[libcamera-devel] [PATCH 2/6] libcamera: Initialise the SensorOutputSize property
Jacopo Mondi
jacopo at jmondi.org
Wed Sep 23 11:09:04 CEST 2020
Hi David,
On Tue, Sep 22, 2020 at 11:03:56AM +0100, David Plowman wrote:
> 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 d2679a4..c9a19b0 100644
> --- a/src/libcamera/camera_sensor.cpp
> +++ b/src/libcamera/camera_sensor.cpp
> @@ -277,6 +277,12 @@ int CameraSensor::init()
> */
> resolution_ = sizes_.back();
>
> + /*
> + * Set a default value for the SensorOutputSize, though it will have to
> + * be updated when new camera modes are chosen.
> + */
> + properties_.set(properties::SensorOutputSize, resolution_);
> +
This doesn't actually reflect what's applied to the sensor, but I
guess it does not make much sense to inspect the property before the
Camera has been configured. This should probably be made more explicit
in the property description. Something like:
Maybe change the last two lines of the proposed description in 1/4
- SensorOutputSize:
type: Size
description: |
The size, in pixels, of the image being used to produce the
desired output streams. The image size might correspond to the
size of the frames produced by the image sensor but would also
take into account additional cropping (or even re-scaling)
performed by the CSI-2 receiver to adjust the sensor frame
size to conform to the output image sizes and aspect ratios.
--> Note that this property changes with every newly selected
camera mode. It can be used to implement digital zoom.
With:
The property is meaningful only after the Camera has been
successfully configured and its value changes whenever a new
configuration is applied. It can be used to implement digital
zoom.
\sa controls::ISPCrop
\todo Move this property to CameraConfiguration once the
feature is made available
On this specific patch
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>
Thanks
j
> return 0;
> }
>
> --
> 2.20.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
More information about the libcamera-devel
mailing list