mirror of
https://github.com/opencv/opencv.git
synced 2025-06-27 23:11:57 +08:00
Tune OpenVX HAL usability checks to distinguish multiplication and color conversion kernels
This commit is contained in:
parent
9620cb550d
commit
62fab57c3e
20
3rdparty/openvx/hal/openvx_hal.cpp
vendored
20
3rdparty/openvx/hal/openvx_hal.cpp
vendored
@ -84,10 +84,22 @@ inline bool dimTooBig(int size)
|
|||||||
inline bool skipSmallImages(int w, int h, int kernel_id)
|
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
|
//OpenVX calls have essential overhead so it make sense to skip them for small images
|
||||||
if (w*h < 1920 * 1080)
|
switch (kernel_id)
|
||||||
return true;
|
{
|
||||||
else
|
case VX_KERNEL_MULTIPLY:
|
||||||
return false;
|
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)
|
inline void setConstantBorder(ivx::border_t &border, vx_uint8 val)
|
||||||
|
Loading…
Reference in New Issue
Block a user