[Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.66,1.67

Alex Beregszaszi alex at mplayerhq.hu
Fri May 23 19:39:57 CEST 2003


Update of /cvsroot/mplayer/main/Gui/wm
In directory mail:/var/tmp.root/cvs-serv5493

Modified Files:
	ws.c 
Log Message:
This could be a 10l, but the codes check later if the wsConvFunc is valid, so no sig11 if it's NULL, but at least no XShape support on PPC :) After all, finally the GUI works on my PPC!%#^^

Index: ws.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/wm/ws.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- ws.c	7 Feb 2003 19:38:20 -0000	1.66
+++ ws.c	23 May 2003 17:39:33 -0000	1.67
@@ -22,6 +22,8 @@
 #include "../../libvo/x11_common.h"
 #include "ws.h"
 #include "wsxdnd.h"
+#include "../../cpudetect.h"
+#include "../../postproc/swscale.h"
 #include "../../postproc/rgb2rgb.h"
 #include "../../mp_msg.h"
 #include "../../mplayer.h"
@@ -81,6 +83,13 @@
 
 // ---
 
+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);
+}
+
 #define PACK_RGB16(r,g,b,pixel) pixel=(b>>3);\
                                 pixel<<=6;\
                                 pixel|=(g>>2);\
@@ -281,6 +290,7 @@
      wsConvFunc=rgb32tobgr15;
      break;
   }
+  sws_rgb2rgb_init(get_sws_cpuflags());
  XSetErrorHandler( wsErrorHandler );
 }
 



More information about the MPlayer-cvslog mailing list