[FFmpeg-cvslog] r30952 - trunk/libswscale/utils.c

diego subversion
Tue Mar 23 21:12:52 CET 2010


Author: diego
Date: Tue Mar 23 21:12:52 2010
New Revision: 30952

Log:
Do not compile AltiVec code when AltiVec is not available; not even in
runtime cpudetection mode.
Fixes compilation with '--enable-runtime-cpudetect --disable-altivec'.

Modified:
   trunk/libswscale/utils.c

Modified: trunk/libswscale/utils.c
==============================================================================
--- trunk/libswscale/utils.c	Tue Mar 23 20:45:33 2010	(r30951)
+++ trunk/libswscale/utils.c	Tue Mar 23 21:12:52 2010	(r30952)
@@ -739,7 +739,7 @@ int sws_setColorspaceDetails(SwsContext 
     ff_yuv2rgb_c_init_tables(c, inv_table, srcRange, brightness, contrast, saturation);
     //FIXME factorize
 
-#if ARCH_PPC && (HAVE_ALTIVEC || CONFIG_RUNTIME_CPUDETECT)
+#if ARCH_PPC && HAVE_ALTIVEC
     if (c->flags & SWS_CPU_CAPS_ALTIVEC)
         ff_yuv2rgb_init_tables_altivec(c, inv_table, brightness, contrast, saturation);
 #endif
@@ -1021,7 +1021,7 @@ SwsContext *sws_getContext(int srcW, int
                        srcFilter->chrV, dstFilter->chrV, c->param) < 0)
             goto fail;
 
-#if ARCH_PPC && (HAVE_ALTIVEC || CONFIG_RUNTIME_CPUDETECT)
+#if ARCH_PPC && HAVE_ALTIVEC
         FF_ALLOC_OR_GOTO(c, c->vYCoeffsBank, sizeof (vector signed short)*c->vLumFilterSize*c->dstH, fail);
         FF_ALLOC_OR_GOTO(c, c->vCCoeffsBank, sizeof (vector signed short)*c->vChrFilterSize*c->chrDstH, fail);
 
@@ -1530,7 +1530,7 @@ void sws_freeContext(SwsContext *c)
     av_freep(&c->vChrFilter);
     av_freep(&c->hLumFilter);
     av_freep(&c->hChrFilter);
-#if ARCH_PPC && (HAVE_ALTIVEC || CONFIG_RUNTIME_CPUDETECT)
+#if ARCH_PPC && HAVE_ALTIVEC
     av_freep(&c->vYCoeffsBank);
     av_freep(&c->vCCoeffsBank);
 #endif



More information about the ffmpeg-cvslog mailing list