do not apply "filmlike_clip" in rgbProc when clampOOG is false

This commit is contained in:
Alberto Griggio
2018-12-01 22:30:11 +01:00
parent f38f0b0ef7
commit c75a0d6bd7

View File

@@ -2450,20 +2450,6 @@ void ImProcFunctions::rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer
btemp[ti * TS + tj] = b;
}
}
} else {
for (int i = istart, ti = 0; i < tH; i++, ti++) {
for (int j = jstart, tj = 0; j < tW; j++, tj++) {
// clip out of gamut colors, without distorting colour too bad
float r = std::max(rtemp[ti * TS + tj], 0.f);
float g = std::max(gtemp[ti * TS + tj], 0.f);
float b = std::max(btemp[ti * TS + tj], 0.f);
if (OOG(max(r, g, b)) && !OOG(min(r, g, b))) {
filmlike_clip(&r, &g, &b);
}
setUnlessOOG(rtemp[ti * TS + tj], gtemp[ti * TS + tj], btemp[ti * TS + tj], r, g, b);
}
}
}
if (histToneCurveThr) {