diff --git a/rtengine/color.h b/rtengine/color.h index 1eb799cda..cc3a1f295 100644 --- a/rtengine/color.h +++ b/rtengine/color.h @@ -954,7 +954,7 @@ public: */ static inline double gamma13_2 (double x) { - return x <= 0.016613 ? x * 2.0 : 1.009968 * exp(log(x) / 1.3) - 0.016613; + return x <= 0.016613 ? x * 2.0 : 1.009968 * exp(log(x) / 1.3) - 0.009968; } static inline double igamma13_2 (double x) @@ -964,7 +964,7 @@ public: static inline double gamma115_2 (double x) { - return x <= 0.001692 ? x * 2.0 : 1.000508 * exp(log(x) / 1.15) - 0.001692; + return x <= 0.001692 ? x * 2.0 : 1.000508 * exp(log(x) / 1.15) - 0.000508; } static inline double igamma115_2 (double x) @@ -974,7 +974,7 @@ public: static inline double gamma145_3 (double x) { - return x <= 0.009115 ? x * 3.0 : 1.012305 * exp(log(x) / 1.45) - 0.009115; + return x <= 0.009115 ? x * 3.0 : 1.012305 * exp(log(x) / 1.45) - 0.012305; } static inline double igamma145_3 (double x) diff --git a/rtengine/rawimagesource.cc b/rtengine/rawimagesource.cc index 3b4eecaf4..ae52227f5 100644 --- a/rtengine/rawimagesource.cc +++ b/rtengine/rawimagesource.cc @@ -1834,7 +1834,7 @@ void RawImageSource::retinexPrepareBuffers(ColorManagementParams cmp, RetinexPar for (int i = 0; i < 65536; i++) { double val = (i) / 65535.; double start = g_a3; - double add = g_a3; + double add = g_a4; double mul = 1. + g_a4; double x; x = Color::gammareti (val, gamm, start, ts, mul , add);