summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/ipu3/cio2.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2022-11-24 10:33:06 +0100
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-01-30 11:04:50 +0100
commit6f6e1bf704feec3a9bcfc1f5490ae82fe8d63065 (patch)
tree1144cde876d28953d34c9973d561b14d1c7e8a90 /src/libcamera/pipeline/ipu3/cio2.h
parent1a614866a29ce1e3c185d72975ad9fc37c4f99bd (diff)
libcamera: camera_sensor: Apply flips at setFormat()
Augment the CameraSensor::setFormat() function to configure horizontal and vertical flips before applying the image format on the sensor. Applying flips before format is crucial as they might change the Bayer pattern ordering. To allow users of the CameraSensor class to specify a Transform, add to the V4L2SubdeviceFormat class a 'transform' member, by default initialized to Transform::Identity. Moving the handling of H/V flips to the CameraSensor class allows to remove quite some boilerplate code from the IPU3 and RaspberryPi pipeline handlers. No functional changes intended. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Diffstat (limited to 'src/libcamera/pipeline/ipu3/cio2.h')
-rw-r--r--src/libcamera/pipeline/ipu3/cio2.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/ipu3/cio2.h b/src/libcamera/pipeline/ipu3/cio2.h
index 68504a2d..bbd87eb8 100644
--- a/src/libcamera/pipeline/ipu3/cio2.h
+++ b/src/libcamera/pipeline/ipu3/cio2.h
@@ -26,6 +26,7 @@ class Request;
class Size;
class SizeRange;
struct StreamConfiguration;
+enum class Transform;
class CIO2Device
{
@@ -38,7 +39,8 @@ public:
std::vector<SizeRange> sizes(const PixelFormat &format) const;
int init(const MediaDevice *media, unsigned int index);
- int configure(const Size &size, V4L2DeviceFormat *outputFormat);
+ int configure(const Size &size, const Transform &transform,
+ V4L2DeviceFormat *outputFormat);
StreamConfiguration generateConfiguration(Size size) const;