[libcamera-devel] [PATCH] ipa: rpi: agc: Fix bug where AeLocked was never getting set

Naushir Patuck naush at raspberrypi.com
Fri Nov 10 12:04:15 CET 2023


Hi David,

Thank you for this fix.

On Fri, 10 Nov 2023 at 10:45, David Plowman via libcamera-devel
<libcamera-devel at lists.libcamera.org> wrote:
>
> The recent change where time-filtering is done before sorting out the
> digital gain means that the target exposure without digital gain is no
> longer set, breaking the 'AeLocked' calculation.
>
> We can use the regular (full) target exposure instead.
>
> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
> Fixes: 84b6327789fc ("ipa: rpi: agc: Filter exposures before dealing with digital gain")

Reviewed-by: Naushir Patuck <naush at raspberrypi.com>

> ---
>  src/ipa/rpi/controller/rpi/agc_channel.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp
> index 8d374b53..8116c6c1 100644
> --- a/src/ipa/rpi/controller/rpi/agc_channel.cpp
> +++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp
> @@ -977,7 +977,7 @@ void AgcChannel::divideUpExposure()
>  void AgcChannel::writeAndFinish(Metadata *imageMetadata, bool desaturate)
>  {
>         status_.totalExposureValue = filtered_.totalExposure;
> -       status_.targetExposureValue = desaturate ? 0s : target_.totalExposureNoDG;
> +       status_.targetExposureValue = desaturate ? 0s : target_.totalExposure;
>         status_.shutterTime = filtered_.shutter;
>         status_.analogueGain = filtered_.analogueGain;
>         /*
> --
> 2.39.2
>


More information about the libcamera-devel mailing list