Add the void cast to the tp_orig variable itself The void cast is used to ignore the tp_orig variable in Release builds because tp_orig is only used in an assert(). So the void cast should be applied to the variable itself rather than the expression *tp_orig. In av1_nonrd_pick_partition(), declare tp_orig with `const`, following the change to the declaration of tp_orig in https://chromium-review.googlesource.com/c/webm/libvpx/+/399459. Tested with the -DCONFIG_RT_ML_PARTITIONING=1 cmake option. Change-Id: Ie4fdf350e507383b643cfb8baaf3cfe1f98ccbf4
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c index 5da753d..b5f1d6a 100644 --- a/av1/encoder/partition_search.c +++ b/av1/encoder/partition_search.c
@@ -5691,7 +5691,7 @@ // Override skipping rectangular partition operations for edge blocks. if (none_rd) *none_rd = 0; - (void)*tp_orig; + (void)tp_orig; #if CONFIG_COLLECT_PARTITION_STATS // Stats at the current quad tree @@ -6310,7 +6310,7 @@ MACROBLOCK *const x = &td->mb; MACROBLOCKD *const xd = &x->e_mbd; const int hbs = mi_size_wide[bsize] >> 1; - TokenExtra *tp_orig = *tp; + const TokenExtra *const tp_orig = *tp; const ModeCosts *mode_costs = &x->mode_costs; RD_STATS this_rdc, best_rdc; RD_SEARCH_MACROBLOCK_CONTEXT x_ctx; @@ -6324,7 +6324,7 @@ assert(mi_size_wide[bsize] == mi_size_high[bsize]); // Square partition only assert(cm->seq_params->sb_size == BLOCK_64X64); // Small SB so far - (void)*tp_orig; + (void)tp_orig; av1_invalid_rd_stats(&best_rdc); best_rdc.rdcost = best_rd;