Fix GCC 8.3.0 -Wmaybe-uninitialized on left_col Fix the GCC 8.3.0 warnings that left_col and left_row may be used uninitialized in the av1_nonrd_pick_inter_mode_sb function. Note that those two variables are actually in the newmv_diff_bias function, which is apparently inlined into the av1_nonrd_pick_inter_mode_sb function by the compiler. BUG=aomedia:3174 Change-Id: I2da7cd6e486e96ea2e34937ac23ed8df15a68d28
diff --git a/av1/common/mv.h b/av1/common/mv.h index 3203bf7..0e4c405 100644 --- a/av1/common/mv.h +++ b/av1/common/mv.h
@@ -23,6 +23,7 @@ #endif #define INVALID_MV 0x80008000 +#define INVALID_MV_ROW_COL -32768 #define GET_MV_RAWPEL(x) (((x) + 3 + ((x) >= 0)) >> 3) #define GET_MV_SUBPEL(x) ((x)*8)
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c index 5ee5761..af60883 100644 --- a/av1/encoder/nonrd_pickmode.c +++ b/av1/encoder/nonrd_pickmode.c
@@ -1055,12 +1055,11 @@ if (this_mode == NEWMV) { int al_mv_average_row; int al_mv_average_col; - int left_row, left_col; int row_diff, col_diff; int above_mv_valid = 0; int left_mv_valid = 0; - int above_row = 0; - int above_col = 0; + int above_row = INVALID_MV_ROW_COL, above_col = INVALID_MV_ROW_COL; + int left_row = INVALID_MV_ROW_COL, left_col = INVALID_MV_ROW_COL; if (bsize >= BLOCK_64X64 && content_state_sb.source_sad != kHighSad && spatial_variance < 300 && (mv_row > 16 || mv_row < -16 || mv_col > 16 || mv_col < -16)) {