From fe471693acbf0d5bb61018b38ea11bdc342eec08 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Tue, 23 Oct 2018 16:24:28 -0700 Subject: [PATCH] Reset frame udpate flags after qp estimate in tpl After the frame quantizer estimate run in tpl model, reset the actual value assigned to the current coding frame. This would avoid certain frame update flags being overwritten by different frame types' update. Change-Id: Idde2ba1108f1f68747b14149b211f882965c99f0 --- vp9/encoder/vp9_ratectrl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index e0d7190..dc43bb1 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -1485,6 +1485,8 @@ void vp9_estimate_qp_gop(VP9_COMP *cpi) { int bottom_index, top_index; int idx; const int gf_index = cpi->twopass.gf_group.index; + const int is_src_frame_alt_ref = cpi->rc.is_src_frame_alt_ref; + const int refresh_frame_context = cpi->common.refresh_frame_context; for (idx = 1; idx <= gop_length; ++idx) { TplDepFrame *tpl_frame = &cpi->tpl_stats[idx]; @@ -1498,6 +1500,8 @@ void vp9_estimate_qp_gop(VP9_COMP *cpi) { } // Reset the actual index and frame update cpi->twopass.gf_group.index = gf_index; + cpi->rc.is_src_frame_alt_ref = is_src_frame_alt_ref; + cpi->common.refresh_frame_context = refresh_frame_context; vp9_configure_buffer_updates(cpi, gf_index); } -- 2.7.4