From: dirk Date: Sat, 26 Mar 2016 19:01:01 +0000 (+0100) Subject: Removed ResizeHorizontalFilterSinc and ResizeVerticalFilterSinc kernels. X-Git-Tag: 7.0.1-0~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1022602c912967848f91930b2e3e209df631b84;p=imagemagick Removed ResizeHorizontalFilterSinc and ResizeVerticalFilterSinc kernels. --- diff --git a/MagickCore/accelerate-private.h b/MagickCore/accelerate-private.h index 77e1eacb8..8c4bc033a 100644 --- a/MagickCore/accelerate-private.h +++ b/MagickCore/accelerate-private.h @@ -2848,7 +2848,7 @@ STRINGIFY( /* Call Sinc even for SincFast to get better precision on GPU and to avoid thread divergence. Sinc is pretty fast on GPU anyway...*/ case SincWeightingFunction: - case SincFastWeightingFunction: + case SincFastWeightingFunction: return Sinc(x); case CubicBCWeightingFunction: return CubicBC(x,filterCoefficients); @@ -3083,29 +3083,6 @@ STRINGIFY( ) - - STRINGIFY( - __kernel __attribute__((reqd_work_group_size(256, 1, 1))) - void ResizeHorizontalFilterSinc(const __global CLPixelType* inputImage, const unsigned int inputColumns, const unsigned int inputRows, const unsigned int matte - , const float xFactor, __global CLPixelType* filteredImage, const unsigned int filteredColumns, const unsigned int filteredRows - , const int resizeFilterType, const int resizeWindowType - , const __global float* resizeFilterCubicCoefficients - , const float resizeFilterScale, const float resizeFilterSupport, const float resizeFilterWindowSupport, const float resizeFilterBlur - , __local CLPixelType* inputImageCache, const int numCachedPixels, const unsigned int pixelPerWorkgroup, const unsigned int pixelChunkSize - , __local float4* outputPixelCache, __local float* densityCache, __local float* gammaCache) { - - ResizeHorizontalFilter(inputImage,inputColumns,inputRows,matte - ,xFactor, filteredImage, filteredColumns, filteredRows - ,SincWeightingFunction, SincWeightingFunction - ,resizeFilterCubicCoefficients - ,resizeFilterScale, resizeFilterSupport, resizeFilterWindowSupport, resizeFilterBlur - ,inputImageCache, numCachedPixels, pixelPerWorkgroup, pixelChunkSize - ,outputPixelCache, densityCache, gammaCache); - - } - ) - - STRINGIFY( __kernel __attribute__((reqd_work_group_size(1, 256, 1))) void ResizeVerticalFilter(const __global CLPixelType* inputImage, const unsigned int inputColumns, const unsigned int inputRows, const unsigned int matte @@ -3275,27 +3252,6 @@ STRINGIFY( } ) - - - STRINGIFY( - __kernel __attribute__((reqd_work_group_size(1, 256, 1))) - void ResizeVerticalFilterSinc(const __global CLPixelType* inputImage, const unsigned int inputColumns, const unsigned int inputRows, const unsigned int matte - , const float yFactor, __global CLPixelType* filteredImage, const unsigned int filteredColumns, const unsigned int filteredRows - , const int resizeFilterType, const int resizeWindowType - , const __global float* resizeFilterCubicCoefficients - , const float resizeFilterScale, const float resizeFilterSupport, const float resizeFilterWindowSupport, const float resizeFilterBlur - , __local CLPixelType* inputImageCache, const int numCachedPixels, const unsigned int pixelPerWorkgroup, const unsigned int pixelChunkSize - , __local float4* outputPixelCache, __local float* densityCache, __local float* gammaCache) { - ResizeVerticalFilter(inputImage,inputColumns,inputRows,matte - ,yFactor,filteredImage,filteredColumns,filteredRows - ,SincWeightingFunction, SincWeightingFunction - ,resizeFilterCubicCoefficients - ,resizeFilterScale,resizeFilterSupport,resizeFilterWindowSupport,resizeFilterBlur - ,inputImageCache,numCachedPixels,pixelPerWorkgroup,pixelChunkSize - ,outputPixelCache,densityCache,gammaCache); - } - ) - /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % diff --git a/MagickCore/accelerate.c b/MagickCore/accelerate.c index ac1aba4a5..ae76dae84 100644 --- a/MagickCore/accelerate.c +++ b/MagickCore/accelerate.c @@ -5395,16 +5395,7 @@ RestoreMSCWarning resizeFilterType = (int)GetResizeFilterWeightingType(resizeFilter); resizeWindowType = (int)GetResizeFilterWindowWeightingType(resizeFilter); - - if (resizeFilterType == SincFastWeightingFunction - && resizeWindowType == SincFastWeightingFunction) - { - horizontalKernel = AcquireOpenCLKernel(clEnv, MAGICK_OPENCL_ACCELERATE, "ResizeHorizontalFilterSinc"); - } - else - { - horizontalKernel = AcquireOpenCLKernel(clEnv, MAGICK_OPENCL_ACCELERATE, "ResizeHorizontalFilter"); - } + horizontalKernel = AcquireOpenCLKernel(clEnv, MAGICK_OPENCL_ACCELERATE, "ResizeHorizontalFilter"); if (horizontalKernel == NULL) { (void) OpenCLThrowMagickException(exception, GetMagickModule(), ResourceLimitWarning, "AcquireOpenCLKernel failed.", "'%s'", "."); @@ -5610,12 +5601,7 @@ RestoreMSCWarning resizeFilterType = (int)GetResizeFilterWeightingType(resizeFilter); resizeWindowType = (int)GetResizeFilterWindowWeightingType(resizeFilter); - if (resizeFilterType == SincFastWeightingFunction - && resizeWindowType == SincFastWeightingFunction) - verticalKernel = AcquireOpenCLKernel(clEnv, MAGICK_OPENCL_ACCELERATE, "ResizeVerticalFilterSinc"); - else - verticalKernel = AcquireOpenCLKernel(clEnv, MAGICK_OPENCL_ACCELERATE, "ResizeVerticalFilter"); - + verticalKernel = AcquireOpenCLKernel(clEnv, MAGICK_OPENCL_ACCELERATE, "ResizeVerticalFilter"); if (verticalKernel == NULL) { (void) OpenCLThrowMagickException(exception, GetMagickModule(), ResourceLimitWarning, "AcquireOpenCLKernel failed.", "'%s'", ".");