]> granicus.if.org Git - libvpx/commitdiff
update_thresh_freq_fact_row_mt: normalize param types
authorJames Zern <jzern@google.com>
Thu, 18 Aug 2022 18:56:25 +0000 (11:56 -0700)
committerJames Zern <jzern@google.com>
Fri, 19 Aug 2022 01:23:30 +0000 (18:23 -0700)
make source_variance unsigned; this matches update_thresh_freq_fact()
and the type of the MACROBLOCK member.

quiets integer sanitizer warnings of the form:
vp9/encoder/vp9_pickmode.c:2710:58: 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)

Bug: b/229626362
Change-Id: I812c6ca914507bf25cad323dea3d91a3a2ea4f1d

vp9/encoder/vp9_pickmode.c

index 697c589ab3b2dc555d52355d2de721c126490106..90dbc427e787274e048711f341a636b787a4b1a0 100644 (file)
@@ -1112,7 +1112,7 @@ static INLINE int rd_less_than_thresh_row_mt(int64_t best_rd, int thresh,
 }
 
 static INLINE void update_thresh_freq_fact_row_mt(
-    VP9_COMP *cpi, TileDataEnc *tile_data, int source_variance,
+    VP9_COMP *cpi, TileDataEnc *tile_data, unsigned int source_variance,
     int thresh_freq_fact_idx, MV_REFERENCE_FRAME ref_frame,
     THR_MODES best_mode_idx, PREDICTION_MODE mode) {
   THR_MODES thr_mode_idx = mode_idx[ref_frame][mode_offset(mode)];