Commit d6231b9e authored by Michael Niedermayer's avatar Michael Niedermayer

use ac prediction in mpeg4 encoding (5% smaller intra-blocks/keyframes)

some minor optimizations
last non zero index cant be 64 bugfix

Originally committed as revision 331 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 49c9325f
This diff is collapsed.
......@@ -552,7 +552,7 @@ static inline void gmc1_motion(MpegEncContext *s,
int dxy, offset, mx, my, src_x, src_y, height, linesize;
int motion_x, motion_y;
if(s->real_sprite_warping_points>1) printf("Oops, thats bad, contact the developers\n");
if(s->real_sprite_warping_points>1) printf("more than 1 warp point isnt supported\n");
motion_x= s->sprite_offset[0][0];
motion_y= s->sprite_offset[0][1];
src_x = s->mb_x * 16 + (motion_x >> (s->sprite_warping_accuracy+1));
......@@ -1247,6 +1247,8 @@ static void encode_picture(MpegEncContext *s, int picture_number)
case FMT_H263:
if (s->h263_msmpeg4)
msmpeg4_encode_mb(s, s->block, motion_x, motion_y);
else if(s->h263_pred)
mpeg4_encode_mb(s, s->block, motion_x, motion_y);
else
h263_encode_mb(s, s->block, motion_x, motion_y);
break;
......
......@@ -145,7 +145,7 @@ typedef struct MpegEncContext {
int avg_mb_var; /* average MB variance for current frame */
INT64 wanted_bits;
INT64 total_bits;
/* H.263 specific */
int gob_number;
int gob_index;
......@@ -313,6 +313,9 @@ static inline int get_rl_index(const RLTable *rl, int last, int run, int level)
void h263_encode_mb(MpegEncContext *s,
DCTELEM block[6][64],
int motion_x, int motion_y);
void mpeg4_encode_mb(MpegEncContext *s,
DCTELEM block[6][64],
int motion_x, int motion_y);
void h263_encode_picture_header(MpegEncContext *s, int picture_number);
int h263_encode_gob_header(MpegEncContext * s, int mb_line);
void h263_dc_scale(MpegEncContext *s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment