diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2023-01-13 10:33:09 +0100 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2023-01-16 14:01:04 +0100 |
commit | 3cba6d10543c508e2c2f8b942dad9147c0d1ea0d (patch) | |
tree | bd20f277152ce381f71d4c4c6be043773dc4fd8e /src/3rdparty/libwebp/src/dsp/quant.h | |
parent | cd92d76e9dcd98f4fc974c796453459779393bdc (diff) | |
download | qtimageformats-3cba6d10543c508e2c2f8b942dad9147c0d1ea0d.tar.gz |
Update bundled libwebp to version 1.3.0
[ChangeLog][Third-Party Code] Update bundled libwebp to version 1.3.0
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Ib7645b7348e950bfa27b902de6da879f8309408d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/3rdparty/libwebp/src/dsp/quant.h')
-rw-r--r-- | src/3rdparty/libwebp/src/dsp/quant.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/3rdparty/libwebp/src/dsp/quant.h b/src/3rdparty/libwebp/src/dsp/quant.h index 5e8dba8..fc099bf 100644 --- a/src/3rdparty/libwebp/src/dsp/quant.h +++ b/src/3rdparty/libwebp/src/dsp/quant.h @@ -21,10 +21,15 @@ #define IsFlat IsFlat_NEON -static uint32x2_t horizontal_add_uint32x4(const uint32x4_t a) { +static uint32_t horizontal_add_uint32x4(const uint32x4_t a) { +#if defined(__aarch64__) + return vaddvq_u32(a); +#else const uint64x2_t b = vpaddlq_u32(a); - return vadd_u32(vreinterpret_u32_u64(vget_low_u64(b)), - vreinterpret_u32_u64(vget_high_u64(b))); + const uint32x2_t c = vadd_u32(vreinterpret_u32_u64(vget_low_u64(b)), + vreinterpret_u32_u64(vget_high_u64(b))); + return vget_lane_u32(c, 0); +#endif } static WEBP_INLINE int IsFlat(const int16_t* levels, int num_blocks, @@ -45,7 +50,7 @@ static WEBP_INLINE int IsFlat(const int16_t* levels, int num_blocks, levels += 16; } - return thresh >= (int32_t)vget_lane_u32(horizontal_add_uint32x4(sum), 0); + return thresh >= (int)horizontal_add_uint32x4(sum); } #else |