diff postproc/yuv2rgb.c @ 13720:821f464b4d90

adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64
author aurel
date Thu, 21 Oct 2004 11:55:20 +0000
parents d2aef091743c
children 08cac43f1e38
line wrap: on
line diff
--- a/postproc/yuv2rgb.c	Thu Oct 21 11:36:20 2004 +0000
+++ b/postproc/yuv2rgb.c	Thu Oct 21 11:55:20 2004 +0000
@@ -156,7 +156,7 @@
 };
 #endif
 
-#ifdef ARCH_X86
+#if defined(ARCH_X86) || defined(ARCH_X86_64)
 
 /* hope these constant values are cache line aligned */
 uint64_t attribute_used __attribute__((aligned(8))) mmx_00ffw = 0x00ff00ff00ff00ffULL;
@@ -183,14 +183,12 @@
 	0x0004000400040004LL,};
 
 #undef HAVE_MMX
-#undef ARCH_X86
 
 //MMX versions
 #undef RENAME
 #define HAVE_MMX
 #undef HAVE_MMX2
 #undef HAVE_3DNOW
-#define ARCH_X86
 #define RENAME(a) a ## _MMX
 #include "yuv2rgb_template.c"
 
@@ -199,7 +197,6 @@
 #define HAVE_MMX
 #define HAVE_MMX2
 #undef HAVE_3DNOW
-#define ARCH_X86
 #define RENAME(a) a ## _MMX2
 #include "yuv2rgb_template.c"
 
@@ -583,7 +580,7 @@
 
 SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
 {
-#ifdef ARCH_X86
+#if defined(ARCH_X86) || defined(ARCH_X86_64)
     if(c->flags & SWS_CPU_CAPS_MMX2){
 	switch(c->dstFormat){
 	case IMGFMT_BGR32: return yuv420_rgb32_MMX2;