Merge pull request #16325 from alalek:core_simd_neon_fix_alignment_lut

pull/16372/head
Alexander Alekhin 5 years ago
commit 3e2d8ca0a1
  1. 6
      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) 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 CV_DECL_ALIGNED(32) elems[2] =
{ {
*(uint64*)(tab + idx[0]), *(unaligned_uint64*)(tab + idx[0]),
*(uint64*)(tab + idx[1]) *(unaligned_uint64*)(tab + idx[1])
}; };
return v_float32x4(vreinterpretq_f32_u64(vld1q_u64(elems))); return v_float32x4(vreinterpretq_f32_u64(vld1q_u64(elems)));
} }

Loading…
Cancel
Save