diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2020-12-01 17:55:32 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-01 20:44:12 +0200 |
commit | 1b5001e92fbe9f4bbbbef89425dfd81a9e080ac9 (patch) | |
tree | e94d2b1cb46a81f0a7d63296a2587a3a8e36106f /src/ipa | |
parent | 02b129dab5c7dc8817b397f01d15fdd553e2aea6 (diff) |
src: ipa: raspberrypi: Avoid AGC filtering when both gain and shutter specified
When both gain and shutter have been directly specified, do not filter
slowly towards those target values, but adopt them immediately. This
should match user expectations better.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa')
-rw-r--r-- | src/ipa/raspberrypi/controller/rpi/agc.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp index 4c56bdc9..30a1c1c1 100644 --- a/src/ipa/raspberrypi/controller/rpi/agc.cpp +++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp @@ -588,7 +588,12 @@ bool Agc::applyDigitalGain(double gain, double target_Y) void Agc::filterExposure(bool desaturate) { - double speed = frame_count_ <= config_.startup_frames ? 1.0 : config_.speed; + double speed = config_.speed; + // AGC adapts instantly if both shutter and gain are directly specified + // or we're in the startup phase. + if ((status_.fixed_shutter && status_.fixed_analogue_gain) || + frame_count_ <= config_.startup_frames) + speed = 1.0; if (filtered_.total_exposure == 0.0) { filtered_.total_exposure = target_.total_exposure; filtered_.total_exposure_no_dg = target_.total_exposure_no_dg; |