diff options
Diffstat (limited to 'apps/codecs/aac.c')
-rw-r--r-- | apps/codecs/aac.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/codecs/aac.c b/apps/codecs/aac.c index 0f38ea1145..1daa7de11b 100644 --- a/apps/codecs/aac.c +++ b/apps/codecs/aac.c | |||
@@ -27,6 +27,11 @@ | |||
27 | 27 | ||
28 | CODEC_HEADER | 28 | CODEC_HEADER |
29 | 29 | ||
30 | /* Global buffers to be used in the mdct synthesis. This way the arrays can | ||
31 | * be moved to IRAM for some targets */ | ||
32 | ALIGN real_t gb_time_buffer[2][1024] IBSS_ATTR_FAAD_LARGE_IRAM; | ||
33 | ALIGN real_t gb_fb_intermed[2][1024] IBSS_ATTR_FAAD_LARGE_IRAM; | ||
34 | |||
30 | /* this is the codec entry point */ | 35 | /* this is the codec entry point */ |
31 | enum codec_status codec_main(void) | 36 | enum codec_status codec_main(void) |
32 | { | 37 | { |
@@ -105,7 +110,14 @@ next_track: | |||
105 | err = CODEC_ERROR; | 110 | err = CODEC_ERROR; |
106 | goto done; | 111 | goto done; |
107 | } | 112 | } |
108 | 113 | ||
114 | /* Set pointer to be able to use IRAM an to avoid alloc in decoder. Must | ||
115 | * be called after NeAACDecOpen(). */ | ||
116 | decoder->time_out[0] = &gb_time_buffer[0][0]; | ||
117 | decoder->time_out[1] = &gb_time_buffer[1][0]; | ||
118 | decoder->fb_intermed[0] = &gb_fb_intermed[0][0]; | ||
119 | decoder->fb_intermed[1] = &gb_fb_intermed[1][0]; | ||
120 | |||
109 | ci->id3->frequency = s; | 121 | ci->id3->frequency = s; |
110 | 122 | ||
111 | i = 0; | 123 | i = 0; |