diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-03-23 20:21:33 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-03-23 20:21:33 +0000 |
commit | 9d2a0355299c7c6004f1b804e6339e5e8759cd27 (patch) | |
tree | eb1faa9f689e41b5442815066eeb9c9222e131a4 /libavcodec/mpegvideo.c | |
parent | 098eefe183bc3430de4330525becc89da7468d20 (diff) | |
download | ffmpeg-9d2a0355299c7c6004f1b804e6339e5e8759cd27.tar.gz |
fixing motion estimation with h263p hopefully
Originally committed as revision 355 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 839fe1a0e4..5a5060bf0d 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -381,6 +381,9 @@ int MPV_encode_init(AVCodecContext *avctx) else if (s->out_format == FMT_MPEG1) mpeg1_encode_init(s); + /* dont use mv_penalty table for crap MV as it would be confused */ + if(s->full_search<4) s->mv_penalty= default_mv_penalty; + s->encoding = 1; /* init */ @@ -1126,8 +1129,8 @@ static void encode_picture(MpegEncContext *s, int picture_number) } } - /* find best f_code */ - if(s->pict_type==P_TYPE){ + /* find best f_code for ME which do unlimited searches */ + if(s->pict_type==P_TYPE && s->full_search>3){ int mv_num[8]; int i; int loose=0; @@ -1149,6 +1152,10 @@ static void encode_picture(MpegEncContext *s, int picture_number) if(loose > 10) break; //FIXME this is pretty ineffective } s->f_code= i; +/* for(i=0; i<=MAX_FCODE; i++){ + printf("%d ", mv_num[i]); + } + printf("\n");*/ }else{ s->f_code= 1; } |