summaryrefslogtreecommitdiff
path: root/thirdparty/libwebp/src/enc/backward_references_enc.c
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-10-27 13:54:05 +0100
committerGitHub <noreply@github.com>2019-10-27 13:54:05 +0100
commit61785bcc7d49cc2c6f1a351ed591dbf31748625b (patch)
treed47cd77a94c7b96d9c2f3800f6304f2ee5663d34 /thirdparty/libwebp/src/enc/backward_references_enc.c
parent2751cea0d4ed0bf99d870067dc8114701083d485 (diff)
parent074d421dca94ec4ddadfbfa62268bda219bab46c (diff)
Merge pull request #33109 from volzhs/libwebp-1.0.3
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;
}