From 6f7f921ebee5589c7bc9e1196392c0ae7f28f96c Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Thu, 3 Nov 2005 15:32:40 +0000 Subject: Move all code into IRAM git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7740 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libffmpegFLAC/bitstream.h | 6 +++--- apps/codecs/libffmpegFLAC/coldfire.S | 2 +- apps/codecs/libffmpegFLAC/decoder.c | 12 +++++++++++- apps/codecs/libffmpegFLAC/decoder.h | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/apps/codecs/libffmpegFLAC/bitstream.h b/apps/codecs/libffmpegFLAC/bitstream.h index 62e98c07ea..668e23a836 100644 --- a/apps/codecs/libffmpegFLAC/bitstream.h +++ b/apps/codecs/libffmpegFLAC/bitstream.h @@ -252,7 +252,7 @@ static inline unsigned int get_bits(GetBitContext *s, int n){ return tmp; } -unsigned int get_bits_long(GetBitContext *s, int n); +unsigned int get_bits_long(GetBitContext *s, int n) ICODE_ATTR; /** * shows 0-17 bits. @@ -267,7 +267,7 @@ static inline unsigned int show_bits(GetBitContext *s, int n){ return tmp; } -unsigned int show_bits_long(GetBitContext *s, int n); +unsigned int show_bits_long(GetBitContext *s, int n) ICODE_ATTR; static inline void skip_bits(GetBitContext *s, int n){ //Note gcc seems to optimize this to s->index+=n for the ALT_READER :)) @@ -328,6 +328,6 @@ static inline void init_get_bits(GetBitContext *s, } } -void align_get_bits(GetBitContext *s); +void align_get_bits(GetBitContext *s) ICODE_ATTR; #endif /* BITSTREAM_H */ diff --git a/apps/codecs/libffmpegFLAC/coldfire.S b/apps/codecs/libffmpegFLAC/coldfire.S index 720e6edd86..33964cdbc1 100644 --- a/apps/codecs/libffmpegFLAC/coldfire.S +++ b/apps/codecs/libffmpegFLAC/coldfire.S @@ -23,7 +23,7 @@ All LPC filtering up to order 8 is done in specially optimised unrolled loops, while every order above this is handled by a slower default routine. */ - .text + .section .icode,"ax",@progbits .global lpc_decode_emac .align 2 lpc_decode_emac: diff --git a/apps/codecs/libffmpegFLAC/decoder.c b/apps/codecs/libffmpegFLAC/decoder.c index 351db1b5a5..9d84bb17e4 100644 --- a/apps/codecs/libffmpegFLAC/decoder.c +++ b/apps/codecs/libffmpegFLAC/decoder.c @@ -111,6 +111,7 @@ static const uint8_t table_crc8[256] ICONST_ATTR = { 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3 }; +static int64_t get_utf8(GetBitContext *gb) ICODE_ATTR; static int64_t get_utf8(GetBitContext *gb) { uint64_t val; @@ -135,7 +136,9 @@ static int64_t get_utf8(GetBitContext *gb) return val; } -static int get_crc8(const uint8_t *buf, int count){ +static int get_crc8(const uint8_t *buf, int count) ICODE_ATTR; +static int get_crc8(const uint8_t *buf, int count) +{ int crc=0; int i; @@ -146,6 +149,7 @@ static int get_crc8(const uint8_t *buf, int count){ return crc; } +static int decode_residuals(FLACContext *s, int32_t* decoded, int pred_order) ICODE_ATTR; static int decode_residuals(FLACContext *s, int32_t* decoded, int pred_order) { int i, tmp, partition, method_type, rice_order; @@ -185,6 +189,7 @@ static int decode_residuals(FLACContext *s, int32_t* decoded, int pred_order) return 0; } +static int decode_subframe_fixed(FLACContext *s, int32_t* decoded, int pred_order) ICODE_ATTR; static int decode_subframe_fixed(FLACContext *s, int32_t* decoded, int pred_order) { int i; @@ -231,6 +236,7 @@ static int decode_subframe_fixed(FLACContext *s, int32_t* decoded, int pred_orde return 0; } +static int decode_subframe_lpc(FLACContext *s, int32_t* decoded, int pred_order) ICODE_ATTR; static int decode_subframe_lpc(FLACContext *s, int32_t* decoded, int pred_order) { int sum, i, j; @@ -377,6 +383,10 @@ static inline int decode_subframe(FLACContext *s, int channel, int32_t* decoded) return 0; } +static int decode_frame(FLACContext *s, + int32_t* decoded0, + int32_t* decoded1, + void (*yield)(void)) ICODE_ATTR; static int decode_frame(FLACContext *s, int32_t* decoded0, int32_t* decoded1, diff --git a/apps/codecs/libffmpegFLAC/decoder.h b/apps/codecs/libffmpegFLAC/decoder.h index 5d503adc78..9e2240fea3 100644 --- a/apps/codecs/libffmpegFLAC/decoder.h +++ b/apps/codecs/libffmpegFLAC/decoder.h @@ -41,6 +41,6 @@ int flac_decode_frame(FLACContext *s, int32_t* decoded0, int32_t* decoded1, uint8_t *buf, int buf_size, - void (*yield)(void)); + void (*yield)(void)) ICODE_ATTR; #endif -- cgit v1.2.3