From 284919ef2e509d8109b84eedcc6d5c2f78cddbef Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 28 Feb 2024 14:40:13 +0200 Subject: libcamera: camera_sensor: Expose the Bayer order Pipeline handlers may need to know the Bayer order produced by the sensor when a Transform is applied (horizontal or vertical flip). This is currently implemented manually in the Raspberry Pi pipeline handler. Move the implementation to the CameraSensor class to make it usable in other pipeline handlers. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally --- include/libcamera/internal/camera_sensor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index 750d6d72..d05f48eb 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -22,12 +22,12 @@ #include +#include "libcamera/internal/bayer_format.h" #include "libcamera/internal/formats.h" #include "libcamera/internal/v4l2_subdevice.h" namespace libcamera { -class BayerFormat; class CameraLens; class MediaEntity; class SensorConfiguration; @@ -69,6 +69,7 @@ public: const ControlList &properties() const { return properties_; } int sensorInfo(IPACameraSensorInfo *info) const; Transform computeTransform(Orientation *orientation) const; + BayerFormat::Order bayerOrder(Transform t) const; const ControlInfoMap &controls() const; ControlList getControls(const std::vector &ids); @@ -114,6 +115,7 @@ private: Rectangle activeArea_; const BayerFormat *bayerFormat_; bool supportFlips_; + bool flipsAlterBayerOrder_; Orientation mountingOrientation_; ControlList properties_; -- cgit v1.2.1