From 83a66640a7a2cb2ab112c676fb80f655f44123c5 Mon Sep 17 00:00:00 2001 From: Michael Platings Date: Fri, 26 Apr 2024 09:38:57 +0000 Subject: [PATCH] Allow cv_hal_convertTo to be undefined cv_hal_convertTo is proposed to be added to OpenCV but for now is not present. To avoid a compilation error when building with the head of the 4.x branch, don't build kleidicv_convertTo_with_fallback if cv_hal_convertTo is not defined. --- adapters/opencv/kleidicv_hal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adapters/opencv/kleidicv_hal.h b/adapters/opencv/kleidicv_hal.h index a32a0d014..fbf6720c3 100644 --- a/adapters/opencv/kleidicv_hal.h +++ b/adapters/opencv/kleidicv_hal.h @@ -285,6 +285,7 @@ static inline int kleidicv_min_max_idx_with_fallback( #undef cv_hal_minMaxIdx #define cv_hal_minMaxIdx kleidicv_min_max_idx_with_fallback +#if defined(cv_hal_convertTo) static inline int kleidicv_convertTo_with_fallback( const uchar *src_data, size_t src_step, int src_depth, uchar *dst_data, size_t dst_step, int dst_depth, int width, int height, double scale, @@ -295,6 +296,7 @@ static inline int kleidicv_convertTo_with_fallback( } #undef cv_hal_convertTo #define cv_hal_convertTo kleidicv_convertTo_with_fallback +#endif // defined(cv_hal_convertTo) #endif // OPENCV_CORE_HAL_REPLACEMENT_HPP -- GitLab