summaryrefslogtreecommitdiff
path: root/src/ipa/rpi/vc4/vc4.cpp
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2023-07-28 14:37:00 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-09-04 17:47:35 +0100
commit250565b5e8848c80443422d9e44c0693aa381c81 (patch)
tree98f218b81bfc3312d0b5a7adfbf69991bbee5d64 /src/ipa/rpi/vc4/vc4.cpp
parent84b6327789fcf5be37a990d5be27f305e8514621 (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/vc4/vc4.cpp')
-rw-r--r--src/ipa/rpi/vc4/vc4.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ipa/rpi/vc4/vc4.cpp b/src/ipa/rpi/vc4/vc4.cpp
index 789a345f..7fd6a88a 100644
--- a/src/ipa/rpi/vc4/vc4.cpp
+++ b/src/ipa/rpi/vc4/vc4.cpp
@@ -60,7 +60,7 @@ private:
bool validateIspControls();
void applyAWB(const struct AwbStatus *awbStatus, ControlList &ctrls);
- void applyDG(const struct AgcStatus *dgStatus, ControlList &ctrls);
+ void applyDG(const struct AgcPrepareStatus *dgStatus, ControlList &ctrls);
void applyCCM(const struct CcmStatus *ccmStatus, ControlList &ctrls);
void applyBlackLevel(const struct BlackLevelStatus *blackLevelStatus, ControlList &ctrls);
void applyGamma(const struct ContrastStatus *contrastStatus, ControlList &ctrls);
@@ -142,7 +142,7 @@ void IpaVc4::platformPrepareIsp([[maybe_unused]] const PrepareParams &params,
if (ccmStatus)
applyCCM(ccmStatus, ctrls);
- AgcStatus *dgStatus = rpiMetadata.getLocked<AgcStatus>("agc.status");
+ AgcPrepareStatus *dgStatus = rpiMetadata.getLocked<AgcPrepareStatus>("agc.prepare_status");
if (dgStatus)
applyDG(dgStatus, ctrls);
@@ -284,7 +284,7 @@ void IpaVc4::applyAWB(const struct AwbStatus *awbStatus, ControlList &ctrls)
static_cast<int32_t>(awbStatus->gainB * 1000));
}
-void IpaVc4::applyDG(const struct AgcStatus *dgStatus, ControlList &ctrls)
+void IpaVc4::applyDG(const struct AgcPrepareStatus *dgStatus, ControlList &ctrls)
{
ctrls.set(V4L2_CID_DIGITAL_GAIN,
static_cast<int32_t>(dgStatus->digitalGain * 1000));