summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2010-03-23 20:12:52 +0000
committerDiego Biurrun <diego@biurrun.de>2010-03-23 20:12:52 +0000
commit13bc1ac31abea96a1373fc1ea86b35afc8630cba (patch)
tree446baec24a69b65d541edfdc9ea28391176a108d /libswscale/utils.c
parent690877426be1510d7fbf3424fe2e8224955c8ec6 (diff)
Do not compile AltiVec code when AltiVec is not available; not even in
runtime cpudetection mode. Fixes compilation with '--enable-runtime-cpudetect --disable-altivec'. Originally committed as revision 30952 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index 91c89c02b0..03a9622aa7 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -739,7 +739,7 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange
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 srcH, enum PixelFormat srcFormat,
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