Mercurial > libavcodec.hg
diff ppc/idct_altivec.c @ 1033:b4172ff70d27 libavcodec
Altivec on non darwin systems patch by Romain Dolbeau
author | bellard |
---|---|
date | Sun, 26 Jan 2003 22:29:47 +0000 |
parents | 35cf2f4a0f8c |
children | b32afefe7d33 |
line wrap: on
line diff
--- a/ppc/idct_altivec.c Thu Jan 23 23:18:42 2003 +0000 +++ b/ppc/idct_altivec.c Sun Jan 26 22:29:47 2003 +0000 @@ -151,6 +151,8 @@ vx6 = vec_sra (vy6, shift); \ 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), @@ -158,6 +160,16 @@ (vector_s16_t)(21407, 29692, 27969, 25172, 21407, 25172, 27969, 29692), (vector_s16_t)(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) {