changeset 11186:90de754f70d6 libavcodec

2 cpu cycles faster context calculation for decode_cabac_intra_mb_type()
author michael
date Tue, 16 Feb 2010 02:51:37 +0000
parents 6011626999a1
children a4c6587e2c27
files h264_cabac.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/h264_cabac.c	Tue Feb 16 00:09:30 2010 +0000
+++ b/h264_cabac.c	Tue Feb 16 02:51:37 2010 +0000
@@ -723,9 +723,9 @@
 
     if(intra_slice){
         int ctx=0;
-        if( h->left_type[0] && !IS_INTRA4x4(h->left_type[0]))
+        if( h->left_type[0] & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM))
             ctx++;
-        if( h->top_type     && !IS_INTRA4x4(h->top_type) )
+        if( h->top_type     & (MB_TYPE_INTRA16x16|MB_TYPE_INTRA_PCM))
             ctx++;
         if( get_cabac_noinline( &h->cabac, &state[ctx] ) == 0 )
             return 0;   /* I4x4 */