diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-02-28 13:07:07 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-02-28 13:07:07 +0000 |
commit | e51d6d27a6240f269878b4c110135195113b628b (patch) | |
tree | 3cf91ab3a437c968aedae9ceabceb7a306d19a30 /libavcodec/mpegvideo.c | |
parent | d671e2feac59bb5bb6c2883980eadb92e0c8ac89 (diff) | |
download | ffmpeg-e51d6d27a6240f269878b4c110135195113b628b.tar.gz |
h263(+) clenaup & bugfixes
Originally committed as revision 1614 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index cbf859c104..2277216891 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -656,8 +656,7 @@ int MPV_encode_init(AVCodecContext *avctx) s->h263_aic = 1; /* These are just to be sure */ - s->umvplus = 0; - s->umvplus_dec = 0; + s->umvplus = 1; avctx->delay=0; s->low_delay=1; break; @@ -2908,17 +2907,14 @@ static void encode_picture(MpegEncContext *s, int picture_number) s->qscale= (int)(s->frame_qscale + 0.5); //FIXME qscale / ... stuff for ME ratedistoration - if(s->msmpeg4_version){ - if(s->pict_type==I_TYPE) - s->no_rounding=1; - else if(s->flipflop_rounding) - s->no_rounding ^= 1; - }else if(s->out_format == FMT_H263){ - if(s->pict_type==I_TYPE) - s->no_rounding=0; - else if(s->pict_type!=B_TYPE) + if(s->pict_type==I_TYPE){ + if(s->msmpeg4_version) s->no_rounding=1; + else s->no_rounding=0; + }else if(s->pict_type!=B_TYPE){ + if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4) s->no_rounding ^= 1; } + /* Estimate motion for every MB */ s->mb_intra=0; //for the rate distoration & bit compare functions if(s->pict_type != I_TYPE){ @@ -2993,7 +2989,7 @@ static void encode_picture(MpegEncContext *s, int picture_number) //printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum); } - if(s->codec_id != CODEC_ID_H263P){ //FIXME use umvplus or something + if(!s->umvplus){ if(s->pict_type==P_TYPE || s->pict_type==S_TYPE) { s->f_code= ff_get_best_fcode(s, s->p_mv_table, MB_TYPE_INTER); |