shithub: libvpx

Download patch

ref: 8075dea1e521b1776574f2aca00bf8a13c8cdea6
parent: 979f0c0e5a901e9d6d21bcc5d566024acaaa22f9
parent: b77291abc9dc2884103c1846f3fc1a0395dd9e67
author: Jingning Han <jingning@google.com>
date: Wed Oct 24 20:01:29 EDT 2018

Merge "Refactor gop_length use case in tpl model"

--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1481,12 +1481,12 @@
 }
 
 void vp9_estimate_qp_gop(VP9_COMP *cpi) {
-  int gop_length = cpi->rc.baseline_gf_interval;
+  int gop_length = cpi->twopass.gf_group.gf_group_size;
   int bottom_index, top_index;
   int idx;
   const int gf_index = cpi->twopass.gf_group.index;
 
-  for (idx = 1; idx <= gop_length + 1 && idx < MAX_LAG_BUFFERS; ++idx) {
+  for (idx = 1; idx < gop_length; ++idx) {
     TplDepFrame *tpl_frame = &cpi->tpl_stats[idx];
     int target_rate = cpi->twopass.gf_group.bit_allocation[idx];
     cpi->twopass.gf_group.index = idx;