mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-21 19:32:52 +01:00
vp8l_enc,AddSingleSubGreen: clear int sanitizer warnings
this localizes the conversion to int in the function; the parameter was previously changed in: 6ab496ed fix some 'unsigned integer overflow' warnings in ubsan implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 2350919223 (32-bit, unsigned) to type 'int' changed the value to -1944048073 (32-bit, signed) Bug: b/229626362 Change-Id: I589eec11c0dabaeba99e153e705f956181c570d2
This commit is contained in:
parent
e2fecc22e1
commit
00ff988a59
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user