[FFmpeg-devel] [PATCH] Simplify IMDCT in dca.c
Alexander E. Patrakov
patrakov
Sat Aug 30 09:07:13 CEST 2008
Michael Niedermayer wrote:
> Hi
>
> patch below replaces the duplicated IMDCT in dca.c by the standard one.
> code is faster, simpler nicer, ....
> yes the QMF of dca is a windowed IMDCT
Yes, here it brings the time to decode a ripped CD down from 1m11s to 51s.
Unfortunately, I could not test the SSE patch by David Conrad and compare.
Your change is not bit-exact WRT the previous version, but sounds right. The
difference is of the form of 1-LSB-clicks (several random clicks per
second - when amplified, sounds like a Geiger counter).
Some cleanup notes:
> float praXin[33], *raXin = &praXin[1];
<...>
> praXin[0] = 0.0;
praXin[0] is no longer needed, and we can just have float raXin[32].
> + for (i = 0; i < 16; i++){
> + float a= subband_fir_hist2[i ];
> + float b= subband_fir_hist2[i+16];
> + float c= 0;
> + float d= 0;
> for (j = 0; j < 512-hist_index; j += 64){
> + a += prCoeff[i+j ]*(-subband_fir_hist[15-i+j]);
> + b += prCoeff[i+j+16]*( subband_fir_hist[ i+j]);
> + c += prCoeff[i+j+32]*( subband_fir_hist[16+i+j]);
> + d += prCoeff[i+j+48]*( subband_fir_hist[31-i+j]);
> }
This time-reversing business (15-i+j) still looks like an attempt to do some
separation of the results of two transforms done in parallel. I mean,
you'll find something similar if you look how people push one real signal
in the real part of the FFT input, another real signal in the imaginary
part, do the FFT and then use the symmetry properties of the Fourier
transform of the real input in order to separate the two original inputs.
It would be interesting to figure out what exactly is going on.
--
Alexander E. Patrakov
More information about the ffmpeg-devel
mailing list