diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-14 14:41:27 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-14 14:41:27 +0000 |
commit | 2dc380ca8ea9d161c337a47a111f83d2e84ceb9c (patch) | |
tree | 2b040dcab1ad5b8330adc5b8b186b90fec2ea12f /libavcodec/h264_cabac.c | |
parent | d3037bbe6b35ab7d416561905f547ecb227e7db4 (diff) | |
download | ffmpeg-2dc380ca8ea9d161c337a47a111f83d2e84ceb9c.tar.gz |
Store sub_mb_type in direct_cache/direct_table.
This is equal complexity but could be more usefull.
Originally committed as revision 21821 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r-- | libavcodec/h264_cabac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index a35b3eb0bd..c0a1332a4d 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -951,9 +951,9 @@ static int decode_cabac_mb_ref( H264Context *h, int list, int n ) { int ctx = 0; if( h->slice_type_nos == FF_B_TYPE) { - if( refa > 0 && !h->direct_cache[scan8[n] - 1] ) + if( refa > 0 && !(h->direct_cache[scan8[n] - 1]&(MB_TYPE_DIRECT2>>1)) ) ctx++; - if( refb > 0 && !h->direct_cache[scan8[n] - 8] ) + if( refb > 0 && !(h->direct_cache[scan8[n] - 8]&(MB_TYPE_DIRECT2>>1)) ) ctx += 2; } else { if( refa > 0 ) @@ -1450,7 +1450,7 @@ decode_intra_mb: 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, 1, 1 ); + fill_rectangle( &h->direct_cache[scan8[4*i]], 2, 2, 8, MB_TYPE_DIRECT2>>1, 1 ); } } } else { |