diff options
author | James Zern <jzern@google.com> | 2023-05-01 21:55:05 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2023-05-02 12:28:50 -0700 |
commit | 0c496a4ff92f6c8c3607bda29f442e254efd28f4 (patch) | |
tree | b17fd07d4ae872b08b6894866a496b6d7bb8c67f /src/dsp/cost_neon.c | |
parent | 8151f388ebb1c48990598418f84b81955ddc5895 (diff) | |
download | libwebp-0c496a4ff92f6c8c3607bda29f442e254efd28f4.tar.gz |
cpu.h: add WEBP_AARCH64
and define it to true for __aarch64__ and Win Arm64 + Visual Studio.
Microsoft's compiler (cl.exe) does not define __aarch64__, but relies on
_M_ARM64 & _M_ARM64EC
Bug: b/277254922
Change-Id: I20e4fa07a4031599db69e3d7ba9050345315ef51
Diffstat (limited to 'src/dsp/cost_neon.c')
-rw-r--r-- | src/dsp/cost_neon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dsp/cost_neon.c b/src/dsp/cost_neon.c index 8cc8ce58..6582669c 100644 --- a/src/dsp/cost_neon.c +++ b/src/dsp/cost_neon.c @@ -29,7 +29,7 @@ static void SetResidualCoeffs_NEON(const int16_t* const coeffs, const uint8x16_t eob = vcombine_u8(vqmovn_u16(eob_0), vqmovn_u16(eob_1)); const uint8x16_t masked = vandq_u8(eob, vld1q_u8(position)); -#ifdef __aarch64__ +#if WEBP_AARCH64 res->last = vmaxvq_u8(masked) - 1; #else const uint8x8_t eob_8x8 = vmax_u8(vget_low_u8(masked), vget_high_u8(masked)); @@ -43,7 +43,7 @@ static void SetResidualCoeffs_NEON(const int16_t* const coeffs, vst1_lane_s32(&res->last, vreinterpret_s32_u32(eob_32x2), 0); --res->last; -#endif // __aarch64__ +#endif // WEBP_AARCH64 res->coeffs = coeffs; } |