]> granicus.if.org Git - libvpx/commitdiff
vpx_dsp/x86/highbd_idct4x4_add_sse2: fix int sanitizer warnings
authorHien Ho <hienho@google.com>
Wed, 28 Aug 2019 18:18:01 +0000 (11:18 -0700)
committerHien Ho <hienho@google.com>
Wed, 28 Aug 2019 18:20:05 +0000 (11:20 -0700)
implicit conversion from type 'int' of value 49161 (32-bit, signed) to
type 'int16_t' (aka 'short') changed the value to -16375 (16-bit,
signed)

BUG=webm:1615

Change-Id: I3f18283609ac2ce365202a63ef61a47eb00c155b

vpx_dsp/x86/highbd_idct4x4_add_sse2.c

index 2e54d24736e68c10689ee738ead7ec1b275752a6..b9c8884f992ecc29c9e87c04dc587ebe75aac11a 100644 (file)
@@ -112,8 +112,8 @@ void vpx_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint16_t *dest,
     min_input = _mm_min_epi16(min_input, _mm_srli_si128(min_input, 4));
     max_input = _mm_max_epi16(max_input, _mm_srli_si128(max_input, 2));
     min_input = _mm_min_epi16(min_input, _mm_srli_si128(min_input, 2));
-    max = _mm_extract_epi16(max_input, 0);
-    min = _mm_extract_epi16(min_input, 0);
+    max = (int16_t)_mm_extract_epi16(max_input, 0);
+    min = (int16_t)_mm_extract_epi16(min_input, 0);
   }
 
   if (bd == 8 || (max < 4096 && min >= -4096)) {