summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-01-18 14:42:41 +0100
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-01-29 12:06:25 +0100
commitd0c4a0c25dcc891ee8e6f10d6c5fc0da757ddf10 (patch)
tree3516e33d2a7a798c3bb00230e58d11a2a25c803d /include
parent4e0a6bf1e4e809bed952b908f9d8ae369b9458a6 (diff)
libcamera: imx8-isi: Split Bayer/YUV config generation
At generateConfiguration() a YUV/RGB pixel format is preferred for the StillCapture/VideoRecording/Viewfinder roles, but currently there are no guarantees in place that the sensor provides a non-Bayer bus format from which YUV/RGB can be generated. This makes the default configuration generated for those roles not to work if the sensor is a RAW-only one. To improve the situation split the configuration generation in two, one for YUV modes and one for Raw Bayer mode. StreamRoles assigned to a YUV mode will try to first generate a YUV configuration and then fallback to RAW if that's what the sensor can provide. As an additional requirement, for YUV streams, the generated mode has to be validated with the sensor to confirm the desired sizes can be generated. In order to test a format on the sensor introduce CameraSensor::tryFormat(). Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/camera_sensor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
index b9f4d786..ce3a790f 100644
--- a/include/libcamera/internal/camera_sensor.h
+++ b/include/libcamera/internal/camera_sensor.h
@@ -54,6 +54,7 @@ public:
V4L2SubdeviceFormat getFormat(const std::vector<unsigned int> &mbusCodes,
const Size &size) const;
int setFormat(V4L2SubdeviceFormat *format);
+ int tryFormat(V4L2SubdeviceFormat *format) const;
const ControlInfoMap &controls() const;
ControlList getControls(const std::vector<uint32_t> &ids);