summaryrefslogtreecommitdiff
path: root/src/dsp/yuv_sse41.c
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2022-08-03 19:36:41 -0700
committerJames Zern <jzern@google.com>2022-08-04 11:26:23 -0700
commitab540ae0c57a79c8829f0d515160bd90e4b0be83 (patch)
tree84105d863e71b324c2a6ce167f4a5a6a47cb921e /src/dsp/yuv_sse41.c
parent8980362eedbe3b23d47be55f70afcf5579094fa8 (diff)
downloadlibwebp-ab540ae0c57a79c8829f0d515160bd90e4b0be83.tar.gz
dsp,x86: normalize types w/_mm_cvtsi32_si128 calls
fixes integer sanitizer warnings of the form: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 3724541952 (32-bit, unsigned) to type 'int' changed the value to -570425344 (32-bit, signed) Bug: b/229626362 Change-Id: Ie4d599aba88226e4e047250464ac37ca11d2cd3b
Diffstat (limited to 'src/dsp/yuv_sse41.c')
-rw-r--r--src/dsp/yuv_sse41.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dsp/yuv_sse41.c b/src/dsp/yuv_sse41.c
index 579d1f74..f79b802e 100644
--- a/src/dsp/yuv_sse41.c
+++ b/src/dsp/yuv_sse41.c
@@ -15,10 +15,12 @@
#if defined(WEBP_USE_SSE41)
-#include "src/dsp/common_sse41.h"
#include <stdlib.h>
#include <smmintrin.h>
+#include "src/dsp/common_sse41.h"
+#include "src/utils/utils.h"
+
//-----------------------------------------------------------------------------
// Convert spans of 32 pixels to various RGB formats for the fancy upsampler.
@@ -74,7 +76,7 @@ static WEBP_INLINE __m128i Load_HI_16_SSE41(const uint8_t* src) {
// Load and replicate the U/V samples
static WEBP_INLINE __m128i Load_UV_HI_8_SSE41(const uint8_t* src) {
const __m128i zero = _mm_setzero_si128();
- const __m128i tmp0 = _mm_cvtsi32_si128(*(const uint32_t*)src);
+ const __m128i tmp0 = _mm_cvtsi32_si128(WebPMemToInt32(src));
const __m128i tmp1 = _mm_unpacklo_epi8(zero, tmp0);
return _mm_unpacklo_epi16(tmp1, tmp1); // replicate samples
}