summaryrefslogtreecommitdiff
path: root/vp9/simple_encode.h
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/simple_encode.h')
-rw-r--r--vp9/simple_encode.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/vp9/simple_encode.h b/vp9/simple_encode.h
index 1f01322c5..d2360d66c 100644
--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -25,6 +25,17 @@ enum FrameType {
kAlternateReference,
};
+// The frame is split to 4x4 blocks.
+// This structure contains the information of each 4x4 block.
+struct PartitionInfo {
+ int row; // row pixel offset of current 4x4 block
+ int column; // column pixel offset of current 4x4 block
+ int row_start; // row pixel offset of the start of the prediction block
+ int column_start; // column pixel offset of the start of the prediction block
+ int width; // prediction block width
+ int height; // prediction block height
+};
+
struct EncodeFrameInfo {
int show_idx;
FrameType frame_type;
@@ -126,6 +137,10 @@ struct EncodeFrameResult {
uint64_t sse;
int quantize_index;
FrameCounts frame_counts;
+ int num_rows_4x4; // number of row units, in size of 4.
+ int num_cols_4x4; // number of column units, in size of 4.
+ // The pointer to the partition information of the frame.
+ std::unique_ptr<PartitionInfo[]> partition_info;
};
struct GroupOfPicture {
@@ -212,8 +227,10 @@ class SimpleEncode {
private:
class EncodeImpl;
- int frame_width_;
- int frame_height_;
+ int frame_width_; // frame width in pixels.
+ int frame_height_; // frame height in pixels.
+ int num_rows_4x4_; // number of row units, in size of 4.
+ int num_cols_4x4_; // number of column units, in size of 4.
int frame_rate_num_;
int frame_rate_den_;
int target_bitrate_;