summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2005-10-28 22:03:52 +0000
committerThom Johansen <thomj@rockbox.org>2005-10-28 22:03:52 +0000
commit6ff84632164962aa20a808e7c6708b7a02b015a1 (patch)
tree420d748a308c65ccfa88621f359ff6d5ebaa2a09 /apps
parenteb87ad5e328bedf313c20640d6f0e003c653ba4b (diff)
downloadrockbox-6ff84632164962aa20a808e7c6708b7a02b015a1.tar.gz
rockbox-6ff84632164962aa20a808e7c6708b7a02b015a1.tar.bz2
rockbox-6ff84632164962aa20a808e7c6708b7a02b015a1.zip
Enabled the FLAC EMAC optimisations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7678 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/libffmpegFLAC/SOURCES3
-rw-r--r--apps/codecs/libffmpegFLAC/decoder.c9
2 files changed, 12 insertions, 0 deletions
diff --git a/apps/codecs/libffmpegFLAC/SOURCES b/apps/codecs/libffmpegFLAC/SOURCES
index 6b23e7ca3e..5ed653ca53 100644
--- a/apps/codecs/libffmpegFLAC/SOURCES
+++ b/apps/codecs/libffmpegFLAC/SOURCES
@@ -1,2 +1,5 @@
bitstream.c
decoder.c
+#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+coldfire.S
+#endif
diff --git a/apps/codecs/libffmpegFLAC/decoder.c b/apps/codecs/libffmpegFLAC/decoder.c
index 5d3f313606..351db1b5a5 100644
--- a/apps/codecs/libffmpegFLAC/decoder.c
+++ b/apps/codecs/libffmpegFLAC/decoder.c
@@ -42,6 +42,10 @@
#include "decoder.h"
+#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+#include "coldfire.h"
+#endif
+
#define INT_MAX 2147483647
#define FFMAX(a,b) ((a) > (b) ? (a) : (b))
@@ -262,6 +266,10 @@ static int decode_subframe_lpc(FLACContext *s, int32_t* decoded, int pred_order)
return -8;
if ((s->bps + coeff_prec + av_log2(pred_order)) <= 32) {
+ #if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
+ (void)sum;
+ lpc_decode_emac(s->blocksize - pred_order, qlevel, pred_order, decoded + pred_order, coeffs);
+ #else
for (i = pred_order; i < s->blocksize; i++)
{
sum = 0;
@@ -269,6 +277,7 @@ static int decode_subframe_lpc(FLACContext *s, int32_t* decoded, int pred_order)
sum += coeffs[j] * decoded[i-j-1];
decoded[i] += sum >> qlevel;
}
+ #endif
} else {
for (i = pred_order; i < s->blocksize; i++)
{