ref: 4dae31877dd3cceb5a129cb9b42f61d58665ddf3
parent: f1e3f340ef699ed1335ae6244eceebdf474c4c41
author: Jingning Han <jingning@google.com>
date: Mon Oct 15 11:27:02 EDT 2018
Refactor GOP reference frame ordering for tpl model Process the frames in the order of GOP structure definition. Decouple the dependency on rc->baseline_gf_interval. Change-Id: I0d42c542aca552975cc8f08b0eb8b22ccf6a9537
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -5415,7 +5415,7 @@
++*tpl_group_frames;
// Initialize P frames
- for (frame_idx = 2; frame_idx < MAX_LAG_BUFFERS; ++frame_idx) {
+ for (frame_idx = 2; frame_idx < MAX_ARF_GOP_SIZE; ++frame_idx) {
const int frame_gop_offset = gf_group->frame_gop_index[frame_idx];
struct lookahead_entry *buf =
vp9_lookahead_peek(cpi->lookahead, frame_gop_offset - 1);
@@ -5433,7 +5433,7 @@
// The length of group of pictures is baseline_gf_interval, plus the
// beginning golden frame from last GOP, plus the last overlay frame in
// the same GOP.
- if (frame_idx == cpi->rc.baseline_gf_interval + 1) break;
+ if (frame_idx == gf_group->gf_group_size) break;
}
gld_index = frame_idx;