From e0c0461787af11c9e82de6f12c2f90cc9ae66032 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 5 Sep 2011 07:59:59 +0000 Subject: [PATCH] optimized gpu::remap (use texture memory) --- modules/gpu/src/cuda/imgproc.cu | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/modules/gpu/src/cuda/imgproc.cu b/modules/gpu/src/cuda/imgproc.cu index 032cffb44..16fbb2b2a 100644 --- a/modules/gpu/src/cuda/imgproc.cu +++ b/modules/gpu/src/cuda/imgproc.cu @@ -77,8 +77,8 @@ namespace cv { namespace gpu { namespace imgproc dim3 grid(divUp(dst.cols, block.x), divUp(dst.rows, block.y)); B brd(src.rows, src.cols, VecTraits::make(borderValue)); - BorderReader< PtrStep_, B > brd_src(src, brd); - Filter< BorderReader< PtrStep_, B > > filter_src(brd_src); + BorderReader< PtrStep_, B > brdSrc(src, brd); + Filter< BorderReader< PtrStep_, B > > filter_src(brdSrc); remap<<>>(filter_src, mapx, mapy, dst); cudaSafeCall( cudaGetLastError() ); @@ -98,6 +98,23 @@ namespace cv { namespace gpu { namespace imgproc return tex2D(tex_remap_ ## type , x, y); \ } \ }; \ + template