Skip to content

Commit ad9e3b9

Browse files
committed
ipa: rpi: awb: Disable CT search bias for Grey World AWB
If grey world AWB is setup in the tuning file, the CT curve will either be missing or invalid. Disable biasing the statistics for the search in such cases. Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
1 parent 75fe515 commit ad9e3b9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ipa/rpi/controller/rpi/awb.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,13 @@ void Awb::prepareStats()
459459
* LSC has already been applied to the stats in this pipeline, so stop
460460
* any LSC compensation. We also ignore config_.fast in this version.
461461
*/
462+
const double biasCtR = config_.bayes && config_.ctR.size() ?
463+
config_.ctR.eval(config_.biasCT) : 0;
464+
const double biasCtB = config_.bayes && config_.ctB.size() ?
465+
config_.ctB.eval(config_.biasCT) : 0;
462466
generateStats(zones_, statistics_, config_.minPixels,
463467
config_.minG, getGlobalMetadata(),
464-
config_.biasProportion, config_.ctR.eval(config_.biasCT),
465-
config_.ctB.eval(config_.biasCT));
468+
config_.biasProportion, biasCtR, biasCtB);
466469
/*
467470
* apply sensitivities, so values appear to come from our "canonical"
468471
* sensor.

0 commit comments

Comments
 (0)