Commit c30c18f5 authored by Cheng Chen's avatar Cheng Chen

Skip intra modes in interframe prediction

Skip remaining intra modes in rd search, when current intra_rd
is 1.5 times worse than current best_rd.

Performance: -0.01%
Speed: 5% faster.

Change-Id: I0265fe4618a23d676546b929cd5f694ce9a890f3
parent c7fa12c0
......@@ -9227,6 +9227,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
int64_t mode_threshold[MAX_MODES];
int *mode_map = tile_data->mode_map[bsize];
const int mode_search_skip_flags = sf->mode_search_skip_flags;
int skip_intra_modes = 0;
HandleInterModeArgs args = {
{ NULL }, { MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE },
......@@ -9510,6 +9511,10 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
second_ref_frame = av1_mode_order[mode_index].ref_frame[1];
mbmi->ref_mv_idx = 0;
if (ref_frame == INTRA_FRAME) {
if (sf->skip_intra_in_interframe && skip_intra_modes) continue;
}
if (sf->drop_ref) {
if (ref_frame > INTRA_FRAME && second_ref_frame > INTRA_FRAME) {
if (num_available_refs > 2) {
......@@ -10211,6 +10216,11 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
best_intra_rd = this_rd;
best_intra_mode = mbmi->mode;
}
if (sf->skip_intra_in_interframe) {
if (best_rd != INT64_MAX && this_rd > (best_rd + (best_rd >> 1)))
skip_intra_modes = 1;
}
}
if (!disable_skip && ref_frame == INTRA_FRAME) {
......
......@@ -493,6 +493,7 @@ void av1_set_speed_features_framesize_independent(AV1_COMP *cpi) {
sf->disable_wedge_search_var_thresh = 0;
sf->fast_wedge_sign_estimate = 0;
sf->drop_ref = 0;
sf->skip_intra_in_interframe = 1;
for (i = 0; i < TX_SIZES; i++) {
sf->intra_y_mode_mask[i] = INTRA_ALL;
......
......@@ -538,6 +538,9 @@ typedef struct SPEED_FEATURES {
// flag to drop some ref frames in compound motion search
int drop_ref;
// flag to allow skipping intra mode for inter frame prediction
int skip_intra_in_interframe;
} SPEED_FEATURES;
struct AV1_COMP;
......
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