mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +02:00
add WebPMemToInt32
and use it with calls to _mm_cvtsi32_si128 and _mm_set_epi32; this calls WebPMemToUint32, but corrects the type to avoid runtime warnings with clang -fsanitize=integer of the form: implicit conversion from type 'uint32_t' (aka 'unsigned int') of value 2155905152 (32-bit, unsigned) to type 'int' changed the value to -2139062144 (32-bit, signed) Bug: b/229626362 Change-Id: I50101ba2b46dfaa852f02d46830f3511c80b02d9
This commit is contained in:
@ -132,7 +132,7 @@ static void RescalerImportRowShrink_SSE2(WebPRescaler* const wrk,
|
||||
__m128i base = zero;
|
||||
accum += wrk->x_add;
|
||||
while (accum > 0) {
|
||||
const __m128i A = _mm_cvtsi32_si128(WebPMemToUint32(src));
|
||||
const __m128i A = _mm_cvtsi32_si128(WebPMemToInt32(src));
|
||||
src += 4;
|
||||
base = _mm_unpacklo_epi8(A, zero);
|
||||
// To avoid overflow, we need: base * x_add / x_sub < 32768
|
||||
|
Reference in New Issue
Block a user