summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2025-03-19 17:01:37 +0100
committerStefan Klug <stefan.klug@ideasonboard.com>2025-03-26 12:31:11 +0100
commit2c66de06a04fe4cf9b2441ae0ac7838922d52251 (patch)
treee78d2a4e6013e0be1ec6caabfcaaa66312dbb890 /src/ipa/rkisp1/algorithms
parent0539e88679df7454d761b607ea82b351e4747a8b (diff)
ipa: rkisp1: agc: Set measurement window to full frame
With the availability of metering modes and the corresponding weights, there is a flexible way of defining the area that gets taken into account when AEGC is calculated. There is no need to reduce that window to an arbitrary region anymore. If need arises we can make this parameter user configurable or add a control for it. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms')
-rw-r--r--src/ipa/rkisp1/algorithms/agc.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
index 101cad5d..b3ac9400 100644
--- a/src/ipa/rkisp1/algorithms/agc.cpp
+++ b/src/ipa/rkisp1/algorithms/agc.cpp
@@ -193,14 +193,10 @@ int Agc::configure(IPAContext &context, const IPACameraSensorInfo &configInfo)
context.activeState.agc.minFrameDuration = std::chrono::microseconds(frameDurationLimits.min().get<int64_t>());
context.activeState.agc.maxFrameDuration = std::chrono::microseconds(frameDurationLimits.max().get<int64_t>());
- /*
- * Define the measurement window for AGC as a centered rectangle
- * covering 3/4 of the image width and height.
- */
- context.configuration.agc.measureWindow.h_offs = configInfo.outputSize.width / 8;
- context.configuration.agc.measureWindow.v_offs = configInfo.outputSize.height / 8;
- context.configuration.agc.measureWindow.h_size = 3 * configInfo.outputSize.width / 4;
- context.configuration.agc.measureWindow.v_size = 3 * configInfo.outputSize.height / 4;
+ context.configuration.agc.measureWindow.h_offs = 0;
+ context.configuration.agc.measureWindow.v_offs = 0;
+ context.configuration.agc.measureWindow.h_size = configInfo.outputSize.width;
+ context.configuration.agc.measureWindow.v_size = configInfo.outputSize.height;
setLimits(context.configuration.sensor.minExposureTime,
context.configuration.sensor.maxExposureTime,