From 60e94a0d9957a8dd25ed78ae4c16c2918644671f Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Mon, 16 Dec 2024 16:40:59 +0100 Subject: libcamera: camera_sensor: Add parameter to limit returned sensor size The getFormat function takes the aspect ratio and the area of the requested size into account when choosing the best sensor size. In case the sensor is connected to an rkisp1 the maximum supported frame size of the ISP is another constraining factor for the selection of the best format. Add a maxSize parameter to support such a constraint. Signed-off-by: Stefan Klug Signed-off-by: Jacopo Mondi Reviewed-by: Paul Elder Reviewed-by: Jacopo Mondi --- include/libcamera/internal/camera_sensor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h index d030e254..605ea813 100644 --- a/include/libcamera/internal/camera_sensor.h +++ b/include/libcamera/internal/camera_sensor.h @@ -53,7 +53,7 @@ public: virtual V4L2SubdeviceFormat getFormat(const std::vector &mbusCodes, - const Size &size) const = 0; + const Size &size, const Size maxSize = Size()) const = 0; virtual int setFormat(V4L2SubdeviceFormat *format, Transform transform = Transform::Identity) = 0; virtual int tryFormat(V4L2SubdeviceFormat *format) const = 0; -- cgit v1.2.1