From 62fab57c3e3e8fb4c6b13a2a9f3e1381a0eb3ee0 Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Fri, 24 Mar 2017 16:08:56 +0300 Subject: [PATCH] Tune OpenVX HAL usability checks to distinguish multiplication and color conversion kernels --- 3rdparty/openvx/hal/openvx_hal.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/3rdparty/openvx/hal/openvx_hal.cpp b/3rdparty/openvx/hal/openvx_hal.cpp index add86c0bde..14889b4ec8 100644 --- a/3rdparty/openvx/hal/openvx_hal.cpp +++ b/3rdparty/openvx/hal/openvx_hal.cpp @@ -84,10 +84,22 @@ inline bool dimTooBig(int size) inline bool skipSmallImages(int w, int h, int kernel_id) { //OpenVX calls have essential overhead so it make sense to skip them for small images - if (w*h < 1920 * 1080) - return true; - else - return false; + switch (kernel_id) + { + case VX_KERNEL_MULTIPLY: + if (w*h < 640 * 480) + return true; + break; + case VX_KERNEL_COLOR_CONVERT: + if (w*h < 2048 * 1536) + return true; + break; + default: + if (w*h < 3840 * 2160) + return true; + break; + } + return false; } inline void setConstantBorder(ivx::border_t &border, vx_uint8 val)