[Mplayer-cvslog] CVS: main/libvo osd.c,1.8,1.9

Nick Kurshev nick at mplayer.dev.hu
Sun Nov 11 15:42:12 CET 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv4910/main/libvo

Modified Files:
	osd.c 
Log Message:
Enable MMX stuff
I don't know why Michael Niedermayer disabled it but:
my benchmarks of 25 frames for TIMER+SUBTITLE (measured by RDTSC):
Non-MMX stuff:
    total=306142159
MMX stuff:
    total=159534150


Index: osd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/osd.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- osd.c	11 Nov 2001 11:18:50 -0000	1.8
+++ osd.c	11 Nov 2001 14:42:10 -0000	1.9
@@ -7,6 +7,8 @@
 #include "config.h"
 #include "osd.h"
 #include "../mmx_defs.h"
+//#define ENABLE_PROFILE
+#include "../my_profile.h"
 
 void vo_draw_alpha_yv12(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){
     int y;
@@ -76,25 +78,13 @@
     return;
 }
 
-#ifdef PROFILE_ME
-static inline unsigned long long int read_tsc( void )
-{
-  unsigned long long int retval;
-  __asm __volatile ("rdtsc":"=A"(retval)::"memory");
-  return retval;
-}
-#endif
-
 void vo_draw_alpha_rgb32(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){
     int y;
-#ifdef PROFILE_ME
-unsigned long long v1,v2;
-v1 = read_tsc();
-#endif
+PROFILE_START();
     for(y=0;y<h;y++){
         register int x;
 #ifdef ARCH_X86
-#ifdef HAVE_MMX2
+#ifdef HAVE_MMX
 	asm volatile(
 		"pxor %%mm7, %%mm7		\n\t"
 		"xorl %%eax, %%eax		\n\t"
@@ -121,7 +111,7 @@
 		"punpcklbw %%mm2, %%mm2		\n\t" // src AABBCCDD
 		"punpcklbw %%mm2, %%mm2		\n\t" // src AAAABBBB
 		"paddb %%mm2, %%mm0		\n\t"
-		MOVNTQ" %%mm0, (%0, %%eax, 4)	\n\t"
+		"movq %%mm0, (%0, %%eax, 4)	\n\t"
 		"addl $2, %%eax			\n\t"
 		"cmpl %3, %%eax			\n\t"
 		" jb 1b				\n\t"
@@ -175,14 +165,10 @@
         srca+=srcstride;
         dstbase+=dststride;
     }
-#ifdef HAVE_MMX2
-	asm volatile(SFENCE:::"memory");
+#ifdef HAVE_MMX
 	asm volatile(EMMS:::"memory");
 #endif
-#ifdef PROFILE_ME
-v2 = read_tsc();
-printf("rd_tsc: %llu\n\t",v2-v1);
-#endif
+PROFILE_END("vo_draw_alpha_rgb32");
     return;
 }
 




More information about the MPlayer-cvslog mailing list