mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 19:50:38 +08:00
fixed gpu::downsample and gpu::blendLinear compite-time bugs under Ubuntu
This commit is contained in:
parent
c6a6d71dae
commit
1a02877ab7
@ -83,19 +83,16 @@ void cv::gpu::blendLinear(const GpuMat& img1, const GpuMat& img2, const GpuMat&
|
||||
{
|
||||
case CV_8U:
|
||||
if (cn != 4)
|
||||
blendLinearCaller(size.height, size.width, cn, (const PtrStep)img1, (const PtrStep)img2,
|
||||
(const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStep)result);
|
||||
blendLinearCaller<uchar>(size.height, size.width, cn, img1, img2, weights1, weights2, result);
|
||||
else
|
||||
blendLinearCaller8UC4(size.height, size.width, (const PtrStep)img1, (const PtrStep)img2,
|
||||
(const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStep)result);
|
||||
blendLinearCaller8UC4(size.height, size.width, img1, img2, weights1, weights2, result);
|
||||
break;
|
||||
case CV_32F:
|
||||
blendLinearCaller(size.height, size.width, cn, (const PtrStepf)img1, (const PtrStepf)img2,
|
||||
(const PtrStepf)weights1, (const PtrStepf)weights2, (PtrStepf)result);
|
||||
blendLinearCaller<float>(size.height, size.width, cn, img1, img2, weights1, weights2, result);
|
||||
break;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "bad image depth in linear blending function");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1374,10 +1374,10 @@ void cv::gpu::downsample(const GpuMat& src, GpuMat& dst, int k)
|
||||
switch (src.depth())
|
||||
{
|
||||
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;
|
||||
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;
|
||||
default:
|
||||
CV_Error(CV_StsUnsupportedFormat, "bad image depth in downsample function");
|
||||
|
Loading…
Reference in New Issue
Block a user