Mercurial > libavcodec.hg
changeset 11168:a820571a6712 libavcodec
Set sub_mb_type in direct_cache instead of just the direct flag.
Simpler, cleaner and faster.
author | michael |
---|---|
date | Sun, 14 Feb 2010 16:51:31 +0000 |
parents | c163ffa8c59e |
children | e251be458ac3 |
files | h264_cabac.c |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/h264_cabac.c Sun Feb 14 14:41:27 2010 +0000 +++ b/h264_cabac.c Sun Feb 14 16:51:31 2010 +0000 @@ -1447,11 +1447,8 @@ h->ref_cache[1][scan8[4]] = h->ref_cache[0][scan8[12]] = h->ref_cache[1][scan8[12]] = PART_NOT_AVAILABLE; - if( h->ref_count[0] > 1 || h->ref_count[1] > 1 ) { for( i = 0; i < 4; i++ ) - if( IS_DIRECT(h->sub_mb_type[i]) ) - fill_rectangle( &h->direct_cache[scan8[4*i]], 2, 2, 8, MB_TYPE_DIRECT2>>1, 1 ); - } + fill_rectangle( &h->direct_cache[scan8[4*i]], 2, 2, 8, (h->sub_mb_type[i]>>1)&0xFF, 1 ); } } else { for( i = 0; i < 4; i++ ) {