summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-20 12:08:31 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-20 12:08:31 +0000
commitf912acba6d1ed3bf7e1c722057df28639111e57b (patch)
tree46f5c92f4301816ae94e1370662c01b8e628e34f /postproc
parent601e2d83bdc227bf68db5e2f5afbd925633bc76d (diff)
downloadmpv-f912acba6d1ed3bf7e1c722057df28639111e57b.tar.bz2
mpv-f912acba6d1ed3bf7e1c722057df28639111e57b.tar.xz
Should fix altivec detection for g3 system.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15524 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r--postproc/swscale.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c
index 0c75f0a7a8..540631b844 100644
--- a/postproc/swscale.c
+++ b/postproc/swscale.c
@@ -733,7 +733,7 @@ static inline void yuv2packedXinC(SwsContext *c, int16_t *lumFilter, int16_t **l
#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 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange
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 @@ SwsContext *sws_getContext(int srcW, int srcH, int origSrcFormat, int dstW, int
}
}
-#ifdef HAVE_ALTIVEC
+#ifdef COMPILE_ALTIVEC
if ((c->flags & SWS_CPU_CAPS_ALTIVEC) &&
((srcFormat == IMGFMT_YV12 &&
(dstFormat == IMGFMT_YUY2 || dstFormat == IMGFMT_UYVY)))) {