Consolidate obmc related speed features This patch combines disable_obmc and prune_obmc_prob_thresh speed features Change-Id: If964721c8369f508b015f3431035b3a29b36a56b
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index 8707594..9e826d0 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c
@@ -1476,8 +1476,8 @@ } } - if (!cpi->sf.inter_sf.disable_obmc && - cpi->sf.inter_sf.prune_obmc_prob_thresh > 0) { + if (cpi->sf.inter_sf.prune_obmc_prob_thresh > 0 && + cpi->sf.inter_sf.prune_obmc_prob_thresh < INT_MAX) { const FRAME_UPDATE_TYPE update_type = get_frame_update_type(&cpi->gf_group); for (i = 0; i < BLOCK_SIZES_ALL; i++) {
diff --git a/av1/encoder/encoder_utils.h b/av1/encoder/encoder_utils.h index ef7538f..317b473 100644 --- a/av1/encoder/encoder_utils.h +++ b/av1/encoder/encoder_utils.h
@@ -861,8 +861,8 @@ if (cpi->sf.tx_sf.tx_type_search.prune_tx_type_using_stats) { av1_copy(frame_probs->tx_type_probs, default_tx_type_probs); } - if (!cpi->sf.inter_sf.disable_obmc && - cpi->sf.inter_sf.prune_obmc_prob_thresh > 0) { + if (cpi->sf.inter_sf.prune_obmc_prob_thresh > 0 && + cpi->sf.inter_sf.prune_obmc_prob_thresh < INT_MAX) { av1_copy(frame_probs->obmc_probs, default_obmc_probs); } if (cpi->sf.inter_sf.prune_warped_prob_thresh > 0) {
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c index 8e507bf..5f5cbfd 100644 --- a/av1/encoder/partition_search.c +++ b/av1/encoder/partition_search.c
@@ -1246,8 +1246,8 @@ if (tile_data->allow_update_cdf) update_stats(&cpi->common, td); // Gather obmc and warped motion count to update the probability. - if ((!cpi->sf.inter_sf.disable_obmc && - cpi->sf.inter_sf.prune_obmc_prob_thresh > 0) || + if ((cpi->sf.inter_sf.prune_obmc_prob_thresh > 0 && + cpi->sf.inter_sf.prune_obmc_prob_thresh < INT_MAX) || (cm->features.allow_warped_motion && cpi->sf.inter_sf.prune_warped_prob_thresh > 0)) { const int inter_block = is_inter_block(mbmi);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index 0529ef1..2a02842 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c
@@ -1352,8 +1352,7 @@ const int prune_obmc = cpi->frame_probs.obmc_probs[update_type][bsize] < cpi->sf.inter_sf.prune_obmc_prob_thresh; if ((!cpi->oxcf.motion_mode_cfg.enable_obmc || - cpi->sf.inter_sf.disable_obmc || cpi->sf.rt_sf.use_nonrd_pick_mode || - prune_obmc) && + cpi->sf.rt_sf.use_nonrd_pick_mode || prune_obmc) && mbmi->motion_mode == OBMC_CAUSAL) continue; @@ -3843,8 +3842,7 @@ const FRAME_UPDATE_TYPE update_type = get_frame_update_type(&cpi->gf_group); const int prune_obmc = cpi->frame_probs.obmc_probs[update_type][bsize] < cpi->sf.inter_sf.prune_obmc_prob_thresh; - if (cpi->oxcf.motion_mode_cfg.enable_obmc && !cpi->sf.inter_sf.disable_obmc && - !prune_obmc) { + if (cpi->oxcf.motion_mode_cfg.enable_obmc && !prune_obmc) { if (check_num_overlappable_neighbors(mbmi) && is_motion_variation_allowed_bsize(bsize)) { int dst_width1[MAX_MB_PLANE] = { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE };
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c index 854b710..c871661 100644 --- a/av1/encoder/speed_features.c +++ b/av1/encoder/speed_features.c
@@ -266,7 +266,7 @@ sf->tx_sf.tx_type_search.prune_tx_type_using_stats = 2; } - sf->inter_sf.prune_obmc_prob_thresh = 16; + sf->inter_sf.prune_obmc_prob_thresh = INT_MAX; } if (speed >= 5) { @@ -609,7 +609,7 @@ sf->inter_sf.prune_inter_modes_based_on_tpl = boosted ? 0 : 2; sf->inter_sf.prune_extended_comp_mode = 2; sf->inter_sf.disable_smooth_interintra = 1; - sf->inter_sf.disable_obmc = 1; + sf->inter_sf.prune_obmc_prob_thresh = INT_MAX; sf->inter_sf.disable_onesided_comp = 1; sf->interp_sf.cb_pred_filter_search = 1; @@ -1157,7 +1157,6 @@ inter_sf->prune_comp_type_by_model_rd = 0; inter_sf->perform_best_rd_based_gating_for_chroma = 0; inter_sf->prune_obmc_prob_thresh = 0; - inter_sf->disable_obmc = 0; inter_sf->disable_interinter_wedge_var_thresh = 0; inter_sf->disable_interintra_wedge_var_thresh = 0; inter_sf->prune_ref_mv_idx_search = 0;
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h index a01b25f..e534c96 100644 --- a/av1/encoder/speed_features.h +++ b/av1/encoder/speed_features.h
@@ -684,11 +684,9 @@ int disable_onesided_comp; // Prune obmc search using previous frame stats. + // INT_MAX : disable obmc search int prune_obmc_prob_thresh; - // Disable obmc. - int disable_obmc; - // Prune warped motion search using previous frame stats. int prune_warped_prob_thresh;