[FFmpeg-cvslog] r30965 - in trunk/libswscale: rgb2rgb.c rgb2rgb_template.c swscale.c swscale_template.c utils.c

Reimar Döffinger Reimar.Doeffinger
Wed Mar 31 19:10:49 CEST 2010


On Wed, Mar 31, 2010 at 10:18:38AM -0400, Ronald S. Bultje wrote:
> Hi,
> 
> On Mon, Mar 29, 2010 at 1:43 PM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > On Mon, Mar 29, 2010 at 01:07:30PM -0400, Ronald S. Bultje wrote:
> >> On Sat, Mar 27, 2010 at 7:31 AM, diego <subversion at mplayerhq.hu> wrote:
> >> > libswscale: Relicense almost all x86 assembler optimizations as LGPL.
> >> [..]
> >> > ? trunk/libswscale/rgb2rgb_template.c
> >>
> >> You broke my build. ;-).
> >>
> >> gcc -I. -I"/Users/ronaldbultje/Projects/ffmpeg-svn" -D_ISOC99_SOURCE
> >> -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> >> -DPIC -DHAVE_AV_CONFIG_H -I/opt/local/include -I/opt/gtk/include
> >> -I/opt/medium/include ? -std=c99 -fomit-frame-pointer -fPIC -g
> >> -Wdeclaration-after-statement -Wall -Wno-switch
> >> -Wdisabled-optimization -Wpointer-arith -Wredundant-decls
> >> -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef
> >> -Wmissing-prototypes -O3 -fno-math-errno -fno-tree-vectorize
> >> -Werror=implicit -Werror=missing-prototypes ? ? ? ?-MMD -MF
> >> libswscale/rgb2rgb.d -MT libswscale/rgb2rgb.o -c -o
> >> libswscale/rgb2rgb.o libswscale/rgb2rgb.c
> >> libswscale/rgb2rgb_template.c: In function ?rgb32tobgr24_MMX?:
> >> libswscale/rgb2rgb_template.c:138: error: can't find a register in
> >> class ?GENERAL_REGS? while reloading ?asm?
> >> libswscale/rgb2rgb_template.c:138: error: ?asm? operand has impossible
> >> constraints
> >
> > Quickest way to fix:
> > get rid of all the
> > "m"(mask24l),"m"(mask24h),"m"(mask24hh),"m"(mask24hhh),"m"(mask24hhhh)
> > constraints and use the variables directly in the asm via MANGLE()
> 
> Can you also fix this one? I've had this one since, probably, forever.
> (This is the last one, promise.)

You know, you could try to fix it yourself, there's nothing particularly
difficult about those...
Anyway, here's the patch for that (testing welcome):
Index: libavcodec/x86/h264dsp_mmx.c
===================================================================
--- libavcodec/x86/h264dsp_mmx.c	(revision 22719)
+++ libavcodec/x86/h264dsp_mmx.c	(working copy)
@@ -964,8 +964,8 @@
 \
     __asm__ volatile(\
         "pxor %%mm7, %%mm7          \n\t"\
-        "movq %5, %%mm4             \n\t"\
-        "movq %6, %%mm5             \n\t"\
+        "movq "MANGLE(ff_pw_5) ", %%mm4\n\t"\
+        "movq "MANGLE(ff_pw_16)", %%mm5\n\t"\
         "1:                         \n\t"\
         "movd  -1(%0), %%mm1        \n\t"\
         "movd    (%0), %%mm2        \n\t"\
@@ -995,7 +995,7 @@
         "decl %2                    \n\t"\
         " jnz 1b                    \n\t"\
         : "+a"(src), "+c"(dst), "+g"(h)\
-        : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride), "m"(ff_pw_5), "m"(ff_pw_16)\
+        : "d"((x86_reg)srcStride), "S"((x86_reg)dstStride)\
         : "memory"\
     );\
 }\



More information about the ffmpeg-cvslog mailing list