summaryrefslogtreecommitdiff
path: root/src/ipa
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2024-09-09 14:22:04 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-09-09 15:13:43 +0100
commit5c5bc85082fce87d66964207f4e0292807f591a3 (patch)
treeb9054d8c708e4f7abf5637d3a59bfe7d8d7e125e /src/ipa
parentf75b8dd26feaca86701704390dea18c71e2f0350 (diff)
ipa: rpi: agc: Ignore stable region when exposure/gain set manually
When a user is taking control of exposure and gain, setting them manually, we set the AGC "stable region" to zero. This means that any user changes, however small, will be applied, and they won't be regarded as "too small to bother with". Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa')
-rw-r--r--src/ipa/rpi/controller/rpi/agc_channel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp
index cf2565a8..c9df9b5b 100644
--- a/src/ipa/rpi/controller/rpi/agc_channel.cpp
+++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp
@@ -883,11 +883,14 @@ void AgcChannel::filterExposure()
/*
* AGC adapts instantly if both shutter and gain are directly specified
- * or we're in the startup phase.
+ * or we're in the startup phase. Also disable the stable region, because we want
+ * to reflect any user exposure/gain updates, however small.
*/
if ((status_.fixedShutter && status_.fixedAnalogueGain) ||
- frameCount_ <= config_.startupFrames)
+ frameCount_ <= config_.startupFrames) {
speed = 1.0;
+ stableRegion = 0.0;
+ }
if (!filtered_.totalExposure) {
filtered_.totalExposure = target_.totalExposure;
} else if (filtered_.totalExposure * (1.0 - stableRegion) < target_.totalExposure &&