diff options
author | David Plowman <david.plowman@raspberrypi.com> | 2023-07-28 14:37:00 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2023-09-04 17:47:35 +0100 |
commit | 250565b5e8848c80443422d9e44c0693aa381c81 (patch) | |
tree | 98f218b81bfc3312d0b5a7adfbf69991bbee5d64 /src/ipa/rpi/common | |
parent | 84b6327789fcf5be37a990d5be27f305e8514621 (diff) |
ipa: rpi: agc: Split AgcStatus into AgcStatus and AgcPrepareStatus
The Agc::process() function returns an AgcStatus object in the
metadata as before, but Agc::prepare() is changed to return the values
it computes in a separate AgcPrepareStatus object (under the new tag
"agc.prepare_status").
The "digitalGain" and "locked" fields are moved from AgcStatus to
AgcPrepareStatus.
This will be useful going forward as we can be more flexible about the
order in which prepare() and process() are called, without them
trampling on each other's results.
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>
Diffstat (limited to 'src/ipa/rpi/common')
-rw-r--r-- | src/ipa/rpi/common/ipa_base.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index b11f10fd..a47ae3a9 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -1216,10 +1216,10 @@ void IpaBase::reportMetadata(unsigned int ipaContext) libcameraMetadata_.set(controls::LensPosition, *deviceStatus->lensPosition); } - AgcStatus *agcStatus = rpiMetadata.getLocked<AgcStatus>("agc.status"); - if (agcStatus) { - libcameraMetadata_.set(controls::AeLocked, agcStatus->locked); - libcameraMetadata_.set(controls::DigitalGain, agcStatus->digitalGain); + AgcPrepareStatus *agcPrepareStatus = rpiMetadata.getLocked<AgcPrepareStatus>("agc.prepare_status"); + if (agcPrepareStatus) { + libcameraMetadata_.set(controls::AeLocked, agcPrepareStatus->locked); + libcameraMetadata_.set(controls::DigitalGain, agcPrepareStatus->digitalGain); } LuxStatus *luxStatus = rpiMetadata.getLocked<LuxStatus>("lux.status"); |