Fix rgb64 on aarch64
Instead of quint64 use uint64_t in order to avoid errors like error: invalid conversion from 'quint64* {aka long long unsigned int*}' to 'const uint64_t* {aka const long unsigned int*}' Unify const usage for LOAD and switch to C++ casts. Change-Id: I4a6a8ec5b24f2f306645178fe00f6bfb1c429403 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This commit is contained in:
parent
ac8a1787eb
commit
59956ec905
@ -88,17 +88,17 @@ QT_BEGIN_NAMESPACE
|
||||
}
|
||||
|
||||
#if defined __SSE2__
|
||||
# define LOAD(ptr) _mm_loadl_epi64((__m128i*)(ptr))
|
||||
# define LOAD(ptr) _mm_loadl_epi64(reinterpret_cast<const __m128i *>(ptr))
|
||||
# define CONVERT(value) _mm_shufflelo_epi16(_mm_cvtsi32_si128(value), _MM_SHUFFLE(0, 0, 0, 0))
|
||||
# define STORE(ptr, value) _mm_storel_epi64((__m128i*)(ptr), value)
|
||||
# define STORE(ptr, value) _mm_storel_epi64(reinterpret_cast<__m128i *>(ptr), value)
|
||||
# define ADD(p, q) _mm_add_epi32(p, q)
|
||||
# define ALPHA(c) _mm_shufflelo_epi16(c, _MM_SHUFFLE(3, 3, 3, 3))
|
||||
# define CONST(n) CONVERT(n)
|
||||
# define INVALPHA(c) _mm_sub_epi32(CONST(65535), ALPHA(c))
|
||||
#elif defined __ARM_NEON__
|
||||
# define LOAD(ptr) vreinterpret_u16_u64(vld1_u64((quint64*)(ptr)))
|
||||
# define LOAD(ptr) vreinterpret_u16_u64(vld1_u64(reinterpret_cast<const uint64_t *>(ptr)))
|
||||
# define CONVERT(value) vreinterpret_u16_u64(vmov_n_u64(value))
|
||||
# define STORE(ptr, value) vst1_u64((quint64*)(ptr), vreinterpret_u64_u16(value))
|
||||
# define STORE(ptr, value) vst1_u64(reinterpret_cast<uint64_t *>(ptr), vreinterpret_u64_u16(value))
|
||||
# define ADD(p, q) vadd_u16(p, q)
|
||||
# define ALPHA(c) vdup_lane_u16(c, 3)
|
||||
# define CONST(n) vdup_n_u16(n)
|
||||
|
Loading…
Reference in New Issue
Block a user