aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/i386/dsputil_mmx_avg.h
diff options
context:
space:
mode:
authorNick Kurshev <nickols_k@mail.ru>2001-11-10 14:36:12 +0000
committerNick Kurshev <nickols_k@mail.ru>2001-11-10 14:36:12 +0000
commita822a47983068ea9ca721c5a3359734c79837195 (patch)
tree25d738d4b1d325b81d325e53b03e402b4c120d4c /libavcodec/i386/dsputil_mmx_avg.h
parent6c426cff79d109fb1f22054f2a8cbe5532437f58 (diff)
downloadffmpeg-a822a47983068ea9ca721c5a3359734c79837195.tar.gz
fixed gcc-3.0.x compilation (by Michael Niedermayer)
Originally committed as revision 211 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386/dsputil_mmx_avg.h')
-rw-r--r--libavcodec/i386/dsputil_mmx_avg.h76
1 files changed, 37 insertions, 39 deletions
diff --git a/libavcodec/i386/dsputil_mmx_avg.h b/libavcodec/i386/dsputil_mmx_avg.h
index 5cd640f713..830fe9f3b2 100644
--- a/libavcodec/i386/dsputil_mmx_avg.h
+++ b/libavcodec/i386/dsputil_mmx_avg.h
@@ -30,24 +30,23 @@ static void DEF(put_pixels_x2)(UINT8 *block, const UINT8 *pixels, int line_size,
dh=h&3;
while(hh--) {
__asm __volatile(
- "movq %4, %%mm0\n\t"
- "movq 1%4, %%mm1\n\t"
- "movq %5, %%mm2\n\t"
- "movq 1%5, %%mm3\n\t"
- "movq %6, %%mm4\n\t"
- "movq 1%6, %%mm5\n\t"
- "movq %7, %%mm6\n\t"
- "movq 1%7, %%mm7\n\t"
+ "movq (%1), %%mm0\n\t"
+ "movq 1(%1), %%mm1\n\t"
+ "movq (%1, %2), %%mm2\n\t"
+ "movq 1(%1, %2), %%mm3\n\t"
+ "movq (%1, %2, 2), %%mm4\n\t"
+ "movq 1(%1, %2, 2), %%mm5\n\t"
+ "movq (%1, %3), %%mm6\n\t"
+ "movq 1(%1, %3), %%mm7\n\t"
PAVGB" %%mm1, %%mm0\n\t"
PAVGB" %%mm3, %%mm2\n\t"
PAVGB" %%mm5, %%mm4\n\t"
PAVGB" %%mm7, %%mm6\n\t"
- "movq %%mm0, %0\n\t"
- "movq %%mm2, %1\n\t"
- "movq %%mm4, %2\n\t"
- "movq %%mm6, %3\n\t"
- :"=m"(*p), "=m"(*(p+line_size)), "=m"(*(p+line_size*2)), "=m"(*(p+line_size*3))
- :"m"(*pix), "m"(*(pix+line_size)), "m"(*(pix+line_size*2)), "m"(*(pix+line_size*3))
+ "movq %%mm0, (%0)\n\t"
+ "movq %%mm2, (%0, %2)\n\t"
+ "movq %%mm4, (%0, %2, 2)\n\t"
+ "movq %%mm6, (%0, %3)\n\t"
+ ::"r"(p), "r"(pix), "r" (line_size), "r" (line_size*3)
:"memory");
pix += line_size*4; p += line_size*4;
}
@@ -114,24 +113,23 @@ static void DEF(avg_pixels)(UINT8 *block, const UINT8 *pixels, int line_size, in
dh=h&3;
while(hh--) {
__asm __volatile(
- "movq %0, %%mm0\n\t"
- "movq %4, %%mm1\n\t"
- "movq %1, %%mm2\n\t"
- "movq %5, %%mm3\n\t"
- "movq %2, %%mm4\n\t"
- "movq %6, %%mm5\n\t"
- "movq %3, %%mm6\n\t"
- "movq %7, %%mm7\n\t"
+ "movq (%0), %%mm0\n\t"
+ "movq (%1), %%mm1\n\t"
+ "movq (%0, %2), %%mm2\n\t"
+ "movq (%1, %2), %%mm3\n\t"
+ "movq (%0, %2, 2), %%mm4\n\t"
+ "movq (%1, %2, 2), %%mm5\n\t"
+ "movq (%0, %3), %%mm6\n\t"
+ "movq (%1, %3), %%mm7\n\t"
PAVGB" %%mm1, %%mm0\n\t"
PAVGB" %%mm3, %%mm2\n\t"
PAVGB" %%mm5, %%mm4\n\t"
PAVGB" %%mm7, %%mm6\n\t"
- "movq %%mm0, %0\n\t"
- "movq %%mm2, %1\n\t"
- "movq %%mm4, %2\n\t"
- "movq %%mm6, %3\n\t"
- :"=m"(*p), "=m"(*(p+line_size)), "=m"(*(p+line_size*2)), "=m"(*(p+line_size*3))
- :"m"(*pix), "m"(*(pix+line_size)), "m"(*(pix+line_size*2)), "m"(*(pix+line_size*3))
+ "movq %%mm0, (%0)\n\t"
+ "movq %%mm2, (%0, %2)\n\t"
+ "movq %%mm4, (%0, %2, 2)\n\t"
+ "movq %%mm6, (%0, %3)\n\t"
+ ::"r"(p), "r"(pix), "r" (line_size), "r" (line_size*3)
:"memory");
pix += line_size*4; p += line_size*4;
}
@@ -141,7 +139,7 @@ static void DEF(avg_pixels)(UINT8 *block, const UINT8 *pixels, int line_size, in
"movq %1, %%mm1\n\t"
PAVGB" %%mm1, %%mm0\n\t"
"movq %%mm0, %0\n\t"
- :"=m"(*p)
+ :"+m"(*p)
:"m"(*pix)
:"memory");
pix += line_size; p += line_size;
@@ -171,7 +169,7 @@ static void DEF(avg_pixels_x2)( UINT8 *block, const UINT8 *pixels, int line_siz
PAVGB" %%mm4, %%mm1\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm1, %1\n\t"
- :"=m"(*p), "=m"(*(p+line_size))
+ :"+m"(*p), "+m"(*(p+line_size))
:"m"(*pix), "m"(*(pix+line_size))
:"memory");
pix += line_size*2;
@@ -185,7 +183,7 @@ static void DEF(avg_pixels_x2)( UINT8 *block, const UINT8 *pixels, int line_siz
PAVGB" %%mm2, %%mm1\n\t"
PAVGB" %%mm1, %%mm0\n\t"
"movq %%mm0, %0\n\t"
- :"=m"(*p)
+ :"+m"(*p)
:"m"(*pix)
:"memory");
}
@@ -214,7 +212,7 @@ static void DEF(avg_pixels_y2)( UINT8 *block, const UINT8 *pixels, int line_si
PAVGB" %%mm4, %%mm1\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm1, %1\n\t"
- :"=m"(*p), "=m"(*(p+line_size))
+ :"+m"(*p), "+m"(*(p+line_size))
:"m"(*pix), "m"(*(pix+line_size)), "m"(*(pix+line_size*2))
:"memory");
pix += line_size*2;
@@ -228,7 +226,7 @@ static void DEF(avg_pixels_y2)( UINT8 *block, const UINT8 *pixels, int line_si
PAVGB" %%mm2, %%mm1\n\t"
PAVGB" %%mm1, %%mm0\n\t"
"movq %%mm0, %0\n\t"
- :"=m"(*p)
+ :"+m"(*p)
:"m"(*pix), "m"(*(pix+line_size))
:"memory");
}
@@ -243,7 +241,7 @@ static void DEF(avg_pixels_xy2)( UINT8 *block, const UINT8 *pixels, int line_si
__asm __volatile(
"pxor %%mm7, %%mm7\n\t"
"movq %0, %%mm6\n\t"
- ::"m"(mm_wtwo):"memory");
+ ::"m"(mm_wtwo));
do {
__asm __volatile(
"movq %1, %%mm0\n\t"
@@ -275,7 +273,7 @@ static void DEF(avg_pixels_xy2)( UINT8 *block, const UINT8 *pixels, int line_si
"packuswb %%mm2, %%mm0\n\t"
PAVGB" %0, %%mm0\n\t"
"movq %%mm0, %0\n\t"
- :"=m"(*p)
+ :"+m"(*p)
:"m"(*pix),
"m"(*(pix+line_size))
:"memory");
@@ -291,7 +289,7 @@ static void DEF(sub_pixels_x2)( DCTELEM *block, const UINT8 *pixels, int line_s
p = block;
pix = pixels;
__asm __volatile(
- "pxor %%mm7, %%mm7":::"memory");
+ "pxor %%mm7, %%mm7":);
do {
__asm __volatile(
"movq 1%1, %%mm2\n\t"
@@ -305,7 +303,7 @@ static void DEF(sub_pixels_x2)( DCTELEM *block, const UINT8 *pixels, int line_s
"psubsw %%mm3, %%mm1\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm1, 8%0\n\t"
- :"=m"(*p)
+ :"+m"(*p)
:"m"(*pix)
:"memory");
pix += line_size;
@@ -320,7 +318,7 @@ static void DEF(sub_pixels_y2)( DCTELEM *block, const UINT8 *pixels, int line_s
p = block;
pix = pixels;
__asm __volatile(
- "pxor %%mm7, %%mm7":::"memory");
+ "pxor %%mm7, %%mm7":);
do {
__asm __volatile(
"movq %2, %%mm2\n\t"
@@ -334,7 +332,7 @@ static void DEF(sub_pixels_y2)( DCTELEM *block, const UINT8 *pixels, int line_s
"psubsw %%mm3, %%mm1\n\t"
"movq %%mm0, %0\n\t"
"movq %%mm1, 8%0\n\t"
- :"=m"(*p)
+ :"+m"(*p)
:"m"(*pix), "m"(*(pix+line_size))
:"memory");
pix += line_size;