Commit 1a02877a authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

fixed gpu::downsample and gpu::blendLinear compite-time bugs under Ubuntu

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