diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-13 02:47:41 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-13 02:47:41 +0000 |
commit | 812bfd7b4480094e1169f7dfabd5b44e2158379d (patch) | |
tree | 8e77231263b293f82c012d0394816ccc6ad43ff0 /libavcodec | |
parent | 828cfff63d8c9256aa4e0e2f5447909a6aedeb64 (diff) | |
download | ffmpeg-812bfd7b4480094e1169f7dfabd5b44e2158379d.tar.gz |
Special case for spatial direct MV predictor being 0.
a little less than 200 cpu cycles faster with the cathedral sample.
Originally committed as revision 21785 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264_direct.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index 96ee7c5cbe..8f297c4c5c 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -265,7 +265,13 @@ single_col: sub_mb_type |= MB_TYPE_L0L1; } - if(IS_INTERLACED(*mb_type) != IS_INTERLACED(mb_type_col[0])){ + if(!is_b8x8 && (mv[0]|mv[1]) == 0){ + fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, (uint8_t)ref[0], 1); + fill_rectangle(&h->ref_cache[1][scan8[0]], 4, 4, 8, (uint8_t)ref[1], 1); + fill_rectangle(&h->mv_cache[0][scan8[0]], 4, 4, 8, 0, 4); + fill_rectangle(&h->mv_cache[1][scan8[0]], 4, 4, 8, 0, 4); + *mb_type= (*mb_type & ~(MB_TYPE_8x8|MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_P1L0|MB_TYPE_P1L1))|MB_TYPE_16x16|MB_TYPE_DIRECT2; + }else if(IS_INTERLACED(*mb_type) != IS_INTERLACED(mb_type_col[0])){ int n=0; for(i8=0; i8<4; i8++){ int x8 = i8&1; |