shithub: libvpx

Download patch

ref: 951e60c6fc3802718f30f19c0a302f2c0c62f783
parent: 15511892a3d330cfa2c0342dedf3bc63cfe4f7dc
author: James Zern <jzern@google.com>
date: Thu Jun 27 11:53:58 EDT 2019

vp9_encodeframe: quiet a few integer sanitizer warnings

implicit conversion from type 'int' of value -2 (32-bit, signed) to type
'uint8_t' (aka 'unsigned char') changed the value to 254 (8-bit,
unsigned)

BUG=webm:1615

Change-Id: I9b8f5a9df3211e344e91d67a45d321e7115f5d4a

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -4248,13 +4248,21 @@
   if (cpi->sf.prune_ref_frame_for_rect_partitions) {
     uint8_t used_frames;
     used_frames = ref_frames_used[0] | ref_frames_used[1];
-    if (used_frames) pc_tree->horizontal[0].skip_ref_frame_mask = ~used_frames;
+    if (used_frames) {
+      pc_tree->horizontal[0].skip_ref_frame_mask = ~used_frames & 0xff;
+    }
     used_frames = ref_frames_used[2] | ref_frames_used[3];
-    if (used_frames) pc_tree->horizontal[1].skip_ref_frame_mask = ~used_frames;
+    if (used_frames) {
+      pc_tree->horizontal[1].skip_ref_frame_mask = ~used_frames & 0xff;
+    }
     used_frames = ref_frames_used[0] | ref_frames_used[2];
-    if (used_frames) pc_tree->vertical[0].skip_ref_frame_mask = ~used_frames;
+    if (used_frames) {
+      pc_tree->vertical[0].skip_ref_frame_mask = ~used_frames & 0xff;
+    }
     used_frames = ref_frames_used[1] | ref_frames_used[3];
-    if (used_frames) pc_tree->vertical[1].skip_ref_frame_mask = ~used_frames;
+    if (used_frames) {
+      pc_tree->vertical[1].skip_ref_frame_mask = ~used_frames & 0xff;
+    }
   }
 
   {