From 987378835fe2306b92851b61a3559c16ecdf3ce7 Mon Sep 17 00:00:00 2001 From: rfelker Date: Sun, 27 Apr 2003 18:44:23 +0000 Subject: ugly ugly fix for michael's 1000l changes in swscaler: mysterious segfault w/g200 anyone have a better fix? git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10006 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/mga_common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libvo') diff --git a/libvo/mga_common.c b/libvo/mga_common.c index 8a2d81be75..072a1d7067 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -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 @@ static int mga_uninit(){ 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) -- cgit v1.2.3