diff options
author | Nils Wallménius <nils@rockbox.org> | 2010-07-25 22:24:53 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2010-07-25 22:24:53 +0000 |
commit | 6325ef978b2c26445721cae14028c3d429b63b3e (patch) | |
tree | d923bd73712cafde272573c26a6820c7c7aa3dab | |
parent | d92f8174a1f838684645267e87b3afebfc48143f (diff) |
codecs: mark some local variables with 'static'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27566 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/codecs/a52.c | 4 | ||||
-rw-r--r-- | apps/codecs/a52_rm.c | 8 | ||||
-rw-r--r-- | apps/codecs/aac.c | 4 | ||||
-rw-r--r-- | apps/codecs/adx.c | 2 | ||||
-rw-r--r-- | apps/codecs/alac.c | 2 | ||||
-rw-r--r-- | apps/codecs/atrac3_oma.c | 2 | ||||
-rw-r--r-- | apps/codecs/atrac3_rm.c | 6 | ||||
-rw-r--r-- | apps/codecs/cook.c | 8 | ||||
-rw-r--r-- | apps/codecs/flac.c | 8 | ||||
-rw-r--r-- | apps/codecs/mpa.c | 26 | ||||
-rw-r--r-- | apps/codecs/mpc.c | 2 | ||||
-rw-r--r-- | apps/codecs/raac.c | 8 | ||||
-rw-r--r-- | apps/codecs/shorten.c | 10 | ||||
-rw-r--r-- | apps/codecs/speex.c | 2 | ||||
-rw-r--r-- | apps/codecs/wmapro.c | 2 |
15 files changed, 47 insertions, 47 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c index 360a5862d7..d399e91627 100644 --- a/apps/codecs/a52.c +++ b/apps/codecs/a52.c @@ -31,8 +31,8 @@ CODEC_HEADER #define A52_SAMPLESPERFRAME (6*256) static a52_state_t *state; -unsigned long samplesdone; -unsigned long frequency; +static unsigned long samplesdone; +static unsigned long frequency; /* used outside liba52 */ static uint8_t buf[3840] IBSS_ATTR; diff --git a/apps/codecs/a52_rm.c b/apps/codecs/a52_rm.c index 822d717a81..bc6c129ad2 100644 --- a/apps/codecs/a52_rm.c +++ b/apps/codecs/a52_rm.c @@ -32,10 +32,10 @@ CODEC_HEADER #define A52_SAMPLESPERFRAME (6*256) static a52_state_t *state; -unsigned long samplesdone; -unsigned long frequency; -RMContext rmctx; -RMPacket pkt; +static unsigned long samplesdone; +static unsigned long frequency; +static RMContext rmctx; +static RMPacket pkt; static void init_rm(RMContext *rmctx) { diff --git a/apps/codecs/aac.c b/apps/codecs/aac.c index 4bc6ffb2f9..1796133e53 100644 --- a/apps/codecs/aac.c +++ b/apps/codecs/aac.c @@ -30,8 +30,8 @@ CODEC_HEADER /* Global buffers to be used in the mdct synthesis. This way the arrays can * be moved to IRAM for some targets */ #define GB_BUF_SIZE 1024 -ALIGN real_t gb_time_buffer[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM; -ALIGN real_t gb_fb_intermed[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM; +static ALIGN real_t gb_time_buffer[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM; +static ALIGN real_t gb_fb_intermed[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM; /* this is the codec entry point */ enum codec_status codec_main(void) diff --git a/apps/codecs/adx.c b/apps/codecs/adx.c index dd5bba16e7..2ef2091a66 100644 --- a/apps/codecs/adx.c +++ b/apps/codecs/adx.c @@ -40,7 +40,7 @@ CODEC_HEADER * Others can be set, but the default is nearly always used, * and there is no way to determine if another was used, anyway. */ -const long cutoff = 500; +static const long cutoff = 500; static int16_t samples[WAV_CHUNK_SIZE] IBSS_ATTR; diff --git a/apps/codecs/alac.c b/apps/codecs/alac.c index 0ac6b1ec80..ebcc657ed7 100644 --- a/apps/codecs/alac.c +++ b/apps/codecs/alac.c @@ -25,7 +25,7 @@ CODEC_HEADER -int32_t outputbuffer[ALAC_MAX_CHANNELS][ALAC_BLOCKSIZE] IBSS_ATTR; +static int32_t outputbuffer[ALAC_MAX_CHANNELS][ALAC_BLOCKSIZE] IBSS_ATTR; /* this is the codec entry point */ enum codec_status codec_main(void) diff --git a/apps/codecs/atrac3_oma.c b/apps/codecs/atrac3_oma.c index 00a0ec001e..2085466ed5 100644 --- a/apps/codecs/atrac3_oma.c +++ b/apps/codecs/atrac3_oma.c @@ -31,7 +31,7 @@ CODEC_HEADER #define FRAMESIZE ci->id3->bytesperframe #define BITRATE ci->id3->bitrate -ATRAC3Context q IBSS_ATTR; +static ATRAC3Context q IBSS_ATTR; /* this is the codec entry point */ enum codec_status codec_main(void) diff --git a/apps/codecs/atrac3_rm.c b/apps/codecs/atrac3_rm.c index a0b0fd8b4b..6c559ec868 100644 --- a/apps/codecs/atrac3_rm.c +++ b/apps/codecs/atrac3_rm.c @@ -28,9 +28,9 @@ CODEC_HEADER -RMContext rmctx; -RMPacket pkt; -ATRAC3Context q IBSS_ATTR; +static RMContext rmctx; +static RMPacket pkt; +static ATRAC3Context q IBSS_ATTR; static void init_rm(RMContext *rmctx) { diff --git a/apps/codecs/cook.c b/apps/codecs/cook.c index 30255d4fd7..7e77c33e1d 100644 --- a/apps/codecs/cook.c +++ b/apps/codecs/cook.c @@ -28,10 +28,10 @@ CODEC_HEADER -RMContext rmctx; -RMPacket pkt; -COOKContext q IBSS_ATTR; -int32_t rm_outbuf[2048]; +static RMContext rmctx; +static RMPacket pkt; +static COOKContext q IBSS_ATTR; +static int32_t rm_outbuf[2048]; static void init_rm(RMContext *rmctx) { diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c index 14ddd3cb05..c23611a50b 100644 --- a/apps/codecs/flac.c +++ b/apps/codecs/flac.c @@ -25,8 +25,8 @@ CODEC_HEADER /* The output buffers containing the decoded samples (channels 0 and 1) */ -int32_t decoded0[MAX_BLOCKSIZE] IBSS_ATTR_FLAC_DECODED0; -int32_t decoded1[MAX_BLOCKSIZE] IBSS_ATTR; +static int32_t decoded0[MAX_BLOCKSIZE] IBSS_ATTR_FLAC_DECODED0; +static int32_t decoded1[MAX_BLOCKSIZE] IBSS_ATTR; #define MAX_SUPPORTED_SEEKTABLE_SIZE 5000 @@ -65,8 +65,8 @@ struct FLACseekpoints { uint16_t blocksize; }; -struct FLACseekpoints seekpoints[MAX_SUPPORTED_SEEKTABLE_SIZE]; -int nseekpoints; +static struct FLACseekpoints seekpoints[MAX_SUPPORTED_SEEKTABLE_SIZE]; +static int nseekpoints; static int8_t *bit_buffer; static size_t buff_size; diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 3140091434..c0e0f38c64 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c @@ -29,32 +29,32 @@ CODEC_HEADER #define MPA_SYNTH_ON_COP #endif -struct mad_stream stream IBSS_ATTR; -struct mad_frame frame IBSS_ATTR; -struct mad_synth synth IBSS_ATTR; +static struct mad_stream stream IBSS_ATTR; +static struct mad_frame frame IBSS_ATTR; +static struct mad_synth synth IBSS_ATTR; #ifdef MPA_SYNTH_ON_COP -volatile short die IBSS_ATTR = 0; /*thread should die*/ +static volatile short die IBSS_ATTR = 0; /*thread should die*/ #if (CONFIG_CPU == PP5024) || (CONFIG_CPU == PP5022) -mad_fixed_t sbsample_prev[2][36][32] IBSS_ATTR; +static mad_fixed_t sbsample_prev[2][36][32] IBSS_ATTR; #else -mad_fixed_t sbsample_prev[2][36][32] SHAREDBSS_ATTR; +static mad_fixed_t sbsample_prev[2][36][32] SHAREDBSS_ATTR; #endif -struct semaphore synth_done_sem IBSS_ATTR; -struct semaphore synth_pending_sem IBSS_ATTR; +static struct semaphore synth_done_sem IBSS_ATTR; +static struct semaphore synth_pending_sem IBSS_ATTR; #endif #define INPUT_CHUNK_SIZE 8192 -mad_fixed_t mad_frame_overlap[2][32][18] IBSS_ATTR; -mad_fixed_t sbsample[2][36][32] IBSS_ATTR; +static mad_fixed_t mad_frame_overlap[2][32][18] IBSS_ATTR; +static mad_fixed_t sbsample[2][36][32] IBSS_ATTR; -unsigned char mad_main_data[MAD_BUFFER_MDLEN] IBSS_ATTR; +static unsigned char mad_main_data[MAD_BUFFER_MDLEN] IBSS_ATTR; /* TODO: what latency does layer 1 have? */ -int mpeg_latency[3] = { 0, 481, 529 }; -int mpeg_framesize[3] = {384, 1152, 1152}; +static int mpeg_latency[3] = { 0, 481, 529 }; +static int mpeg_framesize[3] = {384, 1152, 1152}; static void init_mad(void) { diff --git a/apps/codecs/mpc.c b/apps/codecs/mpc.c index 036864c832..1d83449838 100644 --- a/apps/codecs/mpc.c +++ b/apps/codecs/mpc.c @@ -25,7 +25,7 @@ CODEC_HEADER -MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH] IBSS_ATTR; +static MPC_SAMPLE_FORMAT sample_buffer[MPC_DECODER_BUFFER_LENGTH] IBSS_ATTR; /* Our implementations of the mpc_reader callback functions. */ static mpc_int32_t read_impl(mpc_reader *reader, void *ptr, mpc_int32_t size) diff --git a/apps/codecs/raac.c b/apps/codecs/raac.c index 93972f557b..3fcdca24c9 100644 --- a/apps/codecs/raac.c +++ b/apps/codecs/raac.c @@ -31,8 +31,8 @@ CODEC_HEADER /* Global buffers to be used in the mdct synthesis. This way the arrays can * be moved to IRAM for some targets */ #define GB_BUF_SIZE 1024 -ALIGN real_t gb_time_buffer[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM; -ALIGN real_t gb_fb_intermed[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM; +static ALIGN real_t gb_time_buffer[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM; +static ALIGN real_t gb_fb_intermed[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM; static void init_rm(RMContext *rmctx) @@ -40,8 +40,8 @@ static void init_rm(RMContext *rmctx) memcpy(rmctx, (void*)(( (intptr_t)ci->id3->id3v2buf + 3 ) &~ 3), sizeof(RMContext)); } -RMContext rmctx; -RMPacket pkt; +static RMContext rmctx; +static RMPacket pkt; /* this is the codec entry point */ enum codec_status codec_main(void) { diff --git a/apps/codecs/shorten.c b/apps/codecs/shorten.c index ddc2f9a786..7595ca30c7 100644 --- a/apps/codecs/shorten.c +++ b/apps/codecs/shorten.c @@ -28,13 +28,13 @@ CODEC_HEADER #define IBSS_ATTR_SHORTEN_DECODED0 IBSS_ATTR #endif -int32_t decoded0[MAX_DECODE_SIZE] IBSS_ATTR_SHORTEN_DECODED0; -int32_t decoded1[MAX_DECODE_SIZE] IBSS_ATTR; +static int32_t decoded0[MAX_DECODE_SIZE] IBSS_ATTR_SHORTEN_DECODED0; +static int32_t decoded1[MAX_DECODE_SIZE] IBSS_ATTR; -int32_t offset0[MAX_OFFSET_SIZE] IBSS_ATTR; -int32_t offset1[MAX_OFFSET_SIZE] IBSS_ATTR; +static int32_t offset0[MAX_OFFSET_SIZE] IBSS_ATTR; +static int32_t offset1[MAX_OFFSET_SIZE] IBSS_ATTR; -int8_t ibuf[MAX_BUFFER_SIZE] IBSS_ATTR; +static int8_t ibuf[MAX_BUFFER_SIZE] IBSS_ATTR; /* this is the codec entry point */ enum codec_status codec_main(void) diff --git a/apps/codecs/speex.c b/apps/codecs/speex.c index 52f4239652..2a02ccb4b5 100644 --- a/apps/codecs/speex.c +++ b/apps/codecs/speex.c @@ -35,7 +35,7 @@ CODEC_HEADER -spx_int16_t output[MAX_FRAME_SIZE] IBSS_ATTR; +static spx_int16_t output[MAX_FRAME_SIZE] IBSS_ATTR; static int get_more_data(spx_ogg_sync_state *oy) { diff --git a/apps/codecs/wmapro.c b/apps/codecs/wmapro.c index e929c1f428..62759d0d1d 100644 --- a/apps/codecs/wmapro.c +++ b/apps/codecs/wmapro.c @@ -28,7 +28,7 @@ CODEC_HEADER #define MAXSAMPLES (1L << 12) /* Max number of samples in a wma pro subframe */ #define MAXCHANNELS 8 #define BUFSIZE MAXCHANNELS * MAXSAMPLES -int32_t decoded[BUFSIZE]; +static int32_t decoded[BUFSIZE]; /* this is the codec entry point */ enum codec_status codec_main(void) |