mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
dsp/lossless.c: clear int sanitizer warnings
add explicit casts in calls to ColorTransformDelta() clears warnings of the form: implicit conversion from type 'uint8_t' (aka 'unsigned char') of value 254 (8-bit, unsigned) to type 'int8_t' (aka 'signed char') changed the value to -2 (8-bit, signed) Bug: b/229626362 Change-Id: Ic049ad9c9b5c6b669a1c943287f416533d6c873c
This commit is contained in:
parent
ad7d1753c5
commit
129cf9e97e
@ -293,10 +293,10 @@ void VP8LTransformColorInverse_C(const VP8LMultipliers* const m,
|
|||||||
const uint32_t red = argb >> 16;
|
const uint32_t red = argb >> 16;
|
||||||
int new_red = red & 0xff;
|
int new_red = red & 0xff;
|
||||||
int new_blue = argb & 0xff;
|
int new_blue = argb & 0xff;
|
||||||
new_red += ColorTransformDelta(m->green_to_red_, green);
|
new_red += ColorTransformDelta((int8_t)m->green_to_red_, green);
|
||||||
new_red &= 0xff;
|
new_red &= 0xff;
|
||||||
new_blue += ColorTransformDelta(m->green_to_blue_, green);
|
new_blue += ColorTransformDelta((int8_t)m->green_to_blue_, green);
|
||||||
new_blue += ColorTransformDelta(m->red_to_blue_, (int8_t)new_red);
|
new_blue += ColorTransformDelta((int8_t)m->red_to_blue_, (int8_t)new_red);
|
||||||
new_blue &= 0xff;
|
new_blue &= 0xff;
|
||||||
dst[i] = (argb & 0xff00ff00u) | (new_red << 16) | (new_blue);
|
dst[i] = (argb & 0xff00ff00u) | (new_red << 16) | (new_blue);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user