Mercurial > libavcodec.hg
diff ppc/idct_altivec.c @ 1277:f3152eb76f1a libavcodec
altivec gcc-3 fixes by (Magnus Damm <damm at opensource dot se>)
author | michaelni |
---|---|
date | Wed, 21 May 2003 17:50:57 +0000 |
parents | b32afefe7d33 |
children | e8ff4783f188 |
line wrap: on
line diff
--- a/ppc/idct_altivec.c Tue May 20 17:36:49 2003 +0000 +++ b/ppc/idct_altivec.c Wed May 21 17:50:57 2003 +0000 @@ -38,6 +38,9 @@ #include <stdlib.h> /* malloc(), free() */ #include <string.h> #include "../dsputil.h" + +#include "gcc_fixes.h" + #include "dsputil_altivec.h" #define vector_s16_t vector signed short @@ -152,24 +155,13 @@ vx7 = vec_sra (vy7, shift); -#ifdef CONFIG_DARWIN static const vector_s16_t constants[5] = { - (vector_s16_t)(23170, 13573, 6518, 21895, -23170, -21895, 32, 31), - (vector_s16_t)(16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725), - (vector_s16_t)(22725, 31521, 29692, 26722, 22725, 26722, 29692, 31521), - (vector_s16_t)(21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692), - (vector_s16_t)(19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722) + (vector_s16_t) AVV(23170, 13573, 6518, 21895, -23170, -21895, 32, 31), + (vector_s16_t) AVV(16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725), + (vector_s16_t) AVV(22725, 31521, 29692, 26722, 22725, 26722, 29692, 31521), + (vector_s16_t) AVV(21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692), + (vector_s16_t) AVV(19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722) }; -#else -// broken gcc -static const vector_s16_t constants[5] = { - (vector_s16_t){23170, 13573, 6518, 21895, -23170, -21895, 32, 31}, - (vector_s16_t){16384, 22725, 21407, 19266, 16384, 19266, 21407, 22725}, - (vector_s16_t){22725, 31521, 29692, 26722, 22725, 26722, 29692, 31521}, - (vector_s16_t){21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692}, - (vector_s16_t){19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722} -}; -#endif void idct_put_altivec(uint8_t* dest, int stride, vector_s16_t* block) {