From 884a2ba97af67c4bbf44f7d3d4a10b7800df2b78 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 21 Feb 2008 16:47:05 +0000 Subject: Replace Alpha MVI compiler workarounds by a proper configure check. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26051 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpeg2/cpu_accel.c | 4 ---- libmpeg2/idct.c | 5 +---- libmpeg2/idct_alpha.c | 2 -- libmpeg2/libmpeg-0.4.1.diff | 52 --------------------------------------------- 4 files changed, 1 insertion(+), 62 deletions(-) (limited to 'libmpeg2') diff --git a/libmpeg2/cpu_accel.c b/libmpeg2/cpu_accel.c index 1fae2ed302..6532ebdbd8 100644 --- a/libmpeg2/cpu_accel.c +++ b/libmpeg2/cpu_accel.c @@ -224,7 +224,6 @@ static uint32_t arch_accel (void) #ifdef ARCH_ALPHA static uint32_t arch_accel (void) { -#ifdef CAN_COMPILE_ALPHA_MVI uint64_t no_mvi; asm volatile ("amask %1, %0" @@ -232,9 +231,6 @@ static uint32_t arch_accel (void) : "rI" (256)); /* AMASK_MVI */ return no_mvi ? MPEG2_ACCEL_ALPHA : (MPEG2_ACCEL_ALPHA | MPEG2_ACCEL_ALPHA_MVI); -#else - return MPEG2_ACCEL_ALPHA; -#endif } #endif /* ARCH_ALPHA */ #endif /* ACCEL_DETECT */ diff --git a/libmpeg2/idct.c b/libmpeg2/idct.c index b7e0c96480..deff620f92 100644 --- a/libmpeg2/idct.c +++ b/libmpeg2/idct.c @@ -261,14 +261,11 @@ void mpeg2_idct_init (uint32_t accel) } else #endif #ifdef ARCH_ALPHA -#ifdef CAN_COMPILE_ALPHA_MVI if (accel & MPEG2_ACCEL_ALPHA_MVI) { mpeg2_idct_copy = mpeg2_idct_copy_mvi; mpeg2_idct_add = mpeg2_idct_add_mvi; mpeg2_idct_alpha_init (); - } else -#endif - if (accel & MPEG2_ACCEL_ALPHA) { + } else if (accel & MPEG2_ACCEL_ALPHA) { int i; mpeg2_idct_copy = mpeg2_idct_copy_alpha; diff --git a/libmpeg2/idct_alpha.c b/libmpeg2/idct_alpha.c index 95d580fe1c..71328fae8f 100644 --- a/libmpeg2/idct_alpha.c +++ b/libmpeg2/idct_alpha.c @@ -161,7 +161,6 @@ static inline void idct_col (int16_t * const block) block[8*7] = (a0 - b0) >> 17; } -#ifdef CAN_COMPILE_ALPHA_MVI void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride) { uint64_t clampmask; @@ -294,7 +293,6 @@ void mpeg2_idct_add_mvi (const int last, int16_t * block, stq (p7, dest + 7 * stride); } } -#endif void mpeg2_idct_copy_alpha (int16_t * block, uint8_t * dest, const int stride) { diff --git a/libmpeg2/libmpeg-0.4.1.diff b/libmpeg2/libmpeg-0.4.1.diff index 775020d1a1..8031709264 100644 --- a/libmpeg2/libmpeg-0.4.1.diff +++ b/libmpeg2/libmpeg-0.4.1.diff @@ -79,24 +79,6 @@ #endif asm volatile ("mtspr 256, %0\n\t" VAND (0, 0, 0) -@@ -195,6 +222,7 @@ - #ifdef ARCH_ALPHA - static inline uint32_t arch_accel (void) - { -+#ifdef CAN_COMPILE_ALPHA_MVI - uint64_t no_mvi; - - asm volatile ("amask %1, %0" -@@ -202,6 +230,9 @@ - : "rI" (256)); /* AMASK_MVI */ - return no_mvi ? MPEG2_ACCEL_ALPHA : (MPEG2_ACCEL_ALPHA | - MPEG2_ACCEL_ALPHA_MVI); -+#else -+ return MPEG2_ACCEL_ALPHA; -+#endif - } - #endif /* ARCH_ALPHA */ - #endif /* ACCEL_DETECT */ @@ -212,7 +243,7 @@ accel = 0; @@ -233,40 +215,6 @@ mpeg2_idct_copy = mpeg2_idct_copy_mmx; mpeg2_idct_add = mpeg2_idct_add_mmx; mpeg2_idct_mmx_init (); -@@ -254,11 +261,14 @@ - } else - #endif - #ifdef ARCH_ALPHA -+#ifdef CAN_COMPILE_ALPHA_MVI - if (accel & MPEG2_ACCEL_ALPHA_MVI) { - mpeg2_idct_copy = mpeg2_idct_copy_mvi; - mpeg2_idct_add = mpeg2_idct_add_mvi; - mpeg2_idct_alpha_init (); -- } else if (accel & MPEG2_ACCEL_ALPHA) { -+ } else -+#endif -+ if (accel & MPEG2_ACCEL_ALPHA) { - int i; - - mpeg2_idct_copy = mpeg2_idct_copy_alpha; ---- libmpeg2/idct_alpha.c 2006-06-16 20:12:26.000000000 +0200 -+++ libmpeg2/idct_alpha.c 2006-06-16 20:12:50.000000000 +0200 -@@ -157,6 +161,7 @@ - block[8*7] = (a0 - b0) >> 17; - } - -+#ifdef CAN_COMPILE_ALPHA_MVI - void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride) - { - uint64_t clampmask; -@@ -289,6 +294,7 @@ - stq (p7, dest + 7 * stride); - } - } -+#endif - - void mpeg2_idct_copy_alpha (int16_t * block, uint8_t * dest, const int stride) - { --- libmpeg2/idct_mmx.c 2006-06-16 20:12:26.000000000 +0200 +++ libmpeg2/idct_mmx.c 2006-06-16 20:12:50.000000000 +0200 @@ -23,7 +27,7 @@ -- cgit v1.2.3