From 08d527dac65fc432bd05352434fb247c02fa4bed Mon Sep 17 00:00:00 2001 From: dirk Date: Wed, 20 Jul 2016 07:23:42 +0200 Subject: [PATCH] Whitespace. --- MagickCore/accelerate-kernels-private.h | 9 +++++---- MagickCore/accelerate.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/MagickCore/accelerate-kernels-private.h b/MagickCore/accelerate-kernels-private.h index d6a0781d2..a97c75a70 100644 --- a/MagickCore/accelerate-kernels-private.h +++ b/MagickCore/accelerate-kernels-private.h @@ -2511,7 +2511,6 @@ OPENCL_ENDIF() const unsigned int stopStep = MagickMin(startStep+numStepsPerWorkItem, n); unsigned int cacheIndex = start+startStep-cacheRangeStartX; - for (unsigned int i = startStep; i < stopStep; i++, cacheIndex++) { float weight = getResizeFilterWeight(resizeFilterCubicCoefficients, @@ -2520,7 +2519,7 @@ OPENCL_ENDIF() resizeFilterScale, resizeFilterWindowSupport, resizeFilterBlur, scale*(start + i - bisect + 0.5)); - float4 cp = (float4) 0; + float4 cp = (float4)0.0f; __local CLQuantum *p = inputImageCache + (cacheIndex*number_channels); cp.x = (float) *(p); @@ -2585,7 +2584,8 @@ OPENCL_ENDIF() { density = PerceptibleReciprocal(density); filteredPixel *= (float4) density; - gamma *= density; + if (alpha_index != 0) + gamma *= density; } if (alpha_index != 0) @@ -2750,7 +2750,8 @@ OPENCL_ENDIF() { density = PerceptibleReciprocal(density); filteredPixel *= (float4) density; - gamma *= density; + if (alpha_index != 0) + gamma *= density; } if (alpha_index != 0) diff --git a/MagickCore/accelerate.c b/MagickCore/accelerate.c index e07f16d5d..cc91a4fd4 100644 --- a/MagickCore/accelerate.c +++ b/MagickCore/accelerate.c @@ -4460,8 +4460,8 @@ static Image *ComputeResizeImage(const Image* image,MagickCLEnv clEnv, else { length=image->columns*resizedRows*number_channels; - tempImageBuffer=CreateOpenCLBuffer(device,CL_MEM_READ_WRITE, - length*sizeof(CLQuantum),(void *) NULL); + tempImageBuffer=CreateOpenCLBuffer(device,CL_MEM_READ_WRITE,length* + sizeof(CLQuantum),(void *) NULL); if (tempImageBuffer == (cl_mem) NULL) { (void) OpenCLThrowMagickException(device,exception,GetMagickModule(), -- 2.40.0