summaryrefslogtreecommitdiffstats
path: root/mp3lib
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-18 23:33:14 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-18 23:33:14 +0000
commitdd7c4bc268968f3356106f8f50430f8b6166732f (patch)
tree7473dfe16f0e11ca3a90bd2fbdbf766cb1c56ae3 /mp3lib
parent55001d69f2b42e2b7398f0cbf02a123f3f607a9c (diff)
downloadmpv-dd7c4bc268968f3356106f8f50430f8b6166732f.tar.bz2
mpv-dd7c4bc268968f3356106f8f50430f8b6166732f.tar.xz
Refactor AltiVec macros as done for FFmpeg.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26028 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib')
-rw-r--r--mp3lib/dct64_altivec.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/mp3lib/dct64_altivec.c b/mp3lib/dct64_altivec.c
index 3a692096d9..eb64069f61 100644
--- a/mp3lib/dct64_altivec.c
+++ b/mp3lib/dct64_altivec.c
@@ -28,11 +28,16 @@
#define WORD_s3 0x1c,0x1d,0x1e,0x1f
#ifdef __APPLE_CC__
-#define vcprm(a,b,c,d) (const vector unsigned char)(WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d)
+#define AVV(x...) (x)
#else
-#define vcprm(a,b,c,d) (const vector unsigned char){WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d}
+#define AVV(x...) {x}
#endif
+#define vcprm(a,b,c,d) (const vector unsigned char)AVV(WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d)
+#define vcii(a,b,c,d) (const vector float)AVV(FLOAT_ ## a, FLOAT_ ## b, FLOAT_ ## c, FLOAT_ ## d)
+
+#define FOUROF(a) AVV(a,a,a,a)
+
// vcprmle is used to keep the same index as in the SSE version.
// it's the same as vcprm, with the index inversed
// ('le' is Little Endian)
@@ -43,18 +48,6 @@
#define FLOAT_n -1.
#define FLOAT_p 1.
-#ifdef __APPLE_CC__
-#define vcii(a,b,c,d) (const vector float)(FLOAT_ ## a, FLOAT_ ## b, FLOAT_ ## c, FLOAT_ ## d)
-#else
-#define vcii(a,b,c,d) (const vector float){FLOAT_ ## a, FLOAT_ ## b, FLOAT_ ## c, FLOAT_ ## d}
-#endif
-
-#ifdef __APPLE_CC__
-#define FOUROF(a) (a)
-#else
-#define FOUROF(a) {a,a,a,a}
-#endif
-
void dct64_altivec(real *a,real *b,real *c)
{
real __attribute__ ((aligned(16))) b1[0x20];