diff --git a/3rdparty/openvx/hal/openvx_hal.cpp b/3rdparty/openvx/hal/openvx_hal.cpp index b6ff4ed3b2..8327fc55b2 100644 --- a/3rdparty/openvx/hal/openvx_hal.cpp +++ b/3rdparty/openvx/hal/openvx_hal.cpp @@ -82,7 +82,7 @@ inline bool dimTooBig(int size) } //OpenVX calls have essential overhead so it make sense to skip them for small images -template inline bool skipSmallImages(int w, int h) { return w*h < 3840 * 2160; } +template inline bool skipSmallImages(int w, int h) { return w*h < 7680 * 4320; } template <> inline bool skipSmallImages(int w, int h) { return w*h < 640 * 480; } template <> inline bool skipSmallImages(int w, int h) { return w*h < 2048 * 1536; } @@ -175,7 +175,9 @@ OVX_BINARY_OP(xor, { ivx::IVX_CHECK_STATUS(vxuXor(ctx, ia, ib, ic)); }, VX_KERNE template int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t cstep, int w, int h, double scale) { - if(skipSmallImages(w, h)) + if(scale == 1.0 || sizeof(T) > 1 ? + skipSmallImages(w, h) : /*actually it could be any kernel with generic minimum size*/ + skipSmallImages(w, h) ) return CV_HAL_ERROR_NOT_IMPLEMENTED; if (dimTooBig(w) || dimTooBig(h)) return CV_HAL_ERROR_NOT_IMPLEMENTED; diff --git a/modules/core/include/opencv2/core/openvx/ovx_defs.hpp b/modules/core/include/opencv2/core/openvx/ovx_defs.hpp index 9c23a83df3..09f3faa9f4 100644 --- a/modules/core/include/opencv2/core/openvx/ovx_defs.hpp +++ b/modules/core/include/opencv2/core/openvx/ovx_defs.hpp @@ -26,12 +26,12 @@ namespace ovx{ CV_EXPORTS_W ivx::Context& getOpenVXContext(); template inline bool skipSmallImages(int w, int h) { return w*h < 3840 * 2160; } -template <> inline bool skipSmallImages(int w, int h) { return w*h < 1280*720; } +template <> inline bool skipSmallImages(int w, int h) { return w*h < 3840 * 2160; } template <> inline bool skipSmallImages(int w, int h) { return w*h < 1280 * 720; } template <> inline bool skipSmallImages(int w, int h) { return w*h < 1280 * 720; } -template <> inline bool skipSmallImages(int w, int h) { return w*h < 1280 * 720; } +template <> inline bool skipSmallImages(int w, int h) { return w*h < 1920 * 1080; } template <> inline bool skipSmallImages(int w, int h) { return w*h < 2048 * 1536; } -template <> inline bool skipSmallImages(int w, int h) { return w*h < 640 * 480; } +template <> inline bool skipSmallImages(int w, int h) { return w*h < 1280 * 720; } template <> inline bool skipSmallImages(int w, int h) { return w*h < 1280 * 720; } }}