shithub: libvpx

Download patch

ref: e14acc942b33d525b135108d197d4bb4809cb973
parent: 4e2cfb63de974939b72d990005b36d8c2fac8352
author: Hien Ho <hienho@google.com>
date: Thu Oct 3 07:56:27 EDT 2019

vp9/common/vp9_reconinter: fix int sanitizer warnings

Unit Test: VP9/InvalidFileTest
implicit conversion from type 'int' of value -65536 (32-bit, signed) to
type 'int16_t' (aka 'short') changed the value to 0 (16-bit, signed)

BUG=webm:1615
BUG=webm:1645

Change-Id: I4ce0c6abf8b5bf43ee43e958ad75d9fa28b23eee

--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -96,8 +96,8 @@
   const int spel_right = spel_left - SUBPEL_SHIFTS;
   const int spel_top = (VP9_INTERP_EXTEND + bh) << SUBPEL_BITS;
   const int spel_bottom = spel_top - SUBPEL_SHIFTS;
-  MV clamped_mv = { src_mv->row * (1 << (1 - ss_y)),
-                    src_mv->col * (1 << (1 - ss_x)) };
+  MV clamped_mv = { (short)(src_mv->row * (1 << (1 - ss_y))),
+                    (short)(src_mv->col * (1 << (1 - ss_x))) };
   assert(ss_x <= 1);
   assert(ss_y <= 1);