summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-16 00:34:16 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-17 16:15:10 +0300
commit05d0f952a36c40392a9c8ccf86d3567a64ecba32 (patch)
tree3d90f6186ff3711c711d36e5d183720491cfad4c /src
parentde4ed4e966b476dbcfa63bc61028b0fc16ee4a78 (diff)
ipa: rkisp1: agc: Don't update histogram parameters unnecessarily
The ISP histogram parameters depends on the AE metering mode, but not on the other AE algorithm controls. The exposure mode, constraints mode and frame duration limits influence the behaviour of the algorithm, but not the histogram computation parameters. Update the histogram parameters only when AE metering mode changes. 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')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index 9dac60bd..9f3b59b4 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -261,26 +261,21 @@ void Agc::queueRequest(IPAContext &context,
frameContext.agc.meteringMode = agc.meteringMode;
const auto &exposureMode = controls.get(controls::AeExposureMode);
- if (exposureMode) {
- frameContext.agc.update = agc.exposureMode != *exposureMode;
+ if (exposureMode)
agc.exposureMode =
static_cast<controls::AeExposureModeEnum>(*exposureMode);
- }
frameContext.agc.exposureMode = agc.exposureMode;
const auto &constraintMode = controls.get(controls::AeConstraintMode);
- if (constraintMode) {
- frameContext.agc.update = agc.constraintMode != *constraintMode;
+ if (constraintMode)
agc.constraintMode =
static_cast<controls::AeConstraintModeEnum>(*constraintMode);
- }
frameContext.agc.constraintMode = agc.constraintMode;
const auto &frameDurationLimits = controls.get(controls::FrameDurationLimits);
if (frameDurationLimits) {
utils::Duration maxShutterSpeed =
std::chrono::milliseconds((*frameDurationLimits).back());
- frameContext.agc.update = agc.maxShutterSpeed != maxShutterSpeed;
agc.maxShutterSpeed = maxShutterSpeed;
}
frameContext.agc.maxShutterSpeed = agc.maxShutterSpeed;