From a55bd143344dd4fe9326ca7d9c4ba8c5c665559a Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Thu, 24 Nov 2022 10:10:26 +0100 Subject: libcamera: camera_sensor: Validate Transform The two pipeline handlers that currently support Transform do so by operating H/V flips on the image sensor, instead of rotating on the ISP. As the image sensor performs the actual rotation, centralize the code that validates a requested Transform against the camera sensor rotation and capabilities in the CameraSensor class. The implementation in the IPU3 pipeline handler was copied from the RaspberryPi implementation, and is now centralized in CameraSensor to make it easier for other platforms that do not rotate on the ISP to implement support for Transform using the CameraSensor class. Signed-off-by: Jacopo Mondi --- include/libcamera/internal/camera_sensor.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index 878f3c28..bea52bad 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -29,6 +29,8 @@ class BayerFormat; class CameraLens; class MediaEntity; +enum class Transform; + struct CameraSensorProperties; class CameraSensor : protected Loggable @@ -68,6 +70,8 @@ public: CameraLens *focusLens() { return focusLens_.get(); } + Transform validateTransform(Transform *transform) const; + protected: std::string logPrefix() const override; -- cgit v1.2.1