From 8b1d077bf4452f9e19b54e9af67f442d9f78da83 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 23 May 2003 17:39:33 +0000 Subject: 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!%#^^ git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10171 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Gui/wm/ws.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Gui') diff --git a/Gui/wm/ws.c b/Gui/wm/ws.c index e6fef14c0e..3b021fed6b 100644 --- a/Gui/wm/ws.c +++ b/Gui/wm/ws.c @@ -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 @@ inline int wsSearch( Window win ); // --- +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 @@ wsXDNDInitialize(); wsConvFunc=rgb32tobgr15; break; } + sws_rgb2rgb_init(get_sws_cpuflags()); XSetErrorHandler( wsErrorHandler ); } -- cgit v1.2.3