diff options
Diffstat (limited to 'apps/codecs/aac.c')
-rw-r--r-- | apps/codecs/aac.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/apps/codecs/aac.c b/apps/codecs/aac.c index 6fd4e44000..5638dc49a9 100644 --- a/apps/codecs/aac.c +++ b/apps/codecs/aac.c | |||
@@ -32,12 +32,6 @@ CODEC_HEADER | |||
32 | * for each frame. */ | 32 | * for each frame. */ |
33 | #define FAAD_BYTE_BUFFER_SIZE (2048-12) | 33 | #define FAAD_BYTE_BUFFER_SIZE (2048-12) |
34 | 34 | ||
35 | /* Global buffers to be used in the mdct synthesis. This way the arrays can | ||
36 | * be moved to IRAM for some targets */ | ||
37 | #define GB_BUF_SIZE 1024 | ||
38 | static real_t gb_time_buffer[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM MEM_ALIGN_ATTR; | ||
39 | static real_t gb_fb_intermed[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM MEM_ALIGN_ATTR; | ||
40 | |||
41 | /* this is the codec entry point */ | 35 | /* this is the codec entry point */ |
42 | enum codec_status codec_main(void) | 36 | enum codec_status codec_main(void) |
43 | { | 37 | { |
@@ -55,7 +49,6 @@ enum codec_status codec_main(void) | |||
55 | int file_offset; | 49 | int file_offset; |
56 | int framelength; | 50 | int framelength; |
57 | int lead_trim = 0; | 51 | int lead_trim = 0; |
58 | int needed_bufsize; | ||
59 | unsigned int i; | 52 | unsigned int i; |
60 | unsigned char* buffer; | 53 | unsigned char* buffer; |
61 | NeAACDecFrameInfo frame_info; | 54 | NeAACDecFrameInfo frame_info; |
@@ -119,34 +112,6 @@ next_track: | |||
119 | err = CODEC_ERROR; | 112 | err = CODEC_ERROR; |
120 | goto done; | 113 | goto done; |
121 | } | 114 | } |
122 | |||
123 | /* Set pointer to be able to use IRAM an to avoid alloc in decoder. Must | ||
124 | * be called after NeAACDecOpen(). */ | ||
125 | /* A buffer of framelength or 2*frameLenght size must be allocated for | ||
126 | * time_out. If frameLength is too big or SBR/forceUpSampling is active, | ||
127 | * we do not use the IRAM buffer and keep faad's internal allocation (see | ||
128 | * specrec.c). */ | ||
129 | needed_bufsize = decoder->frameLength; | ||
130 | #ifdef SBR_DEC | ||
131 | if ((decoder->sbr_present_flag == 1) || (decoder->forceUpSampling == 1)) | ||
132 | { | ||
133 | needed_bufsize *= 2; | ||
134 | } | ||
135 | #endif | ||
136 | if (needed_bufsize <= GB_BUF_SIZE) | ||
137 | { | ||
138 | decoder->time_out[0] = &gb_time_buffer[0][0]; | ||
139 | decoder->time_out[1] = &gb_time_buffer[1][0]; | ||
140 | } | ||
141 | /* A buffer of with frameLength elements must be allocated for fb_intermed. | ||
142 | * If frameLength is too big, we do not use the IRAM buffer and keep faad's | ||
143 | * internal allocation (see specrec.c). */ | ||
144 | needed_bufsize = decoder->frameLength; | ||
145 | if (needed_bufsize <= GB_BUF_SIZE) | ||
146 | { | ||
147 | decoder->fb_intermed[0] = &gb_fb_intermed[0][0]; | ||
148 | decoder->fb_intermed[1] = &gb_fb_intermed[1][0]; | ||
149 | } | ||
150 | 115 | ||
151 | #ifdef SBR_DEC | 116 | #ifdef SBR_DEC |
152 | /* Check for need of special handling for seek/resume and elapsed time. */ | 117 | /* Check for need of special handling for seek/resume and elapsed time. */ |