From 3e222a54d90e5fa74fe5e83389294cf95d61c7f1 Mon Sep 17 00:00:00 2001 From: dirk Date: Thu, 7 Apr 2016 22:51:52 +0200 Subject: [PATCH] Whitespace cleanup. --- MagickCore/accelerate-private.h | 133 ++++++++++++++++---------------- 1 file changed, 66 insertions(+), 67 deletions(-) diff --git a/MagickCore/accelerate-private.h b/MagickCore/accelerate-private.h index 66fe4ecb2..fa45cbe30 100644 --- a/MagickCore/accelerate-private.h +++ b/MagickCore/accelerate-private.h @@ -2987,78 +2987,77 @@ STRINGIFY( */ STRINGIFY( - __kernel void RotationalBlur(const __global CLPixelType *im, __global CLPixelType *filtered_im, - const float4 bias, - const unsigned int channel, const unsigned int matte, - const float2 blurCenter, - __constant float *cos_theta, __constant float *sin_theta, - const unsigned int cossin_theta_size) - { - const int x = get_global_id(0); - const int y = get_global_id(1); - const int columns = get_global_size(0); - const int rows = get_global_size(1); - unsigned int step = 1; - float center_x = (float) x - blurCenter.x; - float center_y = (float) y - blurCenter.y; - float radius = hypot(center_x, center_y); - - //float blur_radius = hypot((float) columns/2.0f, (float) rows/2.0f); - float blur_radius = hypot(blurCenter.x, blurCenter.y); + __kernel void RotationalBlur(const __global CLPixelType *im, __global CLPixelType *filtered_im, + const float4 bias, + const unsigned int channel, const unsigned int matte, + const float2 blurCenter, + __constant float *cos_theta, __constant float *sin_theta, + const unsigned int cossin_theta_size) + { + const int x = get_global_id(0); + const int y = get_global_id(1); + const int columns = get_global_size(0); + const int rows = get_global_size(1); + unsigned int step = 1; + float center_x = (float) x - blurCenter.x; + float center_y = (float) y - blurCenter.y; + float radius = hypot(center_x, center_y); - if (radius > MagickEpsilon) - { - step = (unsigned int) (blur_radius / radius); - if (step == 0) - step = 1; - if (step >= cossin_theta_size) - step = cossin_theta_size-1; - } + float blur_radius = hypot(blurCenter.x, blurCenter.y); - float4 result; - result.x = (float)bias.x; - result.y = (float)bias.y; - result.z = (float)bias.z; - result.w = (float)bias.w; - float normalize = 0.0f; + if (radius > MagickEpsilon) + { + step = (unsigned int) (blur_radius / radius); + if (step == 0) + step = 1; + if (step >= cossin_theta_size) + step = cossin_theta_size-1; + } - if (((channel & AlphaChannel) == 0) || (matte == 0)) { - for (unsigned int i=0; i