+ int frame_bits; /* bits used for the current frame */
+ int pb_frame_bits; /* bits of the last b...bp group */
+ Predictor i_pred;
+ Predictor p_pred;
+ double qsum; /* sum of qscales */
+ double qcount; /* count of qscales */
+ double short_term_qsum; /* sum of recent qscales */
+ double short_term_qcount; /* count of recent qscales */
+ RateControlContext rc_context;
+
+ /* statistics, used for 2-pass encoding */
+ int mv_bits;
+ int header_bits;
+ int i_tex_bits;
+ int p_tex_bits;
+ int i_count;
+ int p_count;
+ int skip_count;
+ int misc_bits; // cbp, mb_type
+ int last_bits; //temp var used for calculating the above vars
+
+ /* error concealment / resync */
+ int resync_mb_x; /* x position of last resync marker */
+ int resync_mb_y; /* y position of last resync marker */
+ int mb_num_left; /* number of MBs left in this video packet */
+ GetBitContext next_resync_gb; /* starts at the next resync marker */
+ int next_resync_qscale; /* qscale of next resync marker */
+ int next_resync_pos; /* bitstream position of next resync marker */
+#define DECODING_AC_LOST -1
+#define DECODING_ACDC_LOST -2
+#define DECODING_DESYNC -3
+ int decoding_error;
+ int next_p_frame_damaged; /* set if the next p frame is damaged, to avoid showing trashed b frames */
+ int error_resilience;
+