Fix inaccurate RGB grey WB preview after using ITC

The RGB grey automatic white balance algorithm caches the multipliers.
Temperature correlation automatic white balance also caches results to
the same location, but never uses it. This causes the RGB grey method to
produce incorrect results in the editor. Removing the temperature
correlation cache fixes the issue and does not have side-effects.
This commit is contained in:
Lawrence Lee 2024-01-28 18:00:07 -08:00
parent f4dc5685f7
commit 05acfd510e
No known key found for this signature in database
GPG Key ID: 048FF2B76A63895F
1 changed files with 1 additions and 6 deletions

View File

@ -7691,12 +7691,7 @@ void RawImageSource::getAutoWBMultipliersitc(bool extra, double & tempref, doubl
printf("RGB grey AVG: %g %g %g\n", avg_r / std::max(1, rn), avg_g / std::max(1, gn), avg_b / std::max(1, bn));
}
if (wbpar.method == "autitcgreen") {
//not used
redAWBMul = rm = avg_rm * refwb_red;
greenAWBMul = gm = avg_gm * refwb_green;
blueAWBMul = bm = avg_bm * refwb_blue;
} else {
if (wbpar.method != "autitcgreen") {
const double reds = avg_r / std::max(1, rn) * refwb_red;
const double greens = avg_g / std::max(1, gn) * refwb_green;
const double blues = avg_b / std::max(1, bn) * refwb_blue;