Merge pull request #16325 from alalek:core_simd_neon_fix_alignment_lut

This commit is contained in:
Alexander Alekhin 2020-01-16 15:18:56 +00:00
commit 3e2d8ca0a1

View File

@ -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)));
} }