summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoen Hirschberg <marcoen@gmail.com>2006-12-30 10:43:50 +0000
committerMarcoen Hirschberg <marcoen@gmail.com>2006-12-30 10:43:50 +0000
commitd3f50ed3963cab15a969000241a9b00cd6d5c618 (patch)
tree7545373d269b31a7f56eaf8471d34036e1f6ed1b
parent6d15996e6dfd971ac0b997fbb61027235bdb01cf (diff)
downloadrockbox-d3f50ed3963cab15a969000241a9b00cd6d5c618.tar.gz
rockbox-d3f50ed3963cab15a969000241a9b00cd6d5c618.zip
add a workaround for gigabeat crashes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11863 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/mpegplayer/idct.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/plugins/mpegplayer/idct.c b/apps/plugins/mpegplayer/idct.c
index 5f37d7688c..372d18a6dc 100644
--- a/apps/plugins/mpegplayer/idct.c
+++ b/apps/plugins/mpegplayer/idct.c
@@ -60,7 +60,8 @@ static inline unsigned CLIP(int value)
60 ); 60 );
61 return value; 61 return value;
62} 62}
63#elif defined CPU_ARM 63/* FIXME why doesn't this work on the gigabeat? */
64#elif defined CPU_ARM && CONFIG_CPU != S3C2440
64static inline unsigned CLIP(int value) 65static inline unsigned CLIP(int value)
65{ 66{
66 asm ( /* Note: Uses knowledge that only the low byte of the result is used */ 67 asm ( /* Note: Uses knowledge that only the low byte of the result is used */
@@ -301,7 +302,7 @@ void mpeg2_idct_init (uint32_t accel)
301 302
302 mpeg2_idct_copy = mpeg2_idct_copy_c; 303 mpeg2_idct_copy = mpeg2_idct_copy_c;
303 mpeg2_idct_add = mpeg2_idct_add_c; 304 mpeg2_idct_add = mpeg2_idct_add_c;
304#if !defined(CPU_COLDFIRE) && !defined(CPU_ARM) 305#if !defined(CPU_COLDFIRE) && !defined(CPU_ARM) || CONFIG_CPU == S3C2440
305 for (i = -3840; i < 3840 + 256; i++) 306 for (i = -3840; i < 3840 + 256; i++)
306 CLIP(i) = (i < 0) ? 0 : ((i > 255) ? 255 : i); 307 CLIP(i) = (i < 0) ? 0 : ((i > 255) ? 255 : i);
307#endif 308#endif