From d7ed861ce3b1751d666d0cd942582eff48d310bf Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Tue, 18 Sep 2018 15:08:53 -0700 Subject: [PATCH] Skip RD check for compound modes that have same sign bias The compound mode can only be run between two reference frames with different sign bias flags. Skip the search over same sign bias reference frames in the rate-distortion optimization. Change-Id: I4a57feedea880883cf87200de51862beac108310 --- vp9/encoder/vp9_rdopt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 1f1cd40d8..3c15af368 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -3350,6 +3350,10 @@ void vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, TileDataEnc *tile_data, if (comp_pred) { if (!cpi->allow_comp_inter_inter) continue; + if (cm->ref_frame_sign_bias[ref_frame] == + cm->ref_frame_sign_bias[second_ref_frame]) + continue; + // Skip compound inter modes if ARF is not available. if (!(cpi->ref_frame_flags & flag_list[second_ref_frame])) continue; -- 2.40.0