diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-02-18 23:32:17 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-02-18 23:32:17 +0000 |
commit | 55001d69f2b42e2b7398f0cbf02a123f3f607a9c (patch) | |
tree | 31b0bde030088a1e77bcdab51c825f269b1e77c4 /liba52/imdct.c | |
parent | c7577cd7030c04ce192296edfd151fc449b8e089 (diff) | |
download | mpv-55001d69f2b42e2b7398f0cbf02a123f3f607a9c.tar.bz2 mpv-55001d69f2b42e2b7398f0cbf02a123f3f607a9c.tar.xz |
Refactor AltiVec macros as done for FFmpeg.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26027 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'liba52/imdct.c')
-rw-r--r-- | liba52/imdct.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/liba52/imdct.c b/liba52/imdct.c index a8a5815cb1..c5ebc94dc4 100644 --- a/liba52/imdct.c +++ b/liba52/imdct.c @@ -383,11 +383,16 @@ void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias) #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) @@ -398,18 +403,6 @@ void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias) #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 imdct_do_512_altivec(sample_t data[],sample_t delay[], sample_t bias) |