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

Måns Rullgård mans
Sun Feb 18 16:11:27 CET 2007


michael <subversion at mplayerhq.hu> writes:

> 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)

This broke x86-64.

> +        "add %3, %1                 \n\t"
[...]
> +        : "+r"(dst), "+r"(src), "+r"(h)
> +        : "r"(stride), "m"(ff_pw_32), "m"(x), "m"(y), "m"(ff_pw_8)

The above add, and a few others, compile to "add %edx, %rsi", which
the assembler doesn't like at all, the operands having different
sizes.  This patch makes the code compile, but I'll leave it to the
gurus to decide on the correct fix:

Index: libavcodec/i386/dsputil_h264_template_mmx.c
===================================================================
--- libavcodec/i386/dsputil_h264_template_mmx.c (revision 8019)
+++ libavcodec/i386/dsputil_h264_template_mmx.c (working copy)
@@ -246,7 +246,7 @@
         "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)
+        : "r"((long)stride), "m"(ff_pw_32), "m"(x), "m"(y), "m"(ff_pw_8)
     );
 }
 
-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list