Commit 8db5f17b authored by Jingning Han's avatar Jingning Han

Skip RD search over lst 2/3 frame for non-nearest neighbor mvs

Skip the rate distortion search over last 2/3 reference frames for
the reference motion vectors derived from non-nearest neighbors.
The overall coding performance change is in the noise range - 0.05%
better. Speed up the encoding process by 20%.

Change-Id: I823b8ca2805ae332f4c9bc8ee255069a82db4331
parent 6001fb05
......@@ -9908,6 +9908,22 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
mbmi->ref_mv_idx = 1 + ref_idx;
if (cpi->sf.reduce_inter_modes) {
if (mbmi->ref_frame[0] == LAST2_FRAME ||
mbmi->ref_frame[0] == LAST3_FRAME ||
mbmi->ref_frame[1] == LAST2_FRAME ||
mbmi->ref_frame[1] == LAST3_FRAME) {
if (mbmi_ext
->ref_mv_stack[ref_frame_type]
[mbmi->ref_mv_idx + idx_offset]
.weight < REF_CAT_LEVEL) {
*mbmi = backup_mbmi;
x->skip = backup_skip;
continue;
}
}
}
if (comp_pred) {
int ref_mv_idx = mbmi->ref_mv_idx;
// Special case: NEAR_NEWMV and NEW_NEARMV modes use
......
......@@ -140,6 +140,9 @@ static void set_good_speed_features_framesize_independent(AV1_COMP *cpi,
AV1_COMMON *const cm = &cpi->common;
const int boosted = frame_is_boosted(cpi);
// Speed 0 for all speed features that give neutral coding performance change.
sf->reduce_inter_modes = 1;
if (speed >= 1) {
sf->selective_ref_frame = 1;
sf->tx_size_search_init_depth_rect = 1;
......@@ -452,6 +455,7 @@ void av1_set_speed_features_framesize_independent(AV1_COMP *cpi) {
sf->tx_size_search_method = USE_FULL_RD;
sf->tx_size_search_init_depth_sqr = 0;
sf->tx_size_search_init_depth_rect = 0;
sf->reduce_inter_modes = 0;
sf->adaptive_motion_search = 0;
sf->adaptive_pred_interp_filter = 0;
sf->adaptive_mode_search = 0;
......
......@@ -300,6 +300,9 @@ typedef struct SPEED_FEATURES {
// adds overhead.
int static_segmentation;
// Limit the inter mode tested in the RD loop
int reduce_inter_modes;
// If 1 we iterate finding a best reference for 2 ref frames together - via
// a log search that iterates 4 times (check around mv for last for best
// error of combined predictor then check around mv for alt). If 0 we
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment