# HG changeset patch # User rfelker # Date 1051469063 0 # Node ID be14ff86b4e5562f93a4d5e627b7ddf11a206244 # Parent c889e7f9391aba9c8383126e483a01a9326cf09f ugly ugly fix for michael's 1000l changes in swscaler: mysterious segfault w/g200 anyone have a better fix? diff -r c889e7f9391a -r be14ff86b4e5 libvo/mga_common.c --- a/libvo/mga_common.c Sun Apr 27 17:24:26 2003 +0000 +++ b/libvo/mga_common.c Sun Apr 27 18:44:23 2003 +0000 @@ -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)