Commit 91ab92c3 authored by Roman Donchenko's avatar Roman Donchenko Committed by OpenCV Buildbot

Merge pull request #2318 from gongzg:2.4

parents e5567907 9aef26e2
......@@ -66,7 +66,7 @@ __kernel void arithm_pow(__global VT * src, int src_step, int src_offset,
int dst_index = mad24(y, dst_step, x + dst_offset);
VT src_data = src[src_index];
VT tmp = src_data > 0 ? exp(p * log(src_data)) : (src_data == 0 ? 0 : exp(p * log(fabs(src_data))));
VT tmp = src_data > (VT)0 ? (VT)exp(p * log(src_data)) : (src_data == (VT)0 ? (VT)0 : (VT)exp(p * log(fabs(src_data))));
dst[dst_index] = tmp;
}
......
......@@ -83,10 +83,10 @@ __kernel void resizeLN_C1_D0(__global uchar * dst, __global uchar const * restri
int y = floor(sy);
float v = sy - y;
u = x < 0 ? 0 : u;
u = (x >= src_cols) ? 0 : u;
x = x < 0 ? 0 : x;
x = (x >= src_cols) ? src_cols-1 : x;
u = x < (int4)0 ? (float4)0 : u;
u = (x >= (int4)src_cols) ? (float4)0 : u;
x = x < (int4)0 ? (int4)0 : x;
x = (x >= (int4)src_cols) ? (int4)(src_cols-1) : x;
y<0 ? y=0,v=0 : y;
y>=src_rows ? y=src_rows-1,v=0 : y;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment