Bug in gamma calculation
This commit is contained in:
parent
aa42f7394c
commit
058f5b8f98
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user