Mercurial > libavcodec.hg
comparison alac.c @ 5518:d2ef80f5fd7e libavcodec
use skip_bits where appropriate
author | alex |
---|---|
date | Thu, 09 Aug 2007 00:57:36 +0000 |
parents | 9f8219a3b86f |
children | cb5999c836af |
comparison
equal
deleted
inserted
replaced
5517:998ed46cfa66 | 5518:d2ef80f5fd7e |
---|---|
199 /* multiply x by 2^k - 1, as part of their strange algorithm */ | 199 /* multiply x by 2^k - 1, as part of their strange algorithm */ |
200 x = (x << k) - x; | 200 x = (x << k) - x; |
201 | 201 |
202 if (extrabits > 1) { | 202 if (extrabits > 1) { |
203 x += extrabits - 1; | 203 x += extrabits - 1; |
204 get_bits(&alac->gb, k); | 204 skip_bits(&alac->gb, k); |
205 } else | 205 } else |
206 get_bits(&alac->gb, k - 1); | 206 skip_bits(&alac->gb, k - 1); |
207 } | 207 } |
208 } | 208 } |
209 | 209 |
210 x_modified = sign_modifier + x; | 210 x_modified = sign_modifier + x; |
211 final_val = (x_modified + 1) / 2; | 211 final_val = (x_modified + 1) / 2; |
248 + extrabits - 1; | 248 + extrabits - 1; |
249 | 249 |
250 if (extrabits < 2) { | 250 if (extrabits < 2) { |
251 x = 1 - extrabits; | 251 x = 1 - extrabits; |
252 block_size += x; | 252 block_size += x; |
253 get_bits(&alac->gb, k - 1); | 253 skip_bits(&alac->gb, k - 1); |
254 } else { | 254 } else { |
255 get_bits(&alac->gb, k); | 255 skip_bits(&alac->gb, k); |
256 } | 256 } |
257 } | 257 } |
258 | 258 |
259 if (block_size > 0) { | 259 if (block_size > 0) { |
260 memset(&output_buffer[output_count+1], 0, block_size * 4); | 260 memset(&output_buffer[output_count+1], 0, block_size * 4); |
482 } | 482 } |
483 | 483 |
484 /* 2^result = something to do with output waiting. | 484 /* 2^result = something to do with output waiting. |
485 * perhaps matters if we read > 1 frame in a pass? | 485 * perhaps matters if we read > 1 frame in a pass? |
486 */ | 486 */ |
487 get_bits(&alac->gb, 4); | 487 skip_bits(&alac->gb, 4); |
488 | 488 |
489 get_bits(&alac->gb, 12); /* unknown, skip 12 bits */ | 489 skip_bits(&alac->gb, 12); /* unknown, skip 12 bits */ |
490 | 490 |
491 /* the output sample size is stored soon */ | 491 /* the output sample size is stored soon */ |
492 hassize = get_bits1(&alac->gb); | 492 hassize = get_bits1(&alac->gb); |
493 | 493 |
494 wasted_bytes = get_bits(&alac->gb, 2); /* unknown ? */ | 494 wasted_bytes = get_bits(&alac->gb, 2); /* unknown ? */ |