From: Jingning Han Date: Mon, 15 Sep 2014 17:12:05 +0000 (-0700) Subject: Remove redundant reference frame check in sub8x8 RD search X-Git-Tag: v1.4.0~764^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=252822e81c1d6f7edb359f4358fe9cec2fbb14a8;p=platform%2Fupstream%2Flibvpx.git Remove redundant reference frame check in sub8x8 RD search The valid reference frame check in sub8x8 rate-distortion optimization search has been included in the ref_frame_skip_mask scheme. This commit removes the later further validation checks that are not in effect. Change-Id: I853b477c44037d3dc0afec6cbfce08a96c597a75 --- diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index f80b123..0887769 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -3391,8 +3391,8 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x, } } - if (ref_frame_skip_mask[0] & (1 << ref_index) && - ref_frame_skip_mask[1] & (1 << ref_index)) + if (ref_frame_skip_mask[0] & (1 << ref_frame) && + ref_frame_skip_mask[1] & (1 << MAX(0, second_ref_frame))) continue; // Test best rd so far against threshold for trying this mode. @@ -3401,22 +3401,17 @@ int64_t vp9_rd_pick_inter_mode_sub8x8(VP9_COMP *cpi, MACROBLOCK *x, rd_opt->thresh_freq_fact[bsize][ref_index])) continue; - if (ref_frame > INTRA_FRAME && - !(cpi->ref_frame_flags & flag_list[ref_frame])) { - continue; - } - comp_pred = second_ref_frame > INTRA_FRAME; if (comp_pred) { if (!cm->allow_comp_inter_inter) continue; - if (!(cpi->ref_frame_flags & flag_list[second_ref_frame])) continue; // Do not allow compound prediction if the segment level reference frame // feature is in use as in this case there can only be one reference. if (vp9_segfeature_active(seg, segment_id, SEG_LVL_REF_FRAME)) continue; + if ((cpi->sf.mode_search_skip_flags & FLAG_SKIP_COMP_BESTINTRA) && best_mbmode.ref_frame[0] == INTRA_FRAME) continue;