Commit graph

1699 commits

Author SHA1 Message Date
Laurent Pinchart
175cd10611 cam: Add an option to list camera controls
Add a new --list-controls option to print information about all the
controls supported by a camera.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-04-26 21:04:41 +03:00
Laurent Pinchart
36ab14e12d cam: Rename OptProps to OptListProperties
The name OptProps is not very clear, spell it out fully. The command
line options are not changed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-04-26 21:04:41 +03:00
Laurent Pinchart
205f1f1381 libcamera: v4l2_videodevice: Add support for frame start events
Extend the V4L2VideoDevice to support notifying of frame start events.
The events are received from the device through the V4L2 event API, and
passed to users of the class through a signal.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-04-26 21:04:41 +03:00
Jacopo Mondi
43e8c5a93d libcamera: v4l2_device: Update documentation
Compound controls are now supported, but they're still listed as
unsupported in some parts of the V4L2Device class documentation.
Fix this by removing those parts.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-04-26 17:14:04 +02:00
Jacopo Mondi
96653be728 libcamera: geometry: Rename Rectangle fields
The Rectangle class members that represents the rectangle horizontal and
vertical sizes are named 'w' and 'h', in contrast with the Size and
SizeRange classes which use 'width' and 'height', resulting in having to
look at class definition every time to know which names to use.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-04-26 17:12:42 +02:00
Laurent Pinchart
66a1928a0a libcamera: v4l2_videodevice: Rename fdEvent_ to fdBufferNotifier_
To prepare for the addition of a second notifier for V4L2 events, rename
the current fdEvent_ member to fdBufferNotifier_ to better reflect its
usage.

While at it, simplify allocation of the fdEvent_ notifier.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-04-26 15:15:47 +02:00
Laurent Pinchart
058407bb9b libcamera: device_enumerator_udev: Log the right number of missing deps
Since commit e75ef59e02 ("libcamera: device_enumerator_udev: Update
pending list in addUdevDevice") the populateMediaDevice() function
returns 0 on success instead of the number of missing dependencies,
resulting in a wrong number being logged. Fix it.

Fixes: e75ef59e02 ("libcamera: device_enumerator_udev: Update pending list in addUdevDevice")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
2020-04-20 11:58:29 +03:00
Laurent Pinchart
35269f0457 libcamera: v4l2_videodevice: Return correct format for metadata
When setting format on a metadata video device, the returned format
isn't updated with the actual set format due to a typo. Fix it.

Reported-by: Coverity CID=279098
Fixes: 629e9301c5 ("libcamera: v4l2_device: Add META support in g/s_fmt")
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-04-17 16:32:08 +03:00
Laurent Pinchart
8defb069eb libcamera: gen-ipa-pub-key.py: Wrap lines in generated file
To make the output more readable, break the publicKeyData_ array at 8
bytes boundaries.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-04-16 18:01:56 +03:00
Laurent Pinchart
b382f67c83 libcamera: Make IPA module signing mandatory for the meantime
IPA module signing is optional, but when not available due to missing
dependencies, we hit failures due to a non fully implemented IPA
isolation. Make module signing mandatory until isolation is functional.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-04-16 17:37:41 +03:00
Laurent Pinchart
b7c5e0e4f0 libcamera: Make IPA module signing optional
The IPA module signing mechanism relies on openssl to generate keys and
sign the module. If openssl is not found on the system, the build will
fail. Make the dependency optional by detecting openssl, and skip
generation of signatures if openssl isn't found.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-04-16 17:34:08 +03:00
Laurent Pinchart
bac0e7d675 libcamera: v4l2_videodevice: Map V4L2_PIX_FMT_GREY to DRM FourCC
DRM has a format for 8-bit greyscale data, DRM_FORMAT_R8. Despite the
'R' name, which comes from GL/Vulkan to mean single-channel data, the
format maps to greyscale for display. We can thus map it to
V4L2_PIX_FMT_GREY.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-15 01:07:38 +03:00
Laurent Pinchart
aef75c32e0 libcamera: v4l2_videodevice: Downgrade 4CC conversion errors to warnings
Failing to convert between V4L2 and DRM 4CCs indicates something is
likely wrong, but doesn't necessarily prevent the camera from being
usable. It may for instance only limit the number of supported formats.
Downgrade the related log messages from LogError to LogWarning.

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-04-15 01:07:38 +03:00
Laurent Pinchart
ad0e195411 libcamera: v4l2_videodevice: Expose the device capabilities
Add a caps() function that exposes the V4L2 capabilities for the device.
This is useful for generic code that can't hardcode any a priori
knowledge of the device, such as in a simple pipeline handler.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-04-15 01:07:37 +03:00
Laurent Pinchart
49a35da2ce libcamera: v4l2_subdevice: Don't use doxygen \ref needlessly
The doxygen \ref command is used to generate a reference to a function,
while adding parentheses after the function name is enough. Simplify the
documentation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-15 01:07:35 +03:00
Laurent Pinchart
639cc1ad7a libcamera: v4l2_subdevice: Extend [gs]etFormat() to specify format type
The V4L2 subdevice API exposes ACTIVE and TRY formats, but the
V4L2Subdevice getFormat() and setFormat() operations only apply on
ACTIVE formats. Extend them to support TRY formats as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-15 01:07:31 +03:00
Laurent Pinchart
79ce121b6b libcamera: utils: Add string join function
Add a utils::join() function to join elements of a container into a
string, with a separator and an optional conversion function if the
elements are not implicitly convertible to std::string.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-04-15 01:07:24 +03:00
Laurent Pinchart
ebd0cae455 libcamera: ipa: Remove IPAModuleInfo license field
The IPAModuleInfo license field isn't needed anymore now that modules
are cryptographically signed. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:30 +03:00
Laurent Pinchart
eab143ee69 libcamera: ipa_manager: Verify IPA module signature
Decide whether to isolate the IPA module using the module signature
instead of its license.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:29 +03:00
Laurent Pinchart
4b11facde4 libcamera: ipa_manager: Embed IPA module signing public key
In preparation for verifying the signature of IPA modules, generate a
public key from the private signing key and embed it in the IPAManager
class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:28 +03:00
Laurent Pinchart
462d6508a2 libcamera: Add PubKey class
Add a new PubKey class to handle public key signature verification. The
implementation is based on the gnutls library, which is added as an
optional dependency. If gnutls is not found, signature verification will
unconditionally fail.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:24 +03:00
Laurent Pinchart
bf4049fd90 libcamera: ipa_module: Load IPA module signature
Load the signature from the .sign file, if available, when loading the
IPA module information and store it in the IPAModule class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:23 +03:00
Laurent Pinchart
9893ff92c4 libcamera: ipa_module: Use Span class to tie data and size
The IPAModule class passes pointers to data and the corresponding size
as thwo different variables to several functions. Tie them together in a
Span.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:23 +03:00
Laurent Pinchart
836bd5a7a2 libcamera: ipa_module: Simplify error handling in loadIPAModuleInfo()
Use the File helper class to handle cleanup of the mapped file to
simplify error handling in loadIPAModuleInfo().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:21 +03:00
Laurent Pinchart
bc207e808e libcamera: Add File helper class
The File helper class is a RAII wrapper for a file to manage the file
handle and memory-mapped regions.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:15 +03:00
Laurent Pinchart
ec92318891 libcamera: Add IPA module signing infrastructure
Add infrastructure to generate an RSA private key and sign IPA modules.
The signatures are stored in separate files with a .sign suffix.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:09 +03:00
Laurent Pinchart
e62bc9db73 ipa: vimc: Remove isolated VIMC IPA module
The isolated VIMC module isn't used in any test. Remove it to prepare
for the rework of IPA module isolation. The feature can be added back
later alongside corresponding tests if needed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 02:03:06 +03:00
Laurent Pinchart
0219dc71b3 libcamera: ipa_manager: Proxy open-source IPAs to a thread
While closed-source IPA modules will always be sandboxed, open-source
IPA modules may be run in the main libcamera process or be sandboxed,
depending on platform configuration. These two models exhibit very
different timings, which require extensive testing with both
configurations.

When run into the main libcamera process, IPA modules are executed in
the pipeline handler thread (which is currently a global CameraManager
thread). Time-consuming operations in the IPA may thus slow down the
pipeline handler and compromise real-time behaviour. At least some
pipeline handlers will thus likely spawn a thread to isolate the IPA,
leading to code duplication in pipeline handlers.

Solve both issues by always proxying IPA modules. For open-source IPA
modules that run in the libcamera process, a new IPAProxyThread class is
added to run the IPA in a separate thread.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Niklas: Move thread start/stop of thread into start()/stop()]
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-04-14 00:28:28 +02:00
Niklas Söderlund
7b66e5f76d libcamera: pipeline: vimc: Call IPA start() and stop()
Call the IPA start()/stop() functions before/after the camera is
started. This makes sure the IPA functions properly once thread
management is moved into the start/stop interface.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-14 00:28:28 +02:00
Niklas Söderlund
6d7a66dc4e libcamera: pipeline: rkisp1: Call IPA start() and stop()
Call the IPA start()/stop() functions before/after the camera is
started. This makes sure the IPA functions properly once thread
management is moved into the start/stop interface.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-14 00:28:28 +02:00
Niklas Söderlund
871d182cef libcamera: pipeline: rkisp1: Do not try to process cancelled frames
There is no need to try and process cancelled frames, try to finish as
quickly as possible.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-14 00:28:28 +02:00
Niklas Söderlund
e349ec8c66 libcamera: pipeline: rkisp1: Add clear() to RkISP1Frames
When the camera is stopping the helper that keeps track of which buffers
are associated with a request is not cleared. Add a clear operation and
call it when the camera is stopped.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-14 00:28:28 +02:00
Niklas Söderlund
c1f3261679 libcamera: pipeline: rkisp1: Initialize IPA
The IPA init() call is a no-op in the current IPA, but it's part of the
IPA API and it should be called.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-14 00:28:28 +02:00
Niklas Söderlund
e744c9adb0 libcamera: pipeline: rkisp1: Queue parameters even if they are not ready
If the IPA has not filled in the parameters buffer still queue it to
hardware. Not queuing the buffer results in the pipeline and hardware
going out of sync.

This is not a permanent fix of the problem and a todo is added to fix it
properly. This change does not make the situation worse as the state of
the pipeline is just as unknown as if no param buffer is queued as if one
with old content in it.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-14 00:28:28 +02:00
Niklas Söderlund
0e577cee9d ipa: Add start() and stop() operations
Add two new operations to the IPA interface to start and stop it. The
intention is that these functions shall be used by the IPA to perform
actions when the camera is started and stopped.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-14 00:28:28 +02:00
Kaaira Gupta
72278369b3 libcamera: pixelformats: Replace set of modifiers with single value
DRM fourccs look like they have a per-plane modifier, but in fact each
of them should be same. Hence instead of passing a set of modifiers for
each fourcc in PixelFormat class, we can pass just a single modifier.
So, replace the set with a single value.

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Fix compilation error in src/libcamera/pipeline/ipu3/ipu3.cpp]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-04-04 00:39:44 +03:00
Laurent Pinchart
8f8992e4ee libcamera: pipeline: ipu3: Fix compilation on gcc 5 and 6
Commit 5e7c5d64a6 ("libcamera: ipu3: Do not unconditionally queue
buffers to CIO2") introduced usage of the std::queue default constructor
by using copy-list-initialization from {}. The default constructor was
explicit in C++11, which was fixed retroactively with a defect report
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0935r0.html).
gcc 5 and 6 are unfortunately affected, requiring explicit usage of the
constructor.

Fixes: 5e7c5d64a6 ("libcamera: ipu3: Do not unconditionally queue buffers to CIO2")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-03-29 00:02:13 +02:00
Niklas Söderlund
eb4ae9e787 libcamera: ipu3: Add support for a RAW still capture stream
Allow the RAW buffer cycling between CIO2 and IMGU to be memory copied
to a new FrameBuffer in a new RAW stream. This allows users to capture
the raw Bayer format coming from the sensor.

As the RAW frame is memory copied queueing requests with the
StillCaptureRaw stream might impact performance.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-03-27 16:27:28 +01:00
Niklas Söderlund
5e7c5d64a6 libcamera: ipu3: Do not unconditionally queue buffers to CIO2
Instead of unconditionally cycling buffers between the CIO2 and IMGU
pick a buffer when a request is queued to the pipeline. This is needed
if operations are to be applied to the buffer coming from CIO2 with
parameters coming from a Request.

The approach to pick a CIO2 buffer when a request is queued is similar
to other pipelines, where parameters and statistic buffers are picked
this way.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-03-27 16:27:28 +01:00
Niklas Söderlund
125be3436a libcamera: FrameBuffer: Add a setRequest() interface
Add the ability to set the Request a buffer is associated with. This is
needed for buffers that live inside a pipeline handler and is
temporarily associated with a request as it's being processed inside the
pipeline.

While we are at it delete a stray semicolon.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-03-27 16:27:28 +01:00
Niklas Söderlund
417e3143a9 libcamera: FrameBuffer: Add a method to copy buffer content
This method may be used to memory copy a whole FrameBuffer content
from another buffer. The operation is not fast and should not be used
without great care by pipelines.

The intended use-case is to have an option to copy out RAW buffers from
the middle of a pipeline.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-03-27 16:27:28 +01:00
Niklas Söderlund
1d51ba93e9 cam: Add option to capture StillCaptureRaw stream
Add a role name 'stillraw' to request a StillCaptureRaw stream.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-03-27 16:27:28 +01:00
Niklas Söderlund
e9206124cc libcamera: stream: Add StillCaptureRaw role
Add a role for capturing high resolution, low frame rate, still images
in RAW format.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2020-03-27 16:27:28 +01:00
Kaaira Gupta
2fbab8b077 libcamera: v4l2PixelFormat: Replace hex with fourCC
Print fourCC characters instead of the hex value in toString() as they are
more informative. Also, write the tests for this in formats.cpp

Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-03-27 15:17:30 +00:00
Laurent Pinchart
8c8fde05ac qcam: Print whole stream configuration when adjusted
When the validate() function adjusts the stream configuration, we print
the adjusted size for debugging purpose. Switch to printing the whole
configuration, as the pixel format may be useful too.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-03-26 13:37:55 +02:00
Laurent Pinchart
ee7e2c93df libcamera: Make pipeline handlers selectable at compile time
Add a 'pipelines' project option that specifies which pipeline handlers
to compile in. The corresponding IPA modules are automatically selected.
The default is to compile all pipeline handlers.

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-03-25 12:21:13 +02:00
Laurent Pinchart
a25533089b ipa: Move vimc to a subdirectory
Give a subdirectory to all IPA modules to make the structure of the
source tree more consistent. This will also simplify the implementation
of IPA module selection at build time.

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-03-25 12:21:06 +02:00
Laurent Pinchart
5e8933eeeb libcamera: pipeline: Move uvcvideo and vimc to subdirectories
Give a subdirectory to all pipeline handlers to make the structure of
the source tree more consistent. This will also simplify the
implementation of pipeline handlers selection at build time.

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-03-25 12:20:52 +02:00
Laurent Pinchart
e74885c870 qcam: main_window: Prefer stream formats that don't require conversion
Query the viewfinder for the formats it supports natively, and select
one of them for the stream if possible.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-03-24 14:51:09 +02:00
Laurent Pinchart
8bd4f20193 qcam: viewfinder: Report the natively supported pixel formats
Expose the pixel formats natively supported by the viewfinder, to allow
selection of stream formats that would minimize usage of software
conversion.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-03-24 14:49:52 +02:00