summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3/algorithms
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/ipu3/algorithms')
-rw-r--r--src/ipa/ipu3/algorithms/agc.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
index 970ec424..828e822c 100644
--- a/src/ipa/ipu3/algorithms/agc.cpp
+++ b/src/ipa/ipu3/algorithms/agc.cpp
@@ -60,7 +60,13 @@ int Agc::configure(IPAContext &context, const IPAConfigInfo &configInfo)
lineDuration_ = configInfo.sensorInfo.lineLength * 1.0s
/ configInfo.sensorInfo.pixelRate;
- maxExposureTime_ = kMaxExposure * lineDuration_;
+ maxExposureTime_ = context.configuration.agc.maxShutterSpeed;
+
+ /* Configure the default exposure and gain. */
+ context.frameContext.agc.gain =
+ context.configuration.agc.minAnalogueGain;
+ context.frameContext.agc.exposure =
+ context.configuration.agc.minShutterSpeed / lineDuration_;
return 0;
}