[Ffmpeg-cvslog] r8012 - trunk/libavcodec/i386/dsputil_h264_template_mmx.c

Michael Niedermayer michaelni
Thu Feb 22 02:48:38 CET 2007


Hi

On Wed, Feb 21, 2007 at 10:55:17PM +0100, Ivo wrote:
> On Sunday 18 February 2007 00:43, michael wrote:
> > Author: michael
> > Date: Sun Feb 18 00:43:02 2007
> > New Revision: 8012
> >
> > Modified:
> >    trunk/libavcodec/i386/dsputil_h264_template_mmx.c
> >
> > Log:
> > rewrite H264_CHROMA_MC4_TMPL (20% faster)
> [..]
> > +        "pxor   %%mm7, %%mm7        \n\t"
> > +        "movd %5, %%mm2             \n\t"
> > +        "movd %6, %%mm3             \n\t"
> > +        "movq %7, %%mm4             \n\t"
> > +        "movq %7, %%mm5             \n\t"
> > +        "punpcklwd %%mm2, %%mm2     \n\t"
> > +        "punpcklwd %%mm3, %%mm3     \n\t"
> > +        "punpcklwd %%mm2, %%mm2     \n\t"
> > +        "punpcklwd %%mm3, %%mm3     \n\t"
> > +        "psubw %%mm2, %%mm4         \n\t"
> > +        "psubw %%mm3, %%mm5         \n\t"
> > +
> > +        "movd  (%1), %%mm0          \n\t"
> > +        "movd 1(%1), %%mm6          \n\t"
> > +        "add %3, %1                 \n\t"
> > +        "punpcklbw %%mm7, %%mm0     \n\t"
> > +        "punpcklbw %%mm7, %%mm6     \n\t"
> > +        "pmullw %%mm4, %%mm0        \n\t"
> > +        "pmullw %%mm2, %%mm6        \n\t"
> > +        "paddw %%mm0, %%mm6         \n\t"
> > +
> > +        "1:                         \n\t"
> > +        "movd  (%1), %%mm0          \n\t"
> > +        "movd 1(%1), %%mm1          \n\t"
> > +        "add %3, %1                 \n\t"
> > +        "punpcklbw %%mm7, %%mm0     \n\t"
> > +        "punpcklbw %%mm7, %%mm1     \n\t"
> > +        "pmullw %%mm4, %%mm0        \n\t"
> > +        "pmullw %%mm2, %%mm1        \n\t"
> > +        "paddw %%mm0, %%mm1         \n\t"
> > +        "movq %%mm1, %%mm0          \n\t"
> > +        "pmullw %%mm5, %%mm6        \n\t"
> > +        "pmullw %%mm3, %%mm1        \n\t"
> > +        "paddw %%mm6, %%mm1         \n\t"
> > +        "paddw %4, %%mm1            \n\t"
> > +        "psrlw $6, %%mm1            \n\t"
> > +        "packuswb %%mm1, %%mm1      \n\t"
> > +        H264_CHROMA_OP4((%0), %%mm1, %%mm6)
> > +        "movd %%mm1, (%0)           \n\t"
> > +        "add %3, %0                 \n\t"
> > +        "movd  (%1), %%mm6          \n\t"
> > +        "movd 1(%1), %%mm1          \n\t"
> > +        "add %3, %1                 \n\t"
> > +        "punpcklbw %%mm7, %%mm6     \n\t"
> > +        "punpcklbw %%mm7, %%mm1     \n\t"
> > +        "pmullw %%mm4, %%mm6        \n\t"
> > +        "pmullw %%mm2, %%mm1        \n\t"
> > +        "paddw %%mm6, %%mm1         \n\t"
> > +        "movq %%mm1, %%mm6          \n\t"
> > +        "pmullw %%mm5, %%mm0        \n\t"
> > +        "pmullw %%mm3, %%mm1        \n\t"
> > +        "paddw %%mm0, %%mm1         \n\t"
> > +        "paddw %4, %%mm1            \n\t"
> > +        "psrlw $6, %%mm1            \n\t"
> > +        "packuswb %%mm1, %%mm1      \n\t"
> > +        H264_CHROMA_OP4((%0), %%mm1, %%mm0)
> > +        "movd %%mm1, (%0)           \n\t"
> > +        "add %3, %0                 \n\t"
> > +        "sub $2, %2                 \n\t"
> > +        "jnz 1b                     \n\t"
> > +        : "+r"(dst), "+r"(src), "+r"(h)
> > +        : "r"(stride), "m"(ff_pw_32), "m"(x), "m"(y), "m"(ff_pw_8)
> > +    );
> >  }
> 
> This part broke compilation with gcc 2.95. r8011 was fine:
> 
> /opt/gcc-2.95.3/bin/gcc -I"/misc4/ffmpeg"/libswscale   -DHAVE_AV_CONFIG_H
> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -D_ISOC9X_SOURCE -I"/misc4/ffmpeg" -I"/misc4/ffmpeg"
> -I"/misc4/ffmpeg"/libavutil -fomit-frame-pointer -g -Wall -Wno-switch
> -Wpointer-arith -Wredundant-decls -O3  -c -o i386/dsputil_mmx.o 
> i386/dsputil_mmx.c
> i386/dsputil_mmx.c: In function `gmc_mmx':
> i386/dsputil_mmx.c:2486: warning: suggest parentheses around arithmetic in 
> operand of |
> i386/dsputil_mmx.c:2486: warning: suggest parentheses around arithmetic in 
> operand of |
> i386/dsputil_mmx.c:2487: warning: suggest parentheses around arithmetic in 
> operand of |
> i386/dsputil_mmx.c:2487: warning: suggest parentheses around arithmetic in 
> operand of |
> i386/dsputil_mmx.c:2487: warning: suggest parentheses around arithmetic in 
> operand of |
> In file included from i386/h264dsp_mmx.c:1385,
>                  from i386/dsputil_mmx.c:2681:
> i386/dsputil_h264_template_mmx.c: In function `put_h264_chroma_mc4_mmx':
> i386/dsputil_h264_template_mmx.c:250: more than 10 operands in `asm'
> In file included from i386/h264dsp_mmx.c:1400,
>                  from i386/dsputil_mmx.c:2681:
> i386/dsputil_h264_template_mmx.c: In function `avg_h264_chroma_mc4_mmx2':
> i386/dsputil_h264_template_mmx.c:250: more than 10 operands in `asm'
> In file included from i386/h264dsp_mmx.c:1414,
>                  from i386/dsputil_mmx.c:2681:
> i386/dsputil_h264_template_mmx.c: In function `avg_h264_chroma_mc4_3dnow':
> i386/dsputil_h264_template_mmx.c:250: more than 10 operands in `asm'

fixed


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

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20070222/a8d9f339/attachment.pgp>



More information about the ffmpeg-cvslog mailing list