From: Jingning Han Date: Wed, 10 Oct 2018 21:52:30 +0000 (-0700) Subject: Call tpl model build at the beginning of a GOP X-Git-Tag: v1.8.0~248^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0f7f002b13081ed016033741a021987f70ac568;p=libvpx Call tpl model build at the beginning of a GOP The gop index 0 is default as kf / gf. The effective first coding frame controlled by the current GOP rate allocation is indexed 1. Call the tpl model build for the current GOP once at index 1 position. This would unify the calling system for single/multi-layer ARF GOP structure. Change-Id: I4ce69337e04646098d5513c0aa56b4e0b4483337 --- diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 4a55e08a4..8e35a8bad 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -6373,7 +6373,7 @@ int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags, for (i = 0; i < MAX_REF_FRAMES; ++i) cpi->scaled_ref_idx[i] = INVALID_IDX; } - if (arf_src_index && cpi->sf.enable_tpl_model) { + if (cpi->twopass.gf_group.index == 1 && cpi->sf.enable_tpl_model) { vp9_estimate_qp_gop(cpi); setup_tpl_stats(cpi); }