From: angiebird Date: Sat, 14 Dec 2019 00:44:21 +0000 (-0800) Subject: Add start_show_index/show_frame_count X-Git-Tag: v1.9.0-rc1~120 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56f51daecb9e9c83b6b33b1aeba80f98d5ba71be;p=libvpx Add start_show_index/show_frame_count to GroupOfPicture Change-Id: I905be72686b6c0e27ea782a12f1e8a8176c8b0f5 --- diff --git a/vp9/simple_encode.cc b/vp9/simple_encode.cc index f756a8882..61a6bcc22 100644 --- a/vp9/simple_encode.cc +++ b/vp9/simple_encode.cc @@ -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. diff --git a/vp9/simple_encode.h b/vp9/simple_encode.h index 704aa4882..286b66f02 100644 --- a/vp9/simple_encode.h +++ b/vp9/simple_encode.h @@ -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 {