Merge pull request #13056 from terfendail:box_wintr

* Updated boxFilter implementations to use wide universal intrinsics

* boxFilter implementation moved to separate file

* Replaced ROUNDUP macro with roundUp() function
pull/12454/head
Vitaly Tuzov 6 years ago committed by Alexander Alekhin
parent c72b6b3be8
commit e5d7f446d6
  1. 17
      modules/core/include/opencv2/core/utility.hpp
  2. 1804
      modules/imgproc/src/box_filter.cpp
  3. 1634
      modules/imgproc/src/smooth.cpp

@ -517,6 +517,23 @@ static inline size_t divUp(size_t a, unsigned int b)
return (a + b - 1) / b;
}
/** @brief Round first value up to the nearest multiple of second value.
Use this function instead of `ceil((float)a / b) * b` expressions.
@sa divUp
*/
static inline int roundUp(int a, unsigned int b)
{
CV_DbgAssert(a >= 0);
return a + b - 1 - (a + b -1) % b;
}
/** @overload */
static inline size_t roundUp(size_t a, unsigned int b)
{
return a + b - 1 - (a + b - 1) % b;
}
/** @brief Enables or disables the optimized code.
The function can be used to dynamically turn on and off optimized dispatched code (code that uses SSE4.2, AVX/AVX2,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save