changeset 10994:2179ea01df62 libavcodec

Simplify suffix_length computation, same speed.
author michael
date Sun, 24 Jan 2010 18:18:08 +0000
parents 3932fd1a1c25
children 5352afcd6748
files h264_cavlc.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/h264_cavlc.c	Sun Jan 24 18:17:01 2010 +0000
+++ b/h264_cavlc.c	Sun Jan 24 18:18:08 2010 +0000
@@ -443,9 +443,7 @@
         }else{
             level_code += ((level_code>>31)|1) & -(trailing_ones < 3);
 
-            suffix_length = 1;
-            if(level_code + 3U > 6U)
-                suffix_length++;
+            suffix_length = 1 + (level_code + 3U > 6U);
             level[trailing_ones]= level_code;
         }