vp8,get_sub_mv_ref_prob: change arguments to uint32_t
authorJames Zern <jzern@google.com>
Sat, 16 Apr 2022 05:29:31 +0000 (22:29 -0700)
committerJames Zern <jzern@google.com>
Sat, 16 Apr 2022 05:33:11 +0000 (22:33 -0700)
this matches the call with int_mv::as_int and fixes a warning with
clang-13 -fsanitize=integer:
vp8/decoder/decodemv.c:240:32: runtime error: implicit conversion from
type 'uint32_t' (aka 'unsigned int') of value 4282515456 (32-bit,
unsigned) to type 'int' changed the value to -12451840 (32-bit, signed)

Bug: webm:1759
Change-Id: I7c0aa72baa45421929afac26566e149adc6669d7

vp8/decoder/decodemv.c

index 9437385..51817a2 100644 (file)
@@ -173,7 +173,8 @@ const vp8_prob vp8_sub_mv_ref_prob3[8][VP8_SUBMVREFS - 1] = {
   { 208, 1, 1 }     /* SUBMVREF_LEFT_ABOVE_ZED  */
 };
 
-static const vp8_prob *get_sub_mv_ref_prob(const int left, const int above) {
+static const vp8_prob *get_sub_mv_ref_prob(const uint32_t left,
+                                           const uint32_t above) {
   int lez = (left == 0);
   int aez = (above == 0);
   int lea = (left == above);