diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-11-16 16:29:23 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-11-23 10:29:23 +0200 |
commit | 65628512df0f4bd1e4b2816f080d648fce3e3ab0 (patch) | |
tree | f8133df4ec4f5a3be4f198f965c2c545dffd0472 /src/ipa | |
parent | f2a1817275db8fb77acb5f2771b7577be8642194 (diff) |
ipa: ipu3: agc: Drop kMaxLuminance constant
The kMaxLuminance constant is badly named, it's not a maximum luminance,
but the maximum integer value output by the AWB statistics engine for
per-channel averages. The constant is used in a single place, hardcoding
the value is actually more readable.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa')
-rw-r--r-- | src/ipa/ipu3/algorithms/agc.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp index bd02c474..43a39ffd 100644 --- a/src/ipa/ipu3/algorithms/agc.cpp +++ b/src/ipa/ipu3/algorithms/agc.cpp @@ -61,9 +61,6 @@ static constexpr double kEvGainTarget = 0.5; /* Number of frames to wait before calculating stats on minimum exposure */ static constexpr uint32_t kNumStartupFrames = 10; -/* Maximum luminance used for brightness normalization */ -static constexpr uint32_t kMaxLuminance = 255; - /* * Normalized luma value target. * @@ -298,8 +295,7 @@ double Agc::computeInitialY(IPAFrameContext &frameContext, greenSum * frameContext.awb.gains.green * .587 + blueSum * frameContext.awb.gains.blue * .114; - /* Return the normalized relative luminance. */ - return Y_sum / (grid.height * grid.width) / kMaxLuminance; + return Y_sum / (grid.height * grid.width) / 255; } /** |