- int input_picture_number;
- int picture_number;
- int picture_in_gop_number; /* 0-> first pic in gop, ... */
- int b_frames_since_non_b; /* used for encoding, relative to not yet reordered input */
- int mb_width, mb_height; /* number of MBs horizontally & vertically */
- int h_edge_pos, v_edge_pos;/* horizontal / vertical position of the right/bottom edge (pixel replicateion)*/
- int mb_num; /* number of MBs of a picture */
- int linesize; /* line size, in bytes, may be different from width */
- int uvlinesize; /* line size, for chroma in bytes, may be different from width */
- Picture picture[MAX_PICTURE_COUNT]; /* main picture buffer */
- Picture *input_picture[MAX_PICTURE_COUNT]; /* next pictures on display order for encoding*/
- Picture *reordered_input_picture[MAX_PICTURE_COUNT]; /* pointer to the next pictures in codedorder for encoding*/
- Picture last_picture; /* previous picture */
- Picture next_picture; /* previous picture (for bidir pred) */
- Picture new_picture; /* source picture for encoding */
- Picture current_picture; /* buffer to store the decompressed current picture */
- int last_dc[3]; /* last DC values for MPEG1 */
- INT16 *dc_val[3]; /* used for mpeg4 DC prediction, all 3 arrays must be continuous */
+ int input_picture_number; ///< used to set pic->display_picture_number, shouldnt be used for/by anything else
+ int coded_picture_number; ///< used to set pic->coded_picture_number, shouldnt be used for/by anything else
+ int picture_number; //FIXME remove, unclear definition
+ int picture_in_gop_number; ///< 0-> first pic in gop, ...
+ int b_frames_since_non_b; ///< used for encoding, relative to not yet reordered input
+ int64_t user_specified_pts;///< last non zero pts from AVFrame which was passed into avcodec_encode_video()
+ int mb_width, mb_height; ///< number of MBs horizontally & vertically
+ int mb_stride; ///< mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11
+ int b8_stride; ///< 2*mb_width+1 used for some 8x8 block arrays to allow simple addressing
+ int b4_stride; ///< 4*mb_width+1 used for some 4x4 block arrays to allow simple addressing
+ int h_edge_pos, v_edge_pos;///< horizontal / vertical position of the right/bottom edge (pixel replication)
+ int mb_num; ///< number of MBs of a picture
+ int linesize; ///< line size, in bytes, may be different from width
+ int uvlinesize; ///< line size, for chroma in bytes, may be different from width
+ Picture *picture; ///< main picture buffer
+ Picture **input_picture; ///< next pictures on display order for encoding
+ Picture **reordered_input_picture; ///< pointer to the next pictures in codedorder for encoding
+
+ int start_mb_y; ///< start mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
+ int end_mb_y; ///< end mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
+ struct MpegEncContext *thread_context[MAX_THREADS];
+
+ /**
+ * copy of the previous picture structure.
+ * note, linesize & data, might not match the previous picture (for field pictures)
+ */
+ Picture last_picture;
+
+ /**
+ * copy of the next picture structure.
+ * note, linesize & data, might not match the next picture (for field pictures)
+ */
+ Picture next_picture;
+
+ /**
+ * copy of the source picture structure for encoding.
+ * note, linesize & data, might not match the source picture (for field pictures)
+ */
+ Picture new_picture;
+
+ /**
+ * copy of the current picture structure.
+ * note, linesize & data, might not match the current picture (for field pictures)
+ */
+ Picture current_picture; ///< buffer to store the decompressed current picture
+
+ Picture *last_picture_ptr; ///< pointer to the previous picture.
+ Picture *next_picture_ptr; ///< pointer to the next picture (for bidir pred)
+ Picture *current_picture_ptr; ///< pointer to the current picture
+ uint8_t *visualization_buffer[3]; //< temporary buffer vor MV visualization
+ int last_dc[3]; ///< last DC values for MPEG1
+ int16_t *dc_val_base;
+ int16_t *dc_val[3]; ///< used for mpeg4 DC prediction, all 3 arrays must be continuous
+ int16_t dc_cache[4*5];