[libcamera-devel,v6,1/6] libcamera: Add ScalerCrop control
diff mbox series

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

Commit Message

David Plowman Oct. 26, 2020, 5:19 p.m. UTC
The ScalerCrop control selects how much of the sensor's active pixel
area 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>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/control_ids.yaml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

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

Thank you for the patch.

On Mon, Oct 26, 2020 at 05:19:03PM +0000, David Plowman wrote:
> The ScalerCrop control selects how much of the sensor's active pixel
> area 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>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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..b4f76570 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

The property is called PixelArrayActiveAreas. I'll fix this when
applying.

> +        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 scaling. Its
> +        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..b4f76570 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 scaling. Its
+        maximum valid value is given by the properties::ScalerCropMaximum
+        property, and the two can be used to implement digital zoom.
 ...