[libcamera-devel,1/6] libcamera: Add SensorOutputSize property

Message ID 20200922100400.30766-2-david.plowman@raspberrypi.com
State Superseded
Headers show
Series
  • Digital zoom
Related show

Commit Message

David Plowman Sept. 22, 2020, 10:03 a.m. UTC
The SensorOutputSize camera property reports the image size that the
next step in processing after the sensor and CSI-2 receiver - usually
the ISP - will see. It will normally change when a new camera mode is
selected, and can be used to implement digital zoom.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/libcamera/property_ids.yaml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Jacopo Mondi Sept. 23, 2020, 8:18 a.m. UTC | #1
Hi David,

On Tue, Sep 22, 2020 at 11:03:55AM +0100, David Plowman wrote:
> The SensorOutputSize camera property reports the image size that the
> next step in processing after the sensor and CSI-2 receiver - usually
> the ISP - will see. It will normally change when a new camera mode is
> selected, and can be used to implement digital zoom.
>
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> ---
>  src/libcamera/property_ids.yaml | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml
> index 74ad019..c185549 100644
> --- a/src/libcamera/property_ids.yaml
> +++ b/src/libcamera/property_ids.yaml
> @@ -640,4 +640,16 @@ controls:
>          \todo Rename this property to ActiveAreas once we will have property
>                categories (i.e. Properties::PixelArray::ActiveAreas)
>
> +  - 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.
> +

Looks good to me. As we now have ISPCrop I wonder if naming this
ISPInputSize would make it clear that this property reports the size
of the frames after the CSI-2 receiver crop/re-scale and not the size
of the frame transmitted on the bus by the sensor. Am I overthinking
this ? I would also record with a \todo this has to be moved, but this
can be done when applying the patch.

Let's wait for others' opinions, naming apart this is fine!
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

>  ...
> --
> 2.20.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml
index 74ad019..c185549 100644
--- a/src/libcamera/property_ids.yaml
+++ b/src/libcamera/property_ids.yaml
@@ -640,4 +640,16 @@  controls:
         \todo Rename this property to ActiveAreas once we will have property
               categories (i.e. Properties::PixelArray::ActiveAreas)
 
+  - 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.
+
 ...