]> granicus.if.org Git - imagemagick/commitdiff
Removed ResizeHorizontalFilterSinc and ResizeVerticalFilterSinc kernels.
authordirk <dirk@git.imagemagick.org>
Sat, 26 Mar 2016 19:01:01 +0000 (20:01 +0100)
committerdirk <dirk@git.imagemagick.org>
Sat, 26 Mar 2016 19:01:01 +0000 (20:01 +0100)
MagickCore/accelerate-private.h
MagickCore/accelerate.c

index 77e1eacb8f58d39e27b4088f25c0eac63e257e9a..8c4bc033abf64ac51cd1db1e61c4ac0bf61d468a 100644 (file)
@@ -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);
-  }
-  )
-
 /*
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %                                                                             %
index ac1aba4a56675f2b58054f51ee01a4b453b0c76e..ae76dae84df7e2ddd911600c3c1936a9e0389b2f 100644 (file)
@@ -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'", ".");