Commit 06b40cc3 authored by Debargha Mukherjee's avatar Debargha Mukherjee

Add two levels for selective ref frame sp. feature

The first level is turned on for speed 1.

Change-Id: I3dba0f0250b97a25e174cacc2a46ca7f76572c85
parent 203016e8
......@@ -9962,12 +9962,14 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
#if CONFIG_FRAME_MARKER
if (sf->selective_ref_frame) {
if (mbmi->ref_frame[0] == ALTREF2_FRAME ||
mbmi->ref_frame[1] == ALTREF2_FRAME)
if (cm->cur_frame->alt2_frame_offset < cm->frame_offset) continue;
if (mbmi->ref_frame[0] == BWDREF_FRAME ||
mbmi->ref_frame[1] == BWDREF_FRAME)
if (cm->cur_frame->bwd_frame_offset < cm->frame_offset) continue;
if (sf->selective_ref_frame == 2) {
if (mbmi->ref_frame[0] == ALTREF2_FRAME ||
mbmi->ref_frame[1] == ALTREF2_FRAME)
if (cm->cur_frame->alt2_frame_offset < cm->frame_offset) continue;
if (mbmi->ref_frame[0] == BWDREF_FRAME ||
mbmi->ref_frame[1] == BWDREF_FRAME)
if (cm->cur_frame->bwd_frame_offset < cm->frame_offset) continue;
}
if (mbmi->ref_frame[0] == LAST3_FRAME ||
mbmi->ref_frame[1] == LAST3_FRAME)
if (cm->cur_frame->lst3_frame_offset <= cm->cur_frame->gld_frame_offset)
......@@ -10944,7 +10946,6 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
}
}
PALETTE_EXIT:
// The inter modes' rate costs are not calculated precisely in some cases.
// Therefore, sometimes, NEWMV is chosen instead of NEARESTMV, NEARMV, and
// GLOBALMV. Here, checks are added for those cases, and the mode decisions
......
......@@ -135,6 +135,7 @@ static void set_good_speed_features_framesize_independent(AV1_COMP *cpi,
const int boosted = frame_is_boosted(cpi);
if (speed >= 1) {
sf->selective_ref_frame = 1;
sf->tx_size_search_init_depth_rect = 1;
sf->tx_size_search_init_depth_sqr = 1;
}
......@@ -144,7 +145,7 @@ static void set_good_speed_features_framesize_independent(AV1_COMP *cpi,
sf->tx_type_search.fast_intra_tx_type_search = 1;
sf->tx_type_search.fast_inter_tx_type_search = 1;
sf->selective_ref_frame = 1;
sf->selective_ref_frame = 2;
if ((cpi->twopass.fr_content_type == FC_GRAPHICS_ANIMATION) ||
av1_internal_image_edge(cpi)) {
......
......@@ -335,6 +335,7 @@ typedef struct SPEED_FEATURES {
BLOCK_SIZE always_this_block_size;
// Drop less likely picked reference frames in the RD search
// Has two levels for now: 1 and 2, where 2 is more aggressive than 1.
int selective_ref_frame;
// Skip rectangular partition test when partition type none gives better
......
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