Mercurial > libavcodec.hg
comparison ac3dec.c @ 6091:c365f7b83133 libavcodec
cosmetics: vertical realignment after last commit
author | jbr |
---|---|
date | Sun, 30 Dec 2007 21:09:08 +0000 |
parents | b7b19fbc4746 |
children | 42bdc549a500 |
comparison
equal
deleted
inserted
replaced
6090:b7b19fbc4746 | 6091:c365f7b83133 |
---|---|
331 return err; | 331 return err; |
332 | 332 |
333 /* get decoding parameters from header info */ | 333 /* get decoding parameters from header info */ |
334 s->bit_alloc_params.sr_code = hdr.sr_code; | 334 s->bit_alloc_params.sr_code = hdr.sr_code; |
335 s->channel_mode = hdr.channel_mode; | 335 s->channel_mode = hdr.channel_mode; |
336 center_mix_level = gain_levels[center_levels[hdr.center_mix_level]]; | 336 center_mix_level = gain_levels[center_levels[hdr.center_mix_level]]; |
337 surround_mix_level = gain_levels[surround_levels[hdr.surround_mix_level]]; | 337 surround_mix_level = gain_levels[surround_levels[hdr.surround_mix_level]]; |
338 s->lfe_on = hdr.lfe_on; | 338 s->lfe_on = hdr.lfe_on; |
339 s->bit_alloc_params.sr_shift = hdr.sr_shift; | 339 s->bit_alloc_params.sr_shift = hdr.sr_shift; |
340 s->sampling_rate = hdr.sample_rate; | 340 s->sampling_rate = hdr.sample_rate; |
341 s->bit_rate = hdr.bit_rate; | 341 s->bit_rate = hdr.bit_rate; |
342 s->channels = hdr.channels; | 342 s->channels = hdr.channels; |
343 s->fbw_channels = s->channels - s->lfe_on; | 343 s->fbw_channels = s->channels - s->lfe_on; |
717 for (ch=1; ch<=channels; ch++) { | 717 for (ch=1; ch<=channels; ch++) { |
718 if (s->block_switch[ch]) { | 718 if (s->block_switch[ch]) { |
719 do_imdct_256(s, ch); | 719 do_imdct_256(s, ch); |
720 } else { | 720 } else { |
721 s->imdct_512.fft.imdct_calc(&s->imdct_512, s->tmp_output, | 721 s->imdct_512.fft.imdct_calc(&s->imdct_512, s->tmp_output, |
722 s->transform_coeffs[ch], | 722 s->transform_coeffs[ch], s->tmp_imdct); |
723 s->tmp_imdct); | |
724 } | 723 } |
725 /* For the first half of the block, apply the window, add the delay | 724 /* For the first half of the block, apply the window, add the delay |
726 from the previous block, and send to output */ | 725 from the previous block, and send to output */ |
727 s->dsp.vector_fmul_add_add(s->output[ch-1], s->tmp_output, | 726 s->dsp.vector_fmul_add_add(s->output[ch-1], s->tmp_output, |
728 s->window, s->delay[ch-1], 0, 256, 1); | 727 s->window, s->delay[ch-1], 0, 256, 1); |
729 /* For the second half of the block, apply the window and store the | 728 /* For the second half of the block, apply the window and store the |
730 samples to delay, to be combined with the next block */ | 729 samples to delay, to be combined with the next block */ |
731 s->dsp.vector_fmul_reverse(s->delay[ch-1], s->tmp_output+256, | 730 s->dsp.vector_fmul_reverse(s->delay[ch-1], s->tmp_output+256, |
732 s->window, 256); | 731 s->window, 256); |
733 } | 732 } |
734 } | 733 } |
735 | 734 |
736 /** | 735 /** |
737 * Downmix the output to mono or stereo. | 736 * Downmix the output to mono or stereo. |
789 /* dynamic range */ | 788 /* dynamic range */ |
790 i = !(s->channel_mode); | 789 i = !(s->channel_mode); |
791 do { | 790 do { |
792 if(get_bits1(gbc)) { | 791 if(get_bits1(gbc)) { |
793 s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)]-1.0) * | 792 s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)]-1.0) * |
794 s->avctx->drc_scale)+1.0; | 793 s->avctx->drc_scale)+1.0; |
795 } else if(blk == 0) { | 794 } else if(blk == 0) { |
796 s->dynamic_range[i] = 1.0f; | 795 s->dynamic_range[i] = 1.0f; |
797 } | 796 } |
798 } while(i--); | 797 } while(i--); |
799 | 798 |