rtc: Adjustment to speed 7 for low spatial variance For blocks with low spatial variance: avoid early exit based on rd_thresh for DC/H/V modes. Some visual improvement on test clip with alot of uncovered areas/motion. Negligible bdrate change on rtc_derf set, no change in speed observed. Change-Id: Iedba8e5774d79f0a9abea51523dd1a395f39c7ce
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c index 90a202b..c2e9a4e 100644 --- a/av1/encoder/nonrd_pickmode.c +++ b/av1/encoder/nonrd_pickmode.c
@@ -1876,14 +1876,17 @@ mi->angle_delta[PLANE_TYPE_UV] = 0; mi->filter_intra_mode_info.use_filter_intra = 0; + uint32_t spatial_var_thresh = 50; + int do_early_exit_rdthresh = 1; // Some adjustments to checking intra mode based on source variance. - if (x->source_variance < 50) { + if (x->source_variance < spatial_var_thresh) { // If the best inter mode is large motion or non-LAST ref reduce intra cost // penalty, so intra mode is more likely tested. if (best_pickmode.best_ref_frame != LAST_FRAME || abs(mi->mv[0].as_mv.row) > 32 || abs(mi->mv[0].as_mv.col) > 32) { intra_cost_penalty = intra_cost_penalty >> 2; inter_mode_thresh = RDCOST(x->rdmult, intra_cost_penalty, 0); + do_early_exit_rdthresh = 0; } // For big blocks worth checking intra (since only DC will be checked), // even if best_early_term is set. @@ -1922,7 +1925,8 @@ if (this_mode > 0 && bsize >= BLOCK_32X32) continue; if (rd_less_than_thresh(best_rdc.rdcost, mode_rd_thresh, - rd_thresh_freq_fact[mode_index])) { + rd_thresh_freq_fact[mode_index]) && + (do_early_exit_rdthresh || this_mode == SMOOTH_PRED)) { continue; } const BLOCK_SIZE uv_bsize = get_plane_block_size(