vp8: fix some implicit unsigned -> int conversions
authorJames Zern <jzern@google.com>
Sat, 16 Apr 2022 05:23:05 +0000 (22:23 -0700)
committerJames Zern <jzern@google.com>
Sat, 16 Apr 2022 05:32:51 +0000 (22:32 -0700)
fixes some warnings with clang-13 -fsanitize=integer:
vp8/decoder/threading.c:77:27: runtime error: implicit conversion
from type 'unsigned int' of value 4294967295 (32-bit, unsigned) to type
'int' changed the value to -1 (32-bit, signed)

these bitmask constants were missed in:
1676cddaa vp8: fix some implicit signed -> unsigned conv warnings

Bug: webm:1759
Change-Id: I5d894d08fd41e32b91b56a4d91276837b3415ee4

vp8/decoder/threading.c
vp8/encoder/ethreading.c

index 491e2ce..490f62d 100644 (file)
@@ -74,9 +74,9 @@ static void setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd,
     memcpy(mbd->dequant_y2, xd->dequant_y2, sizeof(xd->dequant_y2));
     memcpy(mbd->dequant_uv, xd->dequant_uv, sizeof(xd->dequant_uv));
 
-    mbd->fullpixel_mask = 0xffffffff;
+    mbd->fullpixel_mask = ~0;
 
-    if (pc->full_pixel) mbd->fullpixel_mask = 0xfffffff8;
+    if (pc->full_pixel) mbd->fullpixel_mask = ~7;
   }
 
   for (i = 0; i < pc->mb_rows; ++i)
index 55a1528..cb35f4f 100644 (file)
@@ -470,8 +470,8 @@ void vp8cx_init_mbrthread_data(VP8_COMP *cpi, MACROBLOCK *x,
 
     setup_mbby_copy(&mbr_ei[i].mb, x);
 
-    mbd->fullpixel_mask = 0xffffffff;
-    if (cm->full_pixel) mbd->fullpixel_mask = 0xfffffff8;
+    mbd->fullpixel_mask = ~0;
+    if (cm->full_pixel) mbd->fullpixel_mask = ~7;
 
     vp8_zero(mb->coef_counts);
     vp8_zero(x->ymode_count);