From e14acc942b33d525b135108d197d4bb4809cb973 Mon Sep 17 00:00:00 2001 From: Hien Ho Date: Thu, 3 Oct 2019 11:56:27 -0700 Subject: 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 --- vp9/common/vp9_reconinter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c index 04f41e6a3..ff59ff504 100644 --- a/vp9/common/vp9_reconinter.c +++ b/vp9/common/vp9_reconinter.c @@ -96,8 +96,8 @@ MV clamp_mv_to_umv_border_sb(const MACROBLOCKD *xd, const MV *src_mv, int bw, 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); -- cgit v1.2.3