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
This commit is contained in:
parent
2e383a430d
commit
5c54ba49d5
31 changed files with 128 additions and 62 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -66,4 +66,8 @@
|
|||
# endif
|
||||
# endif
|
||||
|
||||
#ifndef ICONST_ATTR_MPA_HUFFMAN
|
||||
#define ICONST_ATTR_MPA_HUFFMAN ICONST_ATTR
|
||||
#endif
|
||||
|
||||
# endif
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -97,4 +97,14 @@
|
|||
#define BOOTFILE_EXT "iriver"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
|
||||
#define IBSS_ATTR_VOICE_STACK
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
#define ICODE_ATTR_TREMOR_MDCT
|
||||
#define ICODE_ATTR_FLAC
|
||||
#define IBSS_ATTR_FLAC_DECODED0
|
||||
#define ICONST_ATTR_MPA_HUFFMAN
|
||||
#define IBSS_ATTR_MPC_SAMPLE_BUF
|
||||
#define ICODE_ATTR_ALAC
|
||||
#define IBSS_ATTR_SHORTEN_DECODED0
|
||||
|
||||
#endif
|
||||
|
|
|
@ -123,4 +123,6 @@
|
|||
#define BOOTFILE_EXT "ipod"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
|
||||
#endif /* SIMULATOR */
|
||||
|
|
|
@ -128,4 +128,6 @@
|
|||
#define BOOTFILE_EXT "ipod"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -119,4 +119,6 @@
|
|||
#define BOOTFILE_EXT "ipod"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -125,4 +125,6 @@
|
|||
#define BOOTFILE_EXT "ipod"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -131,4 +131,6 @@
|
|||
#define BOOTFILE_EXT "ipod"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -124,4 +124,6 @@
|
|||
#define BOOTFILE_EXT "ipod"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
|
||||
#endif
|
||||
|
|
|
@ -124,4 +124,6 @@
|
|||
#define BOOTFILE_EXT "ipod"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue