summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libwebp/src/enc/vp8l_enc.c
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2024-01-04 21:21:52 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2024-01-04 21:21:52 +0200
commit3c2ad3eed6fc522ad809797747c8028b3dd4778a (patch)
treec64f652f34da2e39db11b6fca22ad5322c75554d /src/3rdparty/libwebp/src/enc/vp8l_enc.c
parent1019058c497e33edef80d5cb120aa7d6a418a7c6 (diff)
parent1eaa734e4de3589c3c90e4676959a82299a6eb56 (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.13' into tqtc/lts-5.15-opensourcev5.15.13-lts-lgpl
Diffstat (limited to 'src/3rdparty/libwebp/src/enc/vp8l_enc.c')
-rw-r--r--src/3rdparty/libwebp/src/enc/vp8l_enc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/3rdparty/libwebp/src/enc/vp8l_enc.c b/src/3rdparty/libwebp/src/enc/vp8l_enc.c
index 2b345df..0b07e52 100644
--- a/src/3rdparty/libwebp/src/enc/vp8l_enc.c
+++ b/src/3rdparty/libwebp/src/enc/vp8l_enc.c
@@ -361,10 +361,11 @@ typedef enum {
kHistoTotal // Must be last.
} HistoIx;
-static void AddSingleSubGreen(int p, uint32_t* const r, uint32_t* const b) {
- const int green = p >> 8; // The upper bits are masked away later.
- ++r[((p >> 16) - green) & 0xff];
- ++b[((p >> 0) - green) & 0xff];
+static void AddSingleSubGreen(uint32_t p,
+ uint32_t* const r, uint32_t* const b) {
+ const int green = (int)p >> 8; // The upper bits are masked away later.
+ ++r[(((int)p >> 16) - green) & 0xff];
+ ++b[(((int)p >> 0) - green) & 0xff];
}
static void AddSingle(uint32_t p,
@@ -1354,7 +1355,7 @@ static int EncodeImageInternal(
static void ApplySubtractGreen(VP8LEncoder* const enc, int width, int height,
VP8LBitWriter* const bw) {
VP8LPutBits(bw, TRANSFORM_PRESENT, 1);
- VP8LPutBits(bw, SUBTRACT_GREEN, 2);
+ VP8LPutBits(bw, SUBTRACT_GREEN_TRANSFORM, 2);
VP8LSubtractGreenFromBlueAndRed(enc->argb_, width * height);
}