shithub: libvpx

Download patch

ref: 4f5444949fd235b1d40af5be2d2d3d9e740f58e8
parent: da6682aac9e8d12491175fffd2031845ae25b585
parent: 4dae31877dd3cceb5a129cb9b42f61d58665ddf3
author: Jingning Han <[email protected]>
date: Tue Oct 16 17:23:52 EDT 2018

Merge "Refactor GOP reference frame ordering for tpl model"

--- 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;