From: Jingning Han Date: Tue, 18 Sep 2018 19:13:18 +0000 (-0700) Subject: Sync ref frame writing with decoder X-Git-Tag: v1.8.0~308^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e1f78e34cc243bf2eee30081c97ee2944ee4808;p=libvpx Sync ref frame writing with decoder Enable the encoder to produce compound reference frame writing that supports both 2 fwd + 1 bwd and 1 fwd + 2 bwd cases. Change-Id: I63d2141435e2de7d8115d52b974fc41c2e608405 --- diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index b96f59f0c..76b7b123d 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -217,7 +217,8 @@ static void write_ref_frames(const VP9_COMMON *cm, const MACROBLOCKD *const xd, } if (is_compound) { - vpx_write(w, mi->ref_frame[0] == GOLDEN_FRAME, + const int idx = cm->ref_frame_sign_bias[cm->comp_fixed_ref]; + vpx_write(w, mi->ref_frame[!idx] == cm->comp_var_ref[1], vp9_get_pred_prob_comp_ref_p(cm, xd)); } else { const int bit0 = mi->ref_frame[0] != LAST_FRAME;