1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2026-04-07 12:02:55 +03:00
28 changed files with 2027 additions and 118 deletions
@@ -140,7 +140,7 @@
#endif
#if defined _WIN32 && (defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC)) && (defined(CV_CPU_COMPILE_NEON) || !defined(_MSC_VER))
# include <Intrin.h>
# include <intrin.h>
# include <arm_neon.h>
# define CV_NEON 1
#elif defined(__ARM_NEON)
@@ -233,7 +233,7 @@ struct VZeroUpperGuard {
# define CV_SSE 1
# define CV_SSE2 1
#elif defined _WIN32 && (defined(_M_ARM) || defined(_M_ARM64) || defined(_M_ARM64EC)) && (defined(CV_CPU_COMPILE_NEON) || !defined(_MSC_VER))
# include <Intrin.h>
# include <intrin.h>
# include <arm_neon.h>
# define CV_NEON 1
#elif defined(__ARM_NEON)
@@ -1859,9 +1859,12 @@ inline _Tpwvec v_expand_high(const _Tpvec& a) \
{ return _Tpwvec(__CV_CAT(intrin, _high)(a.val)); } \
inline _Tpwvec v_load_expand(const _Tp* ptr) \
{ \
v128_t a = wasm_v128_load(ptr); \
return _Tpwvec(intrin(a)); \
}
using lane_t = typename _Tpwvec::lane_type; \
alignas(16) lane_t tmp[_Tpwvec::nlanes]; \
for(int i = 0; i < _Tpwvec::nlanes; i++) \
tmp[i] = static_cast<lane_t>(ptr[i]); \
return _Tpwvec(wasm_v128_load(tmp)); \
} \
OPENCV_HAL_IMPL_WASM_EXPAND(v_uint8x16, v_uint16x8, uchar, v128_cvtu8x16_i16x8)
OPENCV_HAL_IMPL_WASM_EXPAND(v_int8x16, v_int16x8, schar, v128_cvti8x16_i16x8)
@@ -1873,9 +1876,12 @@ OPENCV_HAL_IMPL_WASM_EXPAND(v_int32x4, v_int64x2, int, v128_cvti32x4_i64x2)
#define OPENCV_HAL_IMPL_WASM_EXPAND_Q(_Tpvec, _Tp, intrin) \
inline _Tpvec v_load_expand_q(const _Tp* ptr) \
{ \
v128_t a = wasm_v128_load(ptr); \
return _Tpvec(intrin(a)); \
}
using lane_t = typename _Tpvec::lane_type; \
alignas(16) lane_t tmp[_Tpvec::nlanes]; \
for(int i = 0; i < _Tpvec::nlanes; i++) \
tmp[i] = static_cast<lane_t>(ptr[i]); \
return _Tpvec(wasm_v128_load(tmp)); \
} \
OPENCV_HAL_IMPL_WASM_EXPAND_Q(v_uint32x4, uchar, v128_cvtu8x16_i32x4)
OPENCV_HAL_IMPL_WASM_EXPAND_Q(v_int32x4, schar, v128_cvti8x16_i32x4)