summaryrefslogtreecommitdiff
path: root/vp9/simple_encode.h
diff options
context:
space:
mode:
authorangiebird <angiebird@google.com>2020-02-20 14:11:25 -0800
committerangiebird <angiebird@google.com>2020-02-20 14:24:22 -0800
commit320fb4c34a6d6bed560fbe564e7e1eae328be100 (patch)
tree03d8f171db0525101adcaa75a851dae5502c13ac /vp9/simple_encode.h
parent5774259307902a7d6ea5f2da06fa7d8f6f8284a7 (diff)
downloadlibvpx-320fb4c34a6d6bed560fbe564e7e1eae328be100.tar
libvpx-320fb4c34a6d6bed560fbe564e7e1eae328be100.tar.gz
libvpx-320fb4c34a6d6bed560fbe564e7e1eae328be100.tar.bz2
libvpx-320fb4c34a6d6bed560fbe564e7e1eae328be100.zip
Add kGoldenFrame and kOverlayFrame to FrameType
Add coding_index to EncodeFrameInfo Add start_coding_index to GroupOfPicture Add frame_coding_index_ to SimpleEncode The definition of coding index is as follows. Each show or no show frame is assigned with a coding index based on its coding order (starting from zero) in the coding process of the entire video. The coding index for each frame is unique. Change-Id: I43e18434a0dff0d1cd6f927a693d6860e4038337
Diffstat (limited to 'vp9/simple_encode.h')
-rw-r--r--vp9/simple_encode.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/vp9/simple_encode.h b/vp9/simple_encode.h
index 60f405e97..4e8fefff1 100644
--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -23,15 +23,18 @@ enum FrameType {
kKeyFrame = 0,
kInterFrame,
kAlternateReference,
+ kOverlayFrame,
+ kGoldenFrame,
};
// The enum type is similar to vp9: |MV_REFERENCE_FRAME|.
+// TODO(angiebird): Clarify the difference between FrameType and RefFrameType.
enum RefFrameType {
- kIntraFrame = 0,
- kLastFrame = 1,
- kGoldenFrame = 2,
+ kIntraRefFrame = 0,
+ kLastRefFrame = 1,
+ kGoldenRefFrame = 2,
kAltRefFrame = 3,
- kNoneRefFrame = -1,
+ kNoneRefRefFrame = -1,
};
// The frame is split to 4x4 blocks.
@@ -68,6 +71,11 @@ struct MotionVectorInfo {
struct EncodeFrameInfo {
int show_idx;
+
+ // Each show or no show frame is assigned with a coding index based on its
+ // coding order (starting from zero) in the coding process of the entire
+ // video. The coding index for each frame is unique.
+ int coding_index;
FrameType frame_type;
};
@@ -237,6 +245,8 @@ struct GroupOfPicture {
// The show index/timestamp of the earliest show frame in the group of
// pictures.
int start_show_index;
+ // The coding index of the first coding frame in the group of picture.
+ int start_coding_index;
};
class SimpleEncode {
@@ -309,11 +319,17 @@ class SimpleEncode {
int frame_rate_den_;
int target_bitrate_;
int num_frames_;
+
std::FILE *in_file_;
std::FILE *out_file_;
std::unique_ptr<EncodeImpl> impl_ptr_;
GroupOfPicture group_of_picture_;
+
+ // Each show or no show frame is assigned with a coding index based on its
+ // coding order (starting from zero) in the coding process of the entire
+ // video. The coding index of to-be-coded frame.
+ int frame_coding_index_;
};
} // namespace vp9