[FFmpeg-devel] [PATCH] Simplify IMDCT in dca.c

Michael Niedermayer michaelni
Sat Aug 30 12:54:46 CEST 2008


On Sat, Aug 30, 2008 at 11:40:35AM +0200, Benjamin Larsson 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
> 
> One part of the IMDCT is a timedomain overlap by the synthesis window. I
> couldn't find one in the patch thus I currently don't agree with the

synthesis window: prCoeff
timedomain overlap:
        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]);
            }
            for (     ; j < 512; j += 64){
                a += prCoeff[i+j   ]*(-subband_fir_hist[15-i+j-512]);
                b += prCoeff[i+j+16]*( subband_fir_hist[   i+j-512]);
                c += prCoeff[i+j+32]*( subband_fir_hist[16+i+j-512]);
                d += prCoeff[i+j+48]*( subband_fir_hist[31-i+j-512]);
            }
            samples_out[i   ] = a * scale + bias;
            samples_out[i+16] = b * scale + bias;
            subband_fir_hist2[i   ] = c;
            subband_fir_hist2[i+16] = d;
        }



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- 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/a2be13e1/attachment.pgp>



More information about the ffmpeg-devel mailing list