diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-01-02 12:48:09 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-01-02 12:48:09 +0000 |
commit | f931ff7b9f535c122348b8569f2742cfbc480ccd (patch) | |
tree | 3c128e53d6655cec0123633207d9412e621402aa /libavcodec/mpegvideo.c | |
parent | f5fb6b34fd1053d1fcb61e4f35de8fa8befb834b (diff) |
pre motion estimation cleanup/bugfix
Originally committed as revision 1390 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index f773d9f306..fec95f4ca1 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -2789,9 +2789,10 @@ static void encode_picture(MpegEncContext *s, int picture_number) /* Estimate motion for every MB */ if(s->pict_type != I_TYPE){ - if(s->pict_type != B_TYPE){ if((s->avctx->pre_me && s->last_non_b_pict_type==I_TYPE) || s->avctx->pre_me==2){ + s->me.pre_pass=1; + for(mb_y=s->mb_height-1; mb_y >=0 ; mb_y--) { for(mb_x=s->mb_width-1; mb_x >=0 ; mb_x--) { s->mb_x = mb_x; @@ -2799,6 +2800,7 @@ static void encode_picture(MpegEncContext *s, int picture_number) ff_pre_estimate_p_frame_motion(s, mb_x, mb_y); } } + s->me.pre_pass=0; } } |