|
|
|
@ -82,10 +82,13 @@ inline bool dimTooBig(int size) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//OpenVX calls have essential overhead so it make sense to skip them for small images
|
|
|
|
|
template <int kernel_id> inline bool skipSmallImages(int w, int h) { return w*h < 7680 * 4320; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_MULTIPLY>(int w, int h) { return w*h < 640 * 480; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_COLOR_CONVERT>(int w, int h) { return w*h < 2048 * 1536; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_INTEGRAL_IMAGE>(int w, int h) { return w*h < 640 * 480; } |
|
|
|
|
template <int kernel_id> inline bool skipSmallImages(int w, int h) { return w*h < 7680 * 4320; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_MULTIPLY>(int w, int h) { return w*h < 640 * 480; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_COLOR_CONVERT>(int w, int h) { return w*h < 2048 * 1536; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_INTEGRAL_IMAGE>(int w, int h) { return w*h < 640 * 480; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_WARP_AFFINE>(int w, int h) { return w*h < 1280 * 720; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_WARP_PERSPECTIVE>(int w, int h) { return w*h < 320 * 240; } |
|
|
|
|
template <> inline bool skipSmallImages<VX_KERNEL_CUSTOM_CONVOLUTION>(int w, int h) { return w*h < 320 * 240; } |
|
|
|
|
|
|
|
|
|
inline void setConstantBorder(ivx::border_t &border, vx_uint8 val) |
|
|
|
|
{ |
|
|
|
@ -553,6 +556,7 @@ int ovx_hal_filterInit(cvhalFilter2D **filter_context, uchar *kernel_data, size_ |
|
|
|
|
for (int i = 0; i < kernel_width; ++i) |
|
|
|
|
data.push_back(row[i]); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
return CV_HAL_ERROR_NOT_IMPLEMENTED; |
|
|
|
|
} |
|
|
|
|