Index: source/libvpx/vp9/encoder/vp9_firstpass.h |
=================================================================== |
--- source/libvpx/vp9/encoder/vp9_firstpass.h (revision 281795) |
+++ source/libvpx/vp9/encoder/vp9_firstpass.h (working copy) |
@@ -12,12 +12,25 @@ |
#define VP9_ENCODER_VP9_FIRSTPASS_H_ |
#include "vp9/encoder/vp9_lookahead.h" |
+#include "vp9/encoder/vp9_ratectrl.h" |
#ifdef __cplusplus |
extern "C" { |
#endif |
+#if CONFIG_FP_MB_STATS |
typedef struct { |
+ PREDICTION_MODE mode; |
+ int err; |
+ int_mv mv; |
+} FIRSTPASS_MB_STATS; |
+ |
+typedef struct { |
+ FIRSTPASS_MB_STATS *mb_stats; |
+} FIRSTPASS_FRAME_MB_STATS; |
+#endif |
+ |
+typedef struct { |
double frame; |
double intra_error; |
double coded_error; |
@@ -39,7 +52,26 @@ |
int64_t spatial_layer_id; |
} FIRSTPASS_STATS; |
+typedef enum { |
+ KF_UPDATE = 0, |
+ LF_UPDATE = 1, |
+ GF_UPDATE = 2, |
+ ARF_UPDATE = 3, |
+ OVERLAY_UPDATE = 4, |
+ FRAME_UPDATE_TYPES = 5 |
+} FRAME_UPDATE_TYPE; |
+ |
typedef struct { |
+ unsigned char index; |
+ RATE_FACTOR_LEVEL rf_level[(MAX_LAG_BUFFERS * 2) + 1]; |
+ FRAME_UPDATE_TYPE update_type[(MAX_LAG_BUFFERS * 2) + 1]; |
+ unsigned char arf_src_offset[(MAX_LAG_BUFFERS * 2) + 1]; |
+ unsigned char arf_update_idx[(MAX_LAG_BUFFERS * 2) + 1]; |
+ unsigned char arf_ref_idx[(MAX_LAG_BUFFERS * 2) + 1]; |
+ int bit_allocation[(MAX_LAG_BUFFERS * 2) + 1]; |
+} GF_GROUP; |
+ |
+typedef struct { |
unsigned int section_intra_rating; |
unsigned int next_iiratio; |
FIRSTPASS_STATS total_stats; |
@@ -56,6 +88,10 @@ |
double kf_intra_err_min; |
double gf_intra_err_min; |
+#if CONFIG_FP_MB_STATS |
+ FIRSTPASS_FRAME_MB_STATS this_frame_mb_stats; |
+#endif |
+ |
// Projected total bits available for a key frame group of frames |
int64_t kf_group_bits; |
@@ -68,8 +104,7 @@ |
int active_worst_quality; |
- int gf_group_index; |
- int gf_group_bit_allocation[MAX_LAG_BUFFERS * 2]; |
+ GF_GROUP gf_group; |
} TWO_PASS; |
struct VP9_COMP; |