<div dir="ltr"><div dir="ltr">Hi David, <div><br></div><div>Thank you for your patch.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 25 Nov 2020 at 11:36, David Plowman <<a href="mailto:david.plowman@raspberrypi.com">david.plowman@raspberrypi.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When both gain and shutter have been directly specified, do not filter<br>
slowly towards those target values, but adopt them immediately. This<br>
should match user expectations better.<br>
<br>
Signed-off-by: David Plowman <<a href="mailto:david.plowman@raspberrypi.com" target="_blank">david.plowman@raspberrypi.com</a>><br></blockquote><div><br></div><div>Reviewed-by: Naushir Patuck <<a href="mailto:naush@raspberrypi.com">naush@raspberrypi.com</a>></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
---<br>
 src/ipa/raspberrypi/controller/rpi/agc.cpp | 7 ++++++-<br>
 1 file changed, 6 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp<br>
index 4c56bdc9..30a1c1c1 100644<br>
--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp<br>
+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp<br>
@@ -588,7 +588,12 @@ bool Agc::applyDigitalGain(double gain, double target_Y)<br>
<br>
 void Agc::filterExposure(bool desaturate)<br>
 {<br>
-       double speed = frame_count_ <= config_.startup_frames ? 1.0 : config_.speed;<br>
+       double speed = config_.speed;<br>
+       // AGC adapts instantly if both shutter and gain are directly specified<br>
+       // or we're in the startup phase.<br>
+       if ((status_.fixed_shutter && status_.fixed_analogue_gain) ||<br>
+           frame_count_ <= config_.startup_frames)<br>
+               speed = 1.0;<br>
        if (filtered_.total_exposure == 0.0) {<br>
                filtered_.total_exposure = target_.total_exposure;<br>
                filtered_.total_exposure_no_dg = target_.total_exposure_no_dg;<br>
-- <br>
2.20.1<br>
<br>
_______________________________________________<br>
libcamera-devel mailing list<br>
<a href="mailto:libcamera-devel@lists.libcamera.org" target="_blank">libcamera-devel@lists.libcamera.org</a><br>
<a href="https://lists.libcamera.org/listinfo/libcamera-devel" rel="noreferrer" target="_blank">https://lists.libcamera.org/listinfo/libcamera-devel</a><br>
</blockquote></div></div>