From f70f5dbae2f038d17a2fba4a7b20593533959fb6 Mon Sep 17 00:00:00 2001 From: Hien Ho Date: Tue, 1 Oct 2019 16:36:56 -0700 Subject: vp9/decoder/vp9_detokenize: fix int sanitizer warnings From unit test: VP9MultiThreaded/InvalidFileTest implicit conversion from type 'int' of value 83144 (32-bit, signed) to type 'tran_low_t' (aka 'short') changed the value to 17608 (16-bit, signed) BUG=webm:1615 BUG=webm:1648 Change-Id: I4170494c328596ace66432c8563c55f31745cf76 --- vp9/decoder/vp9_detokenize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vp9/decoder/vp9_detokenize.c b/vp9/decoder/vp9_detokenize.c index e250a5a35..c2e6b3d54 100644 --- a/vp9/decoder/vp9_detokenize.c +++ b/vp9/decoder/vp9_detokenize.c @@ -243,9 +243,9 @@ static int decode_coefs(const MACROBLOCKD *xd, PLANE_TYPE type, #endif // CONFIG_VP9_HIGHBITDEPTH #else if (read_bool(r, 128, &value, &count, &range)) { - dqcoeff[scan[c]] = -v; + dqcoeff[scan[c]] = (tran_low_t)-v; } else { - dqcoeff[scan[c]] = v; + dqcoeff[scan[c]] = (tran_low_t)v; } #endif // CONFIG_COEFFICIENT_RANGE_CHECKING ++c; -- cgit v1.2.3