diff options
author | Tomasz Malesinski <tomal@rockbox.org> | 2006-11-09 21:59:27 +0000 |
---|---|---|
committer | Tomasz Malesinski <tomal@rockbox.org> | 2006-11-09 21:59:27 +0000 |
commit | 5c54ba49d5c05e394a31f3827f7c4a75e28d9999 (patch) | |
tree | 096c978d3e4d259cc6cf08ee5ccdd4414d06c013 /apps | |
parent | 2e383a430de025378bf17942a1cf5ea86860f700 (diff) |
Added macros controlling what goes to IRAM on different targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11483 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/Tremor/bitwise.c | 4 | ||||
-rw-r--r-- | apps/codecs/Tremor/block.c | 3 | ||||
-rw-r--r-- | apps/codecs/Tremor/config-tremor.h | 16 | ||||
-rw-r--r-- | apps/codecs/Tremor/floor1.c | 5 | ||||
-rw-r--r-- | apps/codecs/Tremor/framing.c | 8 | ||||
-rw-r--r-- | apps/codecs/Tremor/mdct.c | 6 | ||||
-rw-r--r-- | apps/codecs/Tremor/res012.c | 3 | ||||
-rw-r--r-- | apps/codecs/Tremor/synthesis.c | 3 | ||||
-rw-r--r-- | apps/codecs/Tremor/vorbisfile.c | 4 | ||||
-rw-r--r-- | apps/codecs/Tremor/window_lookup.h | 4 | ||||
-rw-r--r-- | apps/codecs/flac.c | 2 | ||||
-rw-r--r-- | apps/codecs/libalac/alac.c | 6 | ||||
-rw-r--r-- | apps/codecs/libalac/decomp.h | 11 | ||||
-rw-r--r-- | apps/codecs/libffmpegFLAC/bitstream.h | 14 | ||||
-rw-r--r-- | apps/codecs/libffmpegFLAC/decoder.c | 12 | ||||
-rw-r--r-- | apps/codecs/libffmpegFLAC/decoder.h | 2 | ||||
-rw-r--r-- | apps/codecs/libffmpegFLAC/shndec.c | 2 | ||||
-rw-r--r-- | apps/codecs/libmad/global.h | 4 | ||||
-rw-r--r-- | apps/codecs/libmad/huffman.c | 38 | ||||
-rw-r--r-- | apps/codecs/libmusepack/musepack.h | 4 | ||||
-rw-r--r-- | apps/codecs/mpc.c | 3 | ||||
-rw-r--r-- | apps/codecs/shorten.c | 6 | ||||
-rw-r--r-- | apps/playback.c | 6 |
23 files changed, 104 insertions, 62 deletions
diff --git a/apps/codecs/Tremor/bitwise.c b/apps/codecs/Tremor/bitwise.c index 3e967b9d42..55d3712708 100644 --- a/apps/codecs/Tremor/bitwise.c +++ b/apps/codecs/Tremor/bitwise.c @@ -49,7 +49,7 @@ void oggpack_readinit(oggpack_buffer *b,ogg_reference *r){ } /* Read in bits without advancing the bitptr; bits <= 32 */ -long oggpack_look_full(oggpack_buffer *b,int bits) ICODE_ATTR; +long oggpack_look_full(oggpack_buffer *b,int bits) ICODE_ATTR_TREMOR_NOT_MDCT; long oggpack_look_full(oggpack_buffer *b,int bits){ unsigned long m=oggpack_mask[bits]; unsigned long ret=-1; @@ -136,7 +136,7 @@ int oggpack_eop(oggpack_buffer *b){ } /* bits <= 32 */ -long oggpack_read(oggpack_buffer *b,int bits) ICODE_ATTR; +long oggpack_read(oggpack_buffer *b,int bits) ICODE_ATTR_TREMOR_NOT_MDCT; long oggpack_read(oggpack_buffer *b,int bits){ unsigned long m=oggpack_mask[bits]; ogg_uint32_t ret=-1; diff --git a/apps/codecs/Tremor/block.c b/apps/codecs/Tremor/block.c index ac19f3a317..9dce13c6e5 100644 --- a/apps/codecs/Tremor/block.c +++ b/apps/codecs/Tremor/block.c @@ -256,7 +256,8 @@ void vorbis_dsp_clear(vorbis_dsp_state *v){ block. The time domain envelope is not yet handled at the point of calling (as it relies on the previous block). */ -int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb) ICODE_ATTR; +int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb) + ICODE_ATTR_TREMOR_NOT_MDCT; int vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb){ vorbis_info *vi=v->vi; codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; diff --git a/apps/codecs/Tremor/config-tremor.h b/apps/codecs/Tremor/config-tremor.h index f4a0e1c0bf..e1ade700e5 100644 --- a/apps/codecs/Tremor/config-tremor.h +++ b/apps/codecs/Tremor/config-tremor.h @@ -13,12 +13,16 @@ #define BIG_ENDIAN 0 #endif -/* As of 28 Dec 2005, the Tremor code is too big for IRAM on the iPod, - so we temporarily disable ICODE_ATTR - this needs reviewing when it comes - to optimising Tremor for the iPod */ -#ifdef CPU_ARM -#undef ICODE_ATTR -#define ICODE_ATTR +#ifndef ICONST_ATTR_TREMOR_WINDOW +#define ICONST_ATTR_TREMOR_WINDOW ICONST_ATTR +#endif + +#ifndef ICODE_ATTR_TREMOR_MDCT +#define ICODE_ATTR_TREMOR_MDCT ICODE_ATTR +#endif + +#ifndef ICODE_ATTR_TREMOR_NOT_MDCT +#define ICODE_ATTR_TREMOR_NOT_MDCT ICODE_ATTR #endif // #define _LOW_ACCURACY_ diff --git a/apps/codecs/Tremor/floor1.c b/apps/codecs/Tremor/floor1.c index 14515c27e6..a66e7379d7 100644 --- a/apps/codecs/Tremor/floor1.c +++ b/apps/codecs/Tremor/floor1.c @@ -312,7 +312,8 @@ static void render_line(int x0,register int x1,int y0,int y1,ogg_int32_t *d){ } } -static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in) ICODE_ATTR; +static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in) + ICODE_ATTR_TREMOR_NOT_MDCT; static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){ vorbis_look_floor1 *look=(vorbis_look_floor1 *)in; vorbis_info_floor1 *info=look->vi; @@ -399,7 +400,7 @@ static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){ } static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo, - ogg_int32_t *out) ICODE_ATTR; + ogg_int32_t *out) ICODE_ATTR_TREMOR_NOT_MDCT; static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo, ogg_int32_t *out){ vorbis_look_floor1 *look=(vorbis_look_floor1 *)in; diff --git a/apps/codecs/Tremor/framing.c b/apps/codecs/Tremor/framing.c index f17ad86d98..e444514901 100644 --- a/apps/codecs/Tremor/framing.c +++ b/apps/codecs/Tremor/framing.c @@ -105,7 +105,8 @@ static ogg_buffer *_fetch_buffer(ogg_buffer_state *bs,long bytes){ return ob; } -static ogg_reference *_fetch_ref(ogg_buffer_state *bs) ICODE_ATTR; +static ogg_reference *_fetch_ref(ogg_buffer_state *bs) + ICODE_ATTR_TREMOR_NOT_MDCT; static ogg_reference *_fetch_ref(ogg_buffer_state *bs){ ogg_reference *or; bs->outstanding++; @@ -857,7 +858,7 @@ static void _next_lace(oggbyte_buffer *ob,ogg_stream_state *os){ } } -static void _span_queued_page(ogg_stream_state *os) ICODE_ATTR; +static void _span_queued_page(ogg_stream_state *os) ICODE_ATTR_TREMOR_NOT_MDCT; static void _span_queued_page(ogg_stream_state *os){ while( !(os->body_fill&FINFLAG) ){ @@ -1016,7 +1017,8 @@ int ogg_stream_reset_serialno(ogg_stream_state *os,int serialno){ return OGG_SUCCESS; } -static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv) ICODE_ATTR; +static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv) + ICODE_ATTR_TREMOR_NOT_MDCT; static int _packetout(ogg_stream_state *os,ogg_packet *op,int adv){ ogg_packet_release(op); diff --git a/apps/codecs/Tremor/mdct.c b/apps/codecs/Tremor/mdct.c index 5d7f195616..8334cdf3c4 100644 --- a/apps/codecs/Tremor/mdct.c +++ b/apps/codecs/Tremor/mdct.c @@ -144,7 +144,8 @@ STIN void mdct_butterfly_32(DATA_TYPE *x){ } /* N/stage point generic N stage butterfly (in place, 4 register) */ -void mdct_butterfly_generic(DATA_TYPE *x,int points, int step) ICODE_ATTR; +void mdct_butterfly_generic(DATA_TYPE *x,int points, int step) + ICODE_ATTR_TREMOR_MDCT; void mdct_butterfly_generic(DATA_TYPE *x,int points, int step){ LOOKUP_T *T = sincos_lookup0; DATA_TYPE *x1 = x + points - 8; @@ -332,7 +333,8 @@ STIN void mdct_bitreverse(DATA_TYPE *x,int n,int step,int shift) { } -void mdct_backward(int n, DATA_TYPE *in, DATA_TYPE *out) ICODE_ATTR; +void mdct_backward(int n, DATA_TYPE *in, DATA_TYPE *out) + ICODE_ATTR_TREMOR_MDCT; void mdct_backward(int n, DATA_TYPE *in, DATA_TYPE *out) { int n2=n>>1; int n4=n>>2; diff --git a/apps/codecs/Tremor/res012.c b/apps/codecs/Tremor/res012.c index 0f4d224f89..fe0cf2e50a 100644 --- a/apps/codecs/Tremor/res012.c +++ b/apps/codecs/Tremor/res012.c @@ -259,7 +259,8 @@ int res1_inverse(vorbis_block *vb,vorbis_look_residue *vl, /* duplicate code here as speed is somewhat more important */ int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl, - ogg_int32_t **in,int *nonzero,int ch) ICODE_ATTR; + ogg_int32_t **in,int *nonzero,int ch) + ICODE_ATTR_TREMOR_NOT_MDCT; int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl, ogg_int32_t **in,int *nonzero,int ch){ long i,k,l,s; diff --git a/apps/codecs/Tremor/synthesis.c b/apps/codecs/Tremor/synthesis.c index c7f0bb6cc5..cef240e796 100644 --- a/apps/codecs/Tremor/synthesis.c +++ b/apps/codecs/Tremor/synthesis.c @@ -35,7 +35,8 @@ static ogg_int32_t *ipcm_vect[CHANNELS] IBSS_ATTR; static ogg_int32_t ipcm_buff[CHANNELS*IRAM_PCM_END] IBSS_ATTR LINE_ATTR; -int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep) ICODE_ATTR; +int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep) + ICODE_ATTR_TREMOR_NOT_MDCT; int vorbis_synthesis(vorbis_block *vb,ogg_packet *op,int decodep){ vorbis_dsp_state *vd=vb->vd; private_state *b=(private_state *)vd->backend_state; diff --git a/apps/codecs/Tremor/vorbisfile.c b/apps/codecs/Tremor/vorbisfile.c index 4d36ab3b48..0f39826388 100644 --- a/apps/codecs/Tremor/vorbisfile.c +++ b/apps/codecs/Tremor/vorbisfile.c @@ -478,7 +478,7 @@ static void _decode_clear(OggVorbis_File *vf){ static int _fetch_and_process_packet(OggVorbis_File *vf, int readp, - int spanp) ICODE_ATTR; + int spanp) ICODE_ATTR_TREMOR_NOT_MDCT; static int _fetch_and_process_packet(OggVorbis_File *vf, int readp, int spanp){ @@ -1458,7 +1458,7 @@ ogg_int64_t ov_pcm_tell(OggVorbis_File *vf){ } /* return time offset (milliseconds) of next PCM sample to be read */ -ogg_int64_t ov_time_tell(OggVorbis_File *vf) ICODE_ATTR; +ogg_int64_t ov_time_tell(OggVorbis_File *vf) ICODE_ATTR_TREMOR_NOT_MDCT; ogg_int64_t ov_time_tell(OggVorbis_File *vf){ int link=0; ogg_int64_t pcm_total=0; diff --git a/apps/codecs/Tremor/window_lookup.h b/apps/codecs/Tremor/window_lookup.h index 9fbb98fb75..ccf316e227 100644 --- a/apps/codecs/Tremor/window_lookup.h +++ b/apps/codecs/Tremor/window_lookup.h @@ -51,7 +51,7 @@ static LOOKUP_T vwin128[64] = { X(0x7ffdcf39), X(0x7fff6dac), X(0x7fffed01), X(0x7fffffc4), }; -static LOOKUP_T vwin256[128] ICONST_ATTR = { +static LOOKUP_T vwin256[128] ICONST_ATTR_TREMOR_WINDOW = { X(0x0001f018), X(0x00117066), X(0x00306e9e), X(0x005ee5f1), X(0x009ccf26), X(0x00ea208b), X(0x0146cdea), X(0x01b2c87f), X(0x022dfedf), X(0x02b85ced), X(0x0351cbbd), X(0x03fa317f), @@ -284,7 +284,7 @@ static LOOKUP_T vwin1024[512] = { X(0x7fffffdd), X(0x7ffffff7), X(0x7fffffff), X(0x7fffffff), }; -static LOOKUP_T vwin2048[1024] ICONST_ATTR = { +static LOOKUP_T vwin2048[1024] ICONST_ATTR_TREMOR_WINDOW = { X(0x000007c0), X(0x000045c4), X(0x0000c1ca), X(0x00017bd3), X(0x000273de), X(0x0003a9eb), X(0x00051df9), X(0x0006d007), X(0x0008c014), X(0x000aee1e), X(0x000d5a25), X(0x00100428), diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c index 1e9c30f1a9..9f2405f4f2 100644 --- a/apps/codecs/flac.c +++ b/apps/codecs/flac.c @@ -34,7 +34,7 @@ struct codec_api* rb; struct codec_api* ci; /* The output buffers containing the decoded samples (channels 0 and 1) */ -int32_t decoded0[MAX_BLOCKSIZE] IBSS_ATTR; +int32_t decoded0[MAX_BLOCKSIZE] IBSS_ATTR_FLAC_DECODED0; int32_t decoded1[MAX_BLOCKSIZE] IBSS_ATTR; #define MAX_SUPPORTED_SEEKTABLE_SIZE 5000 diff --git a/apps/codecs/libalac/alac.c b/apps/codecs/libalac/alac.c index 5487c68961..f8e4df8b1d 100644 --- a/apps/codecs/libalac/alac.c +++ b/apps/codecs/libalac/alac.c @@ -226,7 +226,7 @@ void basterdised_rice_decompress(alac_file *alac, int rice_kmodifier, /* arg424->d */ int rice_historymult, /* arg424->c */ int rice_kmodifier_mask /* arg424->e */ - ) ICODE_ATTR; + ) ICODE_ATTR_ALAC; void basterdised_rice_decompress(alac_file *alac, int32_t *output_buffer, int output_size, @@ -373,7 +373,7 @@ static void predictor_decompress_fir_adapt(int32_t *error_buffer, int readsamplesize, int16_t *predictor_coef_table, int predictor_coef_num, - int predictor_quantitization) ICODE_ATTR; + int predictor_quantitization) ICODE_ATTR_ALAC; static void predictor_decompress_fir_adapt(int32_t *error_buffer, int32_t *buffer_out, int output_size, @@ -645,7 +645,7 @@ void deinterlace_16(int32_t* buffer0, int32_t* buffer1, int numsamples, uint8_t interlacing_shift, - uint8_t interlacing_leftweight) ICODE_ATTR; + uint8_t interlacing_leftweight) ICODE_ATTR_ALAC; void deinterlace_16(int32_t* buffer0, int32_t* buffer1, int numsamples, diff --git a/apps/codecs/libalac/decomp.h b/apps/codecs/libalac/decomp.h index 162811084f..e4a19a7252 100644 --- a/apps/codecs/libalac/decomp.h +++ b/apps/codecs/libalac/decomp.h @@ -1,6 +1,10 @@ #ifndef __ALAC__DECOMP_H #define __ALAC__DECOMP_H +#ifndef ICODE_ATTR_ALAC +#define ICODE_ATTR_ALAC ICODE_ATTR +#endif + /* Always output samples shifted to 28 bits + sign*/ #define ALAC_OUTPUT_DEPTH 29 #define SCALE16 (ALAC_OUTPUT_DEPTH - 16) @@ -31,12 +35,13 @@ typedef struct /* end setinfo stuff */ } alac_file; -void create_alac(int samplesize, int numchannels, alac_file* alac) ICODE_ATTR; +void create_alac(int samplesize, int numchannels, alac_file* alac) + ICODE_ATTR_ALAC; int alac_decode_frame(alac_file *alac, unsigned char *inbuffer, int32_t outputbuffer[ALAC_MAX_CHANNELS][ALAC_BLOCKSIZE], - void (*yield)(void)) ICODE_ATTR; -void alac_set_info(alac_file *alac, char *inputbuffer) ICODE_ATTR; + void (*yield)(void)) ICODE_ATTR_ALAC; +void alac_set_info(alac_file *alac, char *inputbuffer) ICODE_ATTR_ALAC; #endif /* __ALAC__DECOMP_H */ diff --git a/apps/codecs/libffmpegFLAC/bitstream.h b/apps/codecs/libffmpegFLAC/bitstream.h index 288d839c4a..19f2b6e01c 100644 --- a/apps/codecs/libffmpegFLAC/bitstream.h +++ b/apps/codecs/libffmpegFLAC/bitstream.h @@ -18,6 +18,14 @@ #define ICODE_ATTR #endif +#ifndef ICODE_ATTR_FLAC +#define ICODE_ATTR_FLAC ICODE_ATTR +#endif + +#ifndef IBSS_ATTR_FLAC_DECODED0 +#define IBSS_ATTR_FLAC_DECODED0 IBSS_ATTR +#endif + /* Endian conversion routines for standalone compilation */ #ifdef BUILD_STANDALONE #ifdef BUILD_BIGENDIAN @@ -252,7 +260,7 @@ static inline unsigned int get_bits(GetBitContext *s, int n){ return tmp; } -unsigned int get_bits_long(GetBitContext *s, int n) ICODE_ATTR; +unsigned int get_bits_long(GetBitContext *s, int n) ICODE_ATTR_FLAC; /** * shows 0-17 bits. @@ -267,7 +275,7 @@ static inline unsigned int show_bits(GetBitContext *s, int n){ return tmp; } -unsigned int show_bits_long(GetBitContext *s, int n) ICODE_ATTR; +unsigned int show_bits_long(GetBitContext *s, int n) ICODE_ATTR_FLAC; 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 +336,6 @@ static inline void init_get_bits(GetBitContext *s, } } -void align_get_bits(GetBitContext *s) ICODE_ATTR; +void align_get_bits(GetBitContext *s) ICODE_ATTR_FLAC; #endif /* BITSTREAM_H */ diff --git a/apps/codecs/libffmpegFLAC/decoder.c b/apps/codecs/libffmpegFLAC/decoder.c index 3d934d9990..8a1f84c6b6 100644 --- a/apps/codecs/libffmpegFLAC/decoder.c +++ b/apps/codecs/libffmpegFLAC/decoder.c @@ -99,7 +99,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) ICODE_ATTR_FLAC; static int64_t get_utf8(GetBitContext *gb) { uint64_t val; @@ -124,7 +124,7 @@ static int64_t get_utf8(GetBitContext *gb) return val; } -static int get_crc8(const uint8_t *buf, int count) ICODE_ATTR; +static int get_crc8(const uint8_t *buf, int count) ICODE_ATTR_FLAC; static int get_crc8(const uint8_t *buf, int count) { int crc=0; @@ -137,7 +137,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) ICODE_ATTR_FLAC; static int decode_residuals(FLACContext *s, int32_t* decoded, int pred_order) { int i, tmp, partition, method_type, rice_order; @@ -177,7 +177,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) ICODE_ATTR_FLAC; static int decode_subframe_fixed(FLACContext *s, int32_t* decoded, int pred_order) { int i; @@ -224,7 +224,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) ICODE_ATTR_FLAC; static int decode_subframe_lpc(FLACContext *s, int32_t* decoded, int pred_order) { int sum, i, j; @@ -386,7 +386,7 @@ static inline int decode_subframe(FLACContext *s, int channel, int32_t* decoded) static int decode_frame(FLACContext *s, int32_t* decoded0, int32_t* decoded1, - void (*yield)(void)) ICODE_ATTR; + void (*yield)(void)) ICODE_ATTR_FLAC; 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 affec0a5a3..0b148df916 100644 --- a/apps/codecs/libffmpegFLAC/decoder.h +++ b/apps/codecs/libffmpegFLAC/decoder.h @@ -44,6 +44,6 @@ int flac_decode_frame(FLACContext *s, int32_t* decoded0, int32_t* decoded1, uint8_t *buf, int buf_size, - void (*yield)(void)) ICODE_ATTR; + void (*yield)(void)) ICODE_ATTR_FLAC; #endif diff --git a/apps/codecs/libffmpegFLAC/shndec.c b/apps/codecs/libffmpegFLAC/shndec.c index d7fc6a15a6..61b3703188 100644 --- a/apps/codecs/libffmpegFLAC/shndec.c +++ b/apps/codecs/libffmpegFLAC/shndec.c @@ -83,7 +83,7 @@ static unsigned int get_uint(ShortenContext *s, int k) } #if defined(CPU_COLDFIRE) && !defined(SIMULATOR) -static void coldfire_lshift_samples(int n, int shift, int32_t *samples) ICODE_ATTR; +static void coldfire_lshift_samples(int n, int shift, int32_t *samples) ICODE_ATTR_FLAC; static void coldfire_lshift_samples(int n, int shift, int32_t *samples) { /* diff --git a/apps/codecs/libmad/global.h b/apps/codecs/libmad/global.h index fc3dde883e..1ecfea1c14 100644 --- a/apps/codecs/libmad/global.h +++ b/apps/codecs/libmad/global.h @@ -66,4 +66,8 @@ # endif # endif +#ifndef ICONST_ATTR_MPA_HUFFMAN +#define ICONST_ATTR_MPA_HUFFMAN ICONST_ATTR +#endif + # endif diff --git a/apps/codecs/libmad/huffman.c b/apps/codecs/libmad/huffman.c index 6ef2390dee..43216d3680 100644 --- a/apps/codecs/libmad/huffman.c +++ b/apps/codecs/libmad/huffman.c @@ -50,7 +50,7 @@ # endif static -union huffquad const hufftabA[] ICONST_ATTR = { +union huffquad const hufftabA[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 2), /* 0001 */ PTR(20, 2), /* 0010 */ PTR(24, 1), @@ -90,7 +90,7 @@ union huffquad const hufftabA[] ICONST_ATTR = { }; static -union huffquad const hufftabB[] ICONST_ATTR = { +union huffquad const hufftabB[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ V(1, 1, 1, 1, 4), /* 0001 */ V(1, 1, 1, 0, 4), /* 0010 */ V(1, 1, 0, 1, 4), @@ -126,12 +126,12 @@ union huffquad const hufftabB[] ICONST_ATTR = { # endif static -union huffpair const hufftab0[] ICONST_ATTR = { +union huffpair const hufftab0[] ICONST_ATTR_MPA_HUFFMAN = { /* */ V(0, 0, 0) }; static -union huffpair const hufftab1[] ICONST_ATTR = { +union huffpair const hufftab1[] ICONST_ATTR_MPA_HUFFMAN = { /* 000 */ V(1, 1, 3), /* 001 */ V(0, 1, 3), /* 010 */ V(1, 0, 2), @@ -143,7 +143,7 @@ union huffpair const hufftab1[] ICONST_ATTR = { }; static -union huffpair const hufftab2[] ICONST_ATTR = { +union huffpair const hufftab2[] ICONST_ATTR_MPA_HUFFMAN = { /* 000 */ PTR(8, 3), /* 001 */ V(1, 1, 3), /* 010 */ V(0, 1, 3), @@ -165,7 +165,7 @@ union huffpair const hufftab2[] ICONST_ATTR = { }; static -union huffpair const hufftab3[] ICONST_ATTR = { +union huffpair const hufftab3[] ICONST_ATTR_MPA_HUFFMAN = { /* 000 */ PTR(8, 3), /* 001 */ V(1, 0, 3), /* 010 */ V(1, 1, 2), @@ -187,7 +187,7 @@ union huffpair const hufftab3[] ICONST_ATTR = { }; static -union huffpair const hufftab5[] ICONST_ATTR = { +union huffpair const hufftab5[] ICONST_ATTR_MPA_HUFFMAN = { /* 000 */ PTR(8, 4), /* 001 */ V(1, 1, 3), /* 010 */ V(0, 1, 3), @@ -221,7 +221,7 @@ union huffpair const hufftab5[] ICONST_ATTR = { }; static -union huffpair const hufftab6[] ICONST_ATTR = { +union huffpair const hufftab6[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 3), /* 0001 */ PTR(24, 1), /* 0010 */ PTR(26, 1), @@ -259,7 +259,7 @@ union huffpair const hufftab6[] ICONST_ATTR = { }; static -union huffpair const hufftab7[] ICONST_ATTR = { +union huffpair const hufftab7[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 2), @@ -346,7 +346,7 @@ union huffpair const hufftab7[] ICONST_ATTR = { /* this version saves 8 entries (16 bytes) at the expense of an extra lookup in 4 out of 36 cases */ static -union huffpair const hufftab8[] ICONST_ATTR = { +union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 2), /* 0010 */ V(1, 2, 4), @@ -424,7 +424,7 @@ union huffpair const hufftab8[] ICONST_ATTR = { }; # else static -union huffpair const hufftab8[] ICONST_ATTR = { +union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ V(1, 2, 4), @@ -509,7 +509,7 @@ union huffpair const hufftab8[] ICONST_ATTR = { # endif static -union huffpair const hufftab9[] ICONST_ATTR = { +union huffpair const hufftab9[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 3), /* 0010 */ PTR(40, 2), @@ -581,7 +581,7 @@ union huffpair const hufftab9[] ICONST_ATTR = { }; static -union huffpair const hufftab10[] ICONST_ATTR = { +union huffpair const hufftab10[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 2), @@ -719,7 +719,7 @@ union huffpair const hufftab10[] ICONST_ATTR = { }; static -union huffpair const hufftab11[] ICONST_ATTR = { +union huffpair const hufftab11[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), @@ -855,7 +855,7 @@ union huffpair const hufftab11[] ICONST_ATTR = { }; static -union huffpair const hufftab12[] ICONST_ATTR = { +union huffpair const hufftab12[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), @@ -983,7 +983,7 @@ union huffpair const hufftab12[] ICONST_ATTR = { }; static -union huffpair const hufftab13[] ICONST_ATTR = { +union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), @@ -1509,7 +1509,7 @@ union huffpair const hufftab13[] ICONST_ATTR = { }; static -union huffpair const hufftab15[] ICONST_ATTR = { +union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), @@ -2017,7 +2017,7 @@ union huffpair const hufftab15[] ICONST_ATTR = { }; static -union huffpair const hufftab16[] ICONST_ATTR = { +union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), @@ -2551,7 +2551,7 @@ union huffpair const hufftab16[] ICONST_ATTR = { }; static -union huffpair const hufftab24[] ICONST_ATTR = { +union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { /* 0000 */ PTR(16, 4), /* 0001 */ PTR(32, 4), /* 0010 */ PTR(48, 4), diff --git a/apps/codecs/libmusepack/musepack.h b/apps/codecs/libmusepack/musepack.h index 549ea798a9..7e65c75c5a 100644 --- a/apps/codecs/libmusepack/musepack.h +++ b/apps/codecs/libmusepack/musepack.h @@ -52,6 +52,10 @@ extern "C" { #include "reader.h" #include "streaminfo.h" +#ifndef IBSS_ATTR_MPC_SAMPLE_BUF +#define IBSS_ATTR_MPC_SAMPLE_BUF IBSS_ATTR +#endif + #ifdef ROCKBOX_LITTLE_ENDIAN #define MPC_LITTLE_ENDIAN #endif diff --git a/apps/codecs/mpc.c b/apps/codecs/mpc.c index f9622f894b..821b3ce25e 100644 --- a/apps/codecs/mpc.c +++ b/apps/codecs/mpc.c @@ -63,7 +63,8 @@ mpc_bool_t canseek_impl(void *data) return true; } -MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH] IBSS_ATTR; +MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH] +IBSS_ATTR_MPC_SAMPLE_BUF; mpc_uint32_t seek_table[10000]; #ifdef USE_IRAM diff --git a/apps/codecs/shorten.c b/apps/codecs/shorten.c index c571df8c7a..a7fc601ae5 100644 --- a/apps/codecs/shorten.c +++ b/apps/codecs/shorten.c @@ -20,6 +20,10 @@ #include "codeclib.h" #include <codecs/libffmpegFLAC/shndec.h> +#ifndef IBSS_ATTR_SHORTEN_DECODED0 +#define IBSS_ATTR_SHORTEN_DECODED0 IBSS_ATTR +#endif + CODEC_HEADER #ifdef USE_IRAM @@ -33,7 +37,7 @@ extern char iend[]; struct codec_api* rb; struct codec_api* ci; -int32_t decoded0[MAX_DECODE_SIZE] IBSS_ATTR; +int32_t decoded0[MAX_DECODE_SIZE] IBSS_ATTR_SHORTEN_DECODED0; int32_t decoded1[MAX_DECODE_SIZE] IBSS_ATTR; int32_t offset0[MAX_OFFSET_SIZE] IBSS_ATTR; diff --git a/apps/playback.c b/apps/playback.c index f1589ac22e..892bd15105 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -176,6 +176,10 @@ enum { #endif #define CODEC_IRAM_SIZE 0xc000 +#ifndef IBSS_ATTR_VOICE_STACK +#define IBSS_ATTR_VOICE_STACK IBSS_ATTR +#endif + #ifndef SIMULATOR extern bool audio_is_initialized; #else @@ -278,7 +282,7 @@ extern struct codec_api ci_voice; static struct thread_entry *voice_thread_p = NULL; static struct event_queue voice_queue; static long voice_stack[(DEFAULT_STACK_SIZE + 0x2000)/sizeof(long)] -IBSS_ATTR; +IBSS_ATTR_VOICE_STACK; static const char voice_thread_name[] = "voice codec"; /* Voice codec swapping control */ |