ref: b77291abc9dc2884103c1846f3fc1a0395dd9e67
parent: 77e109340d99b3a0ddda9cb5c5d605a236eb46b2
author: Jingning Han <jingning@google.com>
date: Mon Oct 22 06:37:09 EDT 2018
Refactor gop_length use case in tpl model Make it support both single- and multi-layer ARF GOP structure. Change-Id: I760a95804d1b583b057120f6d6be65195a0e6c19
--- 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;