diff --git a/adapters/opencv/kleidicv_hal.cpp b/adapters/opencv/kleidicv_hal.cpp index 6b32e31085b9077b23bcccafe6fe1fdbc9df0d4f..113beb6c12bccb4c1bd52f4b03a5efabc848cd64 100644 --- a/adapters/opencv/kleidicv_hal.cpp +++ b/adapters/opencv/kleidicv_hal.cpp @@ -1031,8 +1031,8 @@ int transpose(const uchar *src_data, size_t src_step, uchar *dst_data, static_cast(element_size))); } -int sum(const uchar *src_data, size_t src_step, int src_type, size_t width, - size_t height, double *result) { +int sum(const uchar *src_data, size_t src_step, int src_type, int width, + int height, double *result) { size_t channels = (src_type >> CV_CN_SHIFT) + 1; if (channels != 1) { @@ -1044,7 +1044,8 @@ int sum(const uchar *src_data, size_t src_step, int src_type, size_t width, float result_float = 0; kleidicv_error_t err = kleidicv_sum_f32(reinterpret_cast(src_data), src_step, - width, height, &result_float); + static_cast(width), + static_cast(height), &result_float); *result = result_float; return convert_error(err); } diff --git a/adapters/opencv/kleidicv_hal.h b/adapters/opencv/kleidicv_hal.h index 9245de5c6a1a73abac703e7aec7cb3011f5a407b..0c9cd5e6bab0587d616192cd22c9280df1d726ed 100644 --- a/adapters/opencv/kleidicv_hal.h +++ b/adapters/opencv/kleidicv_hal.h @@ -126,8 +126,8 @@ int pyrdown(const uchar *src_data, size_t src_step, int src_width, int transpose(const uchar *src_data, size_t src_step, uchar *dst_data, size_t dst_step, int src_width, int src_height, int element_size); -int sum(const uchar *src_data, size_t src_step, int src_type, size_t width, - size_t height, double *result); +int sum(const uchar *src_data, size_t src_step, int src_type, int width, + int height, double *result); int rotate(int src_type, const uchar *src_data, size_t src_step, int src_width, int src_height, uchar *dst_data, size_t dst_step, int angle); diff --git a/adapters/opencv/opencv-4.11.patch b/adapters/opencv/opencv-4.11.patch index 2ea21add4090d199e90869c4b5cd908573391066..4eee55ffbba7ac6e612700558b49ada36b424139 100644 --- a/adapters/opencv/opencv-4.11.patch +++ b/adapters/opencv/opencv-4.11.patch @@ -33,7 +33,7 @@ index 2b4035285f..402f2d451a 100644 double scale[] = {alpha, beta}; CV_Assert( func != 0 ); diff --git a/modules/core/src/hal_replacement.hpp b/modules/core/src/hal_replacement.hpp -index 474fe17393..9a43264a4b 100644 +index 474fe17393..985325375c 100644 --- a/modules/core/src/hal_replacement.hpp +++ b/modules/core/src/hal_replacement.hpp @@ -307,9 +307,29 @@ Hamming distance between two vectors @@ -66,18 +66,20 @@ index 474fe17393..9a43264a4b 100644 //! @endcond /** -@@ -1011,6 +1031,38 @@ inline int hal_ni_transpose2d(const uchar* src_data, size_t src_step, uchar* dst +@@ -1011,6 +1031,40 @@ inline int hal_ni_transpose2d(const uchar* src_data, size_t src_step, uchar* dst #define cv_hal_transpose2d hal_ni_transpose2d //! @endcond +/** -+ @brief sum -+ @param src_data,src_step,src_type Source image -+ @param width,height Source image dimensions -+ @param result Pointer to save the sum result to. -+*/ -+inline int hal_ni_sum(const uchar *src_data, size_t src_step, int src_type, size_t width, size_t height, double *result) { return CV_HAL_ERROR_NOT_IMPLEMENTED; } -+ ++ @ brief sum ++ @param src_data Source image data ++ @param src_step Source image step ++ @param src_type Source image type ++ @param width, height Source image dimensions ++ @param result Pointer to save the sum result to. ++ */ ++inline int hal_ni_sum(const uchar *src_data, size_t src_step, int src_type, int width, int height, double *result) ++{ return CV_HAL_ERROR_NOT_IMPLEMENTED; } +//! @cond IGNORED +#define cv_hal_sum hal_ni_sum +//! @endcond