shithub: libvpx

Download patch

ref: d0f7f002b13081ed016033741a021987f70ac568
parent: 71ff94d3d378996a1a3be1042db3a3edf97180ee
author: Jingning Han <jingning@google.com>
date: Wed Oct 10 10:52:30 EDT 2018

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

--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -6373,7 +6373,7 @@
     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);
   }