diff options
Diffstat (limited to 'src/libmpeg2/idct_altivec.c')
-rw-r--r-- | src/libmpeg2/idct_altivec.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/libmpeg2/idct_altivec.c b/src/libmpeg2/idct_altivec.c index 96be2ebc3..1d20f56b4 100644 --- a/src/libmpeg2/idct_altivec.c +++ b/src/libmpeg2/idct_altivec.c @@ -1,6 +1,6 @@ /* * idct_altivec.c - * Copyright (C) 2000-2001 Michel Lespinasse <walken@zoy.org> + * Copyright (C) 2000-2002 Michel Lespinasse <walken@zoy.org> * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> * * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. @@ -26,7 +26,6 @@ #include "config.h" #ifdef ARCH_PPC -#ifdef ENABLE_ALTIVEC #include <inttypes.h> @@ -56,7 +55,7 @@ static int16_t constants[5][8] ATTR_ALIGN(16) = { * I then do some simple trimming on the function prolog/trailers */ -void idct_block_copy_altivec (int16_t * block, uint8_t * dest, int stride) +void mpeg2_idct_copy_altivec (int16_t * block, uint8_t * dest, int stride) { asm (" \n" "# stwu %r1, -128(%r1) \n" @@ -247,7 +246,7 @@ void idct_block_copy_altivec (int16_t * block, uint8_t * dest, int stride) ); } -void idct_block_add_altivec (int16_t * block, uint8_t * dest, int stride) +void mpeg2_idct_add_altivec (int16_t * block, uint8_t * dest, int stride) { asm (" \n" "# stwu %r1, -192(%r1) \n" @@ -467,24 +466,23 @@ void idct_block_add_altivec (int16_t * block, uint8_t * dest, int stride) ); } -void idct_altivec_init (void) +void mpeg2_idct_altivec_init (void) { - extern uint8_t scan_norm[64]; - extern uint8_t scan_alt[64]; + extern uint8_t mpeg2_scan_norm[64]; + extern uint8_t mpeg2_scan_alt[64]; int i, j; i = constants[0][0]; /* just pretending - keeps gcc happy */ /* the altivec idct uses a transposed input, so we patch scan tables */ for (i = 0; i < 64; i++) { - j = scan_norm[i]; - scan_norm[i] = (j >> 3) | ((j & 7) << 3); - j = scan_alt[i]; - scan_alt[i] = (j >> 3) | ((j & 7) << 3); + j = mpeg2_scan_norm[i]; + mpeg2_scan_norm[i] = (j >> 3) | ((j & 7) << 3); + j = mpeg2_scan_alt[i]; + mpeg2_scan_alt[i] = (j >> 3) | ((j & 7) << 3); } } -#endif /* ENABLE_ALTIVEC */ #endif /* ARCH_PPC */ #else /* __ALTIVEC__ */ @@ -607,7 +605,7 @@ static vector_s16_t constants[5] = { (vector_s16_t)(19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722) }; -void idct_block_copy_altivec (vector_s16_t * block, unsigned char * dest, +void mpeg2_idct_copy_altivec (vector_s16_t * block, unsigned char * dest, int stride) { vector_u8_t tmp; @@ -629,7 +627,7 @@ void idct_block_copy_altivec (vector_s16_t * block, unsigned char * dest, COPY (dest, vx7) } -void idct_block_add_altivec (vector_s16_t * block, unsigned char * dest, +void mpeg2_idct_add_altivec (vector_s16_t * block, unsigned char * dest, int stride) { vector_u8_t tmp; |