diff options
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) |