]> git.sesse.net Git - x264/blobdiff - common/quant.c
Remove explicit run calculation from coeff_level_run
[x264] / common / quant.c
index 26c4b0cd314e346d3bce9b4efc2465c3f9e3a383..0ba71d3941940bfa19ea23ac1070740a3e24694f 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * quant.c: quantization and level-run
  *****************************************************************************
- * Copyright (C) 2005-2011 x264 project
+ * Copyright (C) 2005-2012 x264 project
  *
  * Authors: Loren Merritt <lorenm@u.washington.edu>
  *          Fiona Glaser <fiona@x264.com>
@@ -376,12 +376,9 @@ static int x264_coeff_level_run##num( dctcoef *dct, x264_run_level_t *runlevel )
     int mask = 0;\
     do\
     {\
-        int r = 0;\
-        runlevel->level[i_total] = dct[i_last];\
+        runlevel->level[i_total++] = dct[i_last];\
         mask |= 1 << (i_last);\
-        while( --i_last >= 0 && dct[i_last] == 0 )\
-            r++;\
-        runlevel->run[i_total++] = r;\
+        while( --i_last >= 0 && dct[i_last] == 0 );\
     } while( i_last >= 0 );\
     runlevel->mask = mask;\
     return i_total;\