Removed as_float

From: Alexander Alekhin [mailto:notifications@github.com]
Sent: Monday, April 14, 2014 7:55 AM
To: Itseez/opencv
Cc: Ravunnikutty, Girish
Subject: Re: [opencv] Pullreq/140319 bilateral b (#2612)


In modules/imgproc/src/opencl/bilateral.cl:

> @@ -74,8 +75,8 @@ __kernel void bilateral(__global const uchar * src, int src_step, int src_offset

>          for (int k = 0; k < maxk; k++ )

>          {

>              int_t val = convert_int_t(loadpix(src + src_index + space_ofs[k]));

> -            uint_t diff = abs(val - val0);

> -            float w = space_weight[k] * color_weight[SUM(diff)];

> +            uint diff = (uint)SUM(abs(val - val0));

> +            float w = space_weight[k] * native_exp((float)(diff * diff * as_float(gauss_color_coeff)));

as_float(gauss_color_coeff) is wrong here, because gauss_color_coeff is float constant passed via compiler defines.

—
Reply to this email directly or view it on GitHub<https://github.com/Itseez/opencv/pull/2612/files#r11588081>.