summaryrefslogtreecommitdiffstats
path: root/thirdparty/libwebp/src/enc/backward_references_enc.c
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2019-10-27 21:29:43 +0900
committervolzhs <volzhs@gmail.com>2019-10-27 21:29:43 +0900
commit074d421dca94ec4ddadfbfa62268bda219bab46c (patch)
treeacec76662c787a9275c04d437fd463734ae5d4dd /thirdparty/libwebp/src/enc/backward_references_enc.c
parent9e572b5bacdaeb5079415d276bbf5b8462cac9e3 (diff)
downloadredot-engine-074d421dca94ec4ddadfbfa62268bda219bab46c.tar.gz
Update libwebp to 1.0.3
Diffstat (limited to 'thirdparty/libwebp/src/enc/backward_references_enc.c')
-rw-r--r--thirdparty/libwebp/src/enc/backward_references_enc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/thirdparty/libwebp/src/enc/backward_references_enc.c b/thirdparty/libwebp/src/enc/backward_references_enc.c
index 3ab7b0ac7d..d445b40fc5 100644
--- a/thirdparty/libwebp/src/enc/backward_references_enc.c
+++ b/thirdparty/libwebp/src/enc/backward_references_enc.c
@@ -191,13 +191,14 @@ void VP8LHashChainClear(VP8LHashChain* const p) {
// -----------------------------------------------------------------------------
-#define HASH_MULTIPLIER_HI (0xc6a4a793ULL)
-#define HASH_MULTIPLIER_LO (0x5bd1e996ULL)
+static const uint32_t kHashMultiplierHi = 0xc6a4a793u;
+static const uint32_t kHashMultiplierLo = 0x5bd1e996u;
-static WEBP_INLINE uint32_t GetPixPairHash64(const uint32_t* const argb) {
+static WEBP_UBSAN_IGNORE_UNSIGNED_OVERFLOW WEBP_INLINE
+uint32_t GetPixPairHash64(const uint32_t* const argb) {
uint32_t key;
- key = (argb[1] * HASH_MULTIPLIER_HI) & 0xffffffffu;
- key += (argb[0] * HASH_MULTIPLIER_LO) & 0xffffffffu;
+ key = argb[1] * kHashMultiplierHi;
+ key += argb[0] * kHashMultiplierLo;
key = key >> (32 - HASH_BITS);
return key;
}