mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-17 14:29:48 +02:00
dsp,x86: normalize types w/_mm_set* calls
fixes integer sanitizer warnings of the form: runtime error: implicit conversion from type 'unsigned int' of value 4294967295 (32-bit, unsigned) to type 'int' changed the value to -1 (32-bit, signed) runtime error: implicit conversion from type 'uint8_t' (aka 'unsigned char') of value 128 (8-bit, unsigned) to type 'char' changed the value to -128 (8-bit, signed) Bug: b/229626362 Change-Id: I6be3c40407cf7a27b79d31ee32d3829ecb78ed66
This commit is contained in:
@ -192,7 +192,7 @@ static uint32_t Predictor13_SSE2(const uint32_t* const left,
|
||||
static void PredictorAdd0_SSE2(const uint32_t* in, const uint32_t* upper,
|
||||
int num_pixels, uint32_t* out) {
|
||||
int i;
|
||||
const __m128i black = _mm_set1_epi32(ARGB_BLACK);
|
||||
const __m128i black = _mm_set1_epi32((int)ARGB_BLACK);
|
||||
for (i = 0; i + 4 <= num_pixels; i += 4) {
|
||||
const __m128i src = _mm_loadu_si128((const __m128i*)&in[i]);
|
||||
const __m128i res = _mm_add_epi8(src, black);
|
||||
@ -468,7 +468,7 @@ static void TransformColorInverse_SSE2(const VP8LMultipliers* const m,
|
||||
const __m128i mults_b2 = MK_CST_16(CST(red_to_blue_), 0);
|
||||
#undef MK_CST_16
|
||||
#undef CST
|
||||
const __m128i mask_ag = _mm_set1_epi32(0xff00ff00); // alpha-green masks
|
||||
const __m128i mask_ag = _mm_set1_epi32((int)0xff00ff00); // alpha-green masks
|
||||
int i;
|
||||
for (i = 0; i + 4 <= num_pixels; i += 4) {
|
||||
const __m128i in = _mm_loadu_si128((const __m128i*)&src[i]); // argb
|
||||
@ -532,7 +532,7 @@ static void ConvertBGRAToRGB_SSE2(const uint32_t* src, int num_pixels,
|
||||
|
||||
static void ConvertBGRAToRGBA_SSE2(const uint32_t* src,
|
||||
int num_pixels, uint8_t* dst) {
|
||||
const __m128i red_blue_mask = _mm_set1_epi32(0x00ff00ffu);
|
||||
const __m128i red_blue_mask = _mm_set1_epi32(0x00ff00ff);
|
||||
const __m128i* in = (const __m128i*)src;
|
||||
__m128i* out = (__m128i*)dst;
|
||||
while (num_pixels >= 8) {
|
||||
|
Reference in New Issue
Block a user