[libcamera-devel,v2,3/6] libcamera: Add IspCrop control

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

Commit Message

David Plowman Sept. 25, 2020, 8:51 a.m. UTC
The IspCrop control selects how much of the sensor's output image
will be scaled to form the output image. It can be used to implement
digital zoom.

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

Comments

Jacopo Mondi Sept. 28, 2020, 10:22 a.m. UTC | #1
Hi David,

On Fri, Sep 25, 2020 at 09:51:24AM +0100, David Plowman wrote:
> The IspCrop control selects how much of the sensor's output image
> will be scaled to form the output image. It can be used to implement
> digital zoom.
>
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> ---
>  src/libcamera/control_ids.yaml | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> index 3560d4a..a6a73c8 100644
> --- a/src/libcamera/control_ids.yaml
> +++ b/src/libcamera/control_ids.yaml
> @@ -273,4 +273,13 @@ controls:
>          order in an array of 9 floating point values.
>
>        size: [3x3]
> +
> +  - IspCrop:
> +      type: Rectangle
> +      description: |
> +        Sets the portion of the full sensor image, in pixels, that will be
> +        scaled up to form the whole of the final output image. This control

mmm, mentioning "the full sensor image" makes me think this Rectangle
is defined relatively to the pixel array active size (which is to me
the "full sensor image").

> +        can be used to implement digital zoom. The size of the full sensor
> +        image within which an application can crop is available from the
> +        SensorOutputSize property.

What about
           Sets the image portion that will be scaled up to form the
           whole of the final output image. The selection rectangle is
           expressed in pixel units and defined relatively to the size
           of the frame described by the SensorOutputSize property.

           This control can be used to implement digital zoom.

           \sa properties::SensorOutputSize

?

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/control_ids.yaml b/src/libcamera/control_ids.yaml
index 3560d4a..a6a73c8 100644
--- a/src/libcamera/control_ids.yaml
+++ b/src/libcamera/control_ids.yaml
@@ -273,4 +273,13 @@  controls:
         order in an array of 9 floating point values.
 
       size: [3x3]
+
+  - IspCrop:
+      type: Rectangle
+      description: |
+        Sets the portion of the full sensor image, in pixels, that will be
+        scaled up to form the whole of the final output image. This control
+        can be used to implement digital zoom. The size of the full sensor
+        image within which an application can crop is available from the
+        SensorOutputSize property.
 ...