diff options
author | Alexander Strange <astrange@ithinksw.com> | 2010-09-29 12:34:01 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2010-09-29 12:34:01 +0000 |
commit | 5ba24e4982f988343ac1444b7ddd16cecc3e9bbf (patch) | |
tree | c99a078e673b30989d61be89319a15ad3250b669 /libavfilter/x86 | |
parent | 655c36b22fd889f61aa31d769addbcde695d7252 (diff) | |
download | ffmpeg-5ba24e4982f988343ac1444b7ddd16cecc3e9bbf.tar.gz |
Fix compile on Darwin (FATE). Compile error:
yadif.c:226: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
yadif.c:220: error: 'asm' operand has impossible constraints
Patch by Alexander Strange <astrange ithinksw com>.
Originally committed as revision 25251 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/x86')
-rw-r--r-- | libavfilter/x86/yadif.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavfilter/x86/yadif.c b/libavfilter/x86/yadif.c index 55340cff80..90fa15e3f3 100644 --- a/libavfilter/x86/yadif.c +++ b/libavfilter/x86/yadif.c @@ -38,7 +38,7 @@ "movq %%mm2, %%mm5 \n\t"\ "pxor %%mm3, %%mm4 \n\t"\ "pavgb %%mm3, %%mm5 \n\t"\ - "pand %[pb1], %%mm4 \n\t"\ + "pand "MANGLE(pb_1)", %%mm4 \n\t"\ "psubusb %%mm4, %%mm5 \n\t"\ "psrlq $8, %%mm5 \n\t"\ "punpcklbw %%mm7, %%mm5 \n\t" /* (cur[x-refs+j] + cur[x+refs-j])>>1 */\ @@ -68,7 +68,7 @@ #define CHECK2 /* pretend not to have checked dir=2 if dir=1 was bad.\ hurts both quality and speed, but matches the C version. */\ - "paddw %[pw1], %%mm6 \n\t"\ + "paddw "MANGLE(pw_1)", %%mm6 \n\t"\ "psllw $14, %%mm6 \n\t"\ "paddsw %%mm6, %%mm2 \n\t"\ "movq %%mm0, %%mm3 \n\t"\ @@ -79,12 +79,13 @@ "por %%mm5, %%mm3 \n\t"\ "movq %%mm3, %%mm1 \n\t" +DECLARE_ASM_CONST(16, uint64_t, pw_1) = 0x0001000100010001ULL; +DECLARE_ASM_CONST(16, uint64_t, pb_1) = 0x0101010101010101ULL; + void ff_yadif_filter_line_mmx(uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int refs, int parity, int mode) { - static const uint64_t pw_1 = 0x0001000100010001ULL; - static const uint64_t pb_1 = 0x0101010101010101ULL; uint64_t tmp0, tmp1, tmp2, tmp3; int x; @@ -142,7 +143,7 @@ void ff_yadif_filter_line_mmx(uint8_t *dst, "punpcklbw %%mm7, %%mm3 \n\t" /* ABS(cur[x-refs+1] - cur[x+refs+1]) */\ "paddw %%mm2, %%mm0 \n\t"\ "paddw %%mm3, %%mm0 \n\t"\ - "psubw %[pw1], %%mm0 \n\t" /* spatial_score */\ + "psubw "MANGLE(pw_1)", %%mm0 \n\t" /* spatial_score */\ \ CHECK(-2,0)\ CHECK1\ @@ -203,8 +204,6 @@ void ff_yadif_filter_line_mmx(uint8_t *dst, [next] "r"(next),\ [prefs]"r"((x86_reg)refs),\ [mrefs]"r"((x86_reg)-refs),\ - [pw1] "m"(pw_1),\ - [pb1] "m"(pb_1),\ [mode] "g"(mode)\ );\ __asm__ volatile("movd %%mm1, %0" :"=m"(*dst));\ |