changeset 30910:dd0c440f3205

Do not compile AltiVec code when AltiVec is not available; not even in runtime cpudetection mode. Fixes compilation with '--enable-runtime-cpudetect --disable-altivec'.
author diego
date Tue, 23 Mar 2010 20:12:52 +0000
parents 0d0f53c47bd8
children 4790fe65b11a
files libswscale/utils.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/utils.c	Tue Mar 23 19:45:33 2010 +0000
+++ b/libswscale/utils.c	Tue Mar 23 20:12:52 2010 +0000
@@ -739,7 +739,7 @@
     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 @@
                        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 @@
     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