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

pull/2794/head
mletavin 11 years ago
parent 68883775fb
commit e224e72bbc
  1. 2
      modules/imgproc/src/smooth.cpp

@ -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) ;

Loading…
Cancel
Save