[libcamera-devel,v5,1/5] libcamera: Add ScalerCrop control
diff mbox series

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

Commit Message

David Plowman Oct. 23, 2020, 10:21 a.m. UTC
The ScalerCrop control selects how much of the sensor's output image
will be scaled to form the final output image. It can be used to
implement digital zoom.

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

Comments

Laurent Pinchart Oct. 23, 2020, 10:43 p.m. UTC | #1
Hi David,

Thank you for the patch.

On Fri, Oct 23, 2020 at 11:21:55AM +0100, David Plowman wrote:
> The ScalerCrop control selects how much of the sensor's output image

I'd say "the sensor's active pixel array" here, as that's how it's
defined below.

> will be scaled to form the final output image. It can be used to
> implement digital zoom.
> 
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> ---
>  src/libcamera/control_ids.yaml | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> index 4c415545..1c1f6699 100644
> --- a/src/libcamera/control_ids.yaml
> +++ b/src/libcamera/control_ids.yaml
> @@ -284,4 +284,17 @@ controls:
>          order in an array of 9 floating point values.
>  
>        size: [3x3]
> +
> +  - ScalerCrop:
> +      type: Rectangle
> +      description: |
> +        Sets the image portion that will be scaled to form the whole of
> +        the final output image. The (x,y) location of this rectangle is
> +        relative to the PixelArrayActiveArea that is being used. The units
> +        remain native sensor pixels, even if the sensor is being used in
> +        a binning or skipping mode.
> +
> +        This control is only present when the pipeline supports it. Its

Maybe "when the pipeline supports scaling" ? The fact that a control is
only present when it's supported is a bit of a given :-) Apart from
that,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> +        maximum valid value is given by the properties::ScalerCropMaximum
> +        property, and the two can be used to implement digital zoom.
>  ...

Patch
diff mbox series

diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
index 4c415545..1c1f6699 100644
--- a/src/libcamera/control_ids.yaml
+++ b/src/libcamera/control_ids.yaml
@@ -284,4 +284,17 @@  controls:
         order in an array of 9 floating point values.
 
       size: [3x3]
+
+  - ScalerCrop:
+      type: Rectangle
+      description: |
+        Sets the image portion that will be scaled to form the whole of
+        the final output image. The (x,y) location of this rectangle is
+        relative to the PixelArrayActiveArea that is being used. The units
+        remain native sensor pixels, even if the sensor is being used in
+        a binning or skipping mode.
+
+        This control is only present when the pipeline supports it. Its
+        maximum valid value is given by the properties::ScalerCropMaximum
+        property, and the two can be used to implement digital zoom.
 ...