From 3b991c54ebf9eb6dc17939576fef9662cae1c16c Mon Sep 17 00:00:00 2001 From: Romain Dolbeau Date: Sun, 26 Jan 2003 22:29:47 +0000 Subject: Altivec on non darwin systems patch by Romain Dolbeau Originally committed as revision 1509 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ppc/dsputil_altivec.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'libavcodec/ppc/dsputil_altivec.h') diff --git a/libavcodec/ppc/dsputil_altivec.h b/libavcodec/ppc/dsputil_altivec.h index b19c0a5e51..61dbec5489 100644 --- a/libavcodec/ppc/dsputil_altivec.h +++ b/libavcodec/ppc/dsputil_altivec.h @@ -63,7 +63,11 @@ extern int has_altivec(void); #define WORD_s2 0x18,0x19,0x1a,0x1b #define WORD_s3 0x1c,0x1d,0x1e,0x1f +#ifdef CONFIG_DARWIN #define vcprm(a,b,c,d) (const vector unsigned char)(WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d) +#else +#define vcprm(a,b,c,d) (const vector unsigned char){WORD_ ## a, WORD_ ## b, WORD_ ## c, WORD_ ## d} +#endif // vcprmle is used to keep the same index as in the SSE version. // it's the same as vcprm, with the index inversed @@ -75,7 +79,12 @@ extern int has_altivec(void); #define FLOAT_n -1. #define FLOAT_p 1. + +#ifdef CONFIG_DARWIN #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 #else /* HAVE_ALTIVEC */ #ifdef ALTIVEC_USE_REFERENCE_C_CODE -- cgit v1.2.3