summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3/algorithms/agc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/ipu3/algorithms/agc.cpp')
-rw-r--r--src/ipa/ipu3/algorithms/agc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
index 984aed53..f5bb3328 100644
--- a/src/ipa/ipu3/algorithms/agc.cpp
+++ b/src/ipa/ipu3/algorithms/agc.cpp
@@ -158,17 +158,17 @@ void Agc::lockExposureGain(uint32_t &exposure, double &gain)
utils::Duration newExposure = 0.0s;
if (currentShutter < maxShutterSpeed) {
- exposure = std::clamp<uint32_t>(exposure * currentExposure_ / currentExposureNoDg_,
+ exposure = std::clamp<uint32_t>(exposure * filteredExposure_ / currentExposureNoDg_,
minExposureLines_,
maxExposureLines_);
- newExposure = currentExposure_ / exposure;
- gain = std::clamp(gain * currentExposure_ / newExposure,
+ newExposure = filteredExposure_ / exposure;
+ gain = std::clamp(gain * filteredExposure_ / newExposure,
kMinGain, kMaxGain);
} else {
- gain = std::clamp(gain * currentExposure_ / currentExposureNoDg_,
+ gain = std::clamp(gain * filteredExposure_ / currentExposureNoDg_,
kMinGain, kMaxGain);
- newExposure = currentExposure_ / gain;
- exposure = std::clamp<uint32_t>(exposure * currentExposure_ / newExposure,
+ newExposure = filteredExposure_ / gain;
+ exposure = std::clamp<uint32_t>(exposure * filteredExposure_ / newExposure,
minExposureLines_,
maxExposureLines_);
}