aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ppc/idct_altivec.c
diff options
context:
space:
mode:
authorRomain Dolbeau <dolbeau@irisa.fr>2003-01-26 22:29:47 +0000
committerFabrice Bellard <fabrice@bellard.org>2003-01-26 22:29:47 +0000
commit3b991c54ebf9eb6dc17939576fef9662cae1c16c (patch)
tree472bbe327c6539bccf39d791ab4e9945b94e4b53 /libavcodec/ppc/idct_altivec.c
parenta48835b9fe2d5606a8f0ab56b905047b2a17e42c (diff)
downloadffmpeg-3b991c54ebf9eb6dc17939576fef9662cae1c16c.tar.gz
Altivec on non darwin systems patch by Romain Dolbeau
Originally committed as revision 1509 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ppc/idct_altivec.c')
-rw-r--r--libavcodec/ppc/idct_altivec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/ppc/idct_altivec.c b/libavcodec/ppc/idct_altivec.c
index 41db01f832..1619f17315 100644
--- a/libavcodec/ppc/idct_altivec.c
+++ b/libavcodec/ppc/idct_altivec.c
@@ -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 @@ static const vector_s16_t constants[5] = {
(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)
{