diff options
Diffstat (limited to 'apps/plugins/mpegplayer/idct.c')
-rw-r--r-- | apps/plugins/mpegplayer/idct.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/apps/plugins/mpegplayer/idct.c b/apps/plugins/mpegplayer/idct.c index bf705c6a2f..bf7097401e 100644 --- a/apps/plugins/mpegplayer/idct.c +++ b/apps/plugins/mpegplayer/idct.c | |||
@@ -76,6 +76,14 @@ uint8_t mpeg2_clip[3840 * 2 + 256] IBSS_ATTR; | |||
76 | #define CLIP(i) ((mpeg2_clip + 3840)[i]) | 76 | #define CLIP(i) ((mpeg2_clip + 3840)[i]) |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #ifdef CPU_COLDFIRE | ||
80 | /* assembler functions */ | ||
81 | extern void mpeg2_idct_copy_coldfire(int16_t * block, uint8_t * dest, | ||
82 | const int stride); | ||
83 | extern void mpeg2_idct_add_coldfire(const int last, int16_t * block, | ||
84 | uint8_t * dest, const int stride); | ||
85 | #else /* !CPU_COLDFIE */ | ||
86 | |||
79 | #if 0 | 87 | #if 0 |
80 | #define BUTTERFLY(t0,t1,W0,W1,d0,d1) \ | 88 | #define BUTTERFLY(t0,t1,W0,W1,d0,d1) \ |
81 | do { \ | 89 | do { \ |
@@ -258,6 +266,8 @@ static void mpeg2_idct_add_c (const int last, int16_t * block, | |||
258 | } | 266 | } |
259 | } | 267 | } |
260 | 268 | ||
269 | #endif /* !CPU_COLDFIRE */ | ||
270 | |||
261 | void mpeg2_idct_init (void) | 271 | void mpeg2_idct_init (void) |
262 | { | 272 | { |
263 | extern uint8_t default_mpeg2_scan_norm[64]; | 273 | extern uint8_t default_mpeg2_scan_norm[64]; |
@@ -266,8 +276,13 @@ void mpeg2_idct_init (void) | |||
266 | extern uint8_t mpeg2_scan_alt[64]; | 276 | extern uint8_t mpeg2_scan_alt[64]; |
267 | int i, j; | 277 | int i, j; |
268 | 278 | ||
279 | #ifdef CPU_COLDFIRE | ||
280 | mpeg2_idct_copy = mpeg2_idct_copy_coldfire; | ||
281 | mpeg2_idct_add = mpeg2_idct_add_coldfire; | ||
282 | #else | ||
269 | mpeg2_idct_copy = mpeg2_idct_copy_c; | 283 | mpeg2_idct_copy = mpeg2_idct_copy_c; |
270 | mpeg2_idct_add = mpeg2_idct_add_c; | 284 | mpeg2_idct_add = mpeg2_idct_add_c; |
285 | #endif | ||
271 | 286 | ||
272 | #if !defined(CPU_COLDFIRE) && !defined(CPU_ARM) | 287 | #if !defined(CPU_COLDFIRE) && !defined(CPU_ARM) |
273 | for (i = -3840; i < 3840 + 256; i++) | 288 | for (i = -3840; i < 3840 + 256; i++) |