Mercurial > libavcodec.hg
comparison wma.c @ 9868:5cc32c474caf libavcodec
Introduce WMACoef typedef for decoded coefficients
and change default type to float so that the run level
decoding functionality can be shared with wmapro
author | faust3 |
---|---|
date | Sat, 20 Jun 2009 09:05:28 +0000 |
parents | eb5916527064 |
children | 1f6b569bf958 |
comparison
equal
deleted
inserted
replaced
9867:4ccec8d051fa | 9868:5cc32c474caf |
---|---|
442 * @return 0 on success, -1 otherwise | 442 * @return 0 on success, -1 otherwise |
443 */ | 443 */ |
444 int ff_wma_run_level_decode(AVCodecContext* avctx, GetBitContext* gb, | 444 int ff_wma_run_level_decode(AVCodecContext* avctx, GetBitContext* gb, |
445 VLC *vlc, | 445 VLC *vlc, |
446 const uint16_t *level_table, const uint16_t *run_table, | 446 const uint16_t *level_table, const uint16_t *run_table, |
447 int version, int16_t *ptr, int offset, | 447 int version, WMACoef *ptr, int offset, |
448 int num_coefs, int block_len, int frame_len_bits, | 448 int num_coefs, int block_len, int frame_len_bits, |
449 int coef_nb_bits) | 449 int coef_nb_bits) |
450 { | 450 { |
451 int code, run, level, sign; | 451 int code, run, level, sign; |
452 int16_t* eptr = ptr + num_coefs; | 452 WMACoef* eptr = ptr + num_coefs; |
453 for(;;) { | 453 for(;;) { |
454 code = get_vlc2(gb, vlc->table, VLCBITS, VLCMAX); | 454 code = get_vlc2(gb, vlc->table, VLCBITS, VLCMAX); |
455 if (code < 0) | 455 if (code < 0) |
456 return -1; | 456 return -1; |
457 if (code == 1) { | 457 if (code == 1) { |