[FFmpeg-devel] [PATCH] Simplify IMDCT in dca.c
Michael Niedermayer
michaelni
Sat Aug 30 12:52:05 CEST 2008
On Sat, Aug 30, 2008 at 01:07:13PM +0600, Alexander E. Patrakov wrote:
> 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).
float rounding differenes between split radix fft-mdct and the naive one
used before i suspect.
>
> 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].
removed
>
> > + 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.
the funky indexing and *(-1) is due to ff_imdct_half() the full imdct would
not reqire anything like that
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080830/980fda64/attachment.pgp>
More information about the ffmpeg-devel
mailing list