shithub: libvpx

Download patch

ref: dbd3b8210f0c1f6bfd11dbbe30c5f8a4a86a4782
parent: 99081038e7d34ba82fa323dc9ae282ca0c8c6083
parent: b898e68c7b98765a8549cb58557d87abd8751fd6
author: Jingning Han <jingning@google.com>
date: Sat Sep 29 00:20:27 EDT 2018

Merge "Remove deprecated arf_update_index from GF_GROUP"

--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2206,11 +2206,8 @@
   // For key frames the frame target rate is already set and it
   // is also the golden frame.
   // === [frame_index == 0] ===
-  if (!key_frame) {
+  if (!key_frame)
     set_gf_overlay_frame_type(gf_group, frame_index, rc->source_alt_ref_active);
-    gf_group->arf_update_idx[frame_index] = arf_buffer_indices[0];
-    gf_group->arf_ref_idx[frame_index] = arf_buffer_indices[0];
-  }
 
   ++frame_index;
 
@@ -2219,12 +2216,8 @@
     gf_group->update_type[frame_index] = ARF_UPDATE;
     gf_group->rf_level[frame_index] = GF_ARF_STD;
     gf_group->layer_depth[frame_index] = 1;
-
     gf_group->arf_src_offset[frame_index] =
         (unsigned char)(rc->baseline_gf_interval - 1);
-
-    gf_group->arf_update_idx[frame_index] = arf_buffer_indices[0];
-    gf_group->arf_ref_idx[frame_index] = arf_buffer_indices[0];
     ++frame_index;
   }
 
@@ -2244,12 +2237,8 @@
       rc->baseline_gf_interval - (key_frame || rc->source_alt_ref_pending);
 
   for (i = 0; i < normal_frames; ++i) {
-    int arf_idx = 0;
     if (twopass->stats_in >= twopass->stats_in_end) break;
 
-    gf_group->arf_update_idx[frame_index] = arf_buffer_indices[arf_idx];
-    gf_group->arf_ref_idx[frame_index] = arf_buffer_indices[arf_idx];
-
     gf_group->update_type[frame_index] = LF_UPDATE;
     gf_group->rf_level[frame_index] = INTER_NORMAL;
     gf_group->arf_src_offset[frame_index] = 0;
@@ -2262,8 +2251,6 @@
   // We need to configure the frame at the end of the sequence + 1 that will be
   // the start frame for the next group. Otherwise prior to the call to
   // vp9_rc_get_second_pass_params() the data will be undefined.
-  gf_group->arf_update_idx[frame_index] = arf_buffer_indices[0];
-  gf_group->arf_ref_idx[frame_index] = arf_buffer_indices[0];
 
   set_gf_overlay_frame_type(gf_group, frame_index, rc->source_alt_ref_pending);
 
--- a/vp9/encoder/vp9_firstpass.h
+++ b/vp9/encoder/vp9_firstpass.h
@@ -135,8 +135,6 @@
   FRAME_UPDATE_TYPE update_type[MAX_STATIC_GF_GROUP_LENGTH + 2];
   unsigned char arf_src_offset[MAX_STATIC_GF_GROUP_LENGTH + 2];
   unsigned char layer_depth[MAX_STATIC_GF_GROUP_LENGTH + 2];
-  unsigned char arf_update_idx[MAX_STATIC_GF_GROUP_LENGTH + 2];
-  unsigned char arf_ref_idx[MAX_STATIC_GF_GROUP_LENGTH + 2];
   int bit_allocation[MAX_STATIC_GF_GROUP_LENGTH + 2];
   int gfu_boost[MAX_STATIC_GF_GROUP_LENGTH + 2];