@@ -568,6 +568,8 @@ int AgcAlgorithm::init(const ValueNode &tuningData, CameraSensorHelper *sensor,
if (ret)
return ret;
+ tuning_.hasExposureStages = !agcMLconfig.exposureModeHelpers.empty();
+
fillMissing(agcMLconfig);
impl_.emplace<AgcMeanLuminance>(std::move(agcMLconfig));
@@ -737,6 +739,12 @@ int AgcAlgorithm::configure(agc::Session &session, agc::ActiveState &state,
state.minFrameDuration = std::clamp(
utils::Duration(1.0s / 30),
session.minFrameDuration, session.maxFrameDuration);
+
+ if (!tuning_.hasExposureStages) {
+ state.maxFrameDuration = std::clamp(
+ utils::Duration(1.0s / 15),
+ state.minFrameDuration, session.maxFrameDuration);
+ }
}
/* \todo Move this to the `Camera` class. */
@@ -163,6 +163,10 @@ private:
std::variant<AgcMSV, AgcMeanLuminance> impl_;
CameraSensorHelper *sensor_ = nullptr;
+
+ struct {
+ bool hasExposureStages = false;
+ } tuning_;
};
} /* namespace ipa */
If the tuning file defines no exposure modes, then the "Maximize" mode will be implicitly instantiated and used. But in this case, do not let the camera run slower than 15fps, by default, unless the user explicitly requests it using `FrameDurationLimits`. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> --- src/ipa/libipa/agc.cpp | 8 ++++++++ src/ipa/libipa/agc.h | 4 ++++ 2 files changed, 12 insertions(+)