changeset 6620:eb001d01785c libavcodec

simplify
author michael
date Thu, 17 Apr 2008 02:30:00 +0000
parents 873e705732ca
children 53601889910b
files alac.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/alac.c	Wed Apr 16 21:50:41 2008 +0000
+++ b/alac.c	Thu Apr 17 02:30:00 2008 +0000
@@ -184,11 +184,9 @@
             int k; /* size of extra bits */
 
             /* read k, that is bits as is */
-            k = 31 - rice_kmodifier - count_leading_zeros((history >> 9) + 3);
+            k = 31 - count_leading_zeros((history >> 9) + 3);
 
-            if (k < 0)
-                k += rice_kmodifier;
-            else
+            if (k >= rice_kmodifier)
                 k = rice_kmodifier;
 
             if (k != 1) {