comparison mpegvideo.h @ 2015:3ab8f3e2ae6a libavcodec

moving motion estimation specific variables from MpegEncContext -> MotionEstContext
author michael
date Tue, 11 May 2004 01:38:46 +0000
parents b5753525f9a8
children f089d25c82f0
comparison
equal deleted inserted replaced
2014:15c885db82a8 2015:3ab8f3e2ae6a
194 194
195 /** 195 /**
196 * Motion estimation context. 196 * Motion estimation context.
197 */ 197 */
198 typedef struct MotionEstContext{ 198 typedef struct MotionEstContext{
199 AVCodecContext *avctx;
199 int skip; ///< set if ME is skiped for the current MB 200 int skip; ///< set if ME is skiped for the current MB
200 int co_located_mv[4][2]; ///< mv from last p frame for direct mode ME 201 int co_located_mv[4][2]; ///< mv from last p frame for direct mode ME
201 int direct_basis_mv[4][2]; 202 int direct_basis_mv[4][2];
202 uint8_t *scratchpad; ///< data area for the me algo, so that the ME doesnt need to malloc/free 203 uint8_t *scratchpad; ///< data area for the me algo, so that the ME doesnt need to malloc/free
203 uint8_t *best_mb; 204 uint8_t *best_mb;
224 int pred_y; 225 int pred_y;
225 uint8_t *src[4][4]; 226 uint8_t *src[4][4];
226 uint8_t *ref[4][4]; 227 uint8_t *ref[4][4];
227 int stride; 228 int stride;
228 int uvstride; 229 int uvstride;
230 /* temp variables for picture complexity calculation */
231 int mc_mb_var_sum_temp;
232 int mb_var_sum_temp;
233 int scene_change_score;
229 /* cmp, chroma_cmp;*/ 234 /* cmp, chroma_cmp;*/
230 op_pixels_func (*hpel_put)[4]; 235 op_pixels_func (*hpel_put)[4];
231 op_pixels_func (*hpel_avg)[4]; 236 op_pixels_func (*hpel_avg)[4];
232 qpel_mc_func (*qpel_put)[16]; 237 qpel_mc_func (*qpel_put)[16];
233 qpel_mc_func (*qpel_avg)[16]; 238 qpel_mc_func (*qpel_avg)[16];
391 int16_t (*p_field_mv_table[2][2])[2]; ///< MV table (2MV per MB) interlaced p-frame encoding 396 int16_t (*p_field_mv_table[2][2])[2]; ///< MV table (2MV per MB) interlaced p-frame encoding
392 int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced b-frame encoding 397 int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced b-frame encoding
393 uint8_t (*p_field_select_table[2]); 398 uint8_t (*p_field_select_table[2]);
394 uint8_t (*b_field_select_table[2][2]); 399 uint8_t (*b_field_select_table[2][2]);
395 int me_method; ///< ME algorithm 400 int me_method; ///< ME algorithm
396 int scene_change_score;
397 int mv_dir; 401 int mv_dir;
398 #define MV_DIR_BACKWARD 1 402 #define MV_DIR_BACKWARD 1
399 #define MV_DIR_FORWARD 2 403 #define MV_DIR_FORWARD 2
400 #define MV_DIRECT 4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4) 404 #define MV_DIRECT 4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4)
401 int mv_type; 405 int mv_type;
506 int b_count; 510 int b_count;
507 int skip_count; 511 int skip_count;
508 int misc_bits; ///< cbp, mb_type 512 int misc_bits; ///< cbp, mb_type
509 int last_bits; ///< temp var used for calculating the above vars 513 int last_bits; ///< temp var used for calculating the above vars
510 514
511 /* temp variables for picture complexity calculation */
512 int mc_mb_var_sum_temp;
513 int mb_var_sum_temp;
514
515 /* error concealment / resync */ 515 /* error concealment / resync */
516 int error_count; 516 int error_count;
517 uint8_t *error_status_table; ///< table of the error status of each MB 517 uint8_t *error_status_table; ///< table of the error status of each MB
518 #define VP_START 1 ///< current MB is the first after a resync marker 518 #define VP_START 1 ///< current MB is the first after a resync marker
519 #define AC_ERROR 2 519 #define AC_ERROR 2