diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/codecs/libtremor/block.c | 8 | ||||
| -rw-r--r-- | apps/codecs/libtremor/config-tremor.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/apps/codecs/libtremor/block.c b/apps/codecs/libtremor/block.c index 0eaf7bc..b88896d 100644 --- a/apps/codecs/libtremor/block.c +++ b/apps/codecs/libtremor/block.c @@ -153,7 +153,6 @@ int vorbis_block_clear(vorbis_block *vb){ static int _vds_init(vorbis_dsp_state *v,vorbis_info *vi){ int i; long b_size[2]; - LOOKUP_TNC *iramposw; codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; private_state *b=NULL; @@ -183,17 +182,20 @@ static int _vds_init(vorbis_dsp_state *v,vorbis_info *vi){ b_size[1]=ci->blocksizes[1]/2; b->window[0]=_vorbis_window(0,b_size[0]); b->window[1]=_vorbis_window(0,b_size[1]); - + +#ifdef TREMOR_USE_IRAM /* allocate IRAM buffer for window tables too, if sufficient iram available */ /* give preference to the larger window over the smaller window (on the assumption that both windows are equally likely used) */ + LOOKUP_TNC *iramposw; for(i=1; i>=0; i--){ - iramposw=(LOOKUP_TNC *)iram_malloc(b_size[i]*sizeof(LOOKUP_TNC)); + iramposw=iram_malloc(b_size[i]*sizeof(LOOKUP_TNC)); if(iramposw!=NULL) { memcpy(iramposw, b->window[i], b_size[i]*sizeof(LOOKUP_TNC)); b->window[i]=iramposw; } } +#endif /* finish the codebooks */ if(!ci->fullbooks){ diff --git a/apps/codecs/libtremor/config-tremor.h b/apps/codecs/libtremor/config-tremor.h index 7afb2c6..2f93072 100644 --- a/apps/codecs/libtremor/config-tremor.h +++ b/apps/codecs/libtremor/config-tremor.h @@ -23,6 +23,10 @@ #define ICODE_ATTR_TREMOR_NOT_MDCT ICODE_ATTR #endif +#ifdef USE_IRAM +#define TREMOR_USE_IRAM +#endif + /* Define CPU of large IRAM (PP5022/5024, MCF5250) */ #if (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) || defined(CPU_S5L870X) || (CONFIG_CPU == MCF5250) /* PCM_BUFFER : 32768 byte (4096*2*4 or 2048*4*4) * |