fixed gpu::resize

pull/13383/head
Vladislav Vinogradov 13 years ago
parent f0356004bc
commit 5860477605
  1. 8
      modules/gpu/src/cuda/resize.cu

@ -163,7 +163,9 @@ namespace cv { namespace gpu { namespace device
dim3 grid(divUp(dst.cols, block.x), divUp(dst.rows, block.y)); \
bindTexture(&tex_resize_ ## type , srcWhole); \
tex_resize_ ## type ##_reader texSrc(xoff, yoff); \
Filter< tex_resize_ ## type ##_reader > filter_src(texSrc); \
BrdReplicate< type > brd(src.rows, src.cols); \
BorderReader< tex_resize_ ## type ##_reader , BrdReplicate< type > > brdSrc(texSrc, brd); \
Filter< BorderReader< tex_resize_ ## type ##_reader , BrdReplicate< type > > > filter_src(brdSrc); \
resize<<<grid, block>>>(filter_src, fx, fy, dst); \
cudaSafeCall( cudaGetLastError() ); \
cudaSafeCall( cudaDeviceSynchronize() ); \
@ -177,7 +179,9 @@ namespace cv { namespace gpu { namespace device
dim3 grid(divUp(dst.cols, block.x), divUp(dst.rows, block.y)); \
bindTexture(&tex_resize_ ## type , srcWhole); \
tex_resize_ ## type ##_reader texSrc(xoff, yoff); \
resizeNN<<<grid, block>>>(texSrc, fx, fy, dst); \
BrdReplicate< type > brd(src.rows, src.cols); \
BorderReader< tex_resize_ ## type ##_reader , BrdReplicate< type > > brdSrc(texSrc, brd); \
resizeNN<<<grid, block>>>(brdSrc, fx, fy, dst); \
cudaSafeCall( cudaGetLastError() ); \
cudaSafeCall( cudaDeviceSynchronize() ); \
} \

Loading…
Cancel
Save