[libcamera-devel] [PATCH v5 1/5] libcamera: Add ScalerCrop control

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sat Oct 24 00:43:56 CEST 2020


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 at 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 at ideasonboard.com>

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

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list