shithub: libvpx

Download patch

ref: 56f51daecb9e9c83b6b33b1aeba80f98d5ba71be
parent: 01347cd62cd5ecc18752d4d9ec04f4cb1e3a7166
author: angiebird <[email protected]>
date: Fri Dec 13 11:44:21 EST 2019

Add start_show_index/show_frame_count

to GroupOfPicture

Change-Id: I905be72686b6c0e27ea782a12f1e8a8176c8b0f5

--- a/vp9/simple_encode.cc
+++ b/vp9/simple_encode.cc
@@ -117,6 +117,8 @@
   // 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->show_frame_count = coding_frame_count - use_alt_ref;
+  group_of_picture->start_show_index = first_show_idx;
   {
     // First frame in the group of pictures. It's either key frame or show inter
     // frame.
--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -57,6 +57,11 @@
   // the group of pictures is coded. Otherwise, encode_frame_index will be
   // increased after each EncodeFrame()/EncodeFrameWithQuantizeIndex() call.
   int 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
+  // pictures.
+  int start_show_index;
 };
 
 class SimpleEncode {