_src.offset() % esz != 0 || _src.step() % esz != 0)
return false;
+ bool haveExtraMat = !_extraMat.empty();
+ CV_Assert(actual_op <= 3 || haveExtraMat);
+
Size ksize = _kernel.size();
if (anchor.x < 0)
anchor.x = ksize.width / 2;
}
char cvt[2][40];
- bool haveExtraMat = !_extraMat.empty();
- CV_Assert(actual_op <= 3 || haveExtraMat);
-
const char * const borderMap[] = { "BORDER_CONSTANT", "BORDER_REPLICATE",
"BORDER_REFLECT", 0, "BORDER_REFLECT_101" };
size_t globalsize[2] = { size.width, size.height };
Mat kernel = _kernel.getMat();
Size ksize = kernel.data ? kernel.size() : Size(3, 3), ssize = _src.size();
+ bool doubleSupport = dev.doubleFPConfig() > 0;
+ if ((depth == CV_64F && !doubleSupport) || borderType != BORDER_CONSTANT)
+ return false;
+
+ bool haveExtraMat = !_extraMat.empty();
+ CV_Assert(actual_op <= 3 || haveExtraMat);
+
// try to use OpenCL kernel adopted for small morph kernel
if (dev.isIntel() && !(dev.type() & ocl::Device::TYPE_CPU) &&
((ksize.width < 5 && ksize.height < 5 && esz <= 4) ||
return true;
}
- bool doubleSupport = dev.doubleFPConfig() > 0;
- if ((depth == CV_64F && !doubleSupport) || borderType != BORDER_CONSTANT)
- return false;
-
- bool haveExtraMat = !_extraMat.empty();
- CV_Assert(actual_op <= 3 || haveExtraMat);
-
if (iterations == 0 || kernel.rows*kernel.cols == 1)
{
_src.copyTo(_dst);