[libcamera-devel] [PATCH v4 2/5] libcamera: Initialise the ScalerCropMaximum property
David Plowman
david.plowman at raspberrypi.com
Mon Oct 19 14:51:53 CEST 2020
Add a default initialisation according to the sensor resolution,
though it will need updating when the camera mode changes.
Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
---
src/libcamera/camera_sensor.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
index 78c7ceec..ae25c5c6 100644
--- a/src/libcamera/camera_sensor.cpp
+++ b/src/libcamera/camera_sensor.cpp
@@ -279,6 +279,12 @@ int CameraSensor::init()
*/
resolution_ = sizes_.back();
+ /*
+ * Set a default value for the ScalerCropMaximum, though it will have to
+ * be updated when new camera modes are chosen.
+ */
+ properties_.set(properties::ScalerCropMaximum, Rectangle{ 0, 0, resolution_ });
+
return 0;
}
--
2.20.1
More information about the libcamera-devel
mailing list