From d9f6a0677398ff9801a78300cfe3e8975c324584 Mon Sep 17 00:00:00 2001 From: matze Date: Sun, 9 Oct 2016 15:37:22 +0200 Subject: [PATCH] Adding check for IPP if UMat and OpenCL is available in Sobel and Scharr. --- modules/imgproc/src/deriv.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/src/deriv.cpp b/modules/imgproc/src/deriv.cpp index 0dce2fd9e7..77ba341309 100644 --- a/modules/imgproc/src/deriv.cpp +++ b/modules/imgproc/src/deriv.cpp @@ -539,7 +539,7 @@ void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, } #endif - CV_IPP_RUN(true, ipp_sobel(_src, _dst, ddepth, dx, dy, ksize, scale, delta, borderType)); + CV_IPP_RUN(!(ocl::useOpenCL() && _dst.isUMat()), ipp_sobel(_src, _dst, ddepth, dx, dy, ksize, scale, delta, borderType)); int ktype = std::max(CV_32F, std::max(ddepth, sdepth)); @@ -578,7 +578,7 @@ void cv::Scharr( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, } #endif - CV_IPP_RUN(true, IPPDerivScharr(_src, _dst, ddepth, dx, dy, scale, delta, borderType)); + CV_IPP_RUN(!(ocl::useOpenCL() && _dst.isUMat()), IPPDerivScharr(_src, _dst, ddepth, dx, dy, scale, delta, borderType)); int ktype = std::max(CV_32F, std::max(ddepth, sdepth));