Merge "Adapt mode based rd_threshold for similar block size"
This commit is contained in:
commit
8751e49a6f
@ -2510,24 +2510,23 @@ void vp9_rd_pick_intra_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
|
||||
ctx->mic = *xd->mi[0].src_mi;
|
||||
}
|
||||
|
||||
// Updating rd_thresh_freq_fact[] here means that the different
|
||||
// partition/block sizes are handled independently based on the best
|
||||
// choice for the current partition. It may well be better to keep a scaled
|
||||
// best rd so far value and update rd_thresh_freq_fact based on the mode/size
|
||||
// combination that wins out.
|
||||
static void update_rd_thresh_fact(VP9_COMP *cpi, int bsize,
|
||||
int best_mode_index) {
|
||||
if (cpi->sf.adaptive_rd_thresh > 0) {
|
||||
const int top_mode = bsize < BLOCK_8X8 ? MAX_REFS : MAX_MODES;
|
||||
int mode;
|
||||
for (mode = 0; mode < top_mode; ++mode) {
|
||||
int *const fact = &cpi->rd.thresh_freq_fact[bsize][mode];
|
||||
|
||||
if (mode == best_mode_index) {
|
||||
*fact -= (*fact >> 3);
|
||||
} else {
|
||||
*fact = MIN(*fact + RD_THRESH_INC,
|
||||
cpi->sf.adaptive_rd_thresh * RD_THRESH_MAX_FACT);
|
||||
const BLOCK_SIZE min_size = MAX(bsize - 1, BLOCK_4X4);
|
||||
const BLOCK_SIZE max_size = MIN(bsize + 2, BLOCK_64X64);
|
||||
BLOCK_SIZE bs;
|
||||
for (bs = min_size; bs <= max_size; ++bs) {
|
||||
int *const fact = &cpi->rd.thresh_freq_fact[bs][mode];
|
||||
if (mode == best_mode_index) {
|
||||
*fact -= (*fact >> 4);
|
||||
} else {
|
||||
*fact = MIN(*fact + RD_THRESH_INC,
|
||||
cpi->sf.adaptive_rd_thresh * RD_THRESH_MAX_FACT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,10 +96,12 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
|
||||
if (MIN(cm->width, cm->height) >= 720) {
|
||||
sf->disable_split_mask = DISABLE_ALL_SPLIT;
|
||||
sf->schedule_mode_search = cm->base_qindex < 220 ? 1 : 0;
|
||||
sf->partition_search_breakout_dist_thr = (1 << 25);
|
||||
} else {
|
||||
sf->max_intra_bsize = BLOCK_32X32;
|
||||
sf->disable_split_mask = DISABLE_ALL_INTER_SPLIT;
|
||||
sf->schedule_mode_search = cm->base_qindex < 175 ? 1 : 0;
|
||||
sf->partition_search_breakout_dist_thr = (1 << 23);
|
||||
}
|
||||
sf->mv.subpel_search_method = SUBPEL_TREE_PRUNED;
|
||||
sf->adaptive_pred_interp_filter = 0;
|
||||
@ -107,18 +109,12 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
|
||||
sf->cb_partition_search = !boosted;
|
||||
sf->cb_pred_filter_search = 1;
|
||||
sf->alt_ref_search_fp = 1;
|
||||
sf->motion_field_mode_search = !boosted;
|
||||
sf->recode_loop = ALLOW_RECODE_KFMAXBW;
|
||||
sf->adaptive_rd_thresh = 3;
|
||||
sf->mode_skip_start = 6;
|
||||
sf->intra_y_mode_mask[TX_32X32] = INTRA_DC;
|
||||
sf->intra_uv_mode_mask[TX_32X32] = INTRA_DC;
|
||||
sf->adaptive_interp_filter_search = 1;
|
||||
|
||||
if (MIN(cm->width, cm->height) >= 720)
|
||||
sf->partition_search_breakout_dist_thr = (1 << 25);
|
||||
else
|
||||
sf->partition_search_breakout_dist_thr = (1 << 23);
|
||||
sf->partition_search_breakout_rate_thr = 1000;
|
||||
}
|
||||
|
||||
@ -134,6 +130,7 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
|
||||
sf->use_lp32x32fdct = 1;
|
||||
sf->use_fast_coef_updates = ONE_LOOP_REDUCED;
|
||||
sf->use_fast_coef_costing = 1;
|
||||
sf->motion_field_mode_search = !boosted;
|
||||
|
||||
if (MIN(cm->width, cm->height) >= 720)
|
||||
sf->partition_search_breakout_dist_thr = (1 << 26);
|
||||
|
Loading…
x
Reference in New Issue
Block a user