[Mplayer-cvslog] CVS: main/libavcodec/i386 dsputil_mmx.c,1.5,1.6
    Nick Kurshev 
    nick at mplayer.dev.hu
       
    Thu Jul 19 10:15:56 CEST 2001
    
        - Previous message: [Mplayer-cvslog] CVS: main/libavcodec dsputil.c,1.6,1.7
 
        - Next message: [Mplayer-cvslog] CVS: main asf.h,1.4,1.5 asfheader.c,1.17,1.18 aviheader.c,1.16,1.17 demux_asf.c,1.10,1.11
 
         -  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
 
       
    
  
Update of /cvsroot/mplayer/main/libavcodec/i386
In directory mplayer:/var/tmp.root/cvs-serv31906/main/libavcodec/i386
Modified Files:
	dsputil_mmx.c 
Log Message:
Added MMX support for encoding
Index: dsputil_mmx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/i386/dsputil_mmx.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dsputil_mmx.c	18 Jul 2001 09:05:56 -0000	1.5
+++ dsputil_mmx.c	19 Jul 2001 08:15:53 -0000	1.6
@@ -27,6 +27,38 @@
  cropTable[0..255] = idx;
  cropTable[256..MAX_NEG_CROP(384)] = 255;
 */
+void get_pixels(DCTELEM *block, const UINT8 *pixels, int line_size)
+{
+    DCTELEM *p;
+    const UINT8 *pix;
+    int i;
+
+    /* read the pixels */
+    p = block;
+    pix = pixels;
+    __asm __volatile("pxor %%mm7, %%mm7":::"memory");
+    for(i=0;i<4;i++) {
+	__asm __volatile(
+		"movq	%1, %%mm0\n\t"
+		"movq	%2, %%mm1\n\t"
+		"movq	%%mm0, %%mm2\n\t"
+		"movq	%%mm1, %%mm3\n\t"
+		"punpcklbw %%mm7, %%mm0\n\t"
+		"punpckhbw %%mm7, %%mm2\n\t"
+		"punpcklbw %%mm7, %%mm1\n\t"
+		"punpckhbw %%mm7, %%mm3\n\t"
+		"movq	%%mm0, %0\n\t"
+		"movq	%%mm2, 8%0\n\t"
+		"movq	%%mm1, 16%0\n\t"
+		"movq	%%mm3, 24%0\n\t"
+		:"=m"(*p)
+		:"m"(*pix), "m"(*(pix+line_size))
+		:"memory");
+        pix += line_size*2;
+        p += 16;
+    }
+    emms();
+}
 
 void put_pixels_clamped(const DCTELEM *block, UINT8 *pixels, int line_size)
 {
    
    
        
	- Previous message: [Mplayer-cvslog] CVS: main/libavcodec dsputil.c,1.6,1.7
 
	- Next message: [Mplayer-cvslog] CVS: main asf.h,1.4,1.5 asfheader.c,1.17,1.18 aviheader.c,1.16,1.17 demux_asf.c,1.10,1.11
 
         -  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
 
       
More information about the MPlayer-cvslog
mailing list