Commit 8f8a69d6 authored by yao's avatar yao

fix bug of ocl::canny

parent 778c31a1
......@@ -100,8 +100,6 @@ __kernel
__local int smem[16][18];
if(gidy < rows)
{
smem[lidy][lidx + 1] = src[gidx + gidy * src_step + src_offset];
if(lidx == 0)
{
......@@ -109,6 +107,10 @@ __kernel
smem[lidy][17] = src[min(gidx + 16, cols - 1) + gidy * src_step + src_offset];
}
barrier(CLK_LOCAL_MEM_FENCE);
if(gidy < rows)
{
if(gidx < cols)
{
dx_buf[gidx + gidy * dx_buf_step + dx_buf_offset] =
......@@ -169,8 +171,6 @@ __kernel
__local int sdx[18][16];
__local int sdy[18][16];
if(gidx < cols)
{
sdx[lidy + 1][lidx] = dx_buf[gidx + gidy * dx_buf_step + dx_buf_offset];
sdy[lidy + 1][lidx] = dy_buf[gidx + gidy * dy_buf_step + dy_buf_offset];
if(lidy == 0)
......@@ -183,6 +183,8 @@ __kernel
}
barrier(CLK_LOCAL_MEM_FENCE);
if(gidx < cols)
{
if(gidy < rows)
{
int x = sdx[lidy][lidx] + 2 * sdx[lidy + 1][lidx] + sdx[lidy + 2][lidx];
......
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