Colorspace Handler: Fix compiling for strict NEON.

- We could always use -flax-vector-conversions, but let's try to stay disciplined for now.
This commit is contained in:
rogerman 2024-08-08 12:11:20 -07:00
parent 176e38ce2f
commit b799d94762
1 changed files with 4 additions and 4 deletions

View File

@ -168,15 +168,15 @@ FORCEINLINE void ColorspaceConvert555xTo6665Opaque_NEON(const v128u16 &srcColor,
template <bool SWAP_RB> template <bool SWAP_RB>
FORCEINLINE void ColorspaceConvert5551To8888_NEON(const v128u16 &srcColor, v128u32 &dstLo, v128u32 &dstHi) FORCEINLINE void ColorspaceConvert5551To8888_NEON(const v128u16 &srcColor, v128u32 &dstLo, v128u32 &dstHi)
{ {
const v128s16 srcAlphaBits16 = vandq_s16( vcgtq_s16(vdupq_n_s16(0), vreinterpretq_u16_s16(srcColor)), vdupq_n_s16(0xFF00) ); const v128u16 srcAlphaBits16 = vandq_u16( vcgtq_s16(vdupq_n_s16(0), vreinterpretq_s16_u16(srcColor)), vdupq_n_u16(0xFF00) );
ColorspaceConvert555aTo8888_NEON<SWAP_RB>(srcColor, vreinterpretq_s16_u16(srcAlphaBits16), dstLo, dstHi); ColorspaceConvert555aTo8888_NEON<SWAP_RB>(srcColor, srcAlphaBits16, dstLo, dstHi);
} }
template <bool SWAP_RB> template <bool SWAP_RB>
FORCEINLINE void ColorspaceConvert5551To6665_NEON(const v128u16 &srcColor, v128u32 &dstLo, v128u32 &dstHi) FORCEINLINE void ColorspaceConvert5551To6665_NEON(const v128u16 &srcColor, v128u32 &dstLo, v128u32 &dstHi)
{ {
const v128s16 srcAlphaBits16 = vandq_s16( vcgtq_s16(vdupq_n_s16(0), vreinterpretq_u16_s16(srcColor)), vdupq_n_s16(0x1F00) ); const v128u16 srcAlphaBits16 = vandq_u16( vcgtq_s16(vdupq_n_s16(0), vreinterpretq_s16_u16(srcColor)), vdupq_n_u16(0x1F00) );
ColorspaceConvert555aTo6665_NEON<SWAP_RB>(srcColor, vreinterpretq_s16_u16(srcAlphaBits16), dstLo, dstHi); ColorspaceConvert555aTo6665_NEON<SWAP_RB>(srcColor, srcAlphaBits16, dstLo, dstHi);
} }
template <bool SWAP_RB> template <bool SWAP_RB>