diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-12-22 23:30:57 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-12-22 23:30:57 +0000 |
commit | d951bb9a5c4ff8e45ade4a1413e0aa5f3b73c5a3 (patch) | |
tree | 94af5eaa5db2d7941593dbe8a4df0544f14ffed2 /libavcodec/motion_est.c | |
parent | 79cc11b3ec19cfa63553467015e6cbdb7895a603 (diff) | |
download | ffmpeg-d951bb9a5c4ff8e45ade4a1413e0aa5f3b73c5a3.tar.gz |
test DIRECT{0,0} too if flag mv0 is used
slight PSNR/bitrate increase
Originally committed as revision 7361 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est.c')
-rw-r--r-- | libavcodec/motion_est.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 775544b26a..f9c0d0a601 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -1978,6 +1978,8 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, } //FIXME something smarter if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //dont try direct mode if its invalid for this MB + if(s->codec_id == CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && s->flags&CODEC_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy]) + type |= CANDIDATE_MB_TYPE_DIRECT0; #if 0 if(s->out_format == FMT_MPEG1) type |= CANDIDATE_MB_TYPE_INTRA; |