Skip to content

Commit 62fab57

Browse files
committed
Tune OpenVX HAL usability checks to distinguish multiplication and color conversion kernels
1 parent 9620cb5 commit 62fab57

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

3rdparty/openvx/hal/openvx_hal.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,22 @@ inline bool dimTooBig(int size)
8484
inline bool skipSmallImages(int w, int h, int kernel_id)
8585
{
8686
//OpenVX calls have essential overhead so it make sense to skip them for small images
87-
if (w*h < 1920 * 1080)
88-
return true;
89-
else
90-
return false;
87+
switch (kernel_id)
88+
{
89+
case VX_KERNEL_MULTIPLY:
90+
if (w*h < 640 * 480)
91+
return true;
92+
break;
93+
case VX_KERNEL_COLOR_CONVERT:
94+
if (w*h < 2048 * 1536)
95+
return true;
96+
break;
97+
default:
98+
if (w*h < 3840 * 2160)
99+
return true;
100+
break;
101+
}
102+
return false;
91103
}
92104

93105
inline void setConstantBorder(ivx::border_t &border, vx_uint8 val)

0 commit comments

Comments
 (0)