comparison ac3dec.c @ 7546:97383e012cb9 libavcodec

remove mdct tmp buffer
author lorenm
date Tue, 12 Aug 2008 00:36:36 +0000
parents 0dbdc638270e
children 8226017a65ae
comparison
equal deleted inserted replaced
7545:2dca9201c400 7546:97383e012cb9
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, s->tmp_imdct); 608 s->imdct_256.fft.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];
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 s->imdct_512.fft.imdct_calc(&s->imdct_512, s->tmp_output,
646 s->transform_coeffs[ch], s->tmp_imdct); 646 s->transform_coeffs[ch]);
647 } 647 }
648 /* For the first half of the block, apply the window, add the delay 648 /* For the first half of the block, apply the window, add the delay
649 from the previous block, and send to output */ 649 from the previous block, and send to output */
650 s->dsp.vector_fmul_add_add(s->output[ch-1], s->tmp_output, 650 s->dsp.vector_fmul_add_add(s->output[ch-1], s->tmp_output,
651 s->window, s->delay[ch-1], 0, 256, 1); 651 s->window, s->delay[ch-1], 0, 256, 1);