Commit graph

1526 commits

Author SHA1 Message Date
Laurent Pinchart
67f9605a7f utils: raspberrypi: ctt: Fix pycodestyle E123 and E126
E123 closing bracket does not match indentation of opening bracket's line
E126 continuation line over-indented for hanging indent

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:59:47 +03:00
Laurent Pinchart
ca73168e75 utils: raspberrypi: ctt: Fix pycodestyle E711 and E712
E711 comparison to None should be 'if cond is None:'
E711 comparison to None should be 'if cond is not None:'
E712 comparison to False should be 'if cond is False:' or 'if not cond:'
E712 comparison to True should be 'if cond is True:' or 'if cond:'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:59:07 +03:00
Laurent Pinchart
5f2160cc96 utils: raspberrypi: ctt: Fix pycodestyle E222
E222 multiple spaces after operator

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:59:01 +03:00
Laurent Pinchart
23cb30918c utils: raspberrypi: ctt: Fix pycodestyle E261 and E262
E261 at least two spaces before inline comment
E262 inline comment should start with '# '

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:58:58 +03:00
Laurent Pinchart
23db936a1f utils: raspberrypi: ctt: Fix pycodestyle E303
E303 too many blank lines

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:58:54 +03:00
Laurent Pinchart
e31b104fd1 utils: raspberrypi: ctt: Fix pycodestyle E701
E701 multiple statements on one line (colon)

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:58:37 +03:00
Laurent Pinchart
863e31fa52 utils: raspberrypi: ctt: Fix pycodestyle E228
E228 missing whitespace around modulo operator

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:58:32 +03:00
Laurent Pinchart
641c6ebe9b utils: raspberrypi: ctt: Fix pycodestyle E225
E225 missing whitespace around operator

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:58:22 +03:00
Laurent Pinchart
23f9f46c8a utils: raspberrypi: ctt: Fix pycodestyle E128
E128 continuation line under-indented for visual indent

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:58:12 +03:00
Laurent Pinchart
965cae72a7 utils: raspberrypi: ctt: Fix pycodestyle E251
E251 unexpected spaces around keyword / parameter equals

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:58:07 +03:00
Laurent Pinchart
6eb1bce9c7 utils: raspberrypi: ctt: Fix pycodestyle E211
E211 whitespace before '['

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:57:50 +03:00
Laurent Pinchart
adb5dedb8f utils: raspberrypi: ctt: Fix pycodestyle E241
E241 multiple spaces after ':'
E241 multiple spaces after ','

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:57:48 +03:00
Laurent Pinchart
d6527d382e utils: raspberrypi: ctt: Fix pycodestyle E203
E203 whitespace before ':'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:57:43 +03:00
Laurent Pinchart
da88fcec0d utils: raspberrypi: ctt: Fix pycodestyle E201 and E202
E201 whitespace after '('
E201 whitespace after '{'
E201 whitespace after '['
E202 whitespace before '}'
E202 whitespace before ']'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:57:30 +03:00
Laurent Pinchart
93a133fb17 utils: raspberrypi: ctt: Fix pycodestyle E231
E231 missing whitespace after ','
E231 missing whitespace after ':'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:56:39 +03:00
Laurent Pinchart
7a653369cb licenses: License all meson files under CC0-1.0
In an attempt to clarify the license terms of all files in the libcamera
project, the build system files deserve particular attention. While they
describe how the binaries are created, they are not themselves
transformed into any part of binary distributions of the software, and
thus don't influence the copyright on the binary packages. They are
however subject to copyright, and thus influence the distribution terms
of the source packages.

Most of the meson.build files would not meet the threshold of
originality criteria required for copyright protection. Some of the more
complex meson.build files may be eligible for copyright protection. To
avoid any ambiguity and uncertainty, state our intent to not assert
copyrights on the build system files by putting them in the public
domain with the CC0-1.0 license.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Naushir Patuck <naush@raspberrypi.com>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Show Liu <show.liu@linaro.org>
2020-05-13 16:46:24 +03:00
Laurent Pinchart
cc8215f381 libcamera: proxy: Relicense proxy worker under LGPL
The proxy worker is licensed under the GPL. It is compiled as a binary
separate from libcamera.so, and it is our understanding and intent that
the GPL license doesn't propagate to libcamera.so. However, as the
worker is executed by libcamera.so, the GPL license may cause concerns
in this context, regardless of whether the concerns are valid or not.

This uncertainty could be addressed by a combination of a legal review
and an explicit intent clarification from the copyright holders. A
simpler option is to relicense the code under the LGPL.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Paul Elder <paul.elder@ideasonboard.com>
2020-05-12 22:10:08 +03:00
Laurent Pinchart
49295e549e ipa: Drop v4l2_controls.h from ipa_interface.h
The v4l2_controls.h header is internal, and isn't needed by
ipa_interface.h. It originates from the days when V4L2 controls were
handled through a different API. Drop it.

Fixes: 319d6ae8e3 ("libcamera: controls: Merge ControlInfoMap and V4L2ControlInfoMap")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-05-12 21:43:45 +03:00
Naushir Patuck
4bb5b1f602 libcamera: raspberrypi: Add components to meson build
Add the Raspberry Pi pipeline handler and IPA as targets in the
meson build system.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-11 23:54:48 +03:00
Naushir Patuck
c01cfe14f5 libcamera: utils: Raspberry Pi Camera Tuning Tool
Initial implementation of the Raspberry Pi (BCM2835) Camera Tuning Tool.

All code is licensed under the BSD-2-Clause terms.
Copyright (c) 2019-2020 Raspberry Pi Trading Ltd.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-11 23:54:45 +03:00
Naushir Patuck
0db2c8dc75 libcamera: ipa: Raspberry Pi IPA
Initial implementation of the Raspberry Pi (BCM2835) libcamera IPA and
associated libraries.

All code is licensed under the BSD-2-Clause terms.
Copyright (c) 2019-2020 Raspberry Pi Trading Ltd.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-11 23:54:40 +03:00
Naushir Patuck
740fd1b62f libcamera: pipeline: Raspberry Pi pipeline handler
Initial implementation of the Raspberry Pi (BCM2835) ISP pipeline
handler.

All code is licensed under the BSD-2-Clause terms.
Copyright (c) 2019-2020 Raspberry Pi Trading Ltd.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-05-11 23:54:04 +03:00
Naushir Patuck
43d81d43fe include: uapi: Add header definitions for BCM2835 Unicam and ISP blocks
This commit adds the headers and definitions required for the
bcm2835_isp and bcm2835_unicam kernel modules.

The headers come from patches recently posted to the
linux-media@vger.kernel.org mailing list to add the Unicam and ISP
peripherals drivers to the kernel.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-11 23:53:58 +03:00
Laurent Pinchart
032e0ef6da LICENSES: Add BSD-2-Clause license
In preparation for new code covered by the BSD-2-Clause license, add it
to the LICENSES directory.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-05-11 23:53:54 +03:00
Laurent Pinchart
019a145068 meson: Use files() instead of find_program() for internal scripts
Using find_program() to locate scripts part of the source tree causes
meson to print messages at setup time for each of those scripts:

Program ipa-sign.sh found: YES (/home/user/src/libcamera/src/ipa/ipa-sign.sh)

This pollutes the meson setup log with useless messages, as we know the
scripts are present. Use files() instead to avoid this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-05-11 20:01:30 +03:00
Laurent Pinchart
cfc9e14874 Documentation: coding-style: Fix ordered lists
The syntax used for ordered lists is incorrect. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-11 00:30:14 +03:00
Laurent Pinchart
f13d4b66f2 libcamera: pipeline: simple: Support multiple capture video nodes
The simple pipeline handler rejects devices that have multiple capture
video nodes. There's no real reason to do so, a more dynamic approach is
possible as the pipeline handler already locates the video device by
walking the media graph.

Rework the match sequence by skipping any check on the video nodes, and
create the V4L2VideoDevice for the media entity at the end of the
pipeline when initializing the camera data. The V4L2VideoDevice
instances are managed by the pipeline handler itself, to avoid creating
separate instances in the camera data if multiple sensors are routed to
the same video device.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-10 23:58:54 +03:00
Laurent Pinchart
5c18c41720 libcamera: pipeline: simple: Integrate converter support
Add support for an optional format converter, supported by the
SimpleConverter class. If a converter is available for the pipeline, it
will be used to expose additional pixel formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-10 23:58:50 +03:00
Laurent Pinchart
bfd9185736 libcamera: pipeline: simple: Add simple format converter
The simple format converter supports V4L2 M2M devices that convert pixel
formats.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-10 23:58:44 +03:00
Martijn Braam
a8964c28c8 libcamera: pipeline: Add a simple pipeline handler
This new pipeline handler aims at supporting any simple device without
requiring any device-specific code. Simple devices are currently defined
as a graph made of one or multiple camera sensors and a single video
node, with each sensor connected to the video node through a linear
pipeline.

The simple pipeline handler will automatically parse the media graph,
enumerate sensors, build supported stream configurations, and configure
the pipeline, without any device-specific knowledge. It doesn't support
configuration of any processing in the pipeline at the moment, but may
be extended to support simple processing such as format conversion or
scaling in the future.

The only device-specific information in the pipeline handler is the list
of supported drivers, required for device matching. We may be able to
remove this in the future by matching with the simple pipeline handler
as a last resort option, after all other pipeline handlers have been
tried.

Signed-off-by: Martijn Braam <martijn@brixit.nl>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
2020-05-10 23:58:36 +03:00
Laurent Pinchart
cd6addc31b libcamera: v4l2_videodevice: Support filtering formats by media bus code
Add support for the recent V4L2 extension to VIDIOC_ENUM_FMT that allows
filtering pixel formats by media bus codes.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-10 23:58:34 +03:00
Laurent Pinchart
972bb30c4b include: linux: Extend VIDIOC_ENUM_FMT to support MC-centric devices
This integrates the Linux kernel upstream commits e5b6b07a1b45 ("media:
v4l2: Extend VIDIOC_ENUM_FMT to support MC-centric devices") and
f645e6256bd1 ("media: v4l2-dev/ioctl: Add V4L2_CAP_IO_MC") that are
scheduled for v5.8.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-10 23:58:20 +03:00
Nicolas Dufresne
56ff904915 pkgconfig: Fix include directory path
Should be $includedir/libcamera, as we install into a subdirectory name
'libcamera'. This is fixed by passing the 'subdirs' argument to the pkgconfig
generator.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-10 15:01:54 +03:00
Laurent Pinchart
a5a59b1458 android: hal: License camera3_hal.cpp as LGPL-2.1-or-later
The camera3_hal.cpp is incorrectly licensed as GPL-2.0-or-later, instead
of LGPL-2.1-or-later as the rest of the HAL implementation. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
2020-05-10 15:01:54 +03:00
Laurent Pinchart
3ed0fced1f qcam: dng_writer: Write EXIF IFD as custom directory
The EXIF IFD is incorrectly chained to IFD 0 in addition to being a
referenced as a sub IFD through the EXIFIFD tag. While the libtiff API
doesn't clearly document why this happens, inspection of the
TIFFWriteDirectory() source code show that the function treats the IFD
being written as containing an image, which isn't correct for the EXIF
IFD. Use TIFFWriteCustomDirectory() instead, which fixes the problem.
The resulting DNG file can now be opened with darktable in addition to
rawtherapee.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-05-04 12:56:06 +03:00
Laurent Pinchart
b3987620aa libcamera: camera_sensor: Relax restriction on sizes
The CameraSensor class assumes that camera sensors support the exact
same list of sizes of all media bus codes. While allowing a simpler API,
this assumption is incorrect and is blocking usage of some camera
sensors.

Relaxing the constraint is possible without changes to the CameraSensor
API syntax, but requires changing its semantics. The sizes() function
now returns the list of all sizes for all media bus codes, and the
getFormat() function now searches in all supported media bus codes. The
former is likely not the most useful option for pipeline handlers, but
the sizes() function is currently unused. Designing a better API will
require inspecting current and expected future use cases in pipeline
handlers to determine proper heuristics.

While at it, fix a small typo in an unrelated comment.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 17:49:51 +03:00
Niklas Söderlund
f5698ed541 qcam: dng_writer: Remove colon from \todo
Todo statements should not end with a colon, remove it.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-03 03:35:16 +02:00
Laurent Pinchart
2223579dfe qcam: dng_writer: Generate thumbnail in RGB format
While the DNG specification supports greyscale ("BlackIsZero") for
thumbnails, RawTherapee seems to have trouble reading them. Generate
thumbnails in RGB instead (but still with greyscale content, to avoid
having to interpolate colour components).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 04:32:50 +03:00
Laurent Pinchart
319fc87ef1 qcam: dng_writer: Populate DNG tags from metadata
Populate the DNG black level, ISO speed rating and exposure time from
metadata. The ISO speed rating and exposure time are standardized as
EXIF tags, not TIFF tags, and require a separate EXIF IFD.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 04:32:49 +03:00
Laurent Pinchart
d1561e3c36 qcam: dng_writer: Output thumbnail
Generate a greyscale, 1/16 resolution thumbnail and add it to the DNG
file. This requires shuffling the RAW image generation as the thumbnail
has to be stored in the main IFD as per the DNG and TIFF/EP
specifications.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 04:32:48 +03:00
Laurent Pinchart
b1f9b9a927 qcam: dng_writer: Name arguments to packScanline()
Name arguments to the FormatInfo::packScanline function pointer to make
it easier to understand its usage when reading the function declaration.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 04:32:47 +03:00
Laurent Pinchart
585252eae3 qcam: Pass request metadata to DNG writer
The DNG writer will use the metadata to populate DNG tags.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 04:32:46 +03:00
Laurent Pinchart
3d42c67aab libcamera: camera_sensor: Prepare for multi-subdev camera sensors
While most camera sensors are exposed to userspace as a single subdev,
this is not always the case. A notable exception is the smiapp driver,
which exposes two or three subdevs. The subdev at the output of the
camera sensor will thus have more than one pad. Prepare for this by
removing the single-pad restriction, and locating the source pad
dynamically.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 04:32:32 +03:00
Laurent Pinchart
3697c93a8d libcamera: camera_sensor: Store subdevice in std::unique_ptr
Avoid the need for a manual delete in the destructor by using a unique
pointer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 04:32:30 +03:00
Laurent Pinchart
db7f214547 libcamera: camera_sensor: Access entity directly
The CameraSensor::logPrefix() function accesses the entity from the
subdev. Remove the level of indirection as we stored a pointer to the
entity internally.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-03 04:32:26 +03:00
Niklas Söderlund
a0d8a9ec95 qcam: dng_writer: Fix missing field name
While reformatting the table the field name was missed for one entry,
add it.

Fixes: db7235b714 ("qcam: Add DNGWriter")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-03 00:42:42 +02:00
Niklas Söderlund
b20eb8ffb5 qcam: Add RAW capture support
Add a toolbar button that captures RAW data to disk. The button is only
enabled if the camera is configured to provide a raw stream to the
application.

Only when the capture action is triggered will a request with a raw
buffer be queued to the camera.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-02 14:46:20 +02:00
Niklas Söderlund
db7235b714 qcam: Add DNGWriter
Add an initial DNG file writer. The writer can only deal with a small
set of pixel formats. The generated file is consumable by standard
tools. The writer needs to be extended to write more metadata to the
generated file.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-02 14:46:17 +02:00
Niklas Söderlund
55d5e3e59f qcam: Allow for a second raw stream to be configured
Allow a second stream to be configured for raw capture. This change only
adds support for configuring and allocating buffers for the second
stream. Later changes are needed to queue the allocated buffers to the
camera when the user wishes to capture a raw frame.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-02 14:44:25 +02:00
Jacopo Mondi
5888918153 libcamera: vimc: Adjust crop rectangle
Since the Linux kernel commit:
69e39d40587b ("media: vimc: Implement get/set selection in sink")
the crop rectangle on the VIMC scaler sink pad needs to be
reset to match the requested format to avoid hitting a pipeline format
misconfiguration when the applied format is larger than the one
set in a previous capture session.

As the V4L2 specification is not clear on what the correct behaviour
is, if the crop rectangle should be reset automatically or not on a
set_fmt operation, momentary fix the pipeline handler to please the
driver and manually reset the crop rectangle.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-02 01:35:18 +03:00