mirror of
https://github.com/opencv/opencv.git
synced 2026-09-11 04:43:22 -05:00
Merge pull request #29800 from amd:opencl_guassianBlur
imgproc: Enable GaussianBlur OpenCL fast paths on non-Intel GPUs.
This commit is contained in:
@@ -946,7 +946,6 @@ bool ocl_sepFilter2D(
|
||||
double delta, int borderType
|
||||
)
|
||||
{
|
||||
const ocl::Device & d = ocl::Device::getDefault();
|
||||
Size imgSize = _src.size();
|
||||
|
||||
int type = _src.type(), sdepth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
|
||||
@@ -1008,8 +1007,7 @@ bool ocl_sepFilter2D(
|
||||
imgSize.width > optimizedSepFilterLocalWidth + anchor.x &&
|
||||
imgSize.height > optimizedSepFilterLocalHeight + anchor.y &&
|
||||
(!(borderType & BORDER_ISOLATED) || _src.offset() == 0) &&
|
||||
anchor == Point(kernelX.cols >> 1, kernelY.cols >> 1) &&
|
||||
OCL_PERFORMANCE_CHECK(d.isIntel()), // TODO FIXIT
|
||||
anchor == Point(kernelX.cols >> 1, kernelY.cols >> 1),
|
||||
ocl_sepFilter2D_SinglePass(
|
||||
_src, _dst, kernelX, kernelY, delta,
|
||||
borderType & ~BORDER_ISOLATED, ddepth,
|
||||
@@ -1052,7 +1050,6 @@ bool ocl_sepFilter2D_BitExact(
|
||||
int shift_bits
|
||||
)
|
||||
{
|
||||
const ocl::Device & d = ocl::Device::getDefault();
|
||||
Size imgSize = _src.size();
|
||||
|
||||
int type = _src.type(), sdepth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
|
||||
@@ -1082,8 +1079,7 @@ bool ocl_sepFilter2D_BitExact(
|
||||
imgSize.width > optimizedSepFilterLocalWidth + anchor.x &&
|
||||
imgSize.height > optimizedSepFilterLocalHeight + anchor.y &&
|
||||
(!(borderType & BORDER_ISOLATED) || _src.offset() == 0) &&
|
||||
anchor == Point(kernelX.cols >> 1, kernelY.cols >> 1) &&
|
||||
OCL_PERFORMANCE_CHECK(d.isIntel()), // TODO FIXIT
|
||||
anchor == Point(kernelX.cols >> 1, kernelY.cols >> 1),
|
||||
ocl_sepFilter2D_SinglePass(
|
||||
_src, _dst, kernelX, kernelY, delta,
|
||||
borderType & ~BORDER_ISOLATED, ddepth, bdepth,
|
||||
|
||||
@@ -318,10 +318,9 @@ Ptr<FilterEngine> createGaussianFilter( int type, Size ksize,
|
||||
static bool ocl_GaussianBlur_8UC1(InputArray _src, OutputArray _dst, Size ksize, int ddepth,
|
||||
InputArray _kernelX, InputArray _kernelY, int borderType)
|
||||
{
|
||||
const ocl::Device & dev = ocl::Device::getDefault();
|
||||
int type = _src.type(), sdepth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
|
||||
|
||||
if ( !(dev.isIntel() && (type == CV_8UC1) &&
|
||||
if ( !(type == CV_8UC1 &&
|
||||
(_src.offset() == 0) && (_src.step() % 4 == 0) &&
|
||||
((ksize.width == 5 && (_src.cols() % 4 == 0)) ||
|
||||
(ksize.width == 3 && (_src.cols() % 16 == 0) && (_src.rows() % 2 == 0)))) )
|
||||
|
||||
Reference in New Issue
Block a user