Added condition to use optimized kernels for images of size that multiple of 4 only

This commit is contained in:
mletavin
2014-06-02 15:58:59 +04:00
parent 68883775fb
commit e224e72bbc

View File

@@ -2025,6 +2025,8 @@ static bool ocl_medianFilter(InputArray _src, OutputArray _dst, int m)
bool useOptimized = (1 == cn) &&
(size_t)imgSize.width >= localsize[0] * 8 &&
(size_t)imgSize.height >= localsize[1] * 8 &&
imgSize.width % 4 == 0 &&
imgSize.height % 4 == 0 &&
(ocl::Device::getDefault().isIntel());
cv::String kname = format( useOptimized ? "medianFilter%d_u" : "medianFilter%d", m) ;