Merge pull request #3734 from Beep6581/shartifact

Shadows/Highlights: Use iterated boxblur for radius > 40 when Sharp m…
This commit is contained in:
Ingo Weyrich
2017-03-07 00:10:59 +01:00
committed by GitHub

View File

@@ -85,12 +85,21 @@ void SHMap::update (Imagefloat* img, double radius, double lumi[3], bool hq, int
if (!hq) {
fillLuminance( img, map, lumi);
float *buffer = nullptr;
if(radius > 40.) {
// When we pass another buffer to gaussianBlur, it will use iterated boxblur which is less prone to artifacts
buffer = new float[W * H];
}
#ifdef _OPENMP
#pragma omp parallel
#endif
{
gaussianBlur (map, map, W, H, radius);
gaussianBlur (map, map, W, H, radius, buffer);
}
delete [] buffer;
}
else {