1
mirror of https://github.com/mpv-player/mpv synced 2025-01-24 19:37:30 +01:00

Use x86_reg instead of long in several video filters to fix compilation on MinGW64.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29077 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2009-03-27 20:34:55 +00:00
parent 98c7abd005
commit 255bca1ecd
4 changed files with 11 additions and 11 deletions

View File

@ -424,7 +424,7 @@ block_metrics_faster_c(unsigned char *a, unsigned char *b, int as, int bs,
"paddusw %%mm2, %%mm7\n\t" \
"paddusw %%mm1, %%mm7\n\t" \
: "=r" (a), "=r" (b) \
: "r"((long)as), "r"((long)bs), "m" (ones), "0"(a), "1"(b), "X"(*a), "X"(*b) \
: "r"((x86_reg)as), "r"((x86_reg)bs), "m" (ones), "0"(a), "1"(b), "X"(*a), "X"(*b) \
); \
} while (--lines);
@ -466,8 +466,8 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
mp_msg(MSGT_VFILTER, MSGL_FATAL, "block_metrics_mmx2: internal error\n");
#else
static const unsigned long long ones = 0x0101010101010101ull;
unsigned long interlaced;
unsigned long prefetch_line = (((long)a>>3) & 7) + 10;
x86_reg interlaced;
x86_reg prefetch_line = (((long)a>>3) & 7) + 10;
#ifdef DEBUG
struct frame_stats ts = *s;
#endif
@ -633,7 +633,7 @@ dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos,
"por %%mm3, %%mm1 \n\t" /* avg if >= threshold */
"movq %%mm1, (%2,%4) \n\t"
: /* no output */
: "r" (a), "r" (bos), "r" (dst), "r" ((long)ss), "r" ((long)ds), "r" (cos)
: "r" (a), "r" ((x86_reg)bos), "r" ((x86_reg)dst), "r" ((x86_reg)ss), "r" ((x86_reg)ds), "r" ((x86_reg)cos)
);
a += 8;
dst += 8;

View File

@ -187,7 +187,7 @@ static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
:
: "S" (y), "D" (dst), "a" (u), "b" (v), "c" (w/16),
#if ARCH_X86_64
"d" ((long)us), "r" ((long)vs)
"d" ((x86_reg)us), "r" ((x86_reg)vs)
#else
"d" (&us)
#endif
@ -299,7 +299,7 @@ static void pack_li_1_MMX(unsigned char *dst, unsigned char *y,
:
: "S" (y), "D" (dst), "a" (u), "b" (v), "c" (w/16),
#if ARCH_X86_64
"d" ((long)us), "r" ((long)vs)
"d" ((x86_reg)us), "r" ((x86_reg)vs)
#else
"d" (&us)
#endif

View File

@ -147,7 +147,7 @@ static int8_t *initNoise(FilterParam *fp){
#if HAVE_MMX
static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
long mmx_len= len&(~7);
x86_reg mmx_len= len&(~7);
noise+=shift;
__asm__ volatile(
@ -176,7 +176,7 @@ static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int
//duplicate of previous except movntq
#if HAVE_MMX2
static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
long mmx_len= len&(~7);
x86_reg mmx_len= len&(~7);
noise+=shift;
__asm__ volatile(
@ -218,7 +218,7 @@ static inline void lineNoise_C(uint8_t *dst, uint8_t *src, int8_t *noise, int le
#if HAVE_MMX
static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t **shift){
long mmx_len= len&(~7);
x86_reg mmx_len= len&(~7);
__asm__ volatile(
"mov %5, %%"REG_a" \n\t"

View File

@ -247,8 +247,8 @@ static void filter_line_mmx2(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, u
:[prev] "r"(prev),\
[cur] "r"(cur),\
[next] "r"(next),\
[prefs]"r"((long)refs),\
[mrefs]"r"((long)-refs),\
[prefs]"r"((x86_reg)refs),\
[mrefs]"r"((x86_reg)-refs),\
[pw1] "m"(pw_1),\
[pb1] "m"(pb_1),\
[mode] "g"(mode)\