[MPlayer-dev-eng] Re: Scale is broken
Tobias Diedrich
ranma at tdiedrich.de
Sun Jun 26 20:11:11 CEST 2005
Jindrich Makovicka wrote:
> This is a known issue. It seems no one is currently able to find a set
> of asm() constraints which would fit all versions of gcc and both x86
> and x86-64 ;)
I don't think it's the constraints.
The following is a diff between a version not working with gcc-3.3 and a
working variant. Note that the constraints are unchanged.
--- swscale_template.c.borken 2005-06-20 17:20:22.000000000 +0200
+++ swscale_template.c.works 2005-06-20 17:21:54.000000000 +0200
@@ -2172,7 +2172,7 @@
" jnc 1b \n\t"
: "+r" (counter), "+r" (filter)
- : "m" (filterPos), "m" (dst), "m"(offset),
+ : "m" (filterPos), "m" (dst), "m"(src+filterSize),
"m" (src), "r" ((long)filterSize*2)
: "%"REG_b, "%"REG_a, "%"REG_c
);
@@ -2353,7 +2353,7 @@
" jb 1b \n\t"
- :: "r" (src), "m" (dst), "m" (dstWidth), "m" (xInc_shr16), "m" (xInc_mask)
+ :: "r" (src), "m" (dst), "m" (dstWidth), "m" (xInc>>16), "m" (xInc&0xFFFF)
: "%"REG_a, "%"REG_b, "%ecx", "%"REG_D, "%esi"
);
#ifdef HAVE_MMX2
@@ -2547,7 +2547,7 @@
"cmp %2, %%"REG_a" \n\t"
" jb 1b \n\t"
- :: "m" (src1), "m" (dst), "mp" ((long)dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
+ :: "m" (src1), "m" (dst), "mp" ((long)dstWidth), "m" ((long)(xInc>>16)), "m" ((xInc&0xFFFF)),
"r" (src2)
: "%"REG_a, "%"REG_b, "%ecx", "%"REG_D, "%esi"
);
--
Tobias PGP: http://9ac7e0bc.uguu.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swscale_template.c.borken.gz
Type: application/octet-stream
Size: 13703 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050626/dc298692/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swscale_template.c.works.gz
Type: application/octet-stream
Size: 13712 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050626/dc298692/attachment-0001.obj>
More information about the MPlayer-dev-eng
mailing list