Merge pull request #7042 from alalek:update_6967

This commit is contained in:
Vadim Pisarevsky 2016-08-08 15:17:48 +00:00
commit a95d63dab6
3 changed files with 6 additions and 3 deletions

View File

@ -5019,7 +5019,7 @@ void cv::sepFilter2D( InputArray _src, OutputArray _dst, int ddepth,
InputArray _kernelX, InputArray _kernelY, Point anchor, InputArray _kernelX, InputArray _kernelY, Point anchor,
double delta, int borderType ) double delta, int borderType )
{ {
CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2, CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2 && (size_t)_src.rows() > _kernelY.total() && (size_t)_src.cols() > _kernelX.total(),
ocl_sepFilter2D(_src, _dst, ddepth, _kernelX, _kernelY, anchor, delta, borderType)) ocl_sepFilter2D(_src, _dst, ddepth, _kernelX, _kernelY, anchor, delta, borderType))
Mat src = _src.getMat(), kernelX = _kernelX.getMat(), kernelY = _kernelY.getMat(); Mat src = _src.getMat(), kernelX = _kernelX.getMat(), kernelY = _kernelY.getMat();

View File

@ -1734,6 +1734,9 @@ static bool ipp_GaussianBlur( InputArray _src, OutputArray _dst, Size ksize,
int borderType ) int borderType )
{ {
#if IPP_VERSION_X100 >= 810 #if IPP_VERSION_X100 >= 810
if ((borderType & BORDER_ISOLATED) == 0 && _src.isSubmatrix())
return false;
int type = _src.type(); int type = _src.type();
Size size = _src.size(); Size size = _src.size();
@ -1850,7 +1853,7 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize,
return; return;
#endif #endif
CV_IPP_RUN(true, ipp_GaussianBlur( _src, _dst, ksize, sigma1, sigma2, borderType)); CV_IPP_RUN(!(ocl::useOpenCL() && _dst.isUMat()), ipp_GaussianBlur( _src, _dst, ksize, sigma1, sigma2, borderType));
Mat kx, ky; Mat kx, ky;
createGaussianKernels(kx, ky, type, ksize, sigma1, sigma2); createGaussianKernels(kx, ky, type, ksize, sigma1, sigma2);

View File

@ -225,7 +225,7 @@ OCL_TEST_P(GaussianBlurTest, Mat)
OCL_OFF(cv::GaussianBlur(src_roi, dst_roi, Size(ksize, ksize), sigma1, sigma2, borderType)); OCL_OFF(cv::GaussianBlur(src_roi, dst_roi, Size(ksize, ksize), sigma1, sigma2, borderType));
OCL_ON(cv::GaussianBlur(usrc_roi, udst_roi, Size(ksize, ksize), sigma1, sigma2, borderType)); OCL_ON(cv::GaussianBlur(usrc_roi, udst_roi, Size(ksize, ksize), sigma1, sigma2, borderType));
Near(CV_MAT_DEPTH(type) >= CV_32F ? 7e-5 : 1, false); Near(CV_MAT_DEPTH(type) >= CV_32F ? 1e-3 : 4, CV_MAT_DEPTH(type) >= CV_32F);
} }
} }