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>
This commit is contained in:
parent
f2a1817275
commit
65628512df
1 changed files with 1 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue