[MPlayer-cvslog] CVS: main/postproc swscale.c,1.156,1.157

Nicolas Plourde CVS syncmail at mplayerhq.hu
Fri May 20 14:08:33 CEST 2005


CVS change done by Nicolas Plourde CVS

Update of /cvsroot/mplayer/main/postproc
In directory mail:/var2/tmp/cvs-serv27103/postproc

Modified Files:
	swscale.c 
Log Message:
Should fix altivec detection for g3 system.


Index: swscale.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -r1.156 -r1.157
--- swscale.c	24 Apr 2005 07:50:18 -0000	1.156
+++ swscale.c	20 May 2005 12:08:31 -0000	1.157
@@ -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)))) {




More information about the MPlayer-cvslog mailing list