diff options
Diffstat (limited to 'apps/codecs/libfaad/specrec.c')
-rw-r--r-- | apps/codecs/libfaad/specrec.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/apps/codecs/libfaad/specrec.c b/apps/codecs/libfaad/specrec.c index 02eac11878..d537125d55 100644 --- a/apps/codecs/libfaad/specrec.c +++ b/apps/codecs/libfaad/specrec.c | |||
@@ -61,44 +61,44 @@ static uint8_t quant_to_spec(NeAACDecHandle hDecoder, | |||
61 | 61 | ||
62 | 62 | ||
63 | #ifdef LD_DEC | 63 | #ifdef LD_DEC |
64 | ALIGN static const uint8_t num_swb_512_window[] = | 64 | static const uint8_t num_swb_512_window[] = |
65 | { | 65 | { |
66 | 0, 0, 0, 36, 36, 37, 31, 31, 0, 0, 0, 0 | 66 | 0, 0, 0, 36, 36, 37, 31, 31, 0, 0, 0, 0 |
67 | }; | 67 | }; |
68 | ALIGN static const uint8_t num_swb_480_window[] = | 68 | static const uint8_t num_swb_480_window[] = |
69 | { | 69 | { |
70 | 0, 0, 0, 35, 35, 37, 30, 30, 0, 0, 0, 0 | 70 | 0, 0, 0, 35, 35, 37, 30, 30, 0, 0, 0, 0 |
71 | }; | 71 | }; |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | ALIGN static const uint8_t num_swb_960_window[] ICONST_ATTR = | 74 | static const uint8_t num_swb_960_window[] ICONST_ATTR = |
75 | { | 75 | { |
76 | 40, 40, 45, 49, 49, 49, 46, 46, 42, 42, 42, 40 | 76 | 40, 40, 45, 49, 49, 49, 46, 46, 42, 42, 42, 40 |
77 | }; | 77 | }; |
78 | 78 | ||
79 | ALIGN static const uint8_t num_swb_1024_window[] ICONST_ATTR = | 79 | static const uint8_t num_swb_1024_window[] ICONST_ATTR = |
80 | { | 80 | { |
81 | 41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40 | 81 | 41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40 |
82 | }; | 82 | }; |
83 | 83 | ||
84 | ALIGN static const uint8_t num_swb_128_window[] ICONST_ATTR = | 84 | static const uint8_t num_swb_128_window[] ICONST_ATTR = |
85 | { | 85 | { |
86 | 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15 | 86 | 12, 12, 12, 14, 14, 14, 15, 15, 15, 15, 15, 15 |
87 | }; | 87 | }; |
88 | 88 | ||
89 | ALIGN static const uint16_t swb_offset_1024_96[] = | 89 | static const uint16_t swb_offset_1024_96[] = |
90 | { | 90 | { |
91 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, | 91 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, |
92 | 64, 72, 80, 88, 96, 108, 120, 132, 144, 156, 172, 188, 212, 240, | 92 | 64, 72, 80, 88, 96, 108, 120, 132, 144, 156, 172, 188, 212, 240, |
93 | 276, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024 | 93 | 276, 320, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024 |
94 | }; | 94 | }; |
95 | 95 | ||
96 | ALIGN static const uint16_t swb_offset_128_96[] = | 96 | static const uint16_t swb_offset_128_96[] = |
97 | { | 97 | { |
98 | 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128 | 98 | 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128 |
99 | }; | 99 | }; |
100 | 100 | ||
101 | ALIGN static const uint16_t swb_offset_1024_64[] = | 101 | static const uint16_t swb_offset_1024_64[] = |
102 | { | 102 | { |
103 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, | 103 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, |
104 | 64, 72, 80, 88, 100, 112, 124, 140, 156, 172, 192, 216, 240, 268, | 104 | 64, 72, 80, 88, 100, 112, 124, 140, 156, 172, 192, 216, 240, 268, |
@@ -106,12 +106,12 @@ ALIGN static const uint16_t swb_offset_1024_64[] = | |||
106 | 864, 904, 944, 984, 1024 | 106 | 864, 904, 944, 984, 1024 |
107 | }; | 107 | }; |
108 | 108 | ||
109 | ALIGN static const uint16_t swb_offset_128_64[] = | 109 | static const uint16_t swb_offset_128_64[] = |
110 | { | 110 | { |
111 | 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128 | 111 | 0, 4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 92, 128 |
112 | }; | 112 | }; |
113 | 113 | ||
114 | ALIGN static const uint16_t swb_offset_1024_48[] ICONST_ATTR = | 114 | static const uint16_t swb_offset_1024_48[] ICONST_ATTR = |
115 | { | 115 | { |
116 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, | 116 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, |
117 | 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, | 117 | 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, |
@@ -120,14 +120,14 @@ ALIGN static const uint16_t swb_offset_1024_48[] ICONST_ATTR = | |||
120 | }; | 120 | }; |
121 | 121 | ||
122 | #ifdef LD_DEC | 122 | #ifdef LD_DEC |
123 | ALIGN static const uint16_t swb_offset_512_48[] = | 123 | static const uint16_t swb_offset_512_48[] = |
124 | { | 124 | { |
125 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 68, 76, 84, | 125 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 68, 76, 84, |
126 | 92, 100, 112, 124, 136, 148, 164, 184, 208, 236, 268, 300, 332, 364, 396, | 126 | 92, 100, 112, 124, 136, 148, 164, 184, 208, 236, 268, 300, 332, 364, 396, |
127 | 428, 460, 512 | 127 | 428, 460, 512 |
128 | }; | 128 | }; |
129 | 129 | ||
130 | ALIGN static const uint16_t swb_offset_480_48[] = | 130 | static const uint16_t swb_offset_480_48[] = |
131 | { | 131 | { |
132 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 64, 72 ,80 ,88, | 132 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 64, 72 ,80 ,88, |
133 | 96, 108, 120, 132, 144, 156, 172, 188, 212, 240, 272, 304, 336, 368, 400, | 133 | 96, 108, 120, 132, 144, 156, 172, 188, 212, 240, 272, 304, 336, 368, 400, |
@@ -135,12 +135,12 @@ ALIGN static const uint16_t swb_offset_480_48[] = | |||
135 | }; | 135 | }; |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | ALIGN static const uint16_t swb_offset_128_48[] ICONST_ATTR = | 138 | static const uint16_t swb_offset_128_48[] ICONST_ATTR = |
139 | { | 139 | { |
140 | 0, 4, 8, 12, 16, 20, 28, 36, 44, 56, 68, 80, 96, 112, 128 | 140 | 0, 4, 8, 12, 16, 20, 28, 36, 44, 56, 68, 80, 96, 112, 128 |
141 | }; | 141 | }; |
142 | 142 | ||
143 | ALIGN static const uint16_t swb_offset_1024_32[] ICONST_ATTR = | 143 | static const uint16_t swb_offset_1024_32[] ICONST_ATTR = |
144 | { | 144 | { |
145 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, | 145 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 48, 56, 64, 72, |
146 | 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, | 146 | 80, 88, 96, 108, 120, 132, 144, 160, 176, 196, 216, 240, 264, 292, |
@@ -149,14 +149,14 @@ ALIGN static const uint16_t swb_offset_1024_32[] ICONST_ATTR = | |||
149 | }; | 149 | }; |
150 | 150 | ||
151 | #ifdef LD_DEC | 151 | #ifdef LD_DEC |
152 | ALIGN static const uint16_t swb_offset_512_32[] = | 152 | static const uint16_t swb_offset_512_32[] = |
153 | { | 153 | { |
154 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 64, 72, 80, | 154 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 64, 72, 80, |
155 | 88, 96, 108, 120, 132, 144, 160, 176, 192, 212, 236, 260, 288, 320, 352, | 155 | 88, 96, 108, 120, 132, 144, 160, 176, 192, 212, 236, 260, 288, 320, 352, |
156 | 384, 416, 448, 480, 512 | 156 | 384, 416, 448, 480, 512 |
157 | }; | 157 | }; |
158 | 158 | ||
159 | ALIGN static const uint16_t swb_offset_480_32[] = | 159 | static const uint16_t swb_offset_480_32[] = |
160 | { | 160 | { |
161 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, | 161 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, |
162 | 88, 96, 104, 112, 124, 136, 148, 164, 180, 200, 224, 256, 288, 320, 352, | 162 | 88, 96, 104, 112, 124, 136, 148, 164, 180, 200, 224, 256, 288, 320, 352, |
@@ -164,7 +164,7 @@ ALIGN static const uint16_t swb_offset_480_32[] = | |||
164 | }; | 164 | }; |
165 | #endif | 165 | #endif |
166 | 166 | ||
167 | ALIGN static const uint16_t swb_offset_1024_24[] ICONST_ATTR = | 167 | static const uint16_t swb_offset_1024_24[] ICONST_ATTR = |
168 | { | 168 | { |
169 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, | 169 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, |
170 | 76, 84, 92, 100, 108, 116, 124, 136, 148, 160, 172, 188, 204, 220, | 170 | 76, 84, 92, 100, 108, 116, 124, 136, 148, 160, 172, 188, 204, 220, |
@@ -173,50 +173,50 @@ ALIGN static const uint16_t swb_offset_1024_24[] ICONST_ATTR = | |||
173 | }; | 173 | }; |
174 | 174 | ||
175 | #ifdef LD_DEC | 175 | #ifdef LD_DEC |
176 | ALIGN static const uint16_t swb_offset_512_24[] = | 176 | static const uint16_t swb_offset_512_24[] = |
177 | { | 177 | { |
178 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, | 178 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, |
179 | 80, 92, 104, 120, 140, 164, 192, 224, 256, 288, 320, 352, 384, 416, | 179 | 80, 92, 104, 120, 140, 164, 192, 224, 256, 288, 320, 352, 384, 416, |
180 | 448, 480, 512 | 180 | 448, 480, 512 |
181 | }; | 181 | }; |
182 | 182 | ||
183 | ALIGN static const uint16_t swb_offset_480_24[] = | 183 | static const uint16_t swb_offset_480_24[] = |
184 | { | 184 | { |
185 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, 80, 92, 104, 120, | 185 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 52, 60, 68, 80, 92, 104, 120, |
186 | 140, 164, 192, 224, 256, 288, 320, 352, 384, 416, 448, 480 | 186 | 140, 164, 192, 224, 256, 288, 320, 352, 384, 416, 448, 480 |
187 | }; | 187 | }; |
188 | #endif | 188 | #endif |
189 | 189 | ||
190 | ALIGN static const uint16_t swb_offset_128_24[] ICONST_ATTR = | 190 | static const uint16_t swb_offset_128_24[] ICONST_ATTR = |
191 | { | 191 | { |
192 | 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 64, 76, 92, 108, 128 | 192 | 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 64, 76, 92, 108, 128 |
193 | }; | 193 | }; |
194 | 194 | ||
195 | ALIGN static const uint16_t swb_offset_1024_16[] ICONST_ATTR = | 195 | static const uint16_t swb_offset_1024_16[] ICONST_ATTR = |
196 | { | 196 | { |
197 | 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 100, 112, 124, | 197 | 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 100, 112, 124, |
198 | 136, 148, 160, 172, 184, 196, 212, 228, 244, 260, 280, 300, 320, 344, | 198 | 136, 148, 160, 172, 184, 196, 212, 228, 244, 260, 280, 300, 320, 344, |
199 | 368, 396, 424, 456, 492, 532, 572, 616, 664, 716, 772, 832, 896, 960, 1024 | 199 | 368, 396, 424, 456, 492, 532, 572, 616, 664, 716, 772, 832, 896, 960, 1024 |
200 | }; | 200 | }; |
201 | 201 | ||
202 | ALIGN static const uint16_t swb_offset_128_16[] ICONST_ATTR = | 202 | static const uint16_t swb_offset_128_16[] ICONST_ATTR = |
203 | { | 203 | { |
204 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, 60, 72, 88, 108, 128 | 204 | 0, 4, 8, 12, 16, 20, 24, 28, 32, 40, 48, 60, 72, 88, 108, 128 |
205 | }; | 205 | }; |
206 | 206 | ||
207 | ALIGN static const uint16_t swb_offset_1024_8[] ICONST_ATTR = | 207 | static const uint16_t swb_offset_1024_8[] ICONST_ATTR = |
208 | { | 208 | { |
209 | 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 172, | 209 | 0, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 156, 172, |
210 | 188, 204, 220, 236, 252, 268, 288, 308, 328, 348, 372, 396, 420, 448, | 210 | 188, 204, 220, 236, 252, 268, 288, 308, 328, 348, 372, 396, 420, 448, |
211 | 476, 508, 544, 580, 620, 664, 712, 764, 820, 880, 944, 1024 | 211 | 476, 508, 544, 580, 620, 664, 712, 764, 820, 880, 944, 1024 |
212 | }; | 212 | }; |
213 | 213 | ||
214 | ALIGN static const uint16_t swb_offset_128_8[] ICONST_ATTR = | 214 | static const uint16_t swb_offset_128_8[] ICONST_ATTR = |
215 | { | 215 | { |
216 | 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 60, 72, 88, 108, 128 | 216 | 0, 4, 8, 12, 16, 20, 24, 28, 36, 44, 52, 60, 72, 88, 108, 128 |
217 | }; | 217 | }; |
218 | 218 | ||
219 | ALIGN static const uint16_t *const swb_offset_1024_window[] ICONST_ATTR = | 219 | static const uint16_t *const swb_offset_1024_window[] ICONST_ATTR = |
220 | { | 220 | { |
221 | swb_offset_1024_96, /* 96000 */ | 221 | swb_offset_1024_96, /* 96000 */ |
222 | swb_offset_1024_96, /* 88200 */ | 222 | swb_offset_1024_96, /* 88200 */ |
@@ -233,7 +233,7 @@ ALIGN static const uint16_t *const swb_offset_1024_window[] ICONST_ATTR = | |||
233 | }; | 233 | }; |
234 | 234 | ||
235 | #ifdef LD_DEC | 235 | #ifdef LD_DEC |
236 | ALIGN static const uint16_t *swb_offset_512_window[] = | 236 | static const uint16_t *swb_offset_512_window[] = |
237 | { | 237 | { |
238 | 0, /* 96000 */ | 238 | 0, /* 96000 */ |
239 | 0, /* 88200 */ | 239 | 0, /* 88200 */ |
@@ -249,7 +249,7 @@ ALIGN static const uint16_t *swb_offset_512_window[] = | |||
249 | 0 /* 8000 */ | 249 | 0 /* 8000 */ |
250 | }; | 250 | }; |
251 | 251 | ||
252 | ALIGN static const uint16_t *swb_offset_480_window[] = | 252 | static const uint16_t *swb_offset_480_window[] = |
253 | { | 253 | { |
254 | 0, /* 96000 */ | 254 | 0, /* 96000 */ |
255 | 0, /* 88200 */ | 255 | 0, /* 88200 */ |
@@ -266,7 +266,7 @@ ALIGN static const uint16_t *swb_offset_480_window[] = | |||
266 | }; | 266 | }; |
267 | #endif | 267 | #endif |
268 | 268 | ||
269 | ALIGN static const uint16_t *const swb_offset_128_window[] ICONST_ATTR = | 269 | static const uint16_t *const swb_offset_128_window[] ICONST_ATTR = |
270 | { | 270 | { |
271 | swb_offset_128_96, /* 96000 */ | 271 | swb_offset_128_96, /* 96000 */ |
272 | swb_offset_128_96, /* 88200 */ | 272 | swb_offset_128_96, /* 88200 */ |
@@ -475,7 +475,7 @@ static INLINE real_t iquant(int16_t q, const real_t *tab, uint8_t *error) | |||
475 | } | 475 | } |
476 | 476 | ||
477 | #ifndef FIXED_POINT | 477 | #ifndef FIXED_POINT |
478 | ALIGN static const real_t pow2sf_tab[] = { | 478 | static const real_t pow2sf_tab[] = { |
479 | 2.9802322387695313E-008, 5.9604644775390625E-008, 1.1920928955078125E-007, | 479 | 2.9802322387695313E-008, 5.9604644775390625E-008, 1.1920928955078125E-007, |
480 | 2.384185791015625E-007, 4.76837158203125E-007, 9.5367431640625E-007, | 480 | 2.384185791015625E-007, 4.76837158203125E-007, 9.5367431640625E-007, |
481 | 1.9073486328125E-006, 3.814697265625E-006, 7.62939453125E-006, | 481 | 1.9073486328125E-006, 3.814697265625E-006, 7.62939453125E-006, |
@@ -523,7 +523,7 @@ ALIGN static const real_t pow2sf_tab[] = { | |||
523 | - Within a scalefactor window band, the coefficients are in ascending | 523 | - Within a scalefactor window band, the coefficients are in ascending |
524 | spectral order. | 524 | spectral order. |
525 | */ | 525 | */ |
526 | ALIGN static const real_t pow2_table[] ICONST_ATTR = | 526 | static const real_t pow2_table[] ICONST_ATTR = |
527 | { | 527 | { |
528 | COEF_CONST(1.0), | 528 | COEF_CONST(1.0), |
529 | COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */ | 529 | COEF_CONST(1.1892071150027210667174999705605), /* 2^0.25 */ |
@@ -836,8 +836,8 @@ static uint8_t allocate_channel_pair(NeAACDecHandle hDecoder, | |||
836 | } | 836 | } |
837 | 837 | ||
838 | /* used by reconstruct_single_channel() and reconstruct_channel_pair() */ | 838 | /* used by reconstruct_single_channel() and reconstruct_channel_pair() */ |
839 | ALIGN static real_t spec_coef1[1024] IBSS_ATTR; | 839 | static real_t spec_coef1[1024] IBSS_ATTR MEM_ALIGN_ATTR; |
840 | ALIGN static real_t spec_coef2[1024] IBSS_ATTR; | 840 | static real_t spec_coef2[1024] IBSS_ATTR MEM_ALIGN_ATTR; |
841 | 841 | ||
842 | uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, | 842 | uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, |
843 | element *sce, int16_t *spec_data) | 843 | element *sce, int16_t *spec_data) |