[Mplayer-cvslog] CVS: main/libavcodec/i386 dsputil_mmx.c,1.4,1.5

Nick Kurshev nick at mplayer.dev.hu
Wed Jul 18 11:05:59 CEST 2001


Update of /cvsroot/mplayer/main/libavcodec/i386
In directory mplayer:/var/tmp.root/cvs-serv14847/main/libavcodec/i386

Modified Files:
	dsputil_mmx.c 
Log Message:
Finished MMX/MMX2/3dNow! optimization. Probably fixed 'pink areas'

Index: dsputil_mmx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/i386/dsputil_mmx.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dsputil_mmx.c	17 Jul 2001 20:01:29 -0000	1.4
+++ dsputil_mmx.c	18 Jul 2001 09:05:56 -0000	1.5
@@ -114,7 +114,7 @@
     p   = block;
     pix = pixels;
     hh=h>>2;
-    dh=h%4;
+    dh=h&3;
     while(hh--) {
     __asm __volatile(
 	"movq	%4, %%mm0\n\t"
@@ -162,7 +162,7 @@
   p = block;
   pix = pixels;
[...1150 lines suppressed...]
+	"movq	%0, %%mm1\n\t"
+	"movq	8%0, %%mm3\n\t"
+	"psrlw	$2, %%mm0\n\t"
+	"psrlw	$2, %%mm2\n\t"
+	"psubsw %%mm0, %%mm1\n\t"
+	"psubsw %%mm2, %%mm3\n\t"
+	"movq	%%mm1, %0\n\t"
+	"movq	%%mm3, 8%0\n\t"
+	:"=m"(*p)
+	:"m"(*pix),
+	 "m"(*(pix+line_size))
+	:"memory");
    pix += line_size;
-   pix1 += line_size;
    p +=   8 ;
   } while(--h);
+  emms();
 }
 
 void (* sub_pixels_tab[4])(DCTELEM *block, const UINT8 *pixels, int line_size, int h) =




More information about the MPlayer-cvslog mailing list