]> granicus.if.org Git - libvpx/commitdiff
Add start_show_index/show_frame_count
authorangiebird <angiebird@google.com>
Sat, 14 Dec 2019 00:44:21 +0000 (16:44 -0800)
committerangiebird <angiebird@google.com>
Mon, 16 Dec 2019 23:07:51 +0000 (15:07 -0800)
to GroupOfPicture

Change-Id: I905be72686b6c0e27ea782a12f1e8a8176c8b0f5

vp9/simple_encode.cc
vp9/simple_encode.h

index f756a888202aacc4c05c70efdb1338c63bc3953f..61a6bcc225f78a05ffbd10f07ec54ff6b18097d2 100644 (file)
@@ -117,6 +117,8 @@ static void SetGroupOfPicture(int first_is_key_frame, int use_alt_ref,
   // 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.
index 704aa48829214a41e711751c15fed9eb4473361e..286b66f0291187db2edafdeabacfbaae93cf8d8d 100644 (file)
@@ -57,6 +57,11 @@ struct GroupOfPicture {
   // 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 {