[Mplayer-cvslog] CVS: main/libvo mga_common.c,1.55,1.56

Richard Felker CVS rfelker at mplayerhq.hu
Sun Apr 27 20:44:48 CEST 2003


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

Modified Files:
	mga_common.c 
Log Message:
ugly ugly fix for michael's 1000l changes in swscaler: mysterious segfault w/g200
anyone have a better fix?


Index: mga_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/mga_common.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- mga_common.c	26 Apr 2003 16:56:21 -0000	1.55
+++ mga_common.c	27 Apr 2003 18:44:23 -0000	1.56
@@ -1,6 +1,8 @@
 
 #include "fastmemcpy.h"
 #include "../mmx_defs.h"
+#include "../cpudetect.h"
+#include "../postproc/swscale.h"
 #include "../postproc/rgb2rgb.h"
 #include "mp_msg.h"
 
@@ -413,9 +415,17 @@
   return 0;
 }
 
+static int get_sws_cpuflags(){
+    return 
+          (gCpuCaps.hasMMX   ? SWS_CPU_CAPS_MMX   : 0)
+	| (gCpuCaps.hasMMX2  ? SWS_CPU_CAPS_MMX2  : 0)
+	| (gCpuCaps.has3DNow ? SWS_CPU_CAPS_3DNOW : 0);
+}
+
 static uint32_t preinit(const char *vo_subdevice)
 {
   const char *devname=vo_subdevice?vo_subdevice:"/dev/mga_vid";
+	sws_rgb2rgb_init(get_sws_cpuflags());
 
 	f = open(devname,O_RDWR);
 	if(f == -1)



More information about the MPlayer-cvslog mailing list