summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2023-07-28 14:36:58 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-09-04 17:47:35 +0100
commit2ea57d0b7702efb6e290f7ec2ef35b5646f91a6c (patch)
treef4ccc3811579d0529ea102788ffed9a340b568ae
parentad64716ce927e4fcb8882f16dacc4bfcd15a9305 (diff)
ipa: rpi: agc: Fetch AWB status in process method, not prepare
prepare() doesn't use the AWB status, so fetching it in process() is probably better. This change is preparatory to other changes, where we may find ourselves calling process() without having called prepare() previously. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/ipa/rpi/controller/rpi/agc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ipa/rpi/controller/rpi/agc.cpp b/src/ipa/rpi/controller/rpi/agc.cpp
index ae9ff219..e8526355 100644
--- a/src/ipa/rpi/controller/rpi/agc.cpp
+++ b/src/ipa/rpi/controller/rpi/agc.cpp
@@ -424,7 +424,6 @@ void Agc::prepare(Metadata *imageMetadata)
totalExposureValue = delayedStatus.totalExposureValue;
status_.digitalGain = 1.0;
- fetchAwbStatus(imageMetadata); /* always fetch it so that Process knows it's been done */
if (status_.totalExposureValue) {
/* Process has run, so we have meaningful values. */
@@ -461,6 +460,8 @@ void Agc::process(StatisticsPtr &stats, Metadata *imageMetadata)
* configuration, that kind of thing.
*/
housekeepConfig();
+ /* Fetch the AWB status immediately, so that we can assume it's there. */
+ fetchAwbStatus(imageMetadata);
/* Get the current exposure values for the frame that's just arrived. */
fetchCurrentExposure(imageMetadata);
/* Compute the total gain we require relative to the current exposure. */