shithub: libvpx

Download patch

ref: ace8ab89b7fdd8d43716abc2f38f1f673b3a5ee7
parent: 56f51daecb9e9c83b6b33b1aeba80f98d5ba71be
author: angiebird <angiebird@google.com>
date: Mon Dec 16 10:19:35 EST 2019

Rename encode_frame_index

to next_encode_frame_index

Change-Id: Id9bd2a0f6c4278bf0f0c270eb937a317232dead6

--- a/vp9/simple_encode.cc
+++ b/vp9/simple_encode.cc
@@ -103,11 +103,11 @@
 }
 
 static void IncreaseGroupOfPictureIndex(GroupOfPicture *group_of_picture) {
-  ++group_of_picture->encode_frame_index;
+  ++group_of_picture->next_encode_frame_index;
 }
 
 static int IsGroupOfPictureFinished(const GroupOfPicture &group_of_picture) {
-  return static_cast<size_t>(group_of_picture.encode_frame_index) ==
+  return static_cast<size_t>(group_of_picture.next_encode_frame_index) ==
          group_of_picture.encode_frame_list.size();
 }
 
@@ -116,7 +116,7 @@
                               GroupOfPicture *group_of_picture) {
   // Clean up the state of previous group of picture.
   group_of_picture->encode_frame_list.clear();
-  group_of_picture->encode_frame_index = 0;
+  group_of_picture->next_encode_frame_index = 0;
   group_of_picture->show_frame_count = coding_frame_count - use_alt_ref;
   group_of_picture->start_show_index = first_show_idx;
   {
@@ -296,7 +296,7 @@
 
 EncodeFrameInfo SimpleEncode::GetNextEncodeFrameInfo() const {
   return group_of_picture_
-      .encode_frame_list[group_of_picture_.encode_frame_index];
+      .encode_frame_list[group_of_picture_.next_encode_frame_index];
 }
 
 void SimpleEncode::EncodeFrame(EncodeFrameResult *encode_frame_result) {
--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -52,11 +52,12 @@
   std::vector<EncodeFrameInfo> encode_frame_list;
   // Indicates the index of the next coding frame in encode_frame_list.
   // In other words, EncodeFrameInfo of the next coding frame can be
-  // obtained with encode_frame_list[encode_frame_index].
-  // Internally, encode_frame_index will be set to zero after the last frame of
-  // the group of pictures is coded. Otherwise, encode_frame_index will be
-  // increased after each EncodeFrame()/EncodeFrameWithQuantizeIndex() call.
-  int encode_frame_index;
+  // obtained with encode_frame_list[next_encode_frame_index].
+  // Internally, next_encode_frame_index will be set to zero after the last
+  // frame of the group of pictures is coded. Otherwise, next_encode_frame_index
+  // will be increased after each EncodeFrame()/EncodeFrameWithQuantizeIndex()
+  // call.
+  int next_encode_frame_index;
   // Number of show frames in this group of pictures.
   int show_frame_count;
   // The show index/timestamp of the earliest show frame in the group of