[Mplayer-cvslog] CVS: main/libmpcodecs pullup.c,1.4,1.5

Richard Felker CVS rfelker at mplayerhq.hu
Sun Aug 31 22:36:36 CEST 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv7089/libmpcodecs

Modified Files:
	pullup.c 
Log Message:
1000l, mmx code was not being used because of missing config.h, and
the mmx code was broken too! :(


Index: pullup.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/pullup.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- pullup.c	31 Aug 2003 19:56:13 -0000	1.4
+++ pullup.c	31 Aug 2003 20:36:33 -0000	1.5
@@ -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 @@
 		"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;
 }



More information about the MPlayer-cvslog mailing list