Mercurial > libavcodec.hg
comparison alac.c @ 6620:eb001d01785c libavcodec
simplify
author | michael |
---|---|
date | Thu, 17 Apr 2008 02:30:00 +0000 |
parents | 48759bfbd073 |
children | 53601889910b |
comparison
equal
deleted
inserted
replaced
6619:873e705732ca | 6620:eb001d01785c |
---|---|
182 /* standard rice encoding */ | 182 /* standard rice encoding */ |
183 int extrabits; | 183 int extrabits; |
184 int k; /* size of extra bits */ | 184 int k; /* size of extra bits */ |
185 | 185 |
186 /* read k, that is bits as is */ | 186 /* read k, that is bits as is */ |
187 k = 31 - rice_kmodifier - count_leading_zeros((history >> 9) + 3); | 187 k = 31 - count_leading_zeros((history >> 9) + 3); |
188 | 188 |
189 if (k < 0) | 189 if (k >= rice_kmodifier) |
190 k += rice_kmodifier; | |
191 else | |
192 k = rice_kmodifier; | 190 k = rice_kmodifier; |
193 | 191 |
194 if (k != 1) { | 192 if (k != 1) { |
195 extrabits = show_bits(&alac->gb, k); | 193 extrabits = show_bits(&alac->gb, k); |
196 | 194 |