From 56f51daecb9e9c83b6b33b1aeba80f98d5ba71be Mon Sep 17 00:00:00 2001 From: angiebird Date: Fri, 13 Dec 2019 16:44:21 -0800 Subject: [PATCH] Add start_show_index/show_frame_count to GroupOfPicture Change-Id: I905be72686b6c0e27ea782a12f1e8a8176c8b0f5 --- vp9/simple_encode.cc | 2 ++ vp9/simple_encode.h | 5 +++++ 2 files changed, 7 insertions(+) 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 { -- 2.40.0