diff options
author | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-02-21 16:47:05 +0000 |
---|---|---|
committer | diego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-02-21 16:47:05 +0000 |
commit | 884a2ba97af67c4bbf44f7d3d4a10b7800df2b78 (patch) | |
tree | 0b13e3a2eb4cc5d024efb7b746d64492d97a1d84 /libmpeg2 | |
parent | f1d416c70c602fde1022c0a3d620017e875a3c71 (diff) |
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
Diffstat (limited to 'libmpeg2')
-rw-r--r-- | libmpeg2/cpu_accel.c | 4 | ||||
-rw-r--r-- | libmpeg2/idct.c | 5 | ||||
-rw-r--r-- | libmpeg2/idct_alpha.c | 2 | ||||
-rw-r--r-- | libmpeg2/libmpeg-0.4.1.diff | 52 |
4 files changed, 1 insertions, 62 deletions
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 @@ |