ipa: simple: awb: Fix ColourGains reported
The AWB gains reported in the metadata are currently scaled against the
maximum gain, but in fact the gain itself is already stored as a
floating point gain value.
Remove the incorrect scaling and report the gains directly.
Fixes: a0b97475b1 ("ipa: simple: Report the ColourGains in metadata")
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -55,10 +55,9 @@ void Awb::process(IPAContext &context,
|
||||
const SwIspStats::Histogram &histogram = stats->yHistogram;
|
||||
const uint8_t blackLevel = context.activeState.blc.level;
|
||||
|
||||
const float maxGain = 1024.0;
|
||||
const float mdGains[] = {
|
||||
static_cast<float>(frameContext.gains.red / maxGain),
|
||||
static_cast<float>(frameContext.gains.blue / maxGain)
|
||||
static_cast<float>(frameContext.gains.red),
|
||||
static_cast<float>(frameContext.gains.blue)
|
||||
};
|
||||
metadata.set(controls::ColourGains, mdGains);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user