summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/pullup.c
diff options
context:
space:
mode:
authorrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-31 20:36:33 +0000
committerrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-08-31 20:36:33 +0000
commit94b4a47fa4a7d52dbe09dfc4426f3bb778954315 (patch)
treea4f11c744993586e3be997c4a9258ec5be1470f7 /libmpcodecs/pullup.c
parent1c39b3fa052f6e5ffa7a81cb390883d3a1c20e53 (diff)
downloadmpv-94b4a47fa4a7d52dbe09dfc4426f3bb778954315.tar.bz2
mpv-94b4a47fa4a7d52dbe09dfc4426f3bb778954315.tar.xz
1000l, mmx code was not being used because of missing config.h, and
the mmx code was broken too! :( git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10742 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/pullup.c')
-rw-r--r--libmpcodecs/pullup.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/libmpcodecs/pullup.c b/libmpcodecs/pullup.c
index bae21ec8f5..b994556901 100644
--- a/libmpcodecs/pullup.c
+++ b/libmpcodecs/pullup.c
@@ -2,7 +2,7 @@
#include <stdlib.h>
#include "pullup.h"
-
+#include "config.h"
@@ -10,7 +10,7 @@
static int diff_y_mmx(unsigned char *a, unsigned char *b, int s)
{
int ret;
- asm (
+ asm volatile (
"movl $4, %%ecx \n\t"
"pxor %%mm4, %%mm4 \n\t"
"pxor %%mm7, %%mm7 \n\t"
@@ -37,22 +37,20 @@ static int diff_y_mmx(unsigned char *a, unsigned char *b, int s)
"paddw %%mm3, %%mm4 \n\t"
"decl %%ecx \n\t"
- "jnz fb \n\t"
-
+ "jnz 1b \n\t"
+
"movq %%mm4, %%mm3 \n\t"
- "punpcklwl %%mm7, %%mm4 \n\t"
- "punpckhwl %%mm7, %%mm3 \n\t"
- "paddl %%mm4, %%mm3 \n\t"
- "movq %%mm3, %%mm2 \n\t"
- "punpckllq %%mm7, %%mm3 \n\t"
- "punpckhlq %%mm7, %%mm2 \n\t"
- "paddl %%mm3, %%mm2 \n\t"
- "movl %%mm2, %eax"
+ "punpcklwd %%mm7, %%mm4 \n\t"
+ "punpckhwd %%mm7, %%mm3 \n\t"
+ "paddd %%mm4, %%mm3 \n\t"
+ "movd %%mm3, %%eax \n\t"
+ "psrlq $32, %%mm3 \n\t"
+ "movd %%mm3, %%ebx \n\t"
+ "addl %%ebx, %%eax \n\t"
"emms \n\t"
: "=a" (ret)
: "S" (a), "D" (b), "a" (s)
- :
);
return ret;
}