summaryrefslogtreecommitdiffstats
path: root/apps/codecs/mp3_enc.c
diff options
context:
space:
mode:
authorTomasz Malesinski <tomal@rockbox.org>2006-11-26 18:31:41 +0000
committerTomasz Malesinski <tomal@rockbox.org>2006-11-26 18:31:41 +0000
commit80da8b141c4672ca4380d66094976b6342ed5071 (patch)
tree631e9edd537ae9983524622a9e1ec82e24957280 /apps/codecs/mp3_enc.c
parent8ef3c8a342d41c2aa5e5d8370fd4e89d4d8d937e (diff)
downloadrockbox-80da8b141c4672ca4380d66094976b6342ed5071.tar.gz
rockbox-80da8b141c4672ca4380d66094976b6342ed5071.zip
FS#6357, patch 1: let iramcopy and bss share the same space in codecs and
plugins. Currently, in case of plugins using IRAM bss is cleared twice, once in the loader, once in PLUGIN_IRAM_INIT. For codecs, bss is cleared only during codec initialization. Also, removed double variables in codecs storing a pointer to codec_api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11606 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/mp3_enc.c')
-rw-r--r--apps/codecs/mp3_enc.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
index cb727ce01e..12a24a7c9b 100644
--- a/apps/codecs/mp3_enc.c
+++ b/apps/codecs/mp3_enc.c
@@ -53,14 +53,6 @@ CODEC_ENC_HEADER
#define putlong(c, s) if(s+sz <= 32) { cc = (cc << s) | c; sz+= s; } \
else { putbits(cc, sz); cc = c; sz = s; }
-#ifdef USE_IRAM
-extern char iramcopy[];
-extern char iramstart[];
-extern char iramend[];
-extern char iedata[];
-extern char iend[];
-#endif
-
typedef struct {
int type; /* 0=(MPEG2 - 22.05,24,16kHz) 1=(MPEG1 - 44.1,48,32kHz) */
int mode; /* 0=stereo, 1=jstereo, 2=dual, 3=mono */
@@ -181,7 +173,6 @@ static unsigned pcm_chunk_size IBSS_ATTR;
static unsigned samp_per_frame IBSS_ATTR;
static config_t cfg IBSS_ATTR;
-static struct codec_api *ci;
static char *res_buffer;
static const uint8_t ht_count_const[2][2][16] =
@@ -2460,18 +2451,11 @@ static bool enc_init(void)
return true;
} /* enc_init */
-enum codec_status codec_start(struct codec_api* api)
+enum codec_status codec_main(void)
{
bool cpu_boosted;
/* Generic codec initialisation */
- ci = api;
-
-#ifdef USE_IRAM
- memcpy(iramstart, iramcopy, iramend - iramstart);
- memset(iedata, 0, iend - iedata);
-#endif
-
if (!enc_init())
{
ci->enc_codec_loaded = -1;