fixed gpu::downsample and gpu::blendLinear compite-time bugs under Ubuntu
authorAlexey Spizhevoy <no@email>
Mon, 11 Apr 2011 05:11:23 +0000 (05:11 +0000)
committerAlexey Spizhevoy <no@email>
Mon, 11 Apr 2011 05:11:23 +0000 (05:11 +0000)
modules/gpu/src/blend.cpp
modules/gpu/src/imgproc_gpu.cpp

index c5dfd58..bf56507 100644 (file)
@@ -83,19 +83,16 @@ void cv::gpu::blendLinear(const GpuMat& img1, const GpuMat& img2, const GpuMat&
     {\r
     case CV_8U:\r
         if (cn != 4)\r
-            blendLinearCaller(size.height, size.width, cn, (const PtrStep)img1, (const PtrStep)img2, \r
-                              (const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStep)result);\r
+            blendLinearCaller<uchar>(size.height, size.width, cn, img1, img2, weights1, weights2, result);\r
         else\r
-            blendLinearCaller8UC4(size.height, size.width, (const PtrStep)img1, (const PtrStep)img2, \r
-                                  (const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStep)result);\r
+            blendLinearCaller8UC4(size.height, size.width, img1, img2, weights1, weights2, result);\r
         break;\r
     case CV_32F:\r
-        blendLinearCaller(size.height, size.width, cn, (const PtrStepf)img1, (const PtrStepf)img2, \r
-                          (const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStepf)result);\r
+        blendLinearCaller<float>(size.height, size.width, cn, img1, img2, weights1, weights2, result);\r
         break;\r
     default:\r
         CV_Error(CV_StsUnsupportedFormat, "bad image depth in linear blending function");\r
     }\r
 }\r
 \r
-#endif
\ No newline at end of file
+#endif\r
index 0db8f5a..92a0cbf 100644 (file)
@@ -1374,10 +1374,10 @@ void cv::gpu::downsample(const GpuMat& src, GpuMat& dst, int k)
     switch (src.depth())\r
     {\r
     case CV_8U:\r
-        imgproc::downsampleCaller((const PtrStep)src, dst.rows, dst.cols, k, (PtrStep)dst);\r
+        imgproc::downsampleCaller<uchar>(src, dst.rows, dst.cols, k, dst);\r
         break;\r
     case CV_32F:\r
-        imgproc::downsampleCaller((const PtrStepf)src, dst.rows, dst.cols, k, (PtrStepf)dst);\r
+        imgproc::downsampleCaller<float>(src, dst.rows, dst.cols, k, dst);\r
         break;\r
     default:\r
         CV_Error(CV_StsUnsupportedFormat, "bad image depth in downsample function");\r