[libcamera-devel] [PATCH v2 1/2] libcamera: controls: Add DigitalGain control

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sun Dec 20 03:58:55 CET 2020


Hi David,

Thank you for the patch.

On Thu, Nov 26, 2020 at 02:50:04PM +0000, David Plowman wrote:
> This control reports the global digital gain applied by the pipeline
> as a whole, after capturing a raw image from the sensor.

I believe there's a high chance that we'll end up reworking the
gain-related controls, but that's not a reason to delay merging this
patch given that it's quite clear that more design work will be needed
to design and document the pipeline model (it's quite clear to me at
least, with my limited knowledge on the topic, maybe it would be
straightforward for someone with more experience :-)).

> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
> ---
>  src/libcamera/control_ids.yaml | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> index c8874fa9..75a00f79 100644
> --- a/src/libcamera/control_ids.yaml
> +++ b/src/libcamera/control_ids.yaml
> @@ -530,4 +530,21 @@ controls:
>          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.
> +
> +  - DigitalGain:
> +      type: float
> +      description: |
> +        Digital gain value applied during the processing steps applied
> +        to the image as captured from the sensor.

The double applied sounds strange. Given that we'll rework gain-related
controls anyway there's no need for a v3, so

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

> +
> +        The global digital gain factor is applied to all the colour channels
> +        of the RAW image. Different pipeline models are free to
> +        specify how the global gain factor applies to each separate
> +        channel.
> +
> +        If an imaging pipeline applies digital gain in distinct
> +        processing steps, this value indicates their total sum.
> +        Pipelines are free to decide how to adjust each processing
> +        step to respect the received gain factor and shall report
> +        their total value in the request metadata.
>  ...

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list