summaryrefslogtreecommitdiff
path: root/libavcodec/h264_cabac.c
diff options
context:
space:
mode:
authorJason Garrett-Glaser <jason@x264.com>2011-06-29 15:38:39 -0700
committerJason Garrett-Glaser <jason@x264.com>2011-07-03 15:06:00 -0700
commit556f8a066cb33241bf29e85d7e24c9acf7ea9043 (patch)
treef55f5f363c90aa13fce36d06038bdeb69155c578 /libavcodec/h264_cabac.c
parentca80f11ec30834566f7b16c46a8f4eeacc9c2ce4 (diff)
H.264: template left MB handling
Faster H.264 decoding with ALLOW_INTERLACE off.
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r--libavcodec/h264_cabac.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index a643297f8a..6dacf7a336 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -1296,9 +1296,9 @@ static int decode_cabac_intra_mb_type(H264Context *h, int ctx_base, int intra_sl
if(intra_slice){
int ctx=0;
- if( h->left_type[0] & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM))
+ if( h->left_type[LTOP] & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM))
ctx++;
- if( h->top_type & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM))
+ if( h->top_type & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM))
ctx++;
if( get_cabac_noinline( &h->cabac, &state[ctx] ) == 0 )
return 0; /* I4x4 */
@@ -1376,10 +1376,10 @@ static int decode_cabac_mb_chroma_pre_mode( H264Context *h) {
int ctx = 0;
/* No need to test for IS_INTRA4x4 and IS_INTRA16x16, as we set chroma_pred_mode_table to 0 */
- if( h->left_type[0] && h->chroma_pred_mode_table[mba_xy] != 0 )
+ if( h->left_type[LTOP] && h->chroma_pred_mode_table[mba_xy] != 0 )
ctx++;
- if( h->top_type && h->chroma_pred_mode_table[mbb_xy] != 0 )
+ if( h->top_type && h->chroma_pred_mode_table[mbb_xy] != 0 )
ctx++;
if( get_cabac_noinline( &h->cabac, &h->cabac_state[64+ctx] ) == 0 )
@@ -1880,7 +1880,7 @@ int ff_h264_decode_mb_cabac(H264Context *h) {
int ctx = 0;
assert(h->slice_type_nos == AV_PICTURE_TYPE_B);
- if( !IS_DIRECT( h->left_type[0]-1 ) )
+ if( !IS_DIRECT( h->left_type[LTOP]-1 ) )
ctx++;
if( !IS_DIRECT( h->top_type-1 ) )
ctx++;
@@ -2250,7 +2250,7 @@ decode_intra_mb:
int i;
uint8_t *nnz_cache = h->non_zero_count_cache;
for (i = 0; i < 2; i++){
- if (h->left_type[i] && !IS_8x8DCT(h->left_type[i])){
+ if (h->left_type[LEFT(i)] && !IS_8x8DCT(h->left_type[LEFT(i)])){
nnz_cache[3+8* 1 + 2*8*i]=
nnz_cache[3+8* 2 + 2*8*i]=
nnz_cache[3+8* 6 + 2*8*i]=