[FFmpeg-cvslog] r21431 - trunk/libavcodec/h264_cavlc.c

michael subversion
Sun Jan 24 19:23:46 CET 2010


Author: michael
Date: Sun Jan 24 19:23:46 2010
New Revision: 21431

Log:
Optimize suffix_length computation, 1 cpu cycle speedup.

Modified:
   trunk/libavcodec/h264_cavlc.c

Modified: trunk/libavcodec/h264_cavlc.c
==============================================================================
--- trunk/libavcodec/h264_cavlc.c	Sun Jan 24 19:18:08 2010	(r21430)
+++ trunk/libavcodec/h264_cavlc.c	Sun Jan 24 19:23:46 2010	(r21431)
@@ -470,9 +470,7 @@ static int decode_residual(H264Context *
                 level_code= (((2+level_code)>>1) ^ mask) - mask;
             }
             level[i]= level_code;
-
-            if(suffix_limit[suffix_length] + level_code > 2U*suffix_limit[suffix_length])
-                suffix_length++;
+            suffix_length+= suffix_limit[suffix_length] + level_code > 2U*suffix_limit[suffix_length];
         }
     }
 



More information about the ffmpeg-cvslog mailing list