From: Jerome Jiang Date: Tue, 10 Oct 2023 21:43:16 +0000 (-0400) Subject: Force mode search on 64x64 if no mode is selected X-Git-Tag: accepted/tizen/7.0/unified/20240521.012539~1^2~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ab7ba82511eceb24d45361a0ba81a1460f5dbfc;p=platform%2Fupstream%2Flibvpx.git Force mode search on 64x64 if no mode is selected A speed feature disable_split_mask (set to 63) could cause no mode and partition to be selected in rd_pick_partition because: -> thresh_mult_sub8x8 all INT_MAX -> All modes skipped for sub8x8 blocks -> found_best_rd is 0 -> break from the loop of 4 sub blocks -> sum_rdc is INT_MAX -> No rd update -> should_encode_sb is 0 -> Propagating to top of the tree -> No partition / mode is selected Bug: b/290499385 Change-Id: Ia655e262f3b32445347ae0aaf1a2d868cea997f3 --- diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index 0d03d01..6786959 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -4419,6 +4419,19 @@ static int rd_pick_partition(VP9_COMP *cpi, ThreadData *td, restore_context(x, mi_row, mi_col, a, l, sa, sl, bsize); } + if (bsize == BLOCK_64X64 && best_rdc.rdcost == INT64_MAX) { + vp9_rd_cost_reset(&this_rdc); + rd_pick_sb_modes(cpi, tile_data, x, mi_row, mi_col, &this_rdc, BLOCK_64X64, + ctx, INT_MAX, INT64_MAX); + ctx->rdcost = this_rdc.rdcost; + vp9_rd_cost_update(partition_mul, x->rddiv, &this_rdc); + if (this_rdc.rdcost < best_rdc.rdcost) { + best_rdc = this_rdc; + should_encode_sb = 1; + pc_tree->partitioning = PARTITION_NONE; + } + } + *rd_cost = best_rdc; if (should_encode_sb && pc_tree->index != 3) {