summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHien Ho <hienho@google.com>2019-10-01 16:36:56 -0700
committerHien Ho <hienho@google.com>2019-10-03 18:52:57 +0000
commitf70f5dbae2f038d17a2fba4a7b20593533959fb6 (patch)
tree4db7668fb6de46be33c7afecf32303a832cbaf41
parent4e2cfb63de974939b72d990005b36d8c2fac8352 (diff)
downloadlibvpx-f70f5dbae2f038d17a2fba4a7b20593533959fb6.tar
libvpx-f70f5dbae2f038d17a2fba4a7b20593533959fb6.tar.gz
libvpx-f70f5dbae2f038d17a2fba4a7b20593533959fb6.tar.bz2
libvpx-f70f5dbae2f038d17a2fba4a7b20593533959fb6.zip
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
-rw-r--r--vp9/decoder/vp9_detokenize.c4
1 files 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;