summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/agc.cpp
diff options
context:
space:
mode:
authorBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-05-21 12:25:32 +0200
committerBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-05-27 09:42:46 +0200
commiteecb270085e6a96ba0c7786410877c732d3381e1 (patch)
treecc2318c8b15ba507a23e9bc59739b61bcb88da97 /src/ipa/rkisp1/algorithms/agc.cpp
parentaca8b701ac5645aaf13e2334c4c9e7610d4128a2 (diff)
treewide: Do not use `*NameValueMap` for known values
When the value is known, do not look it up via the control's `NameValueMap`, instead, just refer to the value directly. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/agc.cpp')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index b3ac9400..137a0750 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -68,10 +68,9 @@ int Agc::parseMeteringModes(IPAContext &context, const YamlObject &tuningData)
if (meteringModes_.empty()) {
LOG(RkISP1Agc, Warning)
<< "No metering modes read from tuning file; defaulting to matrix";
- int32_t meteringModeId = controls::AeMeteringModeNameValueMap.at("MeteringMatrix");
std::vector<uint8_t> weights(context.hw->numHistogramWeights, 1);
- meteringModes_[meteringModeId] = weights;
+ meteringModes_[controls::MeteringMatrix] = weights;
}
std::vector<ControlValue> meteringModes;