Skip to content

Commit

Permalink
Colorspace Handler: Fix compiling for strict NEON.
Browse files Browse the repository at this point in the history
- We could always use -flax-vector-conversions, but let's try to stay disciplined for now.
  • Loading branch information
rogerman committed Aug 8, 2024
1 parent 176e38c commit b799d94
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ FORCEINLINE void ColorspaceConvert555xTo6665Opaque_NEON(const v128u16 &srcColor,
template <bool SWAP_RB>
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) );
ColorspaceConvert555aTo8888_NEON<SWAP_RB>(srcColor, vreinterpretq_s16_u16(srcAlphaBits16), dstLo, dstHi);
const v128u16 srcAlphaBits16 = vandq_u16( vcgtq_s16(vdupq_n_s16(0), vreinterpretq_s16_u16(srcColor)), vdupq_n_u16(0xFF00) );
ColorspaceConvert555aTo8888_NEON<SWAP_RB>(srcColor, srcAlphaBits16, dstLo, dstHi);
}

template <bool SWAP_RB>
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) );
ColorspaceConvert555aTo6665_NEON<SWAP_RB>(srcColor, vreinterpretq_s16_u16(srcAlphaBits16), dstLo, dstHi);
const v128u16 srcAlphaBits16 = vandq_u16( vcgtq_s16(vdupq_n_s16(0), vreinterpretq_s16_u16(srcColor)), vdupq_n_u16(0x1F00) );
ColorspaceConvert555aTo6665_NEON<SWAP_RB>(srcColor, srcAlphaBits16, dstLo, dstHi);
}

template <bool SWAP_RB>
Expand Down

0 comments on commit b799d94

Please sign in to comment.