shithub: libvpx

Download patch

ref: 569503fbc9b1c0e9979d6a640757184a765f0a82
parent: 9b8acbfee4608db95c761e95887aadf69015d045
author: Hien Ho <hienho@google.com>
date: Wed Aug 21 09:34:14 EDT 2019

vpx_dsp/x86/fwd_txfm_sse2: fix int sanitizer warnings

implicit conversion from type 'int' of value 32768 (32-bit, signed)
to type 'short' changed the value to -32768 (16-bit, signed)

BUG=webm:1615

Change-Id: I7cdba7f7e550f62fd3ac31574e49b1909b6ab054

--- a/vpx_dsp/x86/fwd_txfm_sse2.h
+++ b/vpx_dsp/x86/fwd_txfm_sse2.h
@@ -36,7 +36,7 @@
 static INLINE int check_epi16_overflow_x2(const __m128i *preg0,
                                           const __m128i *preg1) {
   const __m128i max_overflow = _mm_set1_epi16(0x7fff);
-  const __m128i min_overflow = _mm_set1_epi16(0x8000);
+  const __m128i min_overflow = _mm_set1_epi16((short)0x8000);
   __m128i cmp0 = _mm_or_si128(_mm_cmpeq_epi16(*preg0, max_overflow),
                               _mm_cmpeq_epi16(*preg0, min_overflow));
   __m128i cmp1 = _mm_or_si128(_mm_cmpeq_epi16(*preg1, max_overflow),
@@ -50,7 +50,7 @@
                                           const __m128i *preg2,
                                           const __m128i *preg3) {
   const __m128i max_overflow = _mm_set1_epi16(0x7fff);
-  const __m128i min_overflow = _mm_set1_epi16(0x8000);
+  const __m128i min_overflow = _mm_set1_epi16((short)0x8000);
   __m128i cmp0 = _mm_or_si128(_mm_cmpeq_epi16(*preg0, max_overflow),
                               _mm_cmpeq_epi16(*preg0, min_overflow));
   __m128i cmp1 = _mm_or_si128(_mm_cmpeq_epi16(*preg1, max_overflow),