[FFmpeg-cvslog] r16279 - trunk/libavcodec/h264.c

michael subversion
Mon Dec 22 18:14:14 CET 2008


Author: michael
Date: Mon Dec 22 18:14:13 2008
New Revision: 16279

Log:
Simplify decode_cabac_mb_ref() a little bit, 2 cpu cycles faster on
pentium dual.


Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	(original)
+++ trunk/libavcodec/h264.c	Mon Dec 22 18:14:13 2008
@@ -4991,10 +4991,7 @@ static int decode_cabac_mb_ref( H264Cont
 
     while( get_cabac( &h->cabac, &h->cabac_state[54+ctx] ) ) {
         ref++;
-        if( ctx < 4 )
-            ctx = 4;
-        else
-            ctx = 5;
+        ctx = (ctx>>2)+4;
         if(ref >= 32 /*h->ref_list[list]*/){
             return -1;
         }




More information about the ffmpeg-cvslog mailing list