Shadows/Highlights: Use iterated boxblur for radius > 40 when Sharp mask is disabled, fixes #3730

This commit is contained in:
heckflosse
2017-03-06 16:52:31 +01:00
parent 48946d9d09
commit ff5919be4a

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 {