[libcamera-devel] [PATCH v2 2/2] src: ipa: raspberrypi: Add digital gain to libcamera metadata

Jacopo Mondi jacopo at jmondi.org
Thu Nov 26 16:32:48 CET 2020


Hi David,

On Thu, Nov 26, 2020 at 02:50:05PM +0000, David Plowman wrote:
> The digital gain reported by the AGC algorithm is reported in the
> metadata that is included in completed requests.
>

I see a potential minor issue here.
Your AGC algortihm seems to limit the valid digital gain values in the
[1.0, 4.0] interval. Currently there's no way to report that to
application as we don't have a:
        const ControlInfoMap &Camera::metadata() const;

as we have a:
        const ControlInfoMap &Camera::controls() const;

Do you think it would be useful ?

> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>

For the patch itself
Reviewed-by: Jacopo Mondi <jacopo at jmondi.org>

Thanks
  j

> ---
>  src/ipa/raspberrypi/raspberrypi.cpp | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
> index 9853a343..631fe7b3 100644
> --- a/src/ipa/raspberrypi/raspberrypi.cpp
> +++ b/src/ipa/raspberrypi/raspberrypi.cpp
> @@ -403,8 +403,10 @@ void IPARPi::reportMetadata()
>  	}
>
>  	AgcStatus *agcStatus = rpiMetadata_.GetLocked<AgcStatus>("agc.status");
> -	if (agcStatus)
> +	if (agcStatus) {
>  		libcameraMetadata_.set(controls::AeLocked, agcStatus->locked);
> +		libcameraMetadata_.set(controls::DigitalGain, agcStatus->digital_gain);
> +	}
>
>  	LuxStatus *luxStatus = rpiMetadata_.GetLocked<LuxStatus>("lux.status");
>  	if (luxStatus)
> --
> 2.20.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list