summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/agc.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-16 19:06:01 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-17 16:15:24 +0300
commit14056bceb536e952f745704a4bc3856bad4686ea (patch)
treec4f0029b8b8aad82d4b51b2b615487fe90a3576d /src/ipa/rkisp1/algorithms/agc.cpp
parentb53c6de03fce3b1ca8941292fdefd1f875add537 (diff)
ipa: rkisp1: agc: Rename maxShutterSpeed to maxFrameDuration
The AGC active state and frame context both contain a variable named maxShutterSpeed. The variable is used to limit the maximum shutter speed when computing the exposure time and gains, but stores the maximum frame duration, not clamped by the sensor's maximum shutter speed. Rename it to maxFrameDuration. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/agc.cpp')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index 6a199b47..5b917557 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -182,7 +182,7 @@ int Agc::configure(IPAContext &context, const IPACameraSensorInfo &configInfo)
* except it's computed in the IPA and not here so we'd have to
* recompute it.
*/
- context.activeState.agc.maxShutterSpeed = context.configuration.sensor.maxShutterSpeed;
+ context.activeState.agc.maxFrameDuration = context.configuration.sensor.maxShutterSpeed;
/*
* Define the measurement window for AGC as a centered rectangle
@@ -269,11 +269,11 @@ void Agc::queueRequest(IPAContext &context,
const auto &frameDurationLimits = controls.get(controls::FrameDurationLimits);
if (frameDurationLimits) {
- utils::Duration maxShutterSpeed =
+ utils::Duration maxFrameDuration =
std::chrono::milliseconds((*frameDurationLimits).back());
- agc.maxShutterSpeed = maxShutterSpeed;
+ agc.maxFrameDuration = maxFrameDuration;
}
- frameContext.agc.maxShutterSpeed = agc.maxShutterSpeed;
+ frameContext.agc.maxFrameDuration = agc.maxFrameDuration;
}
/**
@@ -421,7 +421,7 @@ void Agc::process(IPAContext &context, [[maybe_unused]] const uint32_t frame,
expMeans_ = { params->ae.exp_mean, context.hw->numAeCells };
utils::Duration maxShutterSpeed = std::min(context.configuration.sensor.maxShutterSpeed,
- frameContext.agc.maxShutterSpeed);
+ frameContext.agc.maxFrameDuration);
setLimits(context.configuration.sensor.minShutterSpeed,
maxShutterSpeed,
context.configuration.sensor.minAnalogueGain,