diff --git a/rtengine/gauss.h b/rtengine/gauss.h index 7605b8789..0c16f2a5e 100644 --- a/rtengine/gauss.h +++ b/rtengine/gauss.h @@ -332,10 +332,12 @@ template void gaussHorizontalSse (T** src, T** dst, int W, int H, float template void gaussHorizontal (T** src, T** dst, AlignedBufferMP &buffer, int W, int H, double sigma) { -#ifdef __SSE__ - gaussHorizontalSse (src, dst, W, H, sigma); - return; -#else +#ifdef __SSE__ + if(sigma < 70) { // bigger sigma only with double precision + gaussHorizontalSse (src, dst, W, H, sigma); + return; + } +#endif if (sigma<0.25) { // dont perform filtering if (src!=dst) @@ -411,7 +413,6 @@ template void gaussHorizontal (T** src, T** dst, AlignedBufferMP void gaussVerticalSse (T** src, T** dst, int W, int H, float s template void gaussVertical (T** src, T** dst, AlignedBufferMP &buffer, int W, int H, double sigma) { -#ifdef __SSE__ - gaussVerticalSse (src, dst, W, H, sigma); - return; -#else +#ifdef __SSE__ + if(sigma < 70) { // bigger sigma only with double precision + gaussVerticalSse (src, dst, W, H, sigma); + return; + } +#endif if (sigma<0.25) { // dont perform filtering @@ -642,7 +645,6 @@ template void gaussVertical (T** src, T** dst, AlignedBufferMP buffer.release(pBuf); } -#endif }