diff options
author | Juanjo <pulento@users.sourceforge.net> | 2002-04-14 18:57:51 +0000 |
---|---|---|
committer | Juanjo <pulento@users.sourceforge.net> | 2002-04-14 18:57:51 +0000 |
commit | e4986da9ce91c4a6f9e942c4225f0c3d90e5db95 (patch) | |
tree | 17a8d25051d364c09e4e878e1408a3b2f315869c /libavcodec/mpegvideo.c | |
parent | b1ec5875a63d5cf61629ff69fb337c6d96e7b964 (diff) | |
download | ffmpeg-e4986da9ce91c4a6f9e942c4225f0c3d90e5db95.tar.gz |
- ME setting moved to AVCodecContext/MpegEncContext, no longer a global.
- EPZS ME algo used by default.
- HQ flag activated for ffmpeg.
- Cosmetics ...
Originally committed as revision 398 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 778ef76470..7ae54ad93e 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -313,8 +313,10 @@ int MPV_encode_init(AVCodecContext *avctx) } else { s->intra_only = 0; } - s->full_search = motion_estimation_method; - + + /* ME algorithm */ + s->me_method = avctx->me_method; + /* Fixed QSCALE */ s->fixed_qscale = (avctx->flags & CODEC_FLAG_QSCALE); switch(avctx->codec->id) { @@ -413,7 +415,7 @@ int MPV_encode_init(AVCodecContext *avctx) 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; + if (s->me_method < 0) s->mv_penalty = default_mv_penalty; s->encoding = 1; @@ -1344,7 +1346,7 @@ static void encode_picture(MpegEncContext *s, int picture_number) } /* find best f_code for ME which do unlimited searches */ - if(s->pict_type==P_TYPE && s->full_search>3){ + if(s->pict_type == P_TYPE && s->me_method >= 0){ int mv_num[8]; int i; int loose=0; |