diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-04-19 03:25:20 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-04-19 03:25:20 +0000 |
commit | 91029be79005b17311fcf75f3f9f977f4d20cfd7 (patch) | |
tree | 672c42c26c923719256f5e308d1d077e23ff13bb /libavcodec/mpegvideo.h | |
parent | 1f0cd30fd9b656122436ecd625656a04f6235fb3 (diff) | |
download | ffmpeg-91029be79005b17311fcf75f3f9f977f4d20cfd7.tar.gz |
much better ME for b frames (a bit slow though)
fixed MC rounding for b frames
fixed hq mode with b-frames
Originally committed as revision 406 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.h')
-rw-r--r-- | libavcodec/mpegvideo.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 841d40fb3c..24943e5b19 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -141,7 +141,8 @@ typedef struct MpegEncContext { INT16 (*b_direct_forw_mv_table)[2];/* MV table (1MV per MB) direct mode b-frame encoding */ INT16 (*b_direct_back_mv_table)[2];/* MV table (1MV per MB) direct mode b-frame encoding */ INT16 (*b_direct_mv_table)[2]; /* MV table (1MV per MB) direct mode b-frame encoding */ - int me_method; /* ME algorithm */ + int me_method; /* ME algorithm */ + uint8_t *me_scratchpad; /* data area for the me algo, so that the ME doesnt need to malloc/free */ int mv_dir; #define MV_DIR_BACKWARD 1 #define MV_DIR_FORWARD 2 @@ -164,7 +165,8 @@ typedef struct MpegEncContext { UINT8 *fcode_tab; /* smallest fcode needed for each MV */ int has_b_frames; - int no_rounding; /* apply no rounding to motion compensation (MPEG4, msmpeg4, ...) */ + int no_rounding; /* apply no rounding to motion compensation (MPEG4, msmpeg4, ...) + for b-frames rounding mode is allways 0 */ /* macroblock layer */ int mb_x, mb_y; @@ -335,9 +337,7 @@ typedef struct MpegEncContext { UINT32 mb_line_avgsize; DCTELEM (*block)[64]; /* points to one of the following blocks */ - DCTELEM intra_block[6][64] __align8; - DCTELEM inter_block[6][64] __align8; - DCTELEM inter4v_block[6][64] __align8; + DCTELEM blocks[2][6][64] __align8; // for HQ mode we need to keep the best block void (*dct_unquantize_mpeg1)(struct MpegEncContext *s, DCTELEM *block, int n, int qscale); void (*dct_unquantize_mpeg2)(struct MpegEncContext *s, @@ -421,6 +421,7 @@ INT16 *h263_pred_motion(MpegEncContext * s, int block, int *px, int *py); void mpeg4_pred_ac(MpegEncContext * s, INT16 *block, int n, int dir); +void ff_set_mpeg4_time(MpegEncContext * s, int picture_number); void mpeg4_encode_picture_header(MpegEncContext *s, int picture_number); void h263_encode_init(MpegEncContext *s); |