summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-27 18:44:23 +0000
committerrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-27 18:44:23 +0000
commit987378835fe2306b92851b61a3559c16ecdf3ce7 (patch)
tree48db5fcae60db3e3ae911db735cfb34f5e5a01ab /libvo
parent1bbe2f95214b0518ff573111b70d19fc4aecbd2d (diff)
downloadmpv-987378835fe2306b92851b61a3559c16ecdf3ce7.tar.bz2
mpv-987378835fe2306b92851b61a3559c16ecdf3ce7.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/mga_common.c10
1 files changed, 10 insertions, 0 deletions
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)