Mercurial > libavcodec.hg
comparison ac3dec.c @ 7547:8226017a65ae libavcodec
mdct wrapper function to match fft
author | lorenm |
---|---|
date | Tue, 12 Aug 2008 00:38:30 +0000 |
parents | 97383e012cb9 |
children | 60b5c1e5a7ee |
comparison
equal
deleted
inserted
replaced
7546:97383e012cb9 | 7547:8226017a65ae |
---|---|
603 for(k=0; k<128; k++) { | 603 for(k=0; k<128; k++) { |
604 x[k] = s->transform_coeffs[chindex][2*k+i]; | 604 x[k] = s->transform_coeffs[chindex][2*k+i]; |
605 } | 605 } |
606 | 606 |
607 /* run standard IMDCT */ | 607 /* run standard IMDCT */ |
608 s->imdct_256.fft.imdct_calc(&s->imdct_256, o_ptr, x); | 608 ff_imdct_calc(&s->imdct_256, o_ptr, x); |
609 | 609 |
610 /* reverse the post-rotation & reordering from standard IMDCT */ | 610 /* reverse the post-rotation & reordering from standard IMDCT */ |
611 for(k=0; k<32; k++) { | 611 for(k=0; k<32; k++) { |
612 z[i][32+k].re = -o_ptr[128+2*k]; | 612 z[i][32+k].re = -o_ptr[128+2*k]; |
613 z[i][32+k].im = -o_ptr[2*k]; | 613 z[i][32+k].im = -o_ptr[2*k]; |
640 | 640 |
641 for (ch=1; ch<=channels; ch++) { | 641 for (ch=1; ch<=channels; ch++) { |
642 if (s->block_switch[ch]) { | 642 if (s->block_switch[ch]) { |
643 do_imdct_256(s, ch); | 643 do_imdct_256(s, ch); |
644 } else { | 644 } else { |
645 s->imdct_512.fft.imdct_calc(&s->imdct_512, s->tmp_output, | 645 ff_imdct_calc(&s->imdct_512, s->tmp_output, s->transform_coeffs[ch]); |
646 s->transform_coeffs[ch]); | |
647 } | 646 } |
648 /* For the first half of the block, apply the window, add the delay | 647 /* For the first half of the block, apply the window, add the delay |
649 from the previous block, and send to output */ | 648 from the previous block, and send to output */ |
650 s->dsp.vector_fmul_add_add(s->output[ch-1], s->tmp_output, | 649 s->dsp.vector_fmul_add_add(s->output[ch-1], s->tmp_output, |
651 s->window, s->delay[ch-1], 0, 256, 1); | 650 s->window, s->delay[ch-1], 0, 256, 1); |