summaryrefslogtreecommitdiff
path: root/apps/codecs/raac.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/raac.c')
-rw-r--r--apps/codecs/raac.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/apps/codecs/raac.c b/apps/codecs/raac.c
index e3ad2b5dd8..b322ae7df3 100644
--- a/apps/codecs/raac.c
+++ b/apps/codecs/raac.c
@@ -28,13 +28,6 @@
28 28
29CODEC_HEADER 29CODEC_HEADER
30 30
31/* Global buffers to be used in the mdct synthesis. This way the arrays can
32 * be moved to IRAM for some targets */
33#define GB_BUF_SIZE 1024
34static ALIGN real_t gb_time_buffer[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM;
35static ALIGN real_t gb_fb_intermed[2][GB_BUF_SIZE] IBSS_ATTR_FAAD_LARGE_IRAM;
36
37
38static void init_rm(RMContext *rmctx) 31static void init_rm(RMContext *rmctx)
39{ 32{
40 memcpy(rmctx, (void*)(( (intptr_t)ci->id3->id3v2buf + 3 ) &~ 3), sizeof(RMContext)); 33 memcpy(rmctx, (void*)(( (intptr_t)ci->id3->id3v2buf + 3 ) &~ 3), sizeof(RMContext));
@@ -49,7 +42,6 @@ enum codec_status codec_main(void)
49 NeAACDecHandle decoder; 42 NeAACDecHandle decoder;
50 size_t n; 43 size_t n;
51 void *ret; 44 void *ret;
52 int needed_bufsize;
53 unsigned int i; 45 unsigned int i;
54 unsigned char* buffer; 46 unsigned char* buffer;
55 int err, consumed, pkt_offset, skipped = 0; 47 int err, consumed, pkt_offset, skipped = 0;
@@ -103,34 +95,6 @@ next_track:
103 goto done; 95 goto done;
104 } 96 }
105 97
106 /* Set pointer to be able to use IRAM an to avoid alloc in decoder. Must
107 * be called after NeAACDecOpen(). */
108 /* A buffer of framelength or 2*frameLenght size must be allocated for
109 * time_out. If frameLength is too big or SBR/forceUpSampling is active,
110 * we do not use the IRAM buffer and keep faad's internal allocation (see
111 * specrec.c). */
112 needed_bufsize = decoder->frameLength;
113#ifdef SBR_DEC
114 if ((decoder->sbr_present_flag == 1) || (decoder->forceUpSampling == 1))
115 {
116 needed_bufsize *= 2;
117 }
118#endif
119 if (needed_bufsize <= GB_BUF_SIZE)
120 {
121 decoder->time_out[0] = &gb_time_buffer[0][0];
122 decoder->time_out[1] = &gb_time_buffer[1][0];
123 }
124 /* A buffer of with frameLength elements must be allocated for fb_intermed.
125 * If frameLength is too big, we do not use the IRAM buffer and keep faad's
126 * internal allocation (see specrec.c). */
127 needed_bufsize = decoder->frameLength;
128 if (needed_bufsize <= GB_BUF_SIZE)
129 {
130 decoder->fb_intermed[0] = &gb_fb_intermed[0][0];
131 decoder->fb_intermed[1] = &gb_fb_intermed[1][0];
132 }
133
134 /* check for a mid-track resume and force a seek time accordingly */ 98 /* check for a mid-track resume and force a seek time accordingly */
135 if(resume_offset > rmctx.data_offset + DATA_HEADER_SIZE) { 99 if(resume_offset > rmctx.data_offset + DATA_HEADER_SIZE) {
136 resume_offset -= rmctx.data_offset + DATA_HEADER_SIZE; 100 resume_offset -= rmctx.data_offset + DATA_HEADER_SIZE;