[Ffmpeg-cvslog] r5954 - in trunk/libavcodec: dsputil.h fft.c i386/fft_3dn2.c vorbis.c wmadec.c

Reimar Döffinger Reimar.Doeffinger
Tue Aug 8 14:24:40 CEST 2006


Hello,
On Tue, Aug 08, 2006 at 06:01:06AM +0200, lorenm wrote:
> Log:
> 3dnow2 implementation of imdct.
> 6% faster vorbis and wma.
[...]
> Modified: trunk/libavcodec/i386/fft_3dn2.c
> ==============================================================================
> --- trunk/libavcodec/i386/fft_3dn2.c	(original)
> +++ trunk/libavcodec/i386/fft_3dn2.c	Tue Aug  8 06:01:04 2006
[...]
>  #endif
> +
> +void ff_imdct_calc_3dn2(MDCTContext *s, FFTSample *output,
> +                        const FFTSample *input, FFTSample *tmp)
> +{
> +    int k, n8, n4, n2, n;
> +    const uint16_t *revtab = s->fft.revtab;
> +    const FFTSample *tcos = s->tcos;
> +    const FFTSample *tsin = s->tsin;
> +    const FFTSample *in1, *in2;
> +    FFTComplex *z = (FFTComplex *)tmp;
> +
> +    n = 1 << s->nbits;
> +    n2 = n >> 1;
> +    n4 = n >> 2;
> +    n8 = n >> 3;
> +
> +    /* pre rotation */
> +    in1 = input;
> +    in2 = input + n2 - 1;
> +    for(k = 0; k < n4; k++) {
> +        asm volatile(
> +            "movd       %1, %%mm0 \n\t"
> +            "movd       %3, %%mm1 \n\t"
> +            "punpckldq  %2, %%mm0 \n\t"
> +            "punpckldq  %4, %%mm1 \n\t"
> +            "movq    %%mm0, %%mm2 \n\t"
> +            "pfmul   %%mm1, %%mm0 \n\t"
> +            "pswapd  %%mm1, %%mm1 \n\t"
> +            "pfmul   %%mm1, %%mm2 \n\t"
> +            "pfpnacc %%mm2, %%mm0 \n\t"
> +            "movq    %%mm0, %0    \n\t"
> +            :"=m"(z[revtab[k]])
> +            :"m"(in2[-2*k]), "m"(in1[2*k]),
> +             "m"(tcos[k]), "m"(tsin[k])
> +        );

Neither gcc-3.4 nor gcc-2.95 can compile this for me (tested under
debian unstable) unless you add -fomit-frame-pointer, e.g. 2.95 gives
> i386/fft_3dn2.c:171: Invalid `asm' statement:
> i386/fft_3dn2.c:171: fixed or forbidden register 6 (bp) was spilled for class GENERAL_REGS.

Just FYI, I don't care much, neither gcc-4.1 nor anything on AMD64 has
problems *g*

Greetings,
Reimar D?ffinger




More information about the ffmpeg-cvslog mailing list