summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/raspberrypi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/raspberrypi/raspberrypi.cpp')
-rw-r--r--src/ipa/raspberrypi/raspberrypi.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 85aee6f7..ff14cfc4 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -1065,6 +1065,18 @@ void IPARPi::applyFrameDurations(double minFrameDuration, double maxFrameDuratio
libcameraMetadata_.set(controls::FrameDurations,
{ static_cast<int64_t>(minFrameDuration_),
static_cast<int64_t>(maxFrameDuration_) });
+
+ /*
+ * Calculate the maximum exposure time possible for the AGC to use.
+ * GetVBlanking() will update maxShutter with the largest exposure
+ * value possible.
+ */
+ double maxShutter = std::numeric_limits<double>::max();
+ helper_->GetVBlanking(maxShutter, minFrameDuration_, maxFrameDuration_);
+
+ RPiController::AgcAlgorithm *agc = dynamic_cast<RPiController::AgcAlgorithm *>(
+ controller_.GetAlgorithm("agc"));
+ agc->SetMaxShutter(maxShutter);
}
void IPARPi::applyAGC(const struct AgcStatus *agcStatus, ControlList &ctrls)