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-19 10:44:25 +0100
commit0dcc36e29637762a35c6ca4ca29f93e06dfd3d77 (patch)
treefd8f095efec58b8100c4a9ae4105186bf181eb7a /include
parentd81505b834105ee1c879a962a2911d08b14ad5fd (diff)
libcamera: imx8-isi: Split Bayer/YUV config generationisi/raw_sensor
The ISI can: - produce any processed (YUV/RGB) stream format from a non-Raw media bus format - produce Bayer Raw stream formats from a Bayer RAW media bus format 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 provide a non-Bayer bus format from which YUV/RGB an 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 - 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);