Local adjustments "Exposure compensation" final output incorrect, preview OK, fixes #6493

This commit is contained in:
Ingo Weyrich 2022-06-10 18:50:03 +02:00 committed by GitHub
parent 68ec1a5bb5
commit f86a455285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5843,7 +5843,7 @@ float *ImProcFunctions::cos_table(size_t size)
const double pi_size = rtengine::RT_PI / size;
for (size_t i = 0; i < size; i++) {
table[i] = std::cos(pi_size * i);
table[i] = 1.0 - std::cos(pi_size * i);
}
return table;
@ -5889,7 +5889,7 @@ void ImProcFunctions::rex_poisson_dct(float * data, size_t nx, size_t ny, double
#endif
for (size_t i = 0; i < ny; ++i) {
for (size_t j = 0; j < nx; ++j) {
data[i * nx + j] *= m2 / (2.f - cosx[j] - cosy[i]);
data[i * nx + j] *= m2 / (cosx[j] + cosy[i]);
}
}
// handle the first value, data[0, 0] = 0