diff postproc/swscale.c @ 15523:92d2852a0f15

Should fix altivec detection for g3 system.
author nplourde
date Fri, 20 May 2005 12:08:31 +0000
parents 0deaa53ed5ad
children 4a1faa9c8f07
line wrap: on
line diff
--- a/postproc/swscale.c	Fri May 20 00:20:40 2005 +0000
+++ b/postproc/swscale.c	Fri May 20 12:08:31 2005 +0000
@@ -733,7 +733,7 @@
 #endif
 
 #ifdef ARCH_POWERPC
-#ifdef HAVE_ALTIVEC
+#if defined (HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT)
 #define COMPILE_ALTIVEC
 #endif //HAVE_ALTIVEC
 #endif //ARCH_POWERPC
@@ -1796,8 +1796,9 @@
 	yuv2rgb_c_init_tables(c, inv_table, srcRange, brightness, contrast, saturation);
 	//FIXME factorize
 
-#ifdef HAVE_ALTIVEC
-	yuv2rgb_altivec_init_tables (c, inv_table, brightness, contrast, saturation);
+#ifdef COMPILE_ALTIVEC
+	if (c->flags & SWS_CPU_CAPS_ALTIVEC)
+	    yuv2rgb_altivec_init_tables (c, inv_table, brightness, contrast, saturation);
 #endif	
 	return 0;
 }
@@ -1986,7 +1987,7 @@
 			}
 		}
 
-#ifdef HAVE_ALTIVEC
+#ifdef COMPILE_ALTIVEC
 		if ((c->flags & SWS_CPU_CAPS_ALTIVEC) &&
 		    ((srcFormat == IMGFMT_YV12 && 
 		      (dstFormat == IMGFMT_YUY2 || dstFormat == IMGFMT_UYVY)))) {