2 |
- |
1 |
/*
|
|
|
2 |
* libmad - MPEG audio decoder library
|
|
|
3 |
* Copyright (C) 2000-2004 Underbit Technologies, Inc.
|
|
|
4 |
*
|
|
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
|
8 |
* (at your option) any later version.
|
|
|
9 |
*
|
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
13 |
* GNU General Public License for more details.
|
|
|
14 |
*
|
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
|
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
18 |
*
|
|
|
19 |
* $Id: frame.c,v 1.29 2004/02/04 22:59:19 rob Exp $
|
|
|
20 |
*/
|
|
|
21 |
|
|
|
22 |
# ifdef HAVE_CONFIG_H
|
|
|
23 |
# include "config.h"
|
|
|
24 |
# endif
|
|
|
25 |
|
|
|
26 |
# include "global.h"
|
|
|
27 |
|
|
|
28 |
# include "bit.h"
|
|
|
29 |
# include "stream.h"
|
|
|
30 |
# include "frame.h"
|
|
|
31 |
# include "layer12.h"
|
|
|
32 |
# include "layer3.h"
|
|
|
33 |
|
|
|
34 |
static
|
|
|
35 |
unsigned long const bitrate_table[5][15] = {
|
|
|
36 |
/* MPEG-1 */
|
|
|
37 |
{ 0, 32000, 64000, 96000, 128000, 160000, 192000, 224000, /* Layer I */
|
|
|
38 |
256000, 288000, 320000, 352000, 384000, 416000, 448000 },
|
|
|
39 |
{ 0, 32000, 48000, 56000, 64000, 80000, 96000, 112000, /* Layer II */
|
|
|
40 |
128000, 160000, 192000, 224000, 256000, 320000, 384000 },
|
|
|
41 |
{ 0, 32000, 40000, 48000, 56000, 64000, 80000, 96000, /* Layer III */
|
|
|
42 |
112000, 128000, 160000, 192000, 224000, 256000, 320000 },
|
|
|
43 |
|
|
|
44 |
/* MPEG-2 LSF */
|
|
|
45 |
{ 0, 32000, 48000, 56000, 64000, 80000, 96000, 112000, /* Layer I */
|
|
|
46 |
128000, 144000, 160000, 176000, 192000, 224000, 256000 },
|
|
|
47 |
{ 0, 8000, 16000, 24000, 32000, 40000, 48000, 56000, /* Layers */
|
|
|
48 |
64000, 80000, 96000, 112000, 128000, 144000, 160000 } /* II & III */
|
|
|
49 |
};
|
|
|
50 |
|
|
|
51 |
static
|
|
|
52 |
unsigned int const samplerate_table[3] = { 44100, 48000, 32000 };
|
|
|
53 |
|
|
|
54 |
static
|
|
|
55 |
int (*const decoder_table[3])(struct mad_stream *, struct mad_frame *) = {
|
|
|
56 |
mad_layer_I,
|
|
|
57 |
mad_layer_II,
|
|
|
58 |
mad_layer_III
|
|
|
59 |
};
|
|
|
60 |
|
|
|
61 |
/*
|
|
|
62 |
* NAME: header->init()
|
|
|
63 |
* DESCRIPTION: initialize header struct
|
|
|
64 |
*/
|
|
|
65 |
void mad_header_init(struct mad_header *header)
|
|
|
66 |
{
|
|
|
67 |
header->layer = 0;
|
|
|
68 |
header->mode = 0;
|
|
|
69 |
header->mode_extension = 0;
|
|
|
70 |
header->emphasis = 0;
|
|
|
71 |
|
|
|
72 |
header->bitrate = 0;
|
|
|
73 |
header->samplerate = 0;
|
|
|
74 |
|
|
|
75 |
header->crc_check = 0;
|
|
|
76 |
header->crc_target = 0;
|
|
|
77 |
|
|
|
78 |
header->flags = 0;
|
|
|
79 |
header->private_bits = 0;
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
/*
|
|
|
83 |
* NAME: frame->init()
|
|
|
84 |
* DESCRIPTION: initialize frame struct
|
|
|
85 |
*/
|
|
|
86 |
void mad_frame_init(struct mad_frame *frame)
|
|
|
87 |
{
|
|
|
88 |
mad_header_init(&frame->header);
|
|
|
89 |
|
|
|
90 |
frame->options = 0;
|
|
|
91 |
|
|
|
92 |
frame->overlap = 0;
|
|
|
93 |
mad_frame_mute(frame);
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
/*
|
|
|
97 |
* NAME: frame->finish()
|
|
|
98 |
* DESCRIPTION: deallocate any dynamic memory associated with frame
|
|
|
99 |
*/
|
|
|
100 |
void mad_frame_finish(struct mad_frame *frame)
|
|
|
101 |
{
|
|
|
102 |
mad_header_finish(&frame->header);
|
|
|
103 |
|
|
|
104 |
if (frame->overlap) {
|
|
|
105 |
free(frame->overlap);
|
|
|
106 |
frame->overlap = 0;
|
|
|
107 |
}
|
|
|
108 |
}
|
|
|
109 |
|
|
|
110 |
/*
|
|
|
111 |
* NAME: decode_header()
|
|
|
112 |
* DESCRIPTION: read header data and following CRC word
|
|
|
113 |
*/
|
|
|
114 |
static
|
|
|
115 |
int decode_header(struct mad_header *header, struct mad_stream *stream)
|
|
|
116 |
{
|
|
|
117 |
unsigned int index;
|
|
|
118 |
|
|
|
119 |
header->flags = 0;
|
|
|
120 |
header->private_bits = 0;
|
|
|
121 |
|
|
|
122 |
/* header() */
|
|
|
123 |
|
|
|
124 |
/* syncword */
|
|
|
125 |
mad_bit_skip(&stream->ptr, 11);
|
|
|
126 |
|
|
|
127 |
/* MPEG 2.5 indicator (really part of syncword) */
|
|
|
128 |
if (mad_bit_read(&stream->ptr, 1) == 0)
|
|
|
129 |
header->flags |= MAD_FLAG_MPEG_2_5_EXT;
|
|
|
130 |
|
|
|
131 |
/* ID */
|
|
|
132 |
if (mad_bit_read(&stream->ptr, 1) == 0)
|
|
|
133 |
header->flags |= MAD_FLAG_LSF_EXT;
|
|
|
134 |
else if (header->flags & MAD_FLAG_MPEG_2_5_EXT) {
|
|
|
135 |
stream->error = MAD_ERROR_LOSTSYNC;
|
|
|
136 |
return -1;
|
|
|
137 |
}
|
|
|
138 |
|
|
|
139 |
/* layer */
|
|
|
140 |
header->layer = 4 - mad_bit_read(&stream->ptr, 2);
|
|
|
141 |
|
|
|
142 |
if (header->layer == 4) {
|
|
|
143 |
stream->error = MAD_ERROR_BADLAYER;
|
|
|
144 |
return -1;
|
|
|
145 |
}
|
|
|
146 |
|
|
|
147 |
/* protection_bit */
|
|
|
148 |
if (mad_bit_read(&stream->ptr, 1) == 0) {
|
|
|
149 |
header->flags |= MAD_FLAG_PROTECTION;
|
|
|
150 |
header->crc_check = mad_bit_crc(stream->ptr, 16, 0xffff);
|
|
|
151 |
}
|
|
|
152 |
|
|
|
153 |
/* bitrate_index */
|
|
|
154 |
index = mad_bit_read(&stream->ptr, 4);
|
|
|
155 |
|
|
|
156 |
if (index == 15) {
|
|
|
157 |
stream->error = MAD_ERROR_BADBITRATE;
|
|
|
158 |
return -1;
|
|
|
159 |
}
|
|
|
160 |
|
|
|
161 |
if (header->flags & MAD_FLAG_LSF_EXT)
|
|
|
162 |
header->bitrate = bitrate_table[3 + (header->layer >> 1)][index];
|
|
|
163 |
else
|
|
|
164 |
header->bitrate = bitrate_table[header->layer - 1][index];
|
|
|
165 |
|
|
|
166 |
/* sampling_frequency */
|
|
|
167 |
index = mad_bit_read(&stream->ptr, 2);
|
|
|
168 |
|
|
|
169 |
if (index == 3) {
|
|
|
170 |
stream->error = MAD_ERROR_BADSAMPLERATE;
|
|
|
171 |
return -1;
|
|
|
172 |
}
|
|
|
173 |
|
|
|
174 |
header->samplerate = samplerate_table[index];
|
|
|
175 |
|
|
|
176 |
if (header->flags & MAD_FLAG_LSF_EXT) {
|
|
|
177 |
header->samplerate /= 2;
|
|
|
178 |
|
|
|
179 |
if (header->flags & MAD_FLAG_MPEG_2_5_EXT)
|
|
|
180 |
header->samplerate /= 2;
|
|
|
181 |
}
|
|
|
182 |
|
|
|
183 |
/* padding_bit */
|
|
|
184 |
if (mad_bit_read(&stream->ptr, 1))
|
|
|
185 |
header->flags |= MAD_FLAG_PADDING;
|
|
|
186 |
|
|
|
187 |
/* private_bit */
|
|
|
188 |
if (mad_bit_read(&stream->ptr, 1))
|
|
|
189 |
header->private_bits |= MAD_PRIVATE_HEADER;
|
|
|
190 |
|
|
|
191 |
/* mode */
|
|
|
192 |
header->mode = 3 - mad_bit_read(&stream->ptr, 2);
|
|
|
193 |
|
|
|
194 |
/* mode_extension */
|
|
|
195 |
header->mode_extension = mad_bit_read(&stream->ptr, 2);
|
|
|
196 |
|
|
|
197 |
/* copyright */
|
|
|
198 |
if (mad_bit_read(&stream->ptr, 1))
|
|
|
199 |
header->flags |= MAD_FLAG_COPYRIGHT;
|
|
|
200 |
|
|
|
201 |
/* original/copy */
|
|
|
202 |
if (mad_bit_read(&stream->ptr, 1))
|
|
|
203 |
header->flags |= MAD_FLAG_ORIGINAL;
|
|
|
204 |
|
|
|
205 |
/* emphasis */
|
|
|
206 |
header->emphasis = mad_bit_read(&stream->ptr, 2);
|
|
|
207 |
|
|
|
208 |
# if defined(OPT_STRICT)
|
|
|
209 |
/*
|
|
|
210 |
* ISO/IEC 11172-3 says this is a reserved emphasis value, but
|
|
|
211 |
* streams exist which use it anyway. Since the value is not important
|
|
|
212 |
* to the decoder proper, we allow it unless OPT_STRICT is defined.
|
|
|
213 |
*/
|
|
|
214 |
if (header->emphasis == MAD_EMPHASIS_RESERVED) {
|
|
|
215 |
stream->error = MAD_ERROR_BADEMPHASIS;
|
|
|
216 |
return -1;
|
|
|
217 |
}
|
|
|
218 |
# endif
|
|
|
219 |
|
|
|
220 |
/* error_check() */
|
|
|
221 |
|
|
|
222 |
/* crc_check */
|
|
|
223 |
if (header->flags & MAD_FLAG_PROTECTION)
|
|
|
224 |
header->crc_target = mad_bit_read(&stream->ptr, 16);
|
|
|
225 |
|
|
|
226 |
return 0;
|
|
|
227 |
}
|
|
|
228 |
|
|
|
229 |
/*
|
|
|
230 |
* NAME: free_bitrate()
|
|
|
231 |
* DESCRIPTION: attempt to discover the bitstream's free bitrate
|
|
|
232 |
*/
|
|
|
233 |
static
|
|
|
234 |
int free_bitrate(struct mad_stream *stream, struct mad_header const *header)
|
|
|
235 |
{
|
|
|
236 |
struct mad_bitptr keep_ptr;
|
|
|
237 |
unsigned long rate = 0;
|
|
|
238 |
unsigned int pad_slot, slots_per_frame;
|
|
|
239 |
unsigned char const *ptr = 0;
|
|
|
240 |
|
|
|
241 |
keep_ptr = stream->ptr;
|
|
|
242 |
|
|
|
243 |
pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0;
|
|
|
244 |
slots_per_frame = (header->layer == MAD_LAYER_III &&
|
|
|
245 |
(header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144;
|
|
|
246 |
|
|
|
247 |
while (mad_stream_sync(stream) == 0) {
|
|
|
248 |
struct mad_stream peek_stream;
|
|
|
249 |
struct mad_header peek_header;
|
|
|
250 |
|
|
|
251 |
peek_stream = *stream;
|
|
|
252 |
peek_header = *header;
|
|
|
253 |
|
|
|
254 |
if (decode_header(&peek_header, &peek_stream) == 0 &&
|
|
|
255 |
peek_header.layer == header->layer &&
|
|
|
256 |
peek_header.samplerate == header->samplerate) {
|
|
|
257 |
unsigned int N;
|
|
|
258 |
|
|
|
259 |
ptr = mad_bit_nextbyte(&stream->ptr);
|
|
|
260 |
|
|
|
261 |
N = ptr - stream->this_frame;
|
|
|
262 |
|
|
|
263 |
if (header->layer == MAD_LAYER_I) {
|
|
|
264 |
rate = (unsigned long) header->samplerate *
|
|
|
265 |
(N - 4 * pad_slot + 4) / 48 / 1000;
|
|
|
266 |
}
|
|
|
267 |
else {
|
|
|
268 |
rate = (unsigned long) header->samplerate *
|
|
|
269 |
(N - pad_slot + 1) / slots_per_frame / 1000;
|
|
|
270 |
}
|
|
|
271 |
|
|
|
272 |
if (rate >= 8)
|
|
|
273 |
break;
|
|
|
274 |
}
|
|
|
275 |
|
|
|
276 |
mad_bit_skip(&stream->ptr, 8);
|
|
|
277 |
}
|
|
|
278 |
|
|
|
279 |
stream->ptr = keep_ptr;
|
|
|
280 |
|
|
|
281 |
if (rate < 8 || (header->layer == MAD_LAYER_III && rate > 640)) {
|
|
|
282 |
stream->error = MAD_ERROR_LOSTSYNC;
|
|
|
283 |
return -1;
|
|
|
284 |
}
|
|
|
285 |
|
|
|
286 |
stream->freerate = rate * 1000;
|
|
|
287 |
|
|
|
288 |
return 0;
|
|
|
289 |
}
|
|
|
290 |
|
|
|
291 |
/*
|
|
|
292 |
* NAME: header->decode()
|
|
|
293 |
* DESCRIPTION: read the next frame header from the stream
|
|
|
294 |
*/
|
|
|
295 |
int mad_header_decode(struct mad_header *header, struct mad_stream *stream)
|
|
|
296 |
{
|
|
|
297 |
register unsigned char const *ptr, *end;
|
|
|
298 |
unsigned int pad_slot, N;
|
|
|
299 |
|
|
|
300 |
ptr = stream->next_frame;
|
|
|
301 |
end = stream->bufend;
|
|
|
302 |
|
|
|
303 |
if (ptr == 0) {
|
|
|
304 |
stream->error = MAD_ERROR_BUFPTR;
|
|
|
305 |
goto fail;
|
|
|
306 |
}
|
|
|
307 |
|
|
|
308 |
/* stream skip */
|
|
|
309 |
if (stream->skiplen) {
|
|
|
310 |
if (!stream->sync)
|
|
|
311 |
ptr = stream->this_frame;
|
|
|
312 |
|
|
|
313 |
if (end - ptr < stream->skiplen) {
|
|
|
314 |
stream->skiplen -= end - ptr;
|
|
|
315 |
stream->next_frame = end;
|
|
|
316 |
|
|
|
317 |
stream->error = MAD_ERROR_BUFLEN;
|
|
|
318 |
goto fail;
|
|
|
319 |
}
|
|
|
320 |
|
|
|
321 |
ptr += stream->skiplen;
|
|
|
322 |
stream->skiplen = 0;
|
|
|
323 |
|
|
|
324 |
stream->sync = 1;
|
|
|
325 |
}
|
|
|
326 |
|
|
|
327 |
sync:
|
|
|
328 |
/* synchronize */
|
|
|
329 |
if (stream->sync) {
|
|
|
330 |
if (end - ptr < MAD_BUFFER_GUARD) {
|
|
|
331 |
stream->next_frame = ptr;
|
|
|
332 |
|
|
|
333 |
stream->error = MAD_ERROR_BUFLEN;
|
|
|
334 |
goto fail;
|
|
|
335 |
}
|
|
|
336 |
else if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
|
|
|
337 |
/* mark point where frame sync word was expected */
|
|
|
338 |
stream->this_frame = ptr;
|
|
|
339 |
stream->next_frame = ptr + 1;
|
|
|
340 |
|
|
|
341 |
stream->error = MAD_ERROR_LOSTSYNC;
|
|
|
342 |
goto fail;
|
|
|
343 |
}
|
|
|
344 |
}
|
|
|
345 |
else {
|
|
|
346 |
mad_bit_init(&stream->ptr, ptr);
|
|
|
347 |
|
|
|
348 |
if (mad_stream_sync(stream) == -1) {
|
|
|
349 |
if (end - stream->next_frame >= MAD_BUFFER_GUARD)
|
|
|
350 |
stream->next_frame = end - MAD_BUFFER_GUARD;
|
|
|
351 |
|
|
|
352 |
stream->error = MAD_ERROR_BUFLEN;
|
|
|
353 |
goto fail;
|
|
|
354 |
}
|
|
|
355 |
|
|
|
356 |
ptr = mad_bit_nextbyte(&stream->ptr);
|
|
|
357 |
}
|
|
|
358 |
|
|
|
359 |
/* begin processing */
|
|
|
360 |
stream->this_frame = ptr;
|
|
|
361 |
stream->next_frame = ptr + 1; /* possibly bogus sync word */
|
|
|
362 |
|
|
|
363 |
mad_bit_init(&stream->ptr, stream->this_frame);
|
|
|
364 |
|
|
|
365 |
if (decode_header(header, stream) == -1)
|
|
|
366 |
goto fail;
|
|
|
367 |
|
|
|
368 |
/* calculate free bit rate */
|
|
|
369 |
if (header->bitrate == 0) {
|
|
|
370 |
if ((stream->freerate == 0 || !stream->sync ||
|
|
|
371 |
(header->layer == MAD_LAYER_III && stream->freerate > 640000)) &&
|
|
|
372 |
free_bitrate(stream, header) == -1)
|
|
|
373 |
goto fail;
|
|
|
374 |
|
|
|
375 |
header->bitrate = stream->freerate;
|
|
|
376 |
header->flags |= MAD_FLAG_FREEFORMAT;
|
|
|
377 |
}
|
|
|
378 |
|
|
|
379 |
/* calculate beginning of next frame */
|
|
|
380 |
pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0;
|
|
|
381 |
|
|
|
382 |
if (header->layer == MAD_LAYER_I)
|
|
|
383 |
N = ((12 * header->bitrate / header->samplerate) + pad_slot) * 4;
|
|
|
384 |
else {
|
|
|
385 |
unsigned int slots_per_frame;
|
|
|
386 |
|
|
|
387 |
slots_per_frame = (header->layer == MAD_LAYER_III &&
|
|
|
388 |
(header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144;
|
|
|
389 |
|
|
|
390 |
N = (slots_per_frame * header->bitrate / header->samplerate) + pad_slot;
|
|
|
391 |
}
|
|
|
392 |
|
|
|
393 |
/* verify there is enough data left in buffer to decode this frame */
|
|
|
394 |
if (N + MAD_BUFFER_GUARD > end - stream->this_frame) {
|
|
|
395 |
stream->next_frame = stream->this_frame;
|
|
|
396 |
|
|
|
397 |
stream->error = MAD_ERROR_BUFLEN;
|
|
|
398 |
goto fail;
|
|
|
399 |
}
|
|
|
400 |
|
|
|
401 |
stream->next_frame = stream->this_frame + N;
|
|
|
402 |
|
|
|
403 |
if (!stream->sync) {
|
|
|
404 |
/* check that a valid frame header follows this frame */
|
|
|
405 |
|
|
|
406 |
ptr = stream->next_frame;
|
|
|
407 |
if (!(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) {
|
|
|
408 |
ptr = stream->next_frame = stream->this_frame + 1;
|
|
|
409 |
goto sync;
|
|
|
410 |
}
|
|
|
411 |
|
|
|
412 |
stream->sync = 1;
|
|
|
413 |
}
|
|
|
414 |
|
|
|
415 |
header->flags |= MAD_FLAG_INCOMPLETE;
|
|
|
416 |
|
|
|
417 |
return 0;
|
|
|
418 |
|
|
|
419 |
fail:
|
|
|
420 |
stream->sync = 0;
|
|
|
421 |
|
|
|
422 |
return -1;
|
|
|
423 |
}
|
|
|
424 |
|
|
|
425 |
/*
|
|
|
426 |
* NAME: frame->decode()
|
|
|
427 |
* DESCRIPTION: decode a single frame from a bitstream
|
|
|
428 |
*/
|
|
|
429 |
int mad_frame_decode(struct mad_frame *frame, struct mad_stream *stream)
|
|
|
430 |
{
|
|
|
431 |
frame->options = stream->options;
|
|
|
432 |
|
|
|
433 |
/* header() */
|
|
|
434 |
/* error_check() */
|
|
|
435 |
|
|
|
436 |
if (!(frame->header.flags & MAD_FLAG_INCOMPLETE) &&
|
|
|
437 |
mad_header_decode(&frame->header, stream) == -1)
|
|
|
438 |
goto fail;
|
|
|
439 |
|
|
|
440 |
/* audio_data() */
|
|
|
441 |
|
|
|
442 |
frame->header.flags &= ~MAD_FLAG_INCOMPLETE;
|
|
|
443 |
|
|
|
444 |
if (decoder_table[frame->header.layer - 1](stream, frame) == -1) {
|
|
|
445 |
if (!MAD_RECOVERABLE(stream->error))
|
|
|
446 |
stream->next_frame = stream->this_frame;
|
|
|
447 |
|
|
|
448 |
goto fail;
|
|
|
449 |
}
|
|
|
450 |
|
|
|
451 |
/* ancillary_data() */
|
|
|
452 |
|
|
|
453 |
if (frame->header.layer != MAD_LAYER_III) {
|
|
|
454 |
struct mad_bitptr next_frame;
|
|
|
455 |
|
|
|
456 |
mad_bit_init(&next_frame, stream->next_frame);
|
|
|
457 |
|
|
|
458 |
stream->anc_ptr = stream->ptr;
|
|
|
459 |
stream->anc_bitlen = mad_bit_length(&stream->ptr, &next_frame);
|
|
|
460 |
|
|
|
461 |
mad_bit_finish(&next_frame);
|
|
|
462 |
}
|
|
|
463 |
|
|
|
464 |
return 0;
|
|
|
465 |
|
|
|
466 |
fail:
|
|
|
467 |
stream->anc_bitlen = 0;
|
|
|
468 |
return -1;
|
|
|
469 |
}
|
|
|
470 |
|
|
|
471 |
/*
|
|
|
472 |
* NAME: frame->mute()
|
|
|
473 |
* DESCRIPTION: zero all subband values so the frame becomes silent
|
|
|
474 |
*/
|
|
|
475 |
void mad_frame_mute(struct mad_frame *frame)
|
|
|
476 |
{
|
|
|
477 |
unsigned int s, sb;
|
|
|
478 |
|
|
|
479 |
for (s = 0; s < 36; ++s) {
|
|
|
480 |
for (sb = 0; sb < 32; ++sb) {
|
|
|
481 |
frame->sbsample[0][s][sb] =
|
|
|
482 |
frame->sbsample[1][s][sb] = 0;
|
|
|
483 |
}
|
|
|
484 |
}
|
|
|
485 |
|
|
|
486 |
if (frame->overlap) {
|
|
|
487 |
for (s = 0; s < 18; ++s) {
|
|
|
488 |
for (sb = 0; sb < 32; ++sb) {
|
|
|
489 |
(*frame->overlap)[0][sb][s] =
|
|
|
490 |
(*frame->overlap)[1][sb][s] = 0;
|
|
|
491 |
}
|
|
|
492 |
}
|
|
|
493 |
}
|
|
|
494 |
}
|