summaryrefslogtreecommitdiff
path: root/vp9/simple_encode.h
diff options
context:
space:
mode:
authorangiebird <angiebird@google.com>2019-11-26 16:40:48 -0800
committerangiebird <angiebird@google.com>2019-12-10 11:41:01 -0800
commit757a5e6aa926cd5ee0ad6e7424cfd2968d0a03a4 (patch)
tree49c1d0f7c9c1c82ca9249710438007fb15ca4238 /vp9/simple_encode.h
parent38a4e46fd3029c903e124c9f47e88063eb7a4018 (diff)
downloadlibvpx-757a5e6aa926cd5ee0ad6e7424cfd2968d0a03a4.tar
libvpx-757a5e6aa926cd5ee0ad6e7424cfd2968d0a03a4.tar.gz
libvpx-757a5e6aa926cd5ee0ad6e7424cfd2968d0a03a4.tar.bz2
libvpx-757a5e6aa926cd5ee0ad6e7424cfd2968d0a03a4.zip
Add GetNextEncodeFrameInfo ObserveGroupOfPicture
GetNextEncodeFrameInfo() Gets encode_frame_info for the next coding frame. ObserveGroupOfPicture() Provides the group of pictures that the next coding frame is in. Change-Id: Idbc437d32c392f25b06efb2d4e1ec01347d678f2
Diffstat (limited to 'vp9/simple_encode.h')
-rw-r--r--vp9/simple_encode.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/vp9/simple_encode.h b/vp9/simple_encode.h
index 471b4e7a8..b8085298b 100644
--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -25,6 +25,11 @@ enum FrameType {
kAlternateReference,
};
+struct EncodeFrameInfo {
+ int show_idx;
+ FrameType frame_type;
+};
+
struct EncodeFrameResult {
int show_idx;
FrameType frame_type;
@@ -38,6 +43,11 @@ struct EncodeFrameResult {
int quantize_index;
};
+struct GroupOfPicture {
+ std::vector<EncodeFrameInfo> encode_frame_list;
+ int encode_frame_index;
+};
+
class SimpleEncode {
public:
SimpleEncode(int frame_width, int frame_height, int frame_rate_num,
@@ -72,6 +82,14 @@ class SimpleEncode {
// counted.
int GetKeyFrameGroupSize(int key_frame_index) const;
+ // Provides the group of pictures that the next coding frame is in.
+ // Only call this function between StartEncode() and EndEncode()
+ GroupOfPicture ObserveGroupOfPicture() const;
+
+ // Gets encode_frame_info for the next coding frame.
+ // Only call this function between StartEncode() and EndEncode()
+ EncodeFrameInfo GetNextEncodeFrameInfo() const;
+
// Encodes a frame
// This function should be called after StartEncode() and before EndEncode().
void EncodeFrame(EncodeFrameResult *encode_frame_result);
@@ -97,6 +115,8 @@ class SimpleEncode {
int num_frames_;
std::FILE *file_;
std::unique_ptr<EncodeImpl> impl_ptr_;
+
+ GroupOfPicture group_of_picture_;
};
} // namespace vp9