changeset 10005:be14ff86b4e5

ugly ugly fix for michael's 1000l changes in swscaler: mysterious segfault w/g200 anyone have a better fix?
author rfelker
date Sun, 27 Apr 2003 18:44:23 +0000
parents c889e7f9391a
children 6293e6f02fe3
files libvo/mga_common.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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)