[Mplayer-cvslog] CVS: main dec_video.c,1.67,1.68

Michael Niedermayer michael at mplayer.dev.hu
Mon Nov 26 22:46:06 CET 2001


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

Modified Files:
	dec_video.c 
Log Message:
runtime cpu detection


Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- dec_video.c	22 Nov 2001 18:00:18 -0000	1.67
+++ dec_video.c	26 Nov 2001 21:45:48 -0000	1.68
@@ -50,6 +50,8 @@
 
 #include "postproc/postprocess.h"
 
+#include "cpudetect.h"
+
 extern picture_t *picture;	// exported from libmpeg2/decode.c
 
 int divx_quality=0;
@@ -101,8 +103,6 @@
 extern tvi_handle_t *tv_handler;
 #endif
 
-#include "mmx_defs.h"
-
 void AVI_Decode_RLE8(char *image,char *delta,int tdsize,
     unsigned int *map,int imagex,int imagey,unsigned char x11_bytes_pixel);
 
@@ -808,11 +808,14 @@
 } // switch
 //------------------------ frame decoded. --------------------
 
-#ifdef HAVE_MMX
 	// some codecs is broken, and doesn't restore MMX state :(
 	// it happens usually with broken/damaged files.
-	__asm __volatile (EMMS:::"memory");
-#endif
+if(gCpuCaps.has3DNow){
+	__asm __volatile ("femms\n\t":::"memory");
+}
+else if(gCpuCaps.hasMMX){
+	__asm __volatile ("emms\n\t":::"memory");
+}
 
 t2=GetTimer();t=t2-t;video_time_usage+=t*0.000001f;
 




More information about the MPlayer-cvslog mailing list