|
|
|
@ -141,12 +141,12 @@ |
|
|
|
|
#define DIG(a) a, |
|
|
|
|
__constant dstT1 mat_kernel[] = { COEFF }; |
|
|
|
|
|
|
|
|
|
#ifndef INTEGER_ARITHMETIC |
|
|
|
|
#define dstT4 float4 |
|
|
|
|
#define convertDstVec convert_float4 |
|
|
|
|
#else |
|
|
|
|
#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE) |
|
|
|
|
#define dstT4 int4 |
|
|
|
|
#define convertDstVec convert_int4 |
|
|
|
|
#else |
|
|
|
|
#define dstT4 float4 |
|
|
|
|
#define convertDstVec convert_float4 |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
__kernel void row_filter_C1_D0(__global const uchar * src, int src_step_in_pixel, int src_offset_x, int src_offset_y, |
|
|
|
@ -263,10 +263,10 @@ __kernel void row_filter_C1_D0(__global const uchar * src, int src_step_in_pixel |
|
|
|
|
{ |
|
|
|
|
temp[0] = vload4(0, (__local uchar*)&LDS_DAT[l_y][l_x] + RADIUSX + offset - i); |
|
|
|
|
temp[1] = vload4(0, (__local uchar*)&LDS_DAT[l_y][l_x] + RADIUSX + offset + i); |
|
|
|
|
#ifndef INTEGER_ARITHMETIC |
|
|
|
|
sum += mad(convertDstVec(temp[0]), mat_kernel[RADIUSX-i], convertDstVec(temp[1]) * mat_kernel[RADIUSX + i]); |
|
|
|
|
#else |
|
|
|
|
#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE) |
|
|
|
|
sum += mad24(convertDstVec(temp[0]), mat_kernel[RADIUSX-i], convertDstVec(temp[1]) * mat_kernel[RADIUSX + i]); |
|
|
|
|
#else |
|
|
|
|
sum += mad(convertDstVec(temp[0]), mat_kernel[RADIUSX-i], convertDstVec(temp[1]) * mat_kernel[RADIUSX + i]); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -368,10 +368,10 @@ __kernel void row_filter(__global const uchar * src, int src_step, int src_offse |
|
|
|
|
{ |
|
|
|
|
temp[0] = LDS_DAT[l_y][l_x + RADIUSX - i]; |
|
|
|
|
temp[1] = LDS_DAT[l_y][l_x + RADIUSX + i]; |
|
|
|
|
#ifndef INTEGER_ARITHMETIC |
|
|
|
|
sum += mad(convertToDstT(temp[0]), mat_kernel[RADIUSX - i], convertToDstT(temp[1]) * mat_kernel[RADIUSX + i]); |
|
|
|
|
#else |
|
|
|
|
#if (defined(INTEGER_ARITHMETIC) && !INTEL_DEVICE) |
|
|
|
|
sum += mad24(convertToDstT(temp[0]), mat_kernel[RADIUSX - i], convertToDstT(temp[1]) * mat_kernel[RADIUSX + i]); |
|
|
|
|
#else |
|
|
|
|
sum += mad(convertToDstT(temp[0]), mat_kernel[RADIUSX - i], convertToDstT(temp[1]) * mat_kernel[RADIUSX + i]); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|