shithub: libvpx

Download patch

ref: 10b475ec67670795d4e836031bc3090e1d8d0bcc
parent: 08da66d5df27c5eabcc84f420ae6fb3969bf1f73
author: Hien Ho <hienho@google.com>
date: Tue Oct 1 11:38:25 EDT 2019

vpx_dsp/x86/avg_intrin_sse2: fix int sanitizer warnings

Unit Test: VP9/AqSegmentTest. VP9/CpuSpeedTest, AVX2/Loop8Test6Param

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

BUG=webm:1615

Change-Id: I2e5b688a97c3caa29d4b8a817b95a4986b81a562

--- a/vpx_dsp/x86/avg_intrin_sse2.c
+++ b/vpx_dsp/x86/avg_intrin_sse2.c
@@ -571,7 +571,7 @@
   v1 = _mm_srli_epi64(sse, 32);
   sse = _mm_add_epi32(sse, v1);
 
-  mean = _mm_extract_epi16(sum, 0);
+  mean = (int16_t)_mm_extract_epi16(sum, 0);
 
   return _mm_cvtsi128_si32(sse) - ((mean * mean) >> (bwl + 2));
 }