From a9f3acb1252a522d5e2dc66bebf28a17529d1b73 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sat, 11 Jan 2020 18:39:50 +0000 Subject: [PATCH] core(simd): fix NEON alignmnet issue --- modules/core/include/opencv2/core/hal/intrin_neon.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/hal/intrin_neon.hpp b/modules/core/include/opencv2/core/hal/intrin_neon.hpp index 7411b28d0c..559222bb57 100644 --- a/modules/core/include/opencv2/core/hal/intrin_neon.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_neon.hpp @@ -2129,10 +2129,12 @@ inline v_float32x4 v_lut(const float* tab, const int* idx) } inline v_float32x4 v_lut_pairs(const float* tab, const int* idx) { + typedef uint64 CV_DECL_ALIGNED(1) unaligned_uint64; + uint64 CV_DECL_ALIGNED(32) elems[2] = { - *(uint64*)(tab + idx[0]), - *(uint64*)(tab + idx[1]) + *(unaligned_uint64*)(tab + idx[0]), + *(unaligned_uint64*)(tab + idx[1]) }; return v_float32x4(vreinterpretq_f32_u64(vld1q_u64(elems))); }