From 10b475ec67670795d4e836031bc3090e1d8d0bcc Mon Sep 17 00:00:00 2001 From: Hien Ho Date: Tue, 1 Oct 2019 15:38:25 -0700 Subject: [PATCH] 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 --- vpx_dsp/x86/avg_intrin_sse2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpx_dsp/x86/avg_intrin_sse2.c b/vpx_dsp/x86/avg_intrin_sse2.c index 5aba903..f469be1 100644 --- a/vpx_dsp/x86/avg_intrin_sse2.c +++ b/vpx_dsp/x86/avg_intrin_sse2.c @@ -571,7 +571,7 @@ int vpx_vector_var_sse2(const int16_t *ref, const int16_t *src, const int bwl) { 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)); } -- 2.7.4