Mercurial > libavcodec.hg
comparison atrac3.c @ 7546:97383e012cb9 libavcodec
remove mdct tmp buffer
author | lorenm |
---|---|
date | Tue, 12 Aug 2008 00:36:36 +0000 |
parents | 85ab7655ad4d |
children | 8226017a65ae |
comparison
equal
deleted
inserted
replaced
7545:2dca9201c400 | 7546:97383e012cb9 |
---|---|
106 //@{ | 106 //@{ |
107 /** data buffers */ | 107 /** data buffers */ |
108 float outSamples[2048]; | 108 float outSamples[2048]; |
109 uint8_t* decoded_bytes_buffer; | 109 uint8_t* decoded_bytes_buffer; |
110 float tempBuf[1070]; | 110 float tempBuf[1070]; |
111 DECLARE_ALIGNED_16(float,mdct_tmp[512]); | |
112 //@} | 111 //@} |
113 //@{ | 112 //@{ |
114 /** extradata */ | 113 /** extradata */ |
115 int atrac3version; | 114 int atrac3version; |
116 int delay; | 115 int delay; |
187 * caused by the reverse spectra of the QMF. | 186 * caused by the reverse spectra of the QMF. |
188 * | 187 * |
189 * @param pInput float input | 188 * @param pInput float input |
190 * @param pOutput float output | 189 * @param pOutput float output |
191 * @param odd_band 1 if the band is an odd band | 190 * @param odd_band 1 if the band is an odd band |
192 * @param mdct_tmp aligned temporary buffer for the mdct | 191 */ |
193 */ | 192 |
194 | 193 static void IMLT(float *pInput, float *pOutput, int odd_band) |
195 static void IMLT(float *pInput, float *pOutput, int odd_band, float* mdct_tmp) | |
196 { | 194 { |
197 int i; | 195 int i; |
198 | 196 |
199 if (odd_band) { | 197 if (odd_band) { |
200 /** | 198 /** |
208 | 206 |
209 for (i=0; i<128; i++) | 207 for (i=0; i<128; i++) |
210 FFSWAP(float, pInput[i], pInput[255-i]); | 208 FFSWAP(float, pInput[i], pInput[255-i]); |
211 } | 209 } |
212 | 210 |
213 mdct_ctx.fft.imdct_calc(&mdct_ctx,pOutput,pInput,mdct_tmp); | 211 mdct_ctx.fft.imdct_calc(&mdct_ctx,pOutput,pInput); |
214 | 212 |
215 /* Perform windowing on the output. */ | 213 /* Perform windowing on the output. */ |
216 dsp.vector_fmul(pOutput,mdct_window,512); | 214 dsp.vector_fmul(pOutput,mdct_window,512); |
217 | 215 |
218 } | 216 } |
755 | 753 |
756 /* Reconstruct time domain samples. */ | 754 /* Reconstruct time domain samples. */ |
757 for (band=0; band<4; band++) { | 755 for (band=0; band<4; band++) { |
758 /* Perform the IMDCT step without overlapping. */ | 756 /* Perform the IMDCT step without overlapping. */ |
759 if (band <= numBands) { | 757 if (band <= numBands) { |
760 IMLT(&(pSnd->spectrum[band*256]), pSnd->IMDCT_buf, band&1,q->mdct_tmp); | 758 IMLT(&(pSnd->spectrum[band*256]), pSnd->IMDCT_buf, band&1); |
761 } else | 759 } else |
762 memset(pSnd->IMDCT_buf, 0, 512 * sizeof(float)); | 760 memset(pSnd->IMDCT_buf, 0, 512 * sizeof(float)); |
763 | 761 |
764 /* gain compensation and overlapping */ | 762 /* gain compensation and overlapping */ |
765 gainCompensateAndOverlap (pSnd->IMDCT_buf, &(pSnd->prevFrame[band*256]), &(pOut[band*256]), | 763 gainCompensateAndOverlap (pSnd->IMDCT_buf, &(pSnd->prevFrame[band*256]), &(pOut[band*256]), |