diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2006-01-08 22:50:14 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2006-01-08 22:50:14 +0000 |
| commit | 07c4254135aecc6ae0964d6d6413a40251e8f6a8 (patch) | |
| tree | dac473efeb9f49cb6fefeb43c053f2dd0dc1b6cc /apps/codecs | |
| parent | e8b1787296dae2a69893bd0fe97b2361fb6180ba (diff) | |
| download | rockbox-07c4254135aecc6ae0964d6d6413a40251e8f6a8.zip rockbox-07c4254135aecc6ae0964d6d6413a40251e8f6a8.tar.gz rockbox-07c4254135aecc6ae0964d6d6413a40251e8f6a8.tar.bz2 rockbox-07c4254135aecc6ae0964d6d6413a40251e8f6a8.tar.xz | |
Don't include the .bss and .ibss sections in the binary image for codecs and plugins. Saves quite some disk space (and buffer space in case of codec changes during playback).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8308 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
| -rw-r--r-- | apps/codecs/a52.c | 3 | ||||
| -rw-r--r-- | apps/codecs/alac.c | 7 | ||||
| -rw-r--r-- | apps/codecs/flac.c | 7 | ||||
| -rw-r--r-- | apps/codecs/mpa.c | 3 | ||||
| -rw-r--r-- | apps/codecs/mpc.c | 3 | ||||
| -rw-r--r-- | apps/codecs/shorten.c | 7 | ||||
| -rw-r--r-- | apps/codecs/vorbis.c | 3 | ||||
| -rw-r--r-- | apps/codecs/wav.c | 3 | ||||
| -rw-r--r-- | apps/codecs/wavpack.c | 3 |
9 files changed, 33 insertions, 6 deletions
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c index ee80f66..dd504e8 100644 --- a/apps/codecs/a52.c +++ b/apps/codecs/a52.c @@ -117,6 +117,8 @@ void a52_decode_data(uint8_t *start, uint8_t *end) extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif /* this is the codec entry point */ @@ -132,6 +134,7 @@ enum codec_status codec_start(struct codec_api *api) #ifdef USE_IRAM ci->memcpy(iramstart, iramcopy, iramend - iramstart); + ci->memset(iedata, 0, iend - iedata); #endif ci->configure(CODEC_DSP_ENABLE, (bool *)true); diff --git a/apps/codecs/alac.c b/apps/codecs/alac.c index 58ab111..30c1ada 100644 --- a/apps/codecs/alac.c +++ b/apps/codecs/alac.c @@ -21,10 +21,12 @@ #include "libm4a/m4a.h" #include "libalac/decomp.h" -#ifndef SIMULATOR +#ifdef USE_IRAM extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif int32_t outputbuffer[ALAC_MAX_CHANNELS][ALAC_BLOCKSIZE] IBSS_ATTR; @@ -53,8 +55,9 @@ enum codec_status codec_start(struct codec_api* api) rb = api; ci = (struct codec_api*)api; -#ifndef SIMULATOR +#ifdef USE_IRAM rb->memcpy(iramstart, iramcopy, iramend-iramstart); + rb->memset(iedata, 0, iend - iedata); #endif ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c index 7639b9a..ae05b0f 100644 --- a/apps/codecs/flac.c +++ b/apps/codecs/flac.c @@ -20,10 +20,12 @@ #include "codeclib.h" #include <codecs/libffmpegFLAC/decoder.h> -#ifndef SIMULATOR +#ifdef USE_IRAM extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif struct codec_api* rb; @@ -229,8 +231,9 @@ enum codec_status codec_start(struct codec_api* api) rb = api; ci = (struct codec_api*)api; -#ifndef SIMULATOR +#ifdef USE_IRAM ci->memcpy(iramstart, iramcopy, iramend-iramstart); + ci->memset(iedata, 0, iend - iedata); #endif ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 3e6a045..3d824d9 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c @@ -43,6 +43,8 @@ int mpeg_latency[3] = { 0, 481, 529 }; extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif struct codec_api *ci; @@ -83,6 +85,7 @@ enum codec_status codec_start(struct codec_api *api) #ifdef USE_IRAM ci->memcpy(iramstart, iramcopy, iramend - iramstart); + ci->memset(iedata, 0, iend - iedata); #endif if (codec_init(api)) diff --git a/apps/codecs/mpc.c b/apps/codecs/mpc.c index db25015..207a63c 100644 --- a/apps/codecs/mpc.c +++ b/apps/codecs/mpc.c @@ -68,6 +68,8 @@ MPC_SAMPLE_FORMAT sample_buffer[MPC_FRAME_LENGTH*2] IBSS_ATTR; extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif /* this is the codec entry point */ @@ -83,6 +85,7 @@ enum codec_status codec_start(struct codec_api *api) TEST_CODEC_API(api); #ifdef USE_IRAM ci->memcpy(iramstart, iramcopy, iramend - iramstart); + ci->memset(iedata, 0, iend - iedata); #endif ci->configure(CODEC_DSP_ENABLE, (bool *)true); diff --git a/apps/codecs/shorten.c b/apps/codecs/shorten.c index c58b009..9e679f5 100644 --- a/apps/codecs/shorten.c +++ b/apps/codecs/shorten.c @@ -20,10 +20,12 @@ #include "codeclib.h" #include <codecs/libffmpegFLAC/shndec.h> -#ifndef SIMULATOR +#ifdef USE_IRAM extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif struct codec_api* rb; @@ -52,8 +54,9 @@ enum codec_status codec_start(struct codec_api* api) rb = api; ci = (struct codec_api*)api; -#ifndef SIMULATOR +#ifdef USE_IRAM ci->memcpy(iramstart, iramcopy, iramend-iramstart); + ci->memset(iedata, 0, iend - iedata); #endif ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c index 69eba24..795e689 100644 --- a/apps/codecs/vorbis.c +++ b/apps/codecs/vorbis.c @@ -101,6 +101,8 @@ bool vorbis_set_codec_parameters(OggVorbis_File *vf) extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif /* this is the codec entry point */ @@ -125,6 +127,7 @@ enum codec_status codec_start(struct codec_api *api) #ifdef USE_IRAM rb->memcpy(iramstart, iramcopy, iramend - iramstart); + rb->memset(iedata, 0, iend - iedata); #endif rb->configure(CODEC_DSP_ENABLE, (bool *)true); diff --git a/apps/codecs/wav.c b/apps/codecs/wav.c index 85e2412..e86b559 100644 --- a/apps/codecs/wav.c +++ b/apps/codecs/wav.c @@ -94,6 +94,8 @@ enum extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif /* Those are lookup tables, so they should be in the idata section @@ -235,6 +237,7 @@ enum codec_status codec_start(struct codec_api* api) #ifdef USE_IRAM ci->memcpy(iramstart, iramcopy, iramend-iramstart); + ci->memset(iedata, 0, iend - iedata); #endif ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); diff --git a/apps/codecs/wavpack.c b/apps/codecs/wavpack.c index 21c1947..ff890ba 100644 --- a/apps/codecs/wavpack.c +++ b/apps/codecs/wavpack.c @@ -40,6 +40,8 @@ static long read_callback (void *buffer, long bytes) extern char iramcopy[]; extern char iramstart[]; extern char iramend[]; +extern char iedata[]; +extern char iend[]; #endif /* this is the codec entry point */ @@ -56,6 +58,7 @@ enum codec_status codec_start(struct codec_api* api) #ifdef USE_IRAM ci->memcpy(iramstart, iramcopy, iramend-iramstart); + ci->memset(iedata, 0, iend - iedata); #endif ci->configure(CODEC_SET_FILEBUF_WATERMARK, (int *)(1024*512)); |