diff options
Diffstat (limited to 'apps/codecs/libmad')
-rw-r--r-- | apps/codecs/libmad/bit.c | 40 | ||||
-rw-r--r-- | apps/codecs/libmad/bit.h | 4 | ||||
-rw-r--r-- | apps/codecs/libmad/decoder.c | 196 | ||||
-rw-r--r-- | apps/codecs/libmad/decoder.h | 36 | ||||
-rw-r--r-- | apps/codecs/libmad/fixed.c | 8 | ||||
-rw-r--r-- | apps/codecs/libmad/fixed.h | 238 | ||||
-rw-r--r-- | apps/codecs/libmad/frame.c | 62 | ||||
-rw-r--r-- | apps/codecs/libmad/frame.h | 74 | ||||
-rw-r--r-- | apps/codecs/libmad/global.h | 4 | ||||
-rw-r--r-- | apps/codecs/libmad/huffman.c | 692 | ||||
-rw-r--r-- | apps/codecs/libmad/layer12.c | 226 | ||||
-rw-r--r-- | apps/codecs/libmad/layer3.c | 694 | ||||
-rw-r--r-- | apps/codecs/libmad/mad.h | 566 | ||||
-rw-r--r-- | apps/codecs/libmad/minimad.c | 18 | ||||
-rw-r--r-- | apps/codecs/libmad/stream.c | 70 | ||||
-rw-r--r-- | apps/codecs/libmad/stream.h | 98 | ||||
-rw-r--r-- | apps/codecs/libmad/synth.c | 518 | ||||
-rw-r--r-- | apps/codecs/libmad/synth.h | 16 | ||||
-rw-r--r-- | apps/codecs/libmad/timer.c | 82 | ||||
-rw-r--r-- | apps/codecs/libmad/timer.h | 64 | ||||
-rw-r--r-- | apps/codecs/libmad/version.h | 26 |
21 files changed, 1866 insertions, 1866 deletions
diff --git a/apps/codecs/libmad/bit.c b/apps/codecs/libmad/bit.c index f132347c25..f3cca84b2b 100644 --- a/apps/codecs/libmad/bit.c +++ b/apps/codecs/libmad/bit.c | |||
@@ -87,8 +87,8 @@ unsigned short const crc_table[256] = { | |||
87 | #endif | 87 | #endif |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * NAME: bit->init() | 90 | * NAME: bit->init() |
91 | * DESCRIPTION: initialize bit pointer struct | 91 | * DESCRIPTION: initialize bit pointer struct |
92 | */ | 92 | */ |
93 | void mad_bit_init(struct mad_bitptr *bitptr, unsigned char const *byte) | 93 | void mad_bit_init(struct mad_bitptr *bitptr, unsigned char const *byte) |
94 | { | 94 | { |
@@ -97,11 +97,11 @@ void mad_bit_init(struct mad_bitptr *bitptr, unsigned char const *byte) | |||
97 | } | 97 | } |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * NAME: bit->length() | 100 | * NAME: bit->length() |
101 | * DESCRIPTION: return number of bits between start and end points | 101 | * DESCRIPTION: return number of bits between start and end points |
102 | */ | 102 | */ |
103 | unsigned int mad_bit_length(struct mad_bitptr const *begin, | 103 | unsigned int mad_bit_length(struct mad_bitptr const *begin, |
104 | struct mad_bitptr const *end) | 104 | struct mad_bitptr const *end) |
105 | { | 105 | { |
106 | return end->readbit - begin->readbit; | 106 | return end->readbit - begin->readbit; |
107 | } | 107 | } |
@@ -111,8 +111,8 @@ unsigned char mad_bit_bitsleft(struct mad_bitptr const *bitptr) | |||
111 | return 8 - (bitptr->readbit & 7); | 111 | return 8 - (bitptr->readbit & 7); |
112 | } | 112 | } |
113 | /* | 113 | /* |
114 | * NAME: bit->nextbyte() | 114 | * NAME: bit->nextbyte() |
115 | * DESCRIPTION: return pointer to next unprocessed byte | 115 | * DESCRIPTION: return pointer to next unprocessed byte |
116 | */ | 116 | */ |
117 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *bitptr) | 117 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *bitptr) |
118 | { | 118 | { |
@@ -120,8 +120,8 @@ unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *bitptr) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | /* | 122 | /* |
123 | * NAME: bit->skip() | 123 | * NAME: bit->skip() |
124 | * DESCRIPTION: advance bit pointer | 124 | * DESCRIPTION: advance bit pointer |
125 | */ | 125 | */ |
126 | void mad_bit_skip(struct mad_bitptr *bitptr, unsigned int len) | 126 | void mad_bit_skip(struct mad_bitptr *bitptr, unsigned int len) |
127 | { | 127 | { |
@@ -129,8 +129,8 @@ void mad_bit_skip(struct mad_bitptr *bitptr, unsigned int len) | |||
129 | } | 129 | } |
130 | 130 | ||
131 | /* | 131 | /* |
132 | * NAME: bit->read() | 132 | * NAME: bit->read() |
133 | * DESCRIPTION: read an arbitrary number of bits and return their UIMSBF value | 133 | * DESCRIPTION: read an arbitrary number of bits and return their UIMSBF value |
134 | */ | 134 | */ |
135 | 135 | ||
136 | uint32_t mad_bit_read(struct mad_bitptr *bitptr, unsigned int len) ICODE_ATTR; | 136 | uint32_t mad_bit_read(struct mad_bitptr *bitptr, unsigned int len) ICODE_ATTR; |
@@ -154,11 +154,11 @@ uint32_t mad_bit_read(struct mad_bitptr *bitptr, unsigned int len) | |||
154 | 154 | ||
155 | # if 0 | 155 | # if 0 |
156 | /* | 156 | /* |
157 | * NAME: bit->write() | 157 | * NAME: bit->write() |
158 | * DESCRIPTION: write an arbitrary number of bits | 158 | * DESCRIPTION: write an arbitrary number of bits |
159 | */ | 159 | */ |
160 | void mad_bit_write(struct mad_bitptr *bitptr, unsigned int len, | 160 | void mad_bit_write(struct mad_bitptr *bitptr, unsigned int len, |
161 | uint32_t value) | 161 | uint32_t value) |
162 | { | 162 | { |
163 | unsigned char *ptr; | 163 | unsigned char *ptr; |
164 | 164 | ||
@@ -169,11 +169,11 @@ void mad_bit_write(struct mad_bitptr *bitptr, unsigned int len, | |||
169 | # endif | 169 | # endif |
170 | 170 | ||
171 | /* | 171 | /* |
172 | * NAME: bit->crc() | 172 | * NAME: bit->crc() |
173 | * DESCRIPTION: compute CRC-check word | 173 | * DESCRIPTION: compute CRC-check word |
174 | */ | 174 | */ |
175 | unsigned short mad_bit_crc(struct mad_bitptr bitptr, unsigned int len, | 175 | unsigned short mad_bit_crc(struct mad_bitptr bitptr, unsigned int len, |
176 | unsigned short init) | 176 | unsigned short init) |
177 | { | 177 | { |
178 | register unsigned int crc; | 178 | register unsigned int crc; |
179 | 179 | ||
@@ -190,11 +190,11 @@ unsigned short mad_bit_crc(struct mad_bitptr bitptr, unsigned int len, | |||
190 | 190 | ||
191 | switch (len / 8) { | 191 | switch (len / 8) { |
192 | case 3: crc = (crc << 8) ^ | 192 | case 3: crc = (crc << 8) ^ |
193 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; | 193 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; |
194 | case 2: crc = (crc << 8) ^ | 194 | case 2: crc = (crc << 8) ^ |
195 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; | 195 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; |
196 | case 1: crc = (crc << 8) ^ | 196 | case 1: crc = (crc << 8) ^ |
197 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; | 197 | crc_table[((crc >> 8) ^ mad_bit_read(&bitptr, 8)) & 0xff]; |
198 | 198 | ||
199 | len %= 8; | 199 | len %= 8; |
200 | 200 | ||
diff --git a/apps/codecs/libmad/bit.h b/apps/codecs/libmad/bit.h index 615cabee89..ad13373eee 100644 --- a/apps/codecs/libmad/bit.h +++ b/apps/codecs/libmad/bit.h | |||
@@ -29,10 +29,10 @@ struct mad_bitptr { | |||
29 | 29 | ||
30 | void mad_bit_init(struct mad_bitptr *, unsigned char const *); | 30 | void mad_bit_init(struct mad_bitptr *, unsigned char const *); |
31 | 31 | ||
32 | # define mad_bit_finish(bitptr) /* nothing */ | 32 | # define mad_bit_finish(bitptr) /* nothing */ |
33 | 33 | ||
34 | unsigned int mad_bit_length(struct mad_bitptr const *, | 34 | unsigned int mad_bit_length(struct mad_bitptr const *, |
35 | struct mad_bitptr const *); | 35 | struct mad_bitptr const *); |
36 | 36 | ||
37 | unsigned char mad_bit_bitsleft(struct mad_bitptr const *bitptr); | 37 | unsigned char mad_bit_bitsleft(struct mad_bitptr const *bitptr); |
38 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); | 38 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); |
diff --git a/apps/codecs/libmad/decoder.c b/apps/codecs/libmad/decoder.c index fcbabce923..dfa45aaa34 100644 --- a/apps/codecs/libmad/decoder.c +++ b/apps/codecs/libmad/decoder.c | |||
@@ -51,25 +51,25 @@ | |||
51 | # include "decoder.h" | 51 | # include "decoder.h" |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * NAME: decoder->init() | 54 | * NAME: decoder->init() |
55 | * DESCRIPTION: initialize a decoder object with callback routines | 55 | * DESCRIPTION: initialize a decoder object with callback routines |
56 | */ | 56 | */ |
57 | void mad_decoder_init(struct mad_decoder *decoder, void *data, | 57 | void mad_decoder_init(struct mad_decoder *decoder, void *data, |
58 | enum mad_flow (*input_func)(void *, | 58 | enum mad_flow (*input_func)(void *, |
59 | struct mad_stream *), | 59 | struct mad_stream *), |
60 | enum mad_flow (*header_func)(void *, | 60 | enum mad_flow (*header_func)(void *, |
61 | struct mad_header const *), | 61 | struct mad_header const *), |
62 | enum mad_flow (*filter_func)(void *, | 62 | enum mad_flow (*filter_func)(void *, |
63 | struct mad_stream const *, | 63 | struct mad_stream const *, |
64 | struct mad_frame *), | 64 | struct mad_frame *), |
65 | enum mad_flow (*output_func)(void *, | 65 | enum mad_flow (*output_func)(void *, |
66 | struct mad_header const *, | 66 | struct mad_header const *, |
67 | struct mad_pcm *), | 67 | struct mad_pcm *), |
68 | enum mad_flow (*error_func)(void *, | 68 | enum mad_flow (*error_func)(void *, |
69 | struct mad_stream *, | 69 | struct mad_stream *, |
70 | struct mad_frame *), | 70 | struct mad_frame *), |
71 | enum mad_flow (*message_func)(void *, | 71 | enum mad_flow (*message_func)(void *, |
72 | void *, unsigned int *)) | 72 | void *, unsigned int *)) |
73 | { | 73 | { |
74 | decoder->mode = -1; | 74 | decoder->mode = -1; |
75 | 75 | ||
@@ -237,9 +237,9 @@ enum mad_flow receive(int fd, void **message, unsigned int *size) | |||
237 | 237 | ||
238 | if (*size > 0) { | 238 | if (*size > 0) { |
239 | if (*message == 0) { | 239 | if (*message == 0) { |
240 | *message = malloc(*size); | 240 | *message = malloc(*size); |
241 | if (*message == 0) | 241 | if (*message == 0) |
242 | return MAD_FLOW_BREAK; | 242 | return MAD_FLOW_BREAK; |
243 | } | 243 | } |
244 | 244 | ||
245 | result = receive_io_blocking(fd, *message, *size); | 245 | result = receive_io_blocking(fd, *message, *size); |
@@ -278,8 +278,8 @@ enum mad_flow check_message(struct mad_decoder *decoder) | |||
278 | result = decoder->message_func(decoder->cb_data, message, &size); | 278 | result = decoder->message_func(decoder->cb_data, message, &size); |
279 | 279 | ||
280 | if (result == MAD_FLOW_IGNORE || | 280 | if (result == MAD_FLOW_IGNORE || |
281 | result == MAD_FLOW_BREAK) | 281 | result == MAD_FLOW_BREAK) |
282 | size = 0; | 282 | size = 0; |
283 | } | 283 | } |
284 | 284 | ||
285 | if (send(decoder->async.out, message, size) != MAD_FLOW_CONTINUE) | 285 | if (send(decoder->async.out, message, size) != MAD_FLOW_CONTINUE) |
@@ -295,7 +295,7 @@ enum mad_flow check_message(struct mad_decoder *decoder) | |||
295 | 295 | ||
296 | static | 296 | static |
297 | enum mad_flow error_default(void *data, struct mad_stream *stream, | 297 | enum mad_flow error_default(void *data, struct mad_stream *stream, |
298 | struct mad_frame *frame) | 298 | struct mad_frame *frame) |
299 | { | 299 | { |
300 | int *bad_last_frame = data; | 300 | int *bad_last_frame = data; |
301 | 301 | ||
@@ -361,92 +361,92 @@ int run_sync(struct mad_decoder *decoder) | |||
361 | while (1) { | 361 | while (1) { |
362 | # if defined(USE_ASYNC) | 362 | # if defined(USE_ASYNC) |
363 | if (decoder->mode == MAD_DECODER_MODE_ASYNC) { | 363 | if (decoder->mode == MAD_DECODER_MODE_ASYNC) { |
364 | switch (check_message(decoder)) { | 364 | switch (check_message(decoder)) { |
365 | case MAD_FLOW_IGNORE: | 365 | case MAD_FLOW_IGNORE: |
366 | case MAD_FLOW_CONTINUE: | 366 | case MAD_FLOW_CONTINUE: |
367 | break; | 367 | break; |
368 | case MAD_FLOW_BREAK: | 368 | case MAD_FLOW_BREAK: |
369 | goto fail; | 369 | goto fail; |
370 | case MAD_FLOW_STOP: | 370 | case MAD_FLOW_STOP: |
371 | goto done; | 371 | goto done; |
372 | } | 372 | } |
373 | } | 373 | } |
374 | # endif | 374 | # endif |
375 | 375 | ||
376 | if (decoder->header_func) { | 376 | if (decoder->header_func) { |
377 | if (mad_header_decode(&frame->header, stream) == -1) { | 377 | if (mad_header_decode(&frame->header, stream) == -1) { |
378 | if (!MAD_RECOVERABLE(stream->error)) | 378 | if (!MAD_RECOVERABLE(stream->error)) |
379 | break; | 379 | break; |
380 | 380 | ||
381 | switch (error_func(error_data, stream, frame)) { | 381 | switch (error_func(error_data, stream, frame)) { |
382 | case MAD_FLOW_STOP: | 382 | case MAD_FLOW_STOP: |
383 | goto done; | 383 | goto done; |
384 | case MAD_FLOW_BREAK: | 384 | case MAD_FLOW_BREAK: |
385 | goto fail; | 385 | goto fail; |
386 | case MAD_FLOW_IGNORE: | 386 | case MAD_FLOW_IGNORE: |
387 | case MAD_FLOW_CONTINUE: | 387 | case MAD_FLOW_CONTINUE: |
388 | default: | 388 | default: |
389 | continue; | 389 | continue; |
390 | } | 390 | } |
391 | } | 391 | } |
392 | 392 | ||
393 | switch (decoder->header_func(decoder->cb_data, &frame->header)) { | 393 | switch (decoder->header_func(decoder->cb_data, &frame->header)) { |
394 | case MAD_FLOW_STOP: | 394 | case MAD_FLOW_STOP: |
395 | goto done; | 395 | goto done; |
396 | case MAD_FLOW_BREAK: | 396 | case MAD_FLOW_BREAK: |
397 | goto fail; | 397 | goto fail; |
398 | case MAD_FLOW_IGNORE: | 398 | case MAD_FLOW_IGNORE: |
399 | continue; | 399 | continue; |
400 | case MAD_FLOW_CONTINUE: | 400 | case MAD_FLOW_CONTINUE: |
401 | break; | 401 | break; |
402 | } | 402 | } |
403 | } | 403 | } |
404 | 404 | ||
405 | if (mad_frame_decode(frame, stream) == -1) { | 405 | if (mad_frame_decode(frame, stream) == -1) { |
406 | if (!MAD_RECOVERABLE(stream->error)) | 406 | if (!MAD_RECOVERABLE(stream->error)) |
407 | break; | 407 | break; |
408 | 408 | ||
409 | switch (error_func(error_data, stream, frame)) { | 409 | switch (error_func(error_data, stream, frame)) { |
410 | case MAD_FLOW_STOP: | 410 | case MAD_FLOW_STOP: |
411 | goto done; | 411 | goto done; |
412 | case MAD_FLOW_BREAK: | 412 | case MAD_FLOW_BREAK: |
413 | goto fail; | 413 | goto fail; |
414 | case MAD_FLOW_IGNORE: | 414 | case MAD_FLOW_IGNORE: |
415 | break; | 415 | break; |
416 | case MAD_FLOW_CONTINUE: | 416 | case MAD_FLOW_CONTINUE: |
417 | default: | 417 | default: |
418 | continue; | 418 | continue; |
419 | } | 419 | } |
420 | } | 420 | } |
421 | else | 421 | else |
422 | bad_last_frame = 0; | 422 | bad_last_frame = 0; |
423 | 423 | ||
424 | if (decoder->filter_func) { | 424 | if (decoder->filter_func) { |
425 | switch (decoder->filter_func(decoder->cb_data, stream, frame)) { | 425 | switch (decoder->filter_func(decoder->cb_data, stream, frame)) { |
426 | case MAD_FLOW_STOP: | 426 | case MAD_FLOW_STOP: |
427 | goto done; | 427 | goto done; |
428 | case MAD_FLOW_BREAK: | 428 | case MAD_FLOW_BREAK: |
429 | goto fail; | 429 | goto fail; |
430 | case MAD_FLOW_IGNORE: | 430 | case MAD_FLOW_IGNORE: |
431 | continue; | 431 | continue; |
432 | case MAD_FLOW_CONTINUE: | 432 | case MAD_FLOW_CONTINUE: |
433 | break; | 433 | break; |
434 | } | 434 | } |
435 | } | 435 | } |
436 | 436 | ||
437 | mad_synth_frame(synth, frame); | 437 | mad_synth_frame(synth, frame); |
438 | 438 | ||
439 | if (decoder->output_func) { | 439 | if (decoder->output_func) { |
440 | switch (decoder->output_func(decoder->cb_data, | 440 | switch (decoder->output_func(decoder->cb_data, |
441 | &frame->header, &synth->pcm)) { | 441 | &frame->header, &synth->pcm)) { |
442 | case MAD_FLOW_STOP: | 442 | case MAD_FLOW_STOP: |
443 | goto done; | 443 | goto done; |
444 | case MAD_FLOW_BREAK: | 444 | case MAD_FLOW_BREAK: |
445 | goto fail; | 445 | goto fail; |
446 | case MAD_FLOW_IGNORE: | 446 | case MAD_FLOW_IGNORE: |
447 | case MAD_FLOW_CONTINUE: | 447 | case MAD_FLOW_CONTINUE: |
448 | break; | 448 | break; |
449 | } | 449 | } |
450 | } | 450 | } |
451 | } | 451 | } |
452 | } | 452 | } |
@@ -528,8 +528,8 @@ int run_async(struct mad_decoder *decoder) | |||
528 | # endif | 528 | # endif |
529 | 529 | ||
530 | /* | 530 | /* |
531 | * NAME: decoder->run() | 531 | * NAME: decoder->run() |
532 | * DESCRIPTION: run the decoder thread either synchronously or asynchronously | 532 | * DESCRIPTION: run the decoder thread either synchronously or asynchronously |
533 | */ | 533 | */ |
534 | int mad_decoder_run(struct mad_decoder *decoder, enum mad_decoder_mode mode) | 534 | int mad_decoder_run(struct mad_decoder *decoder, enum mad_decoder_mode mode) |
535 | { | 535 | { |
@@ -564,11 +564,11 @@ int mad_decoder_run(struct mad_decoder *decoder, enum mad_decoder_mode mode) | |||
564 | } | 564 | } |
565 | 565 | ||
566 | /* | 566 | /* |
567 | * NAME: decoder->message() | 567 | * NAME: decoder->message() |
568 | * DESCRIPTION: send a message to and receive a reply from the decoder process | 568 | * DESCRIPTION: send a message to and receive a reply from the decoder process |
569 | */ | 569 | */ |
570 | int mad_decoder_message(struct mad_decoder *decoder, | 570 | int mad_decoder_message(struct mad_decoder *decoder, |
571 | void *message, unsigned int *len) | 571 | void *message, unsigned int *len) |
572 | { | 572 | { |
573 | # if defined(USE_ASYNC) | 573 | # if defined(USE_ASYNC) |
574 | if (decoder->mode != MAD_DECODER_MODE_ASYNC || | 574 | if (decoder->mode != MAD_DECODER_MODE_ASYNC || |
diff --git a/apps/codecs/libmad/decoder.h b/apps/codecs/libmad/decoder.h index 714e72c602..1f022154f2 100644 --- a/apps/codecs/libmad/decoder.h +++ b/apps/codecs/libmad/decoder.h | |||
@@ -32,10 +32,10 @@ enum mad_decoder_mode { | |||
32 | }; | 32 | }; |
33 | 33 | ||
34 | enum mad_flow { | 34 | enum mad_flow { |
35 | MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ | 35 | MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ |
36 | MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ | 36 | MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ |
37 | MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ | 37 | MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ |
38 | MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ | 38 | MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ |
39 | }; | 39 | }; |
40 | 40 | ||
41 | struct mad_decoder { | 41 | struct mad_decoder { |
@@ -60,26 +60,26 @@ struct mad_decoder { | |||
60 | enum mad_flow (*input_func)(void *, struct mad_stream *); | 60 | enum mad_flow (*input_func)(void *, struct mad_stream *); |
61 | enum mad_flow (*header_func)(void *, struct mad_header const *); | 61 | enum mad_flow (*header_func)(void *, struct mad_header const *); |
62 | enum mad_flow (*filter_func)(void *, | 62 | enum mad_flow (*filter_func)(void *, |
63 | struct mad_stream const *, struct mad_frame *); | 63 | struct mad_stream const *, struct mad_frame *); |
64 | enum mad_flow (*output_func)(void *, | 64 | enum mad_flow (*output_func)(void *, |
65 | struct mad_header const *, struct mad_pcm *); | 65 | struct mad_header const *, struct mad_pcm *); |
66 | enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); | 66 | enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); |
67 | enum mad_flow (*message_func)(void *, void *, unsigned int *); | 67 | enum mad_flow (*message_func)(void *, void *, unsigned int *); |
68 | }; | 68 | }; |
69 | 69 | ||
70 | void mad_decoder_init(struct mad_decoder *, void *, | 70 | void mad_decoder_init(struct mad_decoder *, void *, |
71 | enum mad_flow (*)(void *, struct mad_stream *), | 71 | enum mad_flow (*)(void *, struct mad_stream *), |
72 | enum mad_flow (*)(void *, struct mad_header const *), | 72 | enum mad_flow (*)(void *, struct mad_header const *), |
73 | enum mad_flow (*)(void *, | 73 | enum mad_flow (*)(void *, |
74 | struct mad_stream const *, | 74 | struct mad_stream const *, |
75 | struct mad_frame *), | 75 | struct mad_frame *), |
76 | enum mad_flow (*)(void *, | 76 | enum mad_flow (*)(void *, |
77 | struct mad_header const *, | 77 | struct mad_header const *, |
78 | struct mad_pcm *), | 78 | struct mad_pcm *), |
79 | enum mad_flow (*)(void *, | 79 | enum mad_flow (*)(void *, |
80 | struct mad_stream *, | 80 | struct mad_stream *, |
81 | struct mad_frame *), | 81 | struct mad_frame *), |
82 | enum mad_flow (*)(void *, void *, unsigned int *)); | 82 | enum mad_flow (*)(void *, void *, unsigned int *)); |
83 | int mad_decoder_finish(struct mad_decoder *); | 83 | int mad_decoder_finish(struct mad_decoder *); |
84 | 84 | ||
85 | # define mad_decoder_options(decoder, opts) \ | 85 | # define mad_decoder_options(decoder, opts) \ |
diff --git a/apps/codecs/libmad/fixed.c b/apps/codecs/libmad/fixed.c index d30f7a1219..f2f0a3ce4a 100644 --- a/apps/codecs/libmad/fixed.c +++ b/apps/codecs/libmad/fixed.c | |||
@@ -28,8 +28,8 @@ | |||
28 | # include "fixed.h" | 28 | # include "fixed.h" |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * NAME: fixed->abs() | 31 | * NAME: fixed->abs() |
32 | * DESCRIPTION: return absolute value of a fixed-point number | 32 | * DESCRIPTION: return absolute value of a fixed-point number |
33 | */ | 33 | */ |
34 | mad_fixed_t mad_f_abs(mad_fixed_t x) | 34 | mad_fixed_t mad_f_abs(mad_fixed_t x) |
35 | { | 35 | { |
@@ -37,8 +37,8 @@ mad_fixed_t mad_f_abs(mad_fixed_t x) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * NAME: fixed->div() | 40 | * NAME: fixed->div() |
41 | * DESCRIPTION: perform division using fixed-point math | 41 | * DESCRIPTION: perform division using fixed-point math |
42 | */ | 42 | */ |
43 | mad_fixed_t mad_f_div(mad_fixed_t x, mad_fixed_t y) | 43 | mad_fixed_t mad_f_div(mad_fixed_t x, mad_fixed_t y) |
44 | { | 44 | { |
diff --git a/apps/codecs/libmad/fixed.h b/apps/codecs/libmad/fixed.h index 7e580c4e8f..84bb5954e3 100644 --- a/apps/codecs/libmad/fixed.h +++ b/apps/codecs/libmad/fixed.h | |||
@@ -64,50 +64,50 @@ typedef mad_fixed_t mad_sample_t; | |||
64 | * supported, and must be done with care. | 64 | * supported, and must be done with care. |
65 | */ | 65 | */ |
66 | 66 | ||
67 | # define MAD_F_FRACBITS 28 | 67 | # define MAD_F_FRACBITS 28 |
68 | 68 | ||
69 | # if MAD_F_FRACBITS == 28 | 69 | # if MAD_F_FRACBITS == 28 |
70 | # define MAD_F(x) ((mad_fixed_t) (x##L)) | 70 | # define MAD_F(x) ((mad_fixed_t) (x##L)) |
71 | # else | 71 | # else |
72 | # if MAD_F_FRACBITS < 28 | 72 | # if MAD_F_FRACBITS < 28 |
73 | # warning "MAD_F_FRACBITS < 28" | 73 | # warning "MAD_F_FRACBITS < 28" |
74 | # define MAD_F(x) ((mad_fixed_t) \ | 74 | # define MAD_F(x) ((mad_fixed_t) \ |
75 | (((x##L) + \ | 75 | (((x##L) + \ |
76 | (1L << (28 - MAD_F_FRACBITS - 1))) >> \ | 76 | (1L << (28 - MAD_F_FRACBITS - 1))) >> \ |
77 | (28 - MAD_F_FRACBITS))) | 77 | (28 - MAD_F_FRACBITS))) |
78 | # elif MAD_F_FRACBITS > 28 | 78 | # elif MAD_F_FRACBITS > 28 |
79 | # error "MAD_F_FRACBITS > 28 not currently supported" | 79 | # error "MAD_F_FRACBITS > 28 not currently supported" |
80 | # define MAD_F(x) ((mad_fixed_t) \ | 80 | # define MAD_F(x) ((mad_fixed_t) \ |
81 | ((x##L) << (MAD_F_FRACBITS - 28))) | 81 | ((x##L) << (MAD_F_FRACBITS - 28))) |
82 | # endif | 82 | # endif |
83 | # endif | 83 | # endif |
84 | 84 | ||
85 | # define MAD_F_MIN ((mad_fixed_t) -0x80000000L) | 85 | # define MAD_F_MIN ((mad_fixed_t) -0x80000000L) |
86 | # define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) | 86 | # define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) |
87 | 87 | ||
88 | # define MAD_F_ONE MAD_F(0x10000000) | 88 | # define MAD_F_ONE MAD_F(0x10000000) |
89 | 89 | ||
90 | # define mad_f_tofixed(x) ((mad_fixed_t) \ | 90 | # define mad_f_tofixed(x) ((mad_fixed_t) \ |
91 | ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) | 91 | ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) |
92 | # define mad_f_todouble(x) ((double) \ | 92 | # define mad_f_todouble(x) ((double) \ |
93 | ((x) / (double) (1L << MAD_F_FRACBITS))) | 93 | ((x) / (double) (1L << MAD_F_FRACBITS))) |
94 | 94 | ||
95 | # define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) | 95 | # define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) |
96 | # define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) | 96 | # define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) |
97 | /* (x should be positive) */ | 97 | /* (x should be positive) */ |
98 | 98 | ||
99 | # define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) | 99 | # define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) |
100 | 100 | ||
101 | # define mad_f_add(x, y) ((x) + (y)) | 101 | # define mad_f_add(x, y) ((x) + (y)) |
102 | # define mad_f_sub(x, y) ((x) - (y)) | 102 | # define mad_f_sub(x, y) ((x) - (y)) |
103 | 103 | ||
104 | # if defined(FPM_FLOAT) | 104 | # if defined(FPM_FLOAT) |
105 | # error "FPM_FLOAT not yet supported" | 105 | # error "FPM_FLOAT not yet supported" |
106 | 106 | ||
107 | # undef MAD_F | 107 | # undef MAD_F |
108 | # define MAD_F(x) mad_f_todouble(x) | 108 | # define MAD_F(x) mad_f_todouble(x) |
109 | 109 | ||
110 | # define mad_f_mul(x, y) ((x) * (y)) | 110 | # define mad_f_mul(x, y) ((x) * (y)) |
111 | # define mad_f_scale64 | 111 | # define mad_f_scale64 |
112 | 112 | ||
113 | # undef ASO_ZEROCHECK | 113 | # undef ASO_ZEROCHECK |
@@ -154,7 +154,7 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
154 | } | 154 | } |
155 | # pragma warning(pop) | 155 | # pragma warning(pop) |
156 | 156 | ||
157 | # define mad_f_mul mad_f_mul_inline | 157 | # define mad_f_mul mad_f_mul_inline |
158 | # define mad_f_scale64 | 158 | # define mad_f_scale64 |
159 | # else | 159 | # else |
160 | /* | 160 | /* |
@@ -163,9 +163,9 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
163 | */ | 163 | */ |
164 | # define MAD_F_MLX(hi, lo, x, y) \ | 164 | # define MAD_F_MLX(hi, lo, x, y) \ |
165 | asm ("imull %3" \ | 165 | asm ("imull %3" \ |
166 | : "=a" (lo), "=d" (hi) \ | 166 | : "=a" (lo), "=d" (hi) \ |
167 | : "%a" (x), "rm" (y) \ | 167 | : "%a" (x), "rm" (y) \ |
168 | : "cc") | 168 | : "cc") |
169 | 169 | ||
170 | # if defined(OPT_ACCURACY) | 170 | # if defined(OPT_ACCURACY) |
171 | /* | 171 | /* |
@@ -176,10 +176,10 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
176 | mad_fixed64lo_t __lo; \ | 176 | mad_fixed64lo_t __lo; \ |
177 | MAD_F_MLX(__hi, __lo, (x), (y)); \ | 177 | MAD_F_MLX(__hi, __lo, (x), (y)); \ |
178 | asm ("addl %2,%0\n\t" \ | 178 | asm ("addl %2,%0\n\t" \ |
179 | "adcl %3,%1" \ | 179 | "adcl %3,%1" \ |
180 | : "=rm" (lo), "=rm" (hi) \ | 180 | : "=rm" (lo), "=rm" (hi) \ |
181 | : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ | 181 | : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ |
182 | : "cc"); \ | 182 | : "cc"); \ |
183 | }) | 183 | }) |
184 | # endif /* OPT_ACCURACY */ | 184 | # endif /* OPT_ACCURACY */ |
185 | 185 | ||
@@ -192,15 +192,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
192 | mad_fixed64lo_t __lo_; \ | 192 | mad_fixed64lo_t __lo_; \ |
193 | mad_fixed_t __result; \ | 193 | mad_fixed_t __result; \ |
194 | asm ("addl %4,%2\n\t" \ | 194 | asm ("addl %4,%2\n\t" \ |
195 | "adcl %5,%3" \ | 195 | "adcl %5,%3" \ |
196 | : "=rm" (__lo_), "=rm" (__hi_) \ | 196 | : "=rm" (__lo_), "=rm" (__hi_) \ |
197 | : "0" (lo), "1" (hi), \ | 197 | : "0" (lo), "1" (hi), \ |
198 | "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ | 198 | "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ |
199 | : "cc"); \ | 199 | : "cc"); \ |
200 | asm ("shrdl %3,%2,%1" \ | 200 | asm ("shrdl %3,%2,%1" \ |
201 | : "=rm" (__result) \ | 201 | : "=rm" (__result) \ |
202 | : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ | 202 | : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ |
203 | : "cc"); \ | 203 | : "cc"); \ |
204 | __result; \ | 204 | __result; \ |
205 | }) | 205 | }) |
206 | # elif defined(OPT_INTEL) | 206 | # elif defined(OPT_INTEL) |
@@ -210,21 +210,21 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
210 | # define mad_f_scale64(hi, lo) \ | 210 | # define mad_f_scale64(hi, lo) \ |
211 | ({ mad_fixed_t __result; \ | 211 | ({ mad_fixed_t __result; \ |
212 | asm ("shrl %3,%1\n\t" \ | 212 | asm ("shrl %3,%1\n\t" \ |
213 | "shll %4,%2\n\t" \ | 213 | "shll %4,%2\n\t" \ |
214 | "orl %2,%1" \ | 214 | "orl %2,%1" \ |
215 | : "=rm" (__result) \ | 215 | : "=rm" (__result) \ |
216 | : "0" (lo), "r" (hi), \ | 216 | : "0" (lo), "r" (hi), \ |
217 | "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ | 217 | "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ |
218 | : "cc"); \ | 218 | : "cc"); \ |
219 | __result; \ | 219 | __result; \ |
220 | }) | 220 | }) |
221 | # else | 221 | # else |
222 | # define mad_f_scale64(hi, lo) \ | 222 | # define mad_f_scale64(hi, lo) \ |
223 | ({ mad_fixed_t __result; \ | 223 | ({ mad_fixed_t __result; \ |
224 | asm ("shrdl %3,%2,%1" \ | 224 | asm ("shrdl %3,%2,%1" \ |
225 | : "=rm" (__result) \ | 225 | : "=rm" (__result) \ |
226 | : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ | 226 | : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ |
227 | : "cc"); \ | 227 | : "cc"); \ |
228 | __result; \ | 228 | __result; \ |
229 | }) | 229 | }) |
230 | # endif /* OPT_ACCURACY */ | 230 | # endif /* OPT_ACCURACY */ |
@@ -249,42 +249,42 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
249 | ({ mad_fixed64hi_t __hi; \ | 249 | ({ mad_fixed64hi_t __hi; \ |
250 | mad_fixed64lo_t __lo; \ | 250 | mad_fixed64lo_t __lo; \ |
251 | mad_fixed_t __result; \ | 251 | mad_fixed_t __result; \ |
252 | asm ("smull %0, %1, %3, %4\n\t" \ | 252 | asm ("smull %0, %1, %3, %4\n\t" \ |
253 | "movs %0, %0, lsr %5\n\t" \ | 253 | "movs %0, %0, lsr %5\n\t" \ |
254 | "adc %2, %0, %1, lsl %6" \ | 254 | "adc %2, %0, %1, lsl %6" \ |
255 | : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ | 255 | : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ |
256 | : "%r" (x), "r" (y), \ | 256 | : "%r" (x), "r" (y), \ |
257 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ | 257 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ |
258 | : "cc"); \ | 258 | : "cc"); \ |
259 | __result; \ | 259 | __result; \ |
260 | }) | 260 | }) |
261 | # endif | 261 | # endif |
262 | 262 | ||
263 | # define MAD_F_MLX(hi, lo, x, y) \ | 263 | # define MAD_F_MLX(hi, lo, x, y) \ |
264 | asm ("smull %0, %1, %2, %3" \ | 264 | asm ("smull %0, %1, %2, %3" \ |
265 | : "=&r" (lo), "=&r" (hi) \ | 265 | : "=&r" (lo), "=&r" (hi) \ |
266 | : "%r" (x), "r" (y)) | 266 | : "%r" (x), "r" (y)) |
267 | 267 | ||
268 | # define MAD_F_MLA(hi, lo, x, y) \ | 268 | # define MAD_F_MLA(hi, lo, x, y) \ |
269 | asm ("smlal %0, %1, %2, %3" \ | 269 | asm ("smlal %0, %1, %2, %3" \ |
270 | : "+r" (lo), "+r" (hi) \ | 270 | : "+r" (lo), "+r" (hi) \ |
271 | : "%r" (x), "r" (y)) | 271 | : "%r" (x), "r" (y)) |
272 | 272 | ||
273 | # define MAD_F_MLN(hi, lo) \ | 273 | # define MAD_F_MLN(hi, lo) \ |
274 | asm ("rsbs %0, %2, #0\n\t" \ | 274 | asm ("rsbs %0, %2, #0\n\t" \ |
275 | "rsc %1, %3, #0" \ | 275 | "rsc %1, %3, #0" \ |
276 | : "=r" (lo), "=r" (hi) \ | 276 | : "=r" (lo), "=r" (hi) \ |
277 | : "0" (lo), "1" (hi) \ | 277 | : "0" (lo), "1" (hi) \ |
278 | : "cc") | 278 | : "cc") |
279 | 279 | ||
280 | # define mad_f_scale64(hi, lo) \ | 280 | # define mad_f_scale64(hi, lo) \ |
281 | ({ mad_fixed_t __result; \ | 281 | ({ mad_fixed_t __result; \ |
282 | asm ("movs %0, %1, lsr %3\n\t" \ | 282 | asm ("movs %0, %1, lsr %3\n\t" \ |
283 | "adc %0, %0, %2, lsl %4" \ | 283 | "adc %0, %0, %2, lsl %4" \ |
284 | : "=&r" (__result) \ | 284 | : "=&r" (__result) \ |
285 | : "r" (lo), "r" (hi), \ | 285 | : "r" (lo), "r" (hi), \ |
286 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ | 286 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ |
287 | : "cc"); \ | 287 | : "cc"); \ |
288 | __result; \ | 288 | __result; \ |
289 | }) | 289 | }) |
290 | 290 | ||
@@ -299,28 +299,28 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
299 | * significant bit depends on OPT_ACCURACY via mad_f_scale64(). | 299 | * significant bit depends on OPT_ACCURACY via mad_f_scale64(). |
300 | */ | 300 | */ |
301 | # define MAD_F_MLX(hi, lo, x, y) \ | 301 | # define MAD_F_MLX(hi, lo, x, y) \ |
302 | asm ("mult %2,%3" \ | 302 | asm ("mult %2,%3" \ |
303 | : "=l" (lo), "=h" (hi) \ | 303 | : "=l" (lo), "=h" (hi) \ |
304 | : "%r" (x), "r" (y)) | 304 | : "%r" (x), "r" (y)) |
305 | 305 | ||
306 | # if defined(HAVE_MADD_ASM) | 306 | # if defined(HAVE_MADD_ASM) |
307 | # define MAD_F_MLA(hi, lo, x, y) \ | 307 | # define MAD_F_MLA(hi, lo, x, y) \ |
308 | asm ("madd %2,%3" \ | 308 | asm ("madd %2,%3" \ |
309 | : "+l" (lo), "+h" (hi) \ | 309 | : "+l" (lo), "+h" (hi) \ |
310 | : "%r" (x), "r" (y)) | 310 | : "%r" (x), "r" (y)) |
311 | # elif defined(HAVE_MADD16_ASM) | 311 | # elif defined(HAVE_MADD16_ASM) |
312 | /* | 312 | /* |
313 | * This loses significant accuracy due to the 16-bit integer limit in the | 313 | * This loses significant accuracy due to the 16-bit integer limit in the |
314 | * multiply/accumulate instruction. | 314 | * multiply/accumulate instruction. |
315 | */ | 315 | */ |
316 | # define MAD_F_ML0(hi, lo, x, y) \ | 316 | # define MAD_F_ML0(hi, lo, x, y) \ |
317 | asm ("mult %2,%3" \ | 317 | asm ("mult %2,%3" \ |
318 | : "=l" (lo), "=h" (hi) \ | 318 | : "=l" (lo), "=h" (hi) \ |
319 | : "%r" ((x) >> 12), "r" ((y) >> 16)) | 319 | : "%r" ((x) >> 12), "r" ((y) >> 16)) |
320 | # define MAD_F_MLA(hi, lo, x, y) \ | 320 | # define MAD_F_MLA(hi, lo, x, y) \ |
321 | asm ("madd16 %2,%3" \ | 321 | asm ("madd16 %2,%3" \ |
322 | : "+l" (lo), "+h" (hi) \ | 322 | : "+l" (lo), "+h" (hi) \ |
323 | : "%r" ((x) >> 12), "r" ((y) >> 16)) | 323 | : "%r" ((x) >> 12), "r" ((y) >> 16)) |
324 | # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) | 324 | # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) |
325 | # endif | 325 | # endif |
326 | 326 | ||
@@ -340,9 +340,9 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
340 | */ | 340 | */ |
341 | # define MAD_F_MLX(hi, lo, x, y) \ | 341 | # define MAD_F_MLX(hi, lo, x, y) \ |
342 | asm ("smul %2, %3, %0\n\t" \ | 342 | asm ("smul %2, %3, %0\n\t" \ |
343 | "rd %%y, %1" \ | 343 | "rd %%y, %1" \ |
344 | : "=r" (lo), "=r" (hi) \ | 344 | : "=r" (lo), "=r" (hi) \ |
345 | : "%r" (x), "rI" (y)) | 345 | : "%r" (x), "rI" (y)) |
346 | 346 | ||
347 | /* --- PowerPC ------------------------------------------------------------- */ | 347 | /* --- PowerPC ------------------------------------------------------------- */ |
348 | 348 | ||
@@ -355,11 +355,11 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
355 | # define MAD_F_MLX(hi, lo, x, y) \ | 355 | # define MAD_F_MLX(hi, lo, x, y) \ |
356 | do { \ | 356 | do { \ |
357 | asm ("mullw %0,%1,%2" \ | 357 | asm ("mullw %0,%1,%2" \ |
358 | : "=r" (lo) \ | 358 | : "=r" (lo) \ |
359 | : "%r" (x), "r" (y)); \ | 359 | : "%r" (x), "r" (y)); \ |
360 | asm ("mulhw %0,%1,%2" \ | 360 | asm ("mulhw %0,%1,%2" \ |
361 | : "=r" (hi) \ | 361 | : "=r" (hi) \ |
362 | : "%r" (x), "r" (y)); \ | 362 | : "%r" (x), "r" (y)); \ |
363 | } \ | 363 | } \ |
364 | while (0) | 364 | while (0) |
365 | 365 | ||
@@ -372,11 +372,11 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
372 | mad_fixed64lo_t __lo; \ | 372 | mad_fixed64lo_t __lo; \ |
373 | MAD_F_MLX(__hi, __lo, (x), (y)); \ | 373 | MAD_F_MLX(__hi, __lo, (x), (y)); \ |
374 | asm ("addc %0,%2,%3\n\t" \ | 374 | asm ("addc %0,%2,%3\n\t" \ |
375 | "adde %1,%4,%5" \ | 375 | "adde %1,%4,%5" \ |
376 | : "=r" (lo), "=r" (hi) \ | 376 | : "=r" (lo), "=r" (hi) \ |
377 | : "%r" (lo), "r" (__lo), \ | 377 | : "%r" (lo), "r" (__lo), \ |
378 | "%r" (hi), "r" (__hi) \ | 378 | "%r" (hi), "r" (__hi) \ |
379 | : "xer"); \ | 379 | : "xer"); \ |
380 | }) | 380 | }) |
381 | # endif | 381 | # endif |
382 | 382 | ||
@@ -387,28 +387,28 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
387 | # define mad_f_scale64(hi, lo) \ | 387 | # define mad_f_scale64(hi, lo) \ |
388 | ({ mad_fixed_t __result, __round; \ | 388 | ({ mad_fixed_t __result, __round; \ |
389 | asm ("rotrwi %0,%1,%2" \ | 389 | asm ("rotrwi %0,%1,%2" \ |
390 | : "=r" (__result) \ | 390 | : "=r" (__result) \ |
391 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ | 391 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ |
392 | asm ("extrwi %0,%1,1,0" \ | 392 | asm ("extrwi %0,%1,1,0" \ |
393 | : "=r" (__round) \ | 393 | : "=r" (__round) \ |
394 | : "r" (__result)); \ | 394 | : "r" (__result)); \ |
395 | asm ("insrwi %0,%1,%2,0" \ | 395 | asm ("insrwi %0,%1,%2,0" \ |
396 | : "+r" (__result) \ | 396 | : "+r" (__result) \ |
397 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ | 397 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ |
398 | asm ("add %0,%1,%2" \ | 398 | asm ("add %0,%1,%2" \ |
399 | : "=r" (__result) \ | 399 | : "=r" (__result) \ |
400 | : "%r" (__result), "r" (__round)); \ | 400 | : "%r" (__result), "r" (__round)); \ |
401 | __result; \ | 401 | __result; \ |
402 | }) | 402 | }) |
403 | # else | 403 | # else |
404 | # define mad_f_scale64(hi, lo) \ | 404 | # define mad_f_scale64(hi, lo) \ |
405 | ({ mad_fixed_t __result; \ | 405 | ({ mad_fixed_t __result; \ |
406 | asm ("rotrwi %0,%1,%2" \ | 406 | asm ("rotrwi %0,%1,%2" \ |
407 | : "=r" (__result) \ | 407 | : "=r" (__result) \ |
408 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ | 408 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ |
409 | asm ("insrwi %0,%1,%2,0" \ | 409 | asm ("insrwi %0,%1,%2,0" \ |
410 | : "+r" (__result) \ | 410 | : "+r" (__result) \ |
411 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ | 411 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ |
412 | __result; \ | 412 | __result; \ |
413 | }) | 413 | }) |
414 | # endif | 414 | # endif |
@@ -452,10 +452,10 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
452 | * Pre-rounding is required to stay within the limits of compliance. | 452 | * Pre-rounding is required to stay within the limits of compliance. |
453 | */ | 453 | */ |
454 | # if defined(OPT_SPEED) | 454 | # if defined(OPT_SPEED) |
455 | # define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) | 455 | # define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) |
456 | # else | 456 | # else |
457 | # define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ | 457 | # define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ |
458 | (((y) + (1L << 15)) >> 16)) | 458 | (((y) + (1L << 15)) >> 16)) |
459 | # endif | 459 | # endif |
460 | 460 | ||
461 | /* ------------------------------------------------------------------------- */ | 461 | /* ------------------------------------------------------------------------- */ |
@@ -476,22 +476,22 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
476 | # endif | 476 | # endif |
477 | 477 | ||
478 | # if !defined(MAD_F_MLA) | 478 | # if !defined(MAD_F_MLA) |
479 | # define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) | 479 | # define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) |
480 | # define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) | 480 | # define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) |
481 | # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) | 481 | # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) |
482 | # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) | 482 | # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) |
483 | # endif | 483 | # endif |
484 | 484 | ||
485 | # if !defined(MAD_F_ML0) | 485 | # if !defined(MAD_F_ML0) |
486 | # define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) | 486 | # define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) |
487 | # endif | 487 | # endif |
488 | 488 | ||
489 | # if !defined(MAD_F_MLN) | 489 | # if !defined(MAD_F_MLN) |
490 | # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) | 490 | # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) |
491 | # endif | 491 | # endif |
492 | 492 | ||
493 | # if !defined(MAD_F_MLZ) | 493 | # if !defined(MAD_F_MLZ) |
494 | # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) | 494 | # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) |
495 | # endif | 495 | # endif |
496 | 496 | ||
497 | # if !defined(mad_f_scale64) | 497 | # if !defined(mad_f_scale64) |
@@ -499,7 +499,7 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
499 | # define mad_f_scale64(hi, lo) \ | 499 | # define mad_f_scale64(hi, lo) \ |
500 | ((((mad_fixed_t) \ | 500 | ((((mad_fixed_t) \ |
501 | (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ | 501 | (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ |
502 | ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) | 502 | ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) |
503 | # else | 503 | # else |
504 | # define mad_f_scale64(hi, lo) \ | 504 | # define mad_f_scale64(hi, lo) \ |
505 | ((mad_fixed_t) \ | 505 | ((mad_fixed_t) \ |
diff --git a/apps/codecs/libmad/frame.c b/apps/codecs/libmad/frame.c index 3fb971d3e1..85c2a201f7 100644 --- a/apps/codecs/libmad/frame.c +++ b/apps/codecs/libmad/frame.c | |||
@@ -61,8 +61,8 @@ int (*const decoder_table[3])(struct mad_stream *, struct mad_frame *) = { | |||
61 | }; | 61 | }; |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * NAME: header->init() | 64 | * NAME: header->init() |
65 | * DESCRIPTION: initialize header struct | 65 | * DESCRIPTION: initialize header struct |
66 | */ | 66 | */ |
67 | void mad_header_init(struct mad_header *header) | 67 | void mad_header_init(struct mad_header *header) |
68 | { | 68 | { |
@@ -84,8 +84,8 @@ void mad_header_init(struct mad_header *header) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * NAME: frame->init() | 87 | * NAME: frame->init() |
88 | * DESCRIPTION: initialize frame struct | 88 | * DESCRIPTION: initialize frame struct |
89 | */ | 89 | */ |
90 | void mad_frame_init(struct mad_frame *frame) | 90 | void mad_frame_init(struct mad_frame *frame) |
91 | { | 91 | { |
@@ -98,8 +98,8 @@ void mad_frame_init(struct mad_frame *frame) | |||
98 | } | 98 | } |
99 | 99 | ||
100 | /* | 100 | /* |
101 | * NAME: frame->finish() | 101 | * NAME: frame->finish() |
102 | * DESCRIPTION: deallocate any dynamic memory associated with frame | 102 | * DESCRIPTION: deallocate any dynamic memory associated with frame |
103 | */ | 103 | */ |
104 | void mad_frame_finish(struct mad_frame *frame) | 104 | void mad_frame_finish(struct mad_frame *frame) |
105 | { | 105 | { |
@@ -112,8 +112,8 @@ void mad_frame_finish(struct mad_frame *frame) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | /* | 114 | /* |
115 | * NAME: decode_header() | 115 | * NAME: decode_header() |
116 | * DESCRIPTION: read header data and following CRC word | 116 | * DESCRIPTION: read header data and following CRC word |
117 | */ | 117 | */ |
118 | static | 118 | static |
119 | int decode_header(struct mad_header *header, struct mad_stream *stream) | 119 | int decode_header(struct mad_header *header, struct mad_stream *stream) |
@@ -231,8 +231,8 @@ int decode_header(struct mad_header *header, struct mad_stream *stream) | |||
231 | } | 231 | } |
232 | 232 | ||
233 | /* | 233 | /* |
234 | * NAME: free_bitrate() | 234 | * NAME: free_bitrate() |
235 | * DESCRIPTION: attempt to discover the bitstream's free bitrate | 235 | * DESCRIPTION: attempt to discover the bitstream's free bitrate |
236 | */ | 236 | */ |
237 | static | 237 | static |
238 | int free_bitrate(struct mad_stream *stream, struct mad_header const *header) | 238 | int free_bitrate(struct mad_stream *stream, struct mad_header const *header) |
@@ -246,7 +246,7 @@ int free_bitrate(struct mad_stream *stream, struct mad_header const *header) | |||
246 | 246 | ||
247 | pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0; | 247 | pad_slot = (header->flags & MAD_FLAG_PADDING) ? 1 : 0; |
248 | slots_per_frame = (header->layer == MAD_LAYER_III && | 248 | slots_per_frame = (header->layer == MAD_LAYER_III && |
249 | (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144; | 249 | (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144; |
250 | 250 | ||
251 | while (mad_stream_sync(stream) == 0) { | 251 | while (mad_stream_sync(stream) == 0) { |
252 | struct mad_stream peek_stream; | 252 | struct mad_stream peek_stream; |
@@ -256,8 +256,8 @@ int free_bitrate(struct mad_stream *stream, struct mad_header const *header) | |||
256 | peek_header = *header; | 256 | peek_header = *header; |
257 | 257 | ||
258 | if (decode_header(&peek_header, &peek_stream) == 0 && | 258 | if (decode_header(&peek_header, &peek_stream) == 0 && |
259 | peek_header.layer == header->layer && | 259 | peek_header.layer == header->layer && |
260 | peek_header.samplerate == header->samplerate) { | 260 | peek_header.samplerate == header->samplerate) { |
261 | unsigned int N; | 261 | unsigned int N; |
262 | 262 | ||
263 | ptr = mad_bit_nextbyte(&stream->ptr); | 263 | ptr = mad_bit_nextbyte(&stream->ptr); |
@@ -265,16 +265,16 @@ int free_bitrate(struct mad_stream *stream, struct mad_header const *header) | |||
265 | N = ptr - stream->this_frame; | 265 | N = ptr - stream->this_frame; |
266 | 266 | ||
267 | if (header->layer == MAD_LAYER_I) { | 267 | if (header->layer == MAD_LAYER_I) { |
268 | rate = (unsigned long) header->samplerate * | 268 | rate = (unsigned long) header->samplerate * |
269 | (N - 4 * pad_slot + 4) / 48 / 1000; | 269 | (N - 4 * pad_slot + 4) / 48 / 1000; |
270 | } | 270 | } |
271 | else { | 271 | else { |
272 | rate = (unsigned long) header->samplerate * | 272 | rate = (unsigned long) header->samplerate * |
273 | (N - pad_slot + 1) / slots_per_frame / 1000; | 273 | (N - pad_slot + 1) / slots_per_frame / 1000; |
274 | } | 274 | } |
275 | 275 | ||
276 | if (rate >= 8) | 276 | if (rate >= 8) |
277 | break; | 277 | break; |
278 | } | 278 | } |
279 | 279 | ||
280 | mad_bit_skip(&stream->ptr, 8); | 280 | mad_bit_skip(&stream->ptr, 8); |
@@ -293,8 +293,8 @@ int free_bitrate(struct mad_stream *stream, struct mad_header const *header) | |||
293 | } | 293 | } |
294 | 294 | ||
295 | /* | 295 | /* |
296 | * NAME: header->decode() | 296 | * NAME: header->decode() |
297 | * DESCRIPTION: read the next frame header from the stream | 297 | * DESCRIPTION: read the next frame header from the stream |
298 | */ | 298 | */ |
299 | int mad_header_decode(struct mad_header *header, struct mad_stream *stream) | 299 | int mad_header_decode(struct mad_header *header, struct mad_stream *stream) |
300 | { | 300 | { |
@@ -351,7 +351,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) | |||
351 | 351 | ||
352 | if (mad_stream_sync(stream) == -1) { | 352 | if (mad_stream_sync(stream) == -1) { |
353 | if (end - stream->next_frame >= MAD_BUFFER_GUARD) | 353 | if (end - stream->next_frame >= MAD_BUFFER_GUARD) |
354 | stream->next_frame = end - MAD_BUFFER_GUARD; | 354 | stream->next_frame = end - MAD_BUFFER_GUARD; |
355 | 355 | ||
356 | stream->error = MAD_ERROR_BUFLEN; | 356 | stream->error = MAD_ERROR_BUFLEN; |
357 | goto fail; | 357 | goto fail; |
@@ -371,13 +371,13 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) | |||
371 | 371 | ||
372 | /* calculate frame duration */ | 372 | /* calculate frame duration */ |
373 | mad_timer_set(&header->duration, 0, | 373 | mad_timer_set(&header->duration, 0, |
374 | 32 * MAD_NSBSAMPLES(header), header->samplerate); | 374 | 32 * MAD_NSBSAMPLES(header), header->samplerate); |
375 | 375 | ||
376 | /* calculate free bit rate */ | 376 | /* calculate free bit rate */ |
377 | if (header->bitrate == 0) { | 377 | if (header->bitrate == 0) { |
378 | if ((stream->freerate == 0 || !stream->sync || | 378 | if ((stream->freerate == 0 || !stream->sync || |
379 | (header->layer == MAD_LAYER_III && stream->freerate > 640000)) && | 379 | (header->layer == MAD_LAYER_III && stream->freerate > 640000)) && |
380 | free_bitrate(stream, header) == -1) | 380 | free_bitrate(stream, header) == -1) |
381 | goto fail; | 381 | goto fail; |
382 | 382 | ||
383 | header->bitrate = stream->freerate; | 383 | header->bitrate = stream->freerate; |
@@ -393,7 +393,7 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) | |||
393 | unsigned int slots_per_frame; | 393 | unsigned int slots_per_frame; |
394 | 394 | ||
395 | slots_per_frame = (header->layer == MAD_LAYER_III && | 395 | slots_per_frame = (header->layer == MAD_LAYER_III && |
396 | (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144; | 396 | (header->flags & MAD_FLAG_LSF_EXT)) ? 72 : 144; |
397 | 397 | ||
398 | N = (slots_per_frame * header->bitrate / header->samplerate) + pad_slot; | 398 | N = (slots_per_frame * header->bitrate / header->samplerate) + pad_slot; |
399 | } | 399 | } |
@@ -431,8 +431,8 @@ int mad_header_decode(struct mad_header *header, struct mad_stream *stream) | |||
431 | } | 431 | } |
432 | 432 | ||
433 | /* | 433 | /* |
434 | * NAME: frame->decode() | 434 | * NAME: frame->decode() |
435 | * DESCRIPTION: decode a single frame from a bitstream | 435 | * DESCRIPTION: decode a single frame from a bitstream |
436 | */ | 436 | */ |
437 | int mad_frame_decode(struct mad_frame *frame, struct mad_stream *stream) | 437 | int mad_frame_decode(struct mad_frame *frame, struct mad_stream *stream) |
438 | { | 438 | { |
@@ -479,8 +479,8 @@ int mad_frame_decode(struct mad_frame *frame, struct mad_stream *stream) | |||
479 | } | 479 | } |
480 | 480 | ||
481 | /* | 481 | /* |
482 | * NAME: frame->mute() | 482 | * NAME: frame->mute() |
483 | * DESCRIPTION: zero all subband values so the frame becomes silent | 483 | * DESCRIPTION: zero all subband values so the frame becomes silent |
484 | */ | 484 | */ |
485 | void mad_frame_mute(struct mad_frame *frame) | 485 | void mad_frame_mute(struct mad_frame *frame) |
486 | { | 486 | { |
@@ -496,8 +496,8 @@ void mad_frame_mute(struct mad_frame *frame) | |||
496 | if (frame->overlap) { | 496 | if (frame->overlap) { |
497 | for (s = 0; s < 18; ++s) { | 497 | for (s = 0; s < 18; ++s) { |
498 | for (sb = 0; sb < 32; ++sb) { | 498 | for (sb = 0; sb < 32; ++sb) { |
499 | (*frame->overlap)[0][sb][s] = | 499 | (*frame->overlap)[0][sb][s] = |
500 | (*frame->overlap)[1][sb][s] = 0; | 500 | (*frame->overlap)[1][sb][s] = 0; |
501 | } | 501 | } |
502 | } | 502 | } |
503 | } | 503 | } |
diff --git a/apps/codecs/libmad/frame.h b/apps/codecs/libmad/frame.h index d2d6dca3ef..4d23107d76 100644 --- a/apps/codecs/libmad/frame.h +++ b/apps/codecs/libmad/frame.h | |||
@@ -27,41 +27,41 @@ | |||
27 | # include "stream.h" | 27 | # include "stream.h" |
28 | 28 | ||
29 | enum mad_layer { | 29 | enum mad_layer { |
30 | MAD_LAYER_I = 1, /* Layer I */ | 30 | MAD_LAYER_I = 1, /* Layer I */ |
31 | MAD_LAYER_II = 2, /* Layer II */ | 31 | MAD_LAYER_II = 2, /* Layer II */ |
32 | MAD_LAYER_III = 3 /* Layer III */ | 32 | MAD_LAYER_III = 3 /* Layer III */ |
33 | }; | 33 | }; |
34 | 34 | ||
35 | enum mad_mode { | 35 | enum mad_mode { |
36 | MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ | 36 | MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ |
37 | MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ | 37 | MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ |
38 | MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ | 38 | MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ |
39 | MAD_MODE_STEREO = 3 /* normal LR stereo */ | 39 | MAD_MODE_STEREO = 3 /* normal LR stereo */ |
40 | }; | 40 | }; |
41 | 41 | ||
42 | enum mad_emphasis { | 42 | enum mad_emphasis { |
43 | MAD_EMPHASIS_NONE = 0, /* no emphasis */ | 43 | MAD_EMPHASIS_NONE = 0, /* no emphasis */ |
44 | MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ | 44 | MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ |
45 | MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ | 45 | MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ |
46 | MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ | 46 | MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ |
47 | }; | 47 | }; |
48 | 48 | ||
49 | struct mad_header { | 49 | struct mad_header { |
50 | enum mad_layer layer; /* audio layer (1, 2, or 3) */ | 50 | enum mad_layer layer; /* audio layer (1, 2, or 3) */ |
51 | enum mad_mode mode; /* channel mode (see above) */ | 51 | enum mad_mode mode; /* channel mode (see above) */ |
52 | int mode_extension; /* additional mode info */ | 52 | int mode_extension; /* additional mode info */ |
53 | enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ | 53 | enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ |
54 | 54 | ||
55 | unsigned long bitrate; /* stream bitrate (bps) */ | 55 | unsigned long bitrate; /* stream bitrate (bps) */ |
56 | unsigned int samplerate; /* sampling frequency (Hz) */ | 56 | unsigned int samplerate; /* sampling frequency (Hz) */ |
57 | 57 | ||
58 | unsigned short crc_check; /* frame CRC accumulator */ | 58 | unsigned short crc_check; /* frame CRC accumulator */ |
59 | unsigned short crc_target; /* final target CRC checksum */ | 59 | unsigned short crc_target; /* final target CRC checksum */ |
60 | 60 | ||
61 | int flags; /* flags (see below) */ | 61 | int flags; /* flags (see below) */ |
62 | int private_bits; /* private bits (see below) */ | 62 | int private_bits; /* private bits (see below) */ |
63 | 63 | ||
64 | mad_timer_t duration; /* audio playing time of frame */ | 64 | mad_timer_t duration; /* audio playing time of frame */ |
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct mad_frame { | 67 | struct mad_frame { |
@@ -76,33 +76,33 @@ struct mad_frame { | |||
76 | mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ | 76 | mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ |
77 | }; | 77 | }; |
78 | 78 | ||
79 | # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) | 79 | # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) |
80 | # define MAD_NSBSAMPLES(header) \ | 80 | # define MAD_NSBSAMPLES(header) \ |
81 | ((header)->layer == MAD_LAYER_I ? 12 : \ | 81 | ((header)->layer == MAD_LAYER_I ? 12 : \ |
82 | (((header)->layer == MAD_LAYER_III && \ | 82 | (((header)->layer == MAD_LAYER_III && \ |
83 | ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) | 83 | ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) |
84 | 84 | ||
85 | enum { | 85 | enum { |
86 | MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ | 86 | MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ |
87 | MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ | 87 | MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ |
88 | 88 | ||
89 | MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ | 89 | MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ |
90 | MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ | 90 | MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ |
91 | MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ | 91 | MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ |
92 | MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ | 92 | MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ |
93 | 93 | ||
94 | MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ | 94 | MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ |
95 | MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ | 95 | MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ |
96 | MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ | 96 | MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ |
97 | 97 | ||
98 | MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ | 98 | MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ |
99 | MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ | 99 | MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ |
100 | MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ | 100 | MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ |
101 | }; | 101 | }; |
102 | 102 | ||
103 | enum { | 103 | enum { |
104 | MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ | 104 | MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ |
105 | MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ | 105 | MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ |
106 | }; | 106 | }; |
107 | 107 | ||
108 | void mad_header_init(struct mad_header *); | 108 | void mad_header_init(struct mad_header *); |
diff --git a/apps/codecs/libmad/global.h b/apps/codecs/libmad/global.h index 22e8546fa6..96bd3eb71e 100644 --- a/apps/codecs/libmad/global.h +++ b/apps/codecs/libmad/global.h | |||
@@ -64,9 +64,9 @@ | |||
64 | 64 | ||
65 | # if !defined(HAVE_ASSERT_H) | 65 | # if !defined(HAVE_ASSERT_H) |
66 | # if defined(NDEBUG) | 66 | # if defined(NDEBUG) |
67 | # define assert(x) /* nothing */ | 67 | # define assert(x) /* nothing */ |
68 | # else | 68 | # else |
69 | # define assert(x) do { if (!(x)) abort(); } while (0) | 69 | # define assert(x) do { if (!(x)) abort(); } while (0) |
70 | # endif | 70 | # endif |
71 | # endif | 71 | # endif |
72 | 72 | ||
diff --git a/apps/codecs/libmad/huffman.c b/apps/codecs/libmad/huffman.c index 43216d3680..db788e71b4 100644 --- a/apps/codecs/libmad/huffman.c +++ b/apps/codecs/libmad/huffman.c | |||
@@ -36,15 +36,15 @@ | |||
36 | 36 | ||
37 | # if defined(__GNUC__) || \ | 37 | # if defined(__GNUC__) || \ |
38 | (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) | 38 | (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) |
39 | # define PTR(offs, bits) { .ptr = { 0, bits, offs } } | 39 | # define PTR(offs, bits) { .ptr = { 0, bits, offs } } |
40 | # define V(v, w, x, y, hlen) { .value = { 1, hlen, v, w, x, y } } | 40 | # define V(v, w, x, y, hlen) { .value = { 1, hlen, v, w, x, y } } |
41 | # else | 41 | # else |
42 | # define PTR(offs, bits) { { 0, bits, offs } } | 42 | # define PTR(offs, bits) { { 0, bits, offs } } |
43 | # if defined(WORDS_BIGENDIAN) | 43 | # if defined(WORDS_BIGENDIAN) |
44 | # define V(v, w, x, y, hlen) { { 1, hlen, (v << 11) | (w << 10) | \ | 44 | # define V(v, w, x, y, hlen) { { 1, hlen, (v << 11) | (w << 10) | \ |
45 | (x << 9) | (y << 8) } } | 45 | (x << 9) | (y << 8) } } |
46 | # else | 46 | # else |
47 | # define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \ | 47 | # define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \ |
48 | (x << 2) | (y << 3) } } | 48 | (x << 2) | (y << 3) } } |
49 | # endif | 49 | # endif |
50 | # endif | 50 | # endif |
@@ -69,23 +69,23 @@ union huffquad const hufftabA[] ICONST_ATTR_MPA_HUFFMAN = { | |||
69 | /* 1111 */ V(0, 0, 0, 0, 1), | 69 | /* 1111 */ V(0, 0, 0, 0, 1), |
70 | 70 | ||
71 | /* 0000 ... */ | 71 | /* 0000 ... */ |
72 | /* 00 */ V(1, 0, 1, 1, 2), /* 16 */ | 72 | /* 00 */ V(1, 0, 1, 1, 2), /* 16 */ |
73 | /* 01 */ V(1, 1, 1, 1, 2), | 73 | /* 01 */ V(1, 1, 1, 1, 2), |
74 | /* 10 */ V(1, 1, 0, 1, 2), | 74 | /* 10 */ V(1, 1, 0, 1, 2), |
75 | /* 11 */ V(1, 1, 1, 0, 2), | 75 | /* 11 */ V(1, 1, 1, 0, 2), |
76 | 76 | ||
77 | /* 0001 ... */ | 77 | /* 0001 ... */ |
78 | /* 00 */ V(0, 1, 1, 1, 2), /* 20 */ | 78 | /* 00 */ V(0, 1, 1, 1, 2), /* 20 */ |
79 | /* 01 */ V(0, 1, 0, 1, 2), | 79 | /* 01 */ V(0, 1, 0, 1, 2), |
80 | /* 10 */ V(1, 0, 0, 1, 1), | 80 | /* 10 */ V(1, 0, 0, 1, 1), |
81 | /* 11 */ V(1, 0, 0, 1, 1), | 81 | /* 11 */ V(1, 0, 0, 1, 1), |
82 | 82 | ||
83 | /* 0010 ... */ | 83 | /* 0010 ... */ |
84 | /* 0 */ V(0, 1, 1, 0, 1), /* 24 */ | 84 | /* 0 */ V(0, 1, 1, 0, 1), /* 24 */ |
85 | /* 1 */ V(0, 0, 1, 1, 1), | 85 | /* 1 */ V(0, 0, 1, 1, 1), |
86 | 86 | ||
87 | /* 0011 ... */ | 87 | /* 0011 ... */ |
88 | /* 0 */ V(1, 0, 1, 0, 1), /* 26 */ | 88 | /* 0 */ V(1, 0, 1, 0, 1), /* 26 */ |
89 | /* 1 */ V(1, 1, 0, 0, 1) | 89 | /* 1 */ V(1, 1, 0, 0, 1) |
90 | }; | 90 | }; |
91 | 91 | ||
@@ -114,14 +114,14 @@ union huffquad const hufftabB[] ICONST_ATTR_MPA_HUFFMAN = { | |||
114 | 114 | ||
115 | # if defined(__GNUC__) || \ | 115 | # if defined(__GNUC__) || \ |
116 | (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) | 116 | (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) |
117 | # define PTR(offs, bits) { .ptr = { 0, bits, offs } } | 117 | # define PTR(offs, bits) { .ptr = { 0, bits, offs } } |
118 | # define V(x, y, hlen) { .value = { 1, hlen, x, y } } | 118 | # define V(x, y, hlen) { .value = { 1, hlen, x, y } } |
119 | # else | 119 | # else |
120 | # define PTR(offs, bits) { { 0, bits, offs } } | 120 | # define PTR(offs, bits) { { 0, bits, offs } } |
121 | # if defined(WORDS_BIGENDIAN) | 121 | # if defined(WORDS_BIGENDIAN) |
122 | # define V(x, y, hlen) { { 1, hlen, (x << 8) | (y << 4) } } | 122 | # define V(x, y, hlen) { { 1, hlen, (x << 8) | (y << 4) } } |
123 | # else | 123 | # else |
124 | # define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } } | 124 | # define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } } |
125 | # endif | 125 | # endif |
126 | # endif | 126 | # endif |
127 | 127 | ||
@@ -154,7 +154,7 @@ union huffpair const hufftab2[] ICONST_ATTR_MPA_HUFFMAN = { | |||
154 | /* 111 */ V(0, 0, 1), | 154 | /* 111 */ V(0, 0, 1), |
155 | 155 | ||
156 | /* 000 ... */ | 156 | /* 000 ... */ |
157 | /* 000 */ V(2, 2, 3), /* 8 */ | 157 | /* 000 */ V(2, 2, 3), /* 8 */ |
158 | /* 001 */ V(0, 2, 3), | 158 | /* 001 */ V(0, 2, 3), |
159 | /* 010 */ V(1, 2, 2), | 159 | /* 010 */ V(1, 2, 2), |
160 | /* 011 */ V(1, 2, 2), | 160 | /* 011 */ V(1, 2, 2), |
@@ -176,7 +176,7 @@ union huffpair const hufftab3[] ICONST_ATTR_MPA_HUFFMAN = { | |||
176 | /* 111 */ V(0, 0, 2), | 176 | /* 111 */ V(0, 0, 2), |
177 | 177 | ||
178 | /* 000 ... */ | 178 | /* 000 ... */ |
179 | /* 000 */ V(2, 2, 3), /* 8 */ | 179 | /* 000 */ V(2, 2, 3), /* 8 */ |
180 | /* 001 */ V(0, 2, 3), | 180 | /* 001 */ V(0, 2, 3), |
181 | /* 010 */ V(1, 2, 2), | 181 | /* 010 */ V(1, 2, 2), |
182 | /* 011 */ V(1, 2, 2), | 182 | /* 011 */ V(1, 2, 2), |
@@ -198,7 +198,7 @@ union huffpair const hufftab5[] ICONST_ATTR_MPA_HUFFMAN = { | |||
198 | /* 111 */ V(0, 0, 1), | 198 | /* 111 */ V(0, 0, 1), |
199 | 199 | ||
200 | /* 000 ... */ | 200 | /* 000 ... */ |
201 | /* 0000 */ PTR(24, 1), /* 8 */ | 201 | /* 0000 */ PTR(24, 1), /* 8 */ |
202 | /* 0001 */ V(3, 2, 4), | 202 | /* 0001 */ V(3, 2, 4), |
203 | /* 0010 */ V(3, 1, 3), | 203 | /* 0010 */ V(3, 1, 3), |
204 | /* 0011 */ V(3, 1, 3), | 204 | /* 0011 */ V(3, 1, 3), |
@@ -216,7 +216,7 @@ union huffpair const hufftab5[] ICONST_ATTR_MPA_HUFFMAN = { | |||
216 | /* 1111 */ V(2, 0, 3), | 216 | /* 1111 */ V(2, 0, 3), |
217 | 217 | ||
218 | /* 000 0000 ... */ | 218 | /* 000 0000 ... */ |
219 | /* 0 */ V(3, 3, 1), /* 24 */ | 219 | /* 0 */ V(3, 3, 1), /* 24 */ |
220 | /* 1 */ V(2, 3, 1) | 220 | /* 1 */ V(2, 3, 1) |
221 | }; | 221 | }; |
222 | 222 | ||
@@ -240,7 +240,7 @@ union huffpair const hufftab6[] ICONST_ATTR_MPA_HUFFMAN = { | |||
240 | /* 1111 */ V(0, 0, 3), | 240 | /* 1111 */ V(0, 0, 3), |
241 | 241 | ||
242 | /* 0000 ... */ | 242 | /* 0000 ... */ |
243 | /* 000 */ V(3, 3, 3), /* 16 */ | 243 | /* 000 */ V(3, 3, 3), /* 16 */ |
244 | /* 001 */ V(0, 3, 3), | 244 | /* 001 */ V(0, 3, 3), |
245 | /* 010 */ V(2, 3, 2), | 245 | /* 010 */ V(2, 3, 2), |
246 | /* 011 */ V(2, 3, 2), | 246 | /* 011 */ V(2, 3, 2), |
@@ -250,11 +250,11 @@ union huffpair const hufftab6[] ICONST_ATTR_MPA_HUFFMAN = { | |||
250 | /* 111 */ V(3, 0, 2), | 250 | /* 111 */ V(3, 0, 2), |
251 | 251 | ||
252 | /* 0001 ... */ | 252 | /* 0001 ... */ |
253 | /* 0 */ V(1, 3, 1), /* 24 */ | 253 | /* 0 */ V(1, 3, 1), /* 24 */ |
254 | /* 1 */ V(3, 1, 1), | 254 | /* 1 */ V(3, 1, 1), |
255 | 255 | ||
256 | /* 0010 ... */ | 256 | /* 0010 ... */ |
257 | /* 0 */ V(2, 2, 1), /* 26 */ | 257 | /* 0 */ V(2, 2, 1), /* 26 */ |
258 | /* 1 */ V(0, 2, 1) | 258 | /* 1 */ V(0, 2, 1) |
259 | }; | 259 | }; |
260 | 260 | ||
@@ -278,7 +278,7 @@ union huffpair const hufftab7[] ICONST_ATTR_MPA_HUFFMAN = { | |||
278 | /* 1111 */ V(0, 0, 1), | 278 | /* 1111 */ V(0, 0, 1), |
279 | 279 | ||
280 | /* 0000 ... */ | 280 | /* 0000 ... */ |
281 | /* 0000 */ PTR(52, 2), /* 16 */ | 281 | /* 0000 */ PTR(52, 2), /* 16 */ |
282 | /* 0001 */ PTR(56, 1), | 282 | /* 0001 */ PTR(56, 1), |
283 | /* 0010 */ PTR(58, 1), | 283 | /* 0010 */ PTR(58, 1), |
284 | /* 0011 */ V(1, 5, 4), | 284 | /* 0011 */ V(1, 5, 4), |
@@ -296,7 +296,7 @@ union huffpair const hufftab7[] ICONST_ATTR_MPA_HUFFMAN = { | |||
296 | /* 1111 */ V(4, 0, 3), | 296 | /* 1111 */ V(4, 0, 3), |
297 | 297 | ||
298 | /* 0001 ... */ | 298 | /* 0001 ... */ |
299 | /* 0000 */ V(0, 4, 4), /* 32 */ | 299 | /* 0000 */ V(0, 4, 4), /* 32 */ |
300 | /* 0001 */ V(2, 3, 4), | 300 | /* 0001 */ V(2, 3, 4), |
301 | /* 0010 */ V(3, 2, 4), | 301 | /* 0010 */ V(3, 2, 4), |
302 | /* 0011 */ V(0, 3, 4), | 302 | /* 0011 */ V(0, 3, 4), |
@@ -314,31 +314,31 @@ union huffpair const hufftab7[] ICONST_ATTR_MPA_HUFFMAN = { | |||
314 | /* 1111 */ V(1, 2, 2), | 314 | /* 1111 */ V(1, 2, 2), |
315 | 315 | ||
316 | /* 0010 ... */ | 316 | /* 0010 ... */ |
317 | /* 00 */ V(2, 1, 1), /* 48 */ | 317 | /* 00 */ V(2, 1, 1), /* 48 */ |
318 | /* 01 */ V(2, 1, 1), | 318 | /* 01 */ V(2, 1, 1), |
319 | /* 10 */ V(0, 2, 2), | 319 | /* 10 */ V(0, 2, 2), |
320 | /* 11 */ V(2, 0, 2), | 320 | /* 11 */ V(2, 0, 2), |
321 | 321 | ||
322 | /* 0000 0000 ... */ | 322 | /* 0000 0000 ... */ |
323 | /* 00 */ V(5, 5, 2), /* 52 */ | 323 | /* 00 */ V(5, 5, 2), /* 52 */ |
324 | /* 01 */ V(4, 5, 2), | 324 | /* 01 */ V(4, 5, 2), |
325 | /* 10 */ V(5, 4, 2), | 325 | /* 10 */ V(5, 4, 2), |
326 | /* 11 */ V(5, 3, 2), | 326 | /* 11 */ V(5, 3, 2), |
327 | 327 | ||
328 | /* 0000 0001 ... */ | 328 | /* 0000 0001 ... */ |
329 | /* 0 */ V(3, 5, 1), /* 56 */ | 329 | /* 0 */ V(3, 5, 1), /* 56 */ |
330 | /* 1 */ V(4, 4, 1), | 330 | /* 1 */ V(4, 4, 1), |
331 | 331 | ||
332 | /* 0000 0010 ... */ | 332 | /* 0000 0010 ... */ |
333 | /* 0 */ V(2, 5, 1), /* 58 */ | 333 | /* 0 */ V(2, 5, 1), /* 58 */ |
334 | /* 1 */ V(5, 2, 1), | 334 | /* 1 */ V(5, 2, 1), |
335 | 335 | ||
336 | /* 0000 0101 ... */ | 336 | /* 0000 0101 ... */ |
337 | /* 0 */ V(0, 5, 1), /* 60 */ | 337 | /* 0 */ V(0, 5, 1), /* 60 */ |
338 | /* 1 */ V(3, 4, 1), | 338 | /* 1 */ V(3, 4, 1), |
339 | 339 | ||
340 | /* 0000 0111 ... */ | 340 | /* 0000 0111 ... */ |
341 | /* 0 */ V(4, 3, 1), /* 62 */ | 341 | /* 0 */ V(4, 3, 1), /* 62 */ |
342 | /* 1 */ V(3, 3, 1) | 342 | /* 1 */ V(3, 3, 1) |
343 | }; | 343 | }; |
344 | 344 | ||
@@ -365,7 +365,7 @@ union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { | |||
365 | /* 1111 */ V(0, 0, 2), | 365 | /* 1111 */ V(0, 0, 2), |
366 | 366 | ||
367 | /* 0000 ... */ | 367 | /* 0000 ... */ |
368 | /* 0000 */ PTR(36, 3), /* 16 */ | 368 | /* 0000 */ PTR(36, 3), /* 16 */ |
369 | /* 0001 */ PTR(44, 2), | 369 | /* 0001 */ PTR(44, 2), |
370 | /* 0010 */ PTR(48, 1), | 370 | /* 0010 */ PTR(48, 1), |
371 | /* 0011 */ V(1, 5, 4), | 371 | /* 0011 */ V(1, 5, 4), |
@@ -383,13 +383,13 @@ union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { | |||
383 | /* 1111 */ V(3, 2, 4), | 383 | /* 1111 */ V(3, 2, 4), |
384 | 384 | ||
385 | /* 0001 ... */ | 385 | /* 0001 ... */ |
386 | /* 00 */ PTR(54, 2), /* 32 */ | 386 | /* 00 */ PTR(54, 2), /* 32 */ |
387 | /* 01 */ V(2, 2, 2), | 387 | /* 01 */ V(2, 2, 2), |
388 | /* 10 */ V(0, 2, 2), | 388 | /* 10 */ V(0, 2, 2), |
389 | /* 11 */ V(2, 0, 2), | 389 | /* 11 */ V(2, 0, 2), |
390 | 390 | ||
391 | /* 0000 0000 ... */ | 391 | /* 0000 0000 ... */ |
392 | /* 000 */ V(5, 5, 3), /* 36 */ | 392 | /* 000 */ V(5, 5, 3), /* 36 */ |
393 | /* 001 */ V(5, 4, 3), | 393 | /* 001 */ V(5, 4, 3), |
394 | /* 010 */ V(4, 5, 2), | 394 | /* 010 */ V(4, 5, 2), |
395 | /* 011 */ V(4, 5, 2), | 395 | /* 011 */ V(4, 5, 2), |
@@ -399,25 +399,25 @@ union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { | |||
399 | /* 111 */ V(5, 3, 1), | 399 | /* 111 */ V(5, 3, 1), |
400 | 400 | ||
401 | /* 0000 0001 ... */ | 401 | /* 0000 0001 ... */ |
402 | /* 00 */ V(3, 5, 2), /* 44 */ | 402 | /* 00 */ V(3, 5, 2), /* 44 */ |
403 | /* 01 */ V(4, 4, 2), | 403 | /* 01 */ V(4, 4, 2), |
404 | /* 10 */ V(2, 5, 1), | 404 | /* 10 */ V(2, 5, 1), |
405 | /* 11 */ V(2, 5, 1), | 405 | /* 11 */ V(2, 5, 1), |
406 | 406 | ||
407 | /* 0000 0010 ... */ | 407 | /* 0000 0010 ... */ |
408 | /* 0 */ V(5, 2, 1), /* 48 */ | 408 | /* 0 */ V(5, 2, 1), /* 48 */ |
409 | /* 1 */ V(0, 5, 1), | 409 | /* 1 */ V(0, 5, 1), |
410 | 410 | ||
411 | /* 0000 0101 ... */ | 411 | /* 0000 0101 ... */ |
412 | /* 0 */ V(3, 4, 1), /* 50 */ | 412 | /* 0 */ V(3, 4, 1), /* 50 */ |
413 | /* 1 */ V(4, 3, 1), | 413 | /* 1 */ V(4, 3, 1), |
414 | 414 | ||
415 | /* 0000 0110 ... */ | 415 | /* 0000 0110 ... */ |
416 | /* 0 */ V(5, 0, 1), /* 52 */ | 416 | /* 0 */ V(5, 0, 1), /* 52 */ |
417 | /* 1 */ V(3, 3, 1), | 417 | /* 1 */ V(3, 3, 1), |
418 | 418 | ||
419 | /* 0001 00 ... */ | 419 | /* 0001 00 ... */ |
420 | /* 00 */ V(1, 3, 2), /* 54 */ | 420 | /* 00 */ V(1, 3, 2), /* 54 */ |
421 | /* 01 */ V(3, 1, 2), | 421 | /* 01 */ V(3, 1, 2), |
422 | /* 10 */ V(0, 3, 2), | 422 | /* 10 */ V(0, 3, 2), |
423 | /* 11 */ V(3, 0, 2), | 423 | /* 11 */ V(3, 0, 2), |
@@ -443,7 +443,7 @@ union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { | |||
443 | /* 1111 */ V(0, 0, 2), | 443 | /* 1111 */ V(0, 0, 2), |
444 | 444 | ||
445 | /* 0000 ... */ | 445 | /* 0000 ... */ |
446 | /* 0000 */ PTR(48, 3), /* 16 */ | 446 | /* 0000 */ PTR(48, 3), /* 16 */ |
447 | /* 0001 */ PTR(56, 2), | 447 | /* 0001 */ PTR(56, 2), |
448 | /* 0010 */ PTR(60, 1), | 448 | /* 0010 */ PTR(60, 1), |
449 | /* 0011 */ V(1, 5, 4), | 449 | /* 0011 */ V(1, 5, 4), |
@@ -461,7 +461,7 @@ union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { | |||
461 | /* 1111 */ V(3, 2, 4), | 461 | /* 1111 */ V(3, 2, 4), |
462 | 462 | ||
463 | /* 0001 ... */ | 463 | /* 0001 ... */ |
464 | /* 0000 */ V(1, 3, 4), /* 32 */ | 464 | /* 0000 */ V(1, 3, 4), /* 32 */ |
465 | /* 0001 */ V(3, 1, 4), | 465 | /* 0001 */ V(3, 1, 4), |
466 | /* 0010 */ V(0, 3, 4), | 466 | /* 0010 */ V(0, 3, 4), |
467 | /* 0011 */ V(3, 0, 4), | 467 | /* 0011 */ V(3, 0, 4), |
@@ -479,7 +479,7 @@ union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { | |||
479 | /* 1111 */ V(2, 0, 2), | 479 | /* 1111 */ V(2, 0, 2), |
480 | 480 | ||
481 | /* 0000 0000 ... */ | 481 | /* 0000 0000 ... */ |
482 | /* 000 */ V(5, 5, 3), /* 48 */ | 482 | /* 000 */ V(5, 5, 3), /* 48 */ |
483 | /* 001 */ V(5, 4, 3), | 483 | /* 001 */ V(5, 4, 3), |
484 | /* 010 */ V(4, 5, 2), | 484 | /* 010 */ V(4, 5, 2), |
485 | /* 011 */ V(4, 5, 2), | 485 | /* 011 */ V(4, 5, 2), |
@@ -489,21 +489,21 @@ union huffpair const hufftab8[] ICONST_ATTR_MPA_HUFFMAN = { | |||
489 | /* 111 */ V(5, 3, 1), | 489 | /* 111 */ V(5, 3, 1), |
490 | 490 | ||
491 | /* 0000 0001 ... */ | 491 | /* 0000 0001 ... */ |
492 | /* 00 */ V(3, 5, 2), /* 56 */ | 492 | /* 00 */ V(3, 5, 2), /* 56 */ |
493 | /* 01 */ V(4, 4, 2), | 493 | /* 01 */ V(4, 4, 2), |
494 | /* 10 */ V(2, 5, 1), | 494 | /* 10 */ V(2, 5, 1), |
495 | /* 11 */ V(2, 5, 1), | 495 | /* 11 */ V(2, 5, 1), |
496 | 496 | ||
497 | /* 0000 0010 ... */ | 497 | /* 0000 0010 ... */ |
498 | /* 0 */ V(5, 2, 1), /* 60 */ | 498 | /* 0 */ V(5, 2, 1), /* 60 */ |
499 | /* 1 */ V(0, 5, 1), | 499 | /* 1 */ V(0, 5, 1), |
500 | 500 | ||
501 | /* 0000 0101 ... */ | 501 | /* 0000 0101 ... */ |
502 | /* 0 */ V(3, 4, 1), /* 62 */ | 502 | /* 0 */ V(3, 4, 1), /* 62 */ |
503 | /* 1 */ V(4, 3, 1), | 503 | /* 1 */ V(4, 3, 1), |
504 | 504 | ||
505 | /* 0000 0110 ... */ | 505 | /* 0000 0110 ... */ |
506 | /* 0 */ V(5, 0, 1), /* 64 */ | 506 | /* 0 */ V(5, 0, 1), /* 64 */ |
507 | /* 1 */ V(3, 3, 1) | 507 | /* 1 */ V(3, 3, 1) |
508 | }; | 508 | }; |
509 | # endif | 509 | # endif |
@@ -528,7 +528,7 @@ union huffpair const hufftab9[] ICONST_ATTR_MPA_HUFFMAN = { | |||
528 | /* 1111 */ V(0, 0, 3), | 528 | /* 1111 */ V(0, 0, 3), |
529 | 529 | ||
530 | /* 0000 ... */ | 530 | /* 0000 ... */ |
531 | /* 0000 */ PTR(50, 1), /* 16 */ | 531 | /* 0000 */ PTR(50, 1), /* 16 */ |
532 | /* 0001 */ V(3, 5, 4), | 532 | /* 0001 */ V(3, 5, 4), |
533 | /* 0010 */ V(5, 3, 4), | 533 | /* 0010 */ V(5, 3, 4), |
534 | /* 0011 */ PTR(52, 1), | 534 | /* 0011 */ PTR(52, 1), |
@@ -546,7 +546,7 @@ union huffpair const hufftab9[] ICONST_ATTR_MPA_HUFFMAN = { | |||
546 | /* 1111 */ V(0, 4, 4), | 546 | /* 1111 */ V(0, 4, 4), |
547 | 547 | ||
548 | /* 0001 ... */ | 548 | /* 0001 ... */ |
549 | /* 000 */ V(2, 4, 3), /* 32 */ | 549 | /* 000 */ V(2, 4, 3), /* 32 */ |
550 | /* 001 */ V(4, 2, 3), | 550 | /* 001 */ V(4, 2, 3), |
551 | /* 010 */ V(3, 3, 3), | 551 | /* 010 */ V(3, 3, 3), |
552 | /* 011 */ V(4, 0, 3), | 552 | /* 011 */ V(4, 0, 3), |
@@ -556,27 +556,27 @@ union huffpair const hufftab9[] ICONST_ATTR_MPA_HUFFMAN = { | |||
556 | /* 111 */ V(4, 1, 2), | 556 | /* 111 */ V(4, 1, 2), |
557 | 557 | ||
558 | /* 0010 ... */ | 558 | /* 0010 ... */ |
559 | /* 00 */ V(2, 3, 2), /* 40 */ | 559 | /* 00 */ V(2, 3, 2), /* 40 */ |
560 | /* 01 */ V(3, 2, 2), | 560 | /* 01 */ V(3, 2, 2), |
561 | /* 10 */ V(1, 3, 1), | 561 | /* 10 */ V(1, 3, 1), |
562 | /* 11 */ V(1, 3, 1), | 562 | /* 11 */ V(1, 3, 1), |
563 | 563 | ||
564 | /* 0011 ... */ | 564 | /* 0011 ... */ |
565 | /* 00 */ V(3, 1, 1), /* 44 */ | 565 | /* 00 */ V(3, 1, 1), /* 44 */ |
566 | /* 01 */ V(3, 1, 1), | 566 | /* 01 */ V(3, 1, 1), |
567 | /* 10 */ V(0, 3, 2), | 567 | /* 10 */ V(0, 3, 2), |
568 | /* 11 */ V(3, 0, 2), | 568 | /* 11 */ V(3, 0, 2), |
569 | 569 | ||
570 | /* 0100 ... */ | 570 | /* 0100 ... */ |
571 | /* 0 */ V(2, 2, 1), /* 48 */ | 571 | /* 0 */ V(2, 2, 1), /* 48 */ |
572 | /* 1 */ V(0, 2, 1), | 572 | /* 1 */ V(0, 2, 1), |
573 | 573 | ||
574 | /* 0000 0000 ... */ | 574 | /* 0000 0000 ... */ |
575 | /* 0 */ V(5, 5, 1), /* 50 */ | 575 | /* 0 */ V(5, 5, 1), /* 50 */ |
576 | /* 1 */ V(4, 5, 1), | 576 | /* 1 */ V(4, 5, 1), |
577 | 577 | ||
578 | /* 0000 0011 ... */ | 578 | /* 0000 0011 ... */ |
579 | /* 0 */ V(5, 4, 1), /* 52 */ | 579 | /* 0 */ V(5, 4, 1), /* 52 */ |
580 | /* 1 */ V(0, 5, 1) | 580 | /* 1 */ V(0, 5, 1) |
581 | }; | 581 | }; |
582 | 582 | ||
@@ -600,7 +600,7 @@ union huffpair const hufftab10[] ICONST_ATTR_MPA_HUFFMAN = { | |||
600 | /* 1111 */ V(0, 0, 1), | 600 | /* 1111 */ V(0, 0, 1), |
601 | 601 | ||
602 | /* 0000 ... */ | 602 | /* 0000 ... */ |
603 | /* 0000 */ PTR(52, 3), /* 16 */ | 603 | /* 0000 */ PTR(52, 3), /* 16 */ |
604 | /* 0001 */ PTR(60, 2), | 604 | /* 0001 */ PTR(60, 2), |
605 | /* 0010 */ PTR(64, 3), | 605 | /* 0010 */ PTR(64, 3), |
606 | /* 0011 */ PTR(72, 1), | 606 | /* 0011 */ PTR(72, 1), |
@@ -618,7 +618,7 @@ union huffpair const hufftab10[] ICONST_ATTR_MPA_HUFFMAN = { | |||
618 | /* 1111 */ PTR(96, 1), | 618 | /* 1111 */ PTR(96, 1), |
619 | 619 | ||
620 | /* 0001 ... */ | 620 | /* 0001 ... */ |
621 | /* 0000 */ PTR(98, 1), /* 32 */ | 621 | /* 0000 */ PTR(98, 1), /* 32 */ |
622 | /* 0001 */ PTR(100, 1), | 622 | /* 0001 */ PTR(100, 1), |
623 | /* 0010 */ V(1, 4, 4), | 623 | /* 0010 */ V(1, 4, 4), |
624 | /* 0011 */ V(4, 1, 4), | 624 | /* 0011 */ V(4, 1, 4), |
@@ -636,13 +636,13 @@ union huffpair const hufftab10[] ICONST_ATTR_MPA_HUFFMAN = { | |||
636 | /* 1111 */ V(2, 2, 3), | 636 | /* 1111 */ V(2, 2, 3), |
637 | 637 | ||
638 | /* 0010 ... */ | 638 | /* 0010 ... */ |
639 | /* 00 */ V(1, 2, 2), /* 48 */ | 639 | /* 00 */ V(1, 2, 2), /* 48 */ |
640 | /* 01 */ V(2, 1, 2), | 640 | /* 01 */ V(2, 1, 2), |
641 | /* 10 */ V(0, 2, 2), | 641 | /* 10 */ V(0, 2, 2), |
642 | /* 11 */ V(2, 0, 2), | 642 | /* 11 */ V(2, 0, 2), |
643 | 643 | ||
644 | /* 0000 0000 ... */ | 644 | /* 0000 0000 ... */ |
645 | /* 000 */ V(7, 7, 3), /* 52 */ | 645 | /* 000 */ V(7, 7, 3), /* 52 */ |
646 | /* 001 */ V(6, 7, 3), | 646 | /* 001 */ V(6, 7, 3), |
647 | /* 010 */ V(7, 6, 3), | 647 | /* 010 */ V(7, 6, 3), |
648 | /* 011 */ V(5, 7, 3), | 648 | /* 011 */ V(5, 7, 3), |
@@ -652,13 +652,13 @@ union huffpair const hufftab10[] ICONST_ATTR_MPA_HUFFMAN = { | |||
652 | /* 111 */ V(4, 7, 2), | 652 | /* 111 */ V(4, 7, 2), |
653 | 653 | ||
654 | /* 0000 0001 ... */ | 654 | /* 0000 0001 ... */ |
655 | /* 00 */ V(7, 4, 2), /* 60 */ | 655 | /* 00 */ V(7, 4, 2), /* 60 */ |
656 | /* 01 */ V(5, 6, 2), | 656 | /* 01 */ V(5, 6, 2), |
657 | /* 10 */ V(6, 5, 2), | 657 | /* 10 */ V(6, 5, 2), |
658 | /* 11 */ V(3, 7, 2), | 658 | /* 11 */ V(3, 7, 2), |
659 | 659 | ||
660 | /* 0000 0010 ... */ | 660 | /* 0000 0010 ... */ |
661 | /* 000 */ V(7, 3, 2), /* 64 */ | 661 | /* 000 */ V(7, 3, 2), /* 64 */ |
662 | /* 001 */ V(7, 3, 2), | 662 | /* 001 */ V(7, 3, 2), |
663 | /* 010 */ V(4, 6, 2), | 663 | /* 010 */ V(4, 6, 2), |
664 | /* 011 */ V(4, 6, 2), | 664 | /* 011 */ V(4, 6, 2), |
@@ -668,53 +668,53 @@ union huffpair const hufftab10[] ICONST_ATTR_MPA_HUFFMAN = { | |||
668 | /* 111 */ V(6, 3, 2), | 668 | /* 111 */ V(6, 3, 2), |
669 | 669 | ||
670 | /* 0000 0011 ... */ | 670 | /* 0000 0011 ... */ |
671 | /* 0 */ V(2, 7, 1), /* 72 */ | 671 | /* 0 */ V(2, 7, 1), /* 72 */ |
672 | /* 1 */ V(7, 2, 1), | 672 | /* 1 */ V(7, 2, 1), |
673 | 673 | ||
674 | /* 0000 0100 ... */ | 674 | /* 0000 0100 ... */ |
675 | /* 00 */ V(6, 4, 2), /* 74 */ | 675 | /* 00 */ V(6, 4, 2), /* 74 */ |
676 | /* 01 */ V(0, 7, 2), | 676 | /* 01 */ V(0, 7, 2), |
677 | /* 10 */ V(7, 0, 1), | 677 | /* 10 */ V(7, 0, 1), |
678 | /* 11 */ V(7, 0, 1), | 678 | /* 11 */ V(7, 0, 1), |
679 | 679 | ||
680 | /* 0000 0101 ... */ | 680 | /* 0000 0101 ... */ |
681 | /* 00 */ V(6, 2, 1), /* 78 */ | 681 | /* 00 */ V(6, 2, 1), /* 78 */ |
682 | /* 01 */ V(6, 2, 1), | 682 | /* 01 */ V(6, 2, 1), |
683 | /* 10 */ V(4, 5, 2), | 683 | /* 10 */ V(4, 5, 2), |
684 | /* 11 */ V(3, 5, 2), | 684 | /* 11 */ V(3, 5, 2), |
685 | 685 | ||
686 | /* 0000 0110 ... */ | 686 | /* 0000 0110 ... */ |
687 | /* 00 */ V(0, 6, 1), /* 82 */ | 687 | /* 00 */ V(0, 6, 1), /* 82 */ |
688 | /* 01 */ V(0, 6, 1), | 688 | /* 01 */ V(0, 6, 1), |
689 | /* 10 */ V(5, 3, 2), | 689 | /* 10 */ V(5, 3, 2), |
690 | /* 11 */ V(4, 4, 2), | 690 | /* 11 */ V(4, 4, 2), |
691 | 691 | ||
692 | /* 0000 1001 ... */ | 692 | /* 0000 1001 ... */ |
693 | /* 0 */ V(3, 6, 1), /* 86 */ | 693 | /* 0 */ V(3, 6, 1), /* 86 */ |
694 | /* 1 */ V(2, 6, 1), | 694 | /* 1 */ V(2, 6, 1), |
695 | 695 | ||
696 | /* 0000 1010 ... */ | 696 | /* 0000 1010 ... */ |
697 | /* 00 */ V(2, 5, 2), /* 88 */ | 697 | /* 00 */ V(2, 5, 2), /* 88 */ |
698 | /* 01 */ V(5, 2, 2), | 698 | /* 01 */ V(5, 2, 2), |
699 | /* 10 */ V(1, 5, 1), | 699 | /* 10 */ V(1, 5, 1), |
700 | /* 11 */ V(1, 5, 1), | 700 | /* 11 */ V(1, 5, 1), |
701 | 701 | ||
702 | /* 0000 1011 ... */ | 702 | /* 0000 1011 ... */ |
703 | /* 00 */ V(5, 1, 1), /* 92 */ | 703 | /* 00 */ V(5, 1, 1), /* 92 */ |
704 | /* 01 */ V(5, 1, 1), | 704 | /* 01 */ V(5, 1, 1), |
705 | /* 10 */ V(3, 4, 2), | 705 | /* 10 */ V(3, 4, 2), |
706 | /* 11 */ V(4, 3, 2), | 706 | /* 11 */ V(4, 3, 2), |
707 | 707 | ||
708 | /* 0000 1111 ... */ | 708 | /* 0000 1111 ... */ |
709 | /* 0 */ V(0, 5, 1), /* 96 */ | 709 | /* 0 */ V(0, 5, 1), /* 96 */ |
710 | /* 1 */ V(5, 0, 1), | 710 | /* 1 */ V(5, 0, 1), |
711 | 711 | ||
712 | /* 0001 0000 ... */ | 712 | /* 0001 0000 ... */ |
713 | /* 0 */ V(2, 4, 1), /* 98 */ | 713 | /* 0 */ V(2, 4, 1), /* 98 */ |
714 | /* 1 */ V(4, 2, 1), | 714 | /* 1 */ V(4, 2, 1), |
715 | 715 | ||
716 | /* 0001 0001 ... */ | 716 | /* 0001 0001 ... */ |
717 | /* 0 */ V(3, 3, 1), /* 100 */ | 717 | /* 0 */ V(3, 3, 1), /* 100 */ |
718 | /* 1 */ V(0, 4, 1) | 718 | /* 1 */ V(0, 4, 1) |
719 | }; | 719 | }; |
720 | 720 | ||
@@ -738,7 +738,7 @@ union huffpair const hufftab11[] ICONST_ATTR_MPA_HUFFMAN = { | |||
738 | /* 1111 */ V(0, 0, 2), | 738 | /* 1111 */ V(0, 0, 2), |
739 | 739 | ||
740 | /* 0000 ... */ | 740 | /* 0000 ... */ |
741 | /* 0000 */ PTR(74, 2), /* 16 */ | 741 | /* 0000 */ PTR(74, 2), /* 16 */ |
742 | /* 0001 */ PTR(78, 3), | 742 | /* 0001 */ PTR(78, 3), |
743 | /* 0010 */ PTR(86, 2), | 743 | /* 0010 */ PTR(86, 2), |
744 | /* 0011 */ PTR(90, 1), | 744 | /* 0011 */ PTR(90, 1), |
@@ -756,7 +756,7 @@ union huffpair const hufftab11[] ICONST_ATTR_MPA_HUFFMAN = { | |||
756 | /* 1111 */ PTR(98, 1), | 756 | /* 1111 */ PTR(98, 1), |
757 | 757 | ||
758 | /* 0001 ... */ | 758 | /* 0001 ... */ |
759 | /* 0000 */ PTR(100, 1), /* 32 */ | 759 | /* 0000 */ PTR(100, 1), /* 32 */ |
760 | /* 0001 */ V(1, 5, 4), | 760 | /* 0001 */ V(1, 5, 4), |
761 | /* 0010 */ V(6, 2, 3), | 761 | /* 0010 */ V(6, 2, 3), |
762 | /* 0011 */ V(6, 2, 3), | 762 | /* 0011 */ V(6, 2, 3), |
@@ -774,7 +774,7 @@ union huffpair const hufftab11[] ICONST_ATTR_MPA_HUFFMAN = { | |||
774 | /* 1111 */ V(4, 2, 4), | 774 | /* 1111 */ V(4, 2, 4), |
775 | 775 | ||
776 | /* 0010 ... */ | 776 | /* 0010 ... */ |
777 | /* 0000 */ V(1, 4, 4), /* 48 */ | 777 | /* 0000 */ V(1, 4, 4), /* 48 */ |
778 | /* 0001 */ V(4, 1, 4), | 778 | /* 0001 */ V(4, 1, 4), |
779 | /* 0010 */ V(0, 4, 4), | 779 | /* 0010 */ V(0, 4, 4), |
780 | /* 0011 */ V(4, 0, 4), | 780 | /* 0011 */ V(4, 0, 4), |
@@ -792,7 +792,7 @@ union huffpair const hufftab11[] ICONST_ATTR_MPA_HUFFMAN = { | |||
792 | /* 1111 */ V(3, 1, 2), | 792 | /* 1111 */ V(3, 1, 2), |
793 | 793 | ||
794 | /* 0011 ... */ | 794 | /* 0011 ... */ |
795 | /* 000 */ V(0, 3, 3), /* 64 */ | 795 | /* 000 */ V(0, 3, 3), /* 64 */ |
796 | /* 001 */ V(3, 0, 3), | 796 | /* 001 */ V(3, 0, 3), |
797 | /* 010 */ V(2, 2, 2), | 797 | /* 010 */ V(2, 2, 2), |
798 | /* 011 */ V(2, 2, 2), | 798 | /* 011 */ V(2, 2, 2), |
@@ -802,17 +802,17 @@ union huffpair const hufftab11[] ICONST_ATTR_MPA_HUFFMAN = { | |||
802 | /* 111 */ V(2, 1, 1), | 802 | /* 111 */ V(2, 1, 1), |
803 | 803 | ||
804 | /* 0101 ... */ | 804 | /* 0101 ... */ |
805 | /* 0 */ V(0, 2, 1), /* 72 */ | 805 | /* 0 */ V(0, 2, 1), /* 72 */ |
806 | /* 1 */ V(2, 0, 1), | 806 | /* 1 */ V(2, 0, 1), |
807 | 807 | ||
808 | /* 0000 0000 ... */ | 808 | /* 0000 0000 ... */ |
809 | /* 00 */ V(7, 7, 2), /* 74 */ | 809 | /* 00 */ V(7, 7, 2), /* 74 */ |
810 | /* 01 */ V(6, 7, 2), | 810 | /* 01 */ V(6, 7, 2), |
811 | /* 10 */ V(7, 6, 2), | 811 | /* 10 */ V(7, 6, 2), |
812 | /* 11 */ V(7, 5, 2), | 812 | /* 11 */ V(7, 5, 2), |
813 | 813 | ||
814 | /* 0000 0001 ... */ | 814 | /* 0000 0001 ... */ |
815 | /* 000 */ V(6, 6, 2), /* 78 */ | 815 | /* 000 */ V(6, 6, 2), /* 78 */ |
816 | /* 001 */ V(6, 6, 2), | 816 | /* 001 */ V(6, 6, 2), |
817 | /* 010 */ V(4, 7, 2), | 817 | /* 010 */ V(4, 7, 2), |
818 | /* 011 */ V(4, 7, 2), | 818 | /* 011 */ V(4, 7, 2), |
@@ -822,35 +822,35 @@ union huffpair const hufftab11[] ICONST_ATTR_MPA_HUFFMAN = { | |||
822 | /* 111 */ V(5, 5, 3), | 822 | /* 111 */ V(5, 5, 3), |
823 | 823 | ||
824 | /* 0000 0010 ... */ | 824 | /* 0000 0010 ... */ |
825 | /* 00 */ V(5, 6, 2), /* 86 */ | 825 | /* 00 */ V(5, 6, 2), /* 86 */ |
826 | /* 01 */ V(6, 5, 2), | 826 | /* 01 */ V(6, 5, 2), |
827 | /* 10 */ V(3, 7, 1), | 827 | /* 10 */ V(3, 7, 1), |
828 | /* 11 */ V(3, 7, 1), | 828 | /* 11 */ V(3, 7, 1), |
829 | 829 | ||
830 | /* 0000 0011 ... */ | 830 | /* 0000 0011 ... */ |
831 | /* 0 */ V(7, 3, 1), /* 90 */ | 831 | /* 0 */ V(7, 3, 1), /* 90 */ |
832 | /* 1 */ V(4, 6, 1), | 832 | /* 1 */ V(4, 6, 1), |
833 | 833 | ||
834 | /* 0000 0100 ... */ | 834 | /* 0000 0100 ... */ |
835 | /* 00 */ V(4, 5, 2), /* 92 */ | 835 | /* 00 */ V(4, 5, 2), /* 92 */ |
836 | /* 01 */ V(5, 4, 2), | 836 | /* 01 */ V(5, 4, 2), |
837 | /* 10 */ V(3, 5, 2), | 837 | /* 10 */ V(3, 5, 2), |
838 | /* 11 */ V(5, 3, 2), | 838 | /* 11 */ V(5, 3, 2), |
839 | 839 | ||
840 | /* 0000 0111 ... */ | 840 | /* 0000 0111 ... */ |
841 | /* 0 */ V(6, 4, 1), /* 96 */ | 841 | /* 0 */ V(6, 4, 1), /* 96 */ |
842 | /* 1 */ V(0, 7, 1), | 842 | /* 1 */ V(0, 7, 1), |
843 | 843 | ||
844 | /* 0000 1111 ... */ | 844 | /* 0000 1111 ... */ |
845 | /* 0 */ V(4, 4, 1), /* 98 */ | 845 | /* 0 */ V(4, 4, 1), /* 98 */ |
846 | /* 1 */ V(2, 5, 1), | 846 | /* 1 */ V(2, 5, 1), |
847 | 847 | ||
848 | /* 0001 0000 ... */ | 848 | /* 0001 0000 ... */ |
849 | /* 0 */ V(5, 2, 1), /* 100 */ | 849 | /* 0 */ V(5, 2, 1), /* 100 */ |
850 | /* 1 */ V(0, 5, 1), | 850 | /* 1 */ V(0, 5, 1), |
851 | 851 | ||
852 | /* 0001 1101 ... */ | 852 | /* 0001 1101 ... */ |
853 | /* 0 */ V(4, 3, 1), /* 102 */ | 853 | /* 0 */ V(4, 3, 1), /* 102 */ |
854 | /* 1 */ V(3, 3, 1) | 854 | /* 1 */ V(3, 3, 1) |
855 | }; | 855 | }; |
856 | 856 | ||
@@ -874,7 +874,7 @@ union huffpair const hufftab12[] ICONST_ATTR_MPA_HUFFMAN = { | |||
874 | /* 1111 */ V(1, 0, 3), | 874 | /* 1111 */ V(1, 0, 3), |
875 | 875 | ||
876 | /* 0000 ... */ | 876 | /* 0000 ... */ |
877 | /* 0000 */ PTR(80, 2), /* 16 */ | 877 | /* 0000 */ PTR(80, 2), /* 16 */ |
878 | /* 0001 */ PTR(84, 1), | 878 | /* 0001 */ PTR(84, 1), |
879 | /* 0010 */ PTR(86, 1), | 879 | /* 0010 */ PTR(86, 1), |
880 | /* 0011 */ PTR(88, 1), | 880 | /* 0011 */ PTR(88, 1), |
@@ -892,7 +892,7 @@ union huffpair const hufftab12[] ICONST_ATTR_MPA_HUFFMAN = { | |||
892 | /* 1111 */ V(6, 3, 4), | 892 | /* 1111 */ V(6, 3, 4), |
893 | 893 | ||
894 | /* 0001 ... */ | 894 | /* 0001 ... */ |
895 | /* 0000 */ V(4, 5, 4), /* 32 */ | 895 | /* 0000 */ V(4, 5, 4), /* 32 */ |
896 | /* 0001 */ V(5, 4, 4), | 896 | /* 0001 */ V(5, 4, 4), |
897 | /* 0010 */ V(4, 4, 4), | 897 | /* 0010 */ V(4, 4, 4), |
898 | /* 0011 */ PTR(94, 1), | 898 | /* 0011 */ PTR(94, 1), |
@@ -910,7 +910,7 @@ union huffpair const hufftab12[] ICONST_ATTR_MPA_HUFFMAN = { | |||
910 | /* 1111 */ V(5, 2, 4), | 910 | /* 1111 */ V(5, 2, 4), |
911 | 911 | ||
912 | /* 0010 ... */ | 912 | /* 0010 ... */ |
913 | /* 0000 */ V(1, 5, 3), /* 48 */ | 913 | /* 0000 */ V(1, 5, 3), /* 48 */ |
914 | /* 0001 */ V(1, 5, 3), | 914 | /* 0001 */ V(1, 5, 3), |
915 | /* 0010 */ V(5, 1, 3), | 915 | /* 0010 */ V(5, 1, 3), |
916 | /* 0011 */ V(5, 1, 3), | 916 | /* 0011 */ V(5, 1, 3), |
@@ -928,13 +928,13 @@ union huffpair const hufftab12[] ICONST_ATTR_MPA_HUFFMAN = { | |||
928 | /* 1111 */ V(1, 4, 3), | 928 | /* 1111 */ V(1, 4, 3), |
929 | 929 | ||
930 | /* 0011 ... */ | 930 | /* 0011 ... */ |
931 | /* 00 */ V(3, 3, 2), /* 64 */ | 931 | /* 00 */ V(3, 3, 2), /* 64 */ |
932 | /* 01 */ V(4, 1, 2), | 932 | /* 01 */ V(4, 1, 2), |
933 | /* 10 */ V(2, 3, 2), | 933 | /* 10 */ V(2, 3, 2), |
934 | /* 11 */ V(3, 2, 2), | 934 | /* 11 */ V(3, 2, 2), |
935 | 935 | ||
936 | /* 0100 ... */ | 936 | /* 0100 ... */ |
937 | /* 000 */ V(4, 0, 3), /* 68 */ | 937 | /* 000 */ V(4, 0, 3), /* 68 */ |
938 | /* 001 */ V(0, 3, 3), | 938 | /* 001 */ V(0, 3, 3), |
939 | /* 010 */ V(3, 0, 2), | 939 | /* 010 */ V(3, 0, 2), |
940 | /* 011 */ V(3, 0, 2), | 940 | /* 011 */ V(3, 0, 2), |
@@ -944,41 +944,41 @@ union huffpair const hufftab12[] ICONST_ATTR_MPA_HUFFMAN = { | |||
944 | /* 111 */ V(1, 3, 1), | 944 | /* 111 */ V(1, 3, 1), |
945 | 945 | ||
946 | /* 0101 ... */ | 946 | /* 0101 ... */ |
947 | /* 0 */ V(3, 1, 1), /* 76 */ | 947 | /* 0 */ V(3, 1, 1), /* 76 */ |
948 | /* 1 */ V(2, 2, 1), | 948 | /* 1 */ V(2, 2, 1), |
949 | 949 | ||
950 | /* 1000 ... */ | 950 | /* 1000 ... */ |
951 | /* 0 */ V(0, 2, 1), /* 78 */ | 951 | /* 0 */ V(0, 2, 1), /* 78 */ |
952 | /* 1 */ V(2, 0, 1), | 952 | /* 1 */ V(2, 0, 1), |
953 | 953 | ||
954 | /* 0000 0000 ... */ | 954 | /* 0000 0000 ... */ |
955 | /* 00 */ V(7, 7, 2), /* 80 */ | 955 | /* 00 */ V(7, 7, 2), /* 80 */ |
956 | /* 01 */ V(6, 7, 2), | 956 | /* 01 */ V(6, 7, 2), |
957 | /* 10 */ V(7, 6, 1), | 957 | /* 10 */ V(7, 6, 1), |
958 | /* 11 */ V(7, 6, 1), | 958 | /* 11 */ V(7, 6, 1), |
959 | 959 | ||
960 | /* 0000 0001 ... */ | 960 | /* 0000 0001 ... */ |
961 | /* 0 */ V(5, 7, 1), /* 84 */ | 961 | /* 0 */ V(5, 7, 1), /* 84 */ |
962 | /* 1 */ V(7, 5, 1), | 962 | /* 1 */ V(7, 5, 1), |
963 | 963 | ||
964 | /* 0000 0010 ... */ | 964 | /* 0000 0010 ... */ |
965 | /* 0 */ V(6, 6, 1), /* 86 */ | 965 | /* 0 */ V(6, 6, 1), /* 86 */ |
966 | /* 1 */ V(4, 7, 1), | 966 | /* 1 */ V(4, 7, 1), |
967 | 967 | ||
968 | /* 0000 0011 ... */ | 968 | /* 0000 0011 ... */ |
969 | /* 0 */ V(7, 4, 1), /* 88 */ | 969 | /* 0 */ V(7, 4, 1), /* 88 */ |
970 | /* 1 */ V(6, 5, 1), | 970 | /* 1 */ V(6, 5, 1), |
971 | 971 | ||
972 | /* 0000 0110 ... */ | 972 | /* 0000 0110 ... */ |
973 | /* 0 */ V(7, 3, 1), /* 90 */ | 973 | /* 0 */ V(7, 3, 1), /* 90 */ |
974 | /* 1 */ V(5, 5, 1), | 974 | /* 1 */ V(5, 5, 1), |
975 | 975 | ||
976 | /* 0000 1101 ... */ | 976 | /* 0000 1101 ... */ |
977 | /* 0 */ V(0, 7, 1), /* 92 */ | 977 | /* 0 */ V(0, 7, 1), /* 92 */ |
978 | /* 1 */ V(7, 0, 1), | 978 | /* 1 */ V(7, 0, 1), |
979 | 979 | ||
980 | /* 0001 0011 ... */ | 980 | /* 0001 0011 ... */ |
981 | /* 0 */ V(0, 6, 1), /* 94 */ | 981 | /* 0 */ V(0, 6, 1), /* 94 */ |
982 | /* 1 */ V(0, 5, 1) | 982 | /* 1 */ V(0, 5, 1) |
983 | }; | 983 | }; |
984 | 984 | ||
@@ -1002,7 +1002,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1002 | /* 1111 */ V(0, 0, 1), | 1002 | /* 1111 */ V(0, 0, 1), |
1003 | 1003 | ||
1004 | /* 0000 ... */ | 1004 | /* 0000 ... */ |
1005 | /* 0000 */ PTR(68, 4), /* 16 */ | 1005 | /* 0000 */ PTR(68, 4), /* 16 */ |
1006 | /* 0001 */ PTR(84, 4), | 1006 | /* 0001 */ PTR(84, 4), |
1007 | /* 0010 */ PTR(100, 4), | 1007 | /* 0010 */ PTR(100, 4), |
1008 | /* 0011 */ PTR(116, 4), | 1008 | /* 0011 */ PTR(116, 4), |
@@ -1020,7 +1020,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1020 | /* 1111 */ PTR(226, 1), | 1020 | /* 1111 */ PTR(226, 1), |
1021 | 1021 | ||
1022 | /* 0001 ... */ | 1022 | /* 0001 ... */ |
1023 | /* 0000 */ PTR(228, 2), /* 32 */ | 1023 | /* 0000 */ PTR(228, 2), /* 32 */ |
1024 | /* 0001 */ PTR(232, 2), | 1024 | /* 0001 */ PTR(232, 2), |
1025 | /* 0010 */ PTR(236, 2), | 1025 | /* 0010 */ PTR(236, 2), |
1026 | /* 0011 */ PTR(240, 2), | 1026 | /* 0011 */ PTR(240, 2), |
@@ -1038,7 +1038,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1038 | /* 1111 */ V(1, 4, 4), | 1038 | /* 1111 */ V(1, 4, 4), |
1039 | 1039 | ||
1040 | /* 0010 ... */ | 1040 | /* 0010 ... */ |
1041 | /* 0000 */ V(4, 1, 3), /* 48 */ | 1041 | /* 0000 */ V(4, 1, 3), /* 48 */ |
1042 | /* 0001 */ V(4, 1, 3), | 1042 | /* 0001 */ V(4, 1, 3), |
1043 | /* 0010 */ V(0, 4, 4), | 1043 | /* 0010 */ V(0, 4, 4), |
1044 | /* 0011 */ V(4, 0, 4), | 1044 | /* 0011 */ V(4, 0, 4), |
@@ -1056,13 +1056,13 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1056 | /* 1111 */ V(2, 2, 3), | 1056 | /* 1111 */ V(2, 2, 3), |
1057 | 1057 | ||
1058 | /* 0011 ... */ | 1058 | /* 0011 ... */ |
1059 | /* 00 */ V(1, 2, 2), /* 64 */ | 1059 | /* 00 */ V(1, 2, 2), /* 64 */ |
1060 | /* 01 */ V(2, 1, 2), | 1060 | /* 01 */ V(2, 1, 2), |
1061 | /* 10 */ V(0, 2, 2), | 1061 | /* 10 */ V(0, 2, 2), |
1062 | /* 11 */ V(2, 0, 2), | 1062 | /* 11 */ V(2, 0, 2), |
1063 | 1063 | ||
1064 | /* 0000 0000 ... */ | 1064 | /* 0000 0000 ... */ |
1065 | /* 0000 */ PTR(262, 4), /* 68 */ | 1065 | /* 0000 */ PTR(262, 4), /* 68 */ |
1066 | /* 0001 */ PTR(278, 4), | 1066 | /* 0001 */ PTR(278, 4), |
1067 | /* 0010 */ PTR(294, 4), | 1067 | /* 0010 */ PTR(294, 4), |
1068 | /* 0011 */ PTR(310, 3), | 1068 | /* 0011 */ PTR(310, 3), |
@@ -1080,7 +1080,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1080 | /* 1111 */ V(15, 1, 4), | 1080 | /* 1111 */ V(15, 1, 4), |
1081 | 1081 | ||
1082 | /* 0000 0001 ... */ | 1082 | /* 0000 0001 ... */ |
1083 | /* 0000 */ V(15, 0, 4), /* 84 */ | 1083 | /* 0000 */ V(15, 0, 4), /* 84 */ |
1084 | /* 0001 */ PTR(360, 1), | 1084 | /* 0001 */ PTR(360, 1), |
1085 | /* 0010 */ PTR(362, 1), | 1085 | /* 0010 */ PTR(362, 1), |
1086 | /* 0011 */ PTR(364, 1), | 1086 | /* 0011 */ PTR(364, 1), |
@@ -1098,7 +1098,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1098 | /* 1111 */ V(3, 13, 4), | 1098 | /* 1111 */ V(3, 13, 4), |
1099 | 1099 | ||
1100 | /* 0000 0010 ... */ | 1100 | /* 0000 0010 ... */ |
1101 | /* 0000 */ PTR(380, 1), /* 100 */ | 1101 | /* 0000 */ PTR(380, 1), /* 100 */ |
1102 | /* 0001 */ V(2, 13, 4), | 1102 | /* 0001 */ V(2, 13, 4), |
1103 | /* 0010 */ V(13, 2, 4), | 1103 | /* 0010 */ V(13, 2, 4), |
1104 | /* 0011 */ V(1, 13, 4), | 1104 | /* 0011 */ V(1, 13, 4), |
@@ -1116,7 +1116,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1116 | /* 1111 */ V(10, 8, 4), | 1116 | /* 1111 */ V(10, 8, 4), |
1117 | 1117 | ||
1118 | /* 0000 0011 ... */ | 1118 | /* 0000 0011 ... */ |
1119 | /* 0000 */ V(4, 12, 4), /* 116 */ | 1119 | /* 0000 */ V(4, 12, 4), /* 116 */ |
1120 | /* 0001 */ V(12, 4, 4), | 1120 | /* 0001 */ V(12, 4, 4), |
1121 | /* 0010 */ V(6, 11, 4), | 1121 | /* 0010 */ V(6, 11, 4), |
1122 | /* 0011 */ V(11, 6, 4), | 1122 | /* 0011 */ V(11, 6, 4), |
@@ -1134,7 +1134,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1134 | /* 1111 */ V(1, 12, 3), | 1134 | /* 1111 */ V(1, 12, 3), |
1135 | 1135 | ||
1136 | /* 0000 0100 ... */ | 1136 | /* 0000 0100 ... */ |
1137 | /* 0000 */ V(12, 1, 3), /* 132 */ | 1137 | /* 0000 */ V(12, 1, 3), /* 132 */ |
1138 | /* 0001 */ V(12, 1, 3), | 1138 | /* 0001 */ V(12, 1, 3), |
1139 | /* 0010 */ V(9, 8, 4), | 1139 | /* 0010 */ V(9, 8, 4), |
1140 | /* 0011 */ V(0, 12, 4), | 1140 | /* 0011 */ V(0, 12, 4), |
@@ -1152,7 +1152,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1152 | /* 1111 */ V(5, 10, 4), | 1152 | /* 1111 */ V(5, 10, 4), |
1153 | 1153 | ||
1154 | /* 0000 0101 ... */ | 1154 | /* 0000 0101 ... */ |
1155 | /* 0000 */ V(2, 11, 3), /* 148 */ | 1155 | /* 0000 */ V(2, 11, 3), /* 148 */ |
1156 | /* 0001 */ V(2, 11, 3), | 1156 | /* 0001 */ V(2, 11, 3), |
1157 | /* 0010 */ V(10, 5, 4), | 1157 | /* 0010 */ V(10, 5, 4), |
1158 | /* 0011 */ V(6, 9, 4), | 1158 | /* 0011 */ V(6, 9, 4), |
@@ -1170,7 +1170,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1170 | /* 1111 */ V(11, 2, 2), | 1170 | /* 1111 */ V(11, 2, 2), |
1171 | 1171 | ||
1172 | /* 0000 0110 ... */ | 1172 | /* 0000 0110 ... */ |
1173 | /* 000 */ V(1, 11, 2), /* 164 */ | 1173 | /* 000 */ V(1, 11, 2), /* 164 */ |
1174 | /* 001 */ V(1, 11, 2), | 1174 | /* 001 */ V(1, 11, 2), |
1175 | /* 010 */ V(11, 1, 2), | 1175 | /* 010 */ V(11, 1, 2), |
1176 | /* 011 */ V(11, 1, 2), | 1176 | /* 011 */ V(11, 1, 2), |
@@ -1180,7 +1180,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1180 | /* 111 */ V(4, 10, 3), | 1180 | /* 111 */ V(4, 10, 3), |
1181 | 1181 | ||
1182 | /* 0000 0111 ... */ | 1182 | /* 0000 0111 ... */ |
1183 | /* 000 */ V(3, 10, 3), /* 172 */ | 1183 | /* 000 */ V(3, 10, 3), /* 172 */ |
1184 | /* 001 */ V(10, 3, 3), | 1184 | /* 001 */ V(10, 3, 3), |
1185 | /* 010 */ V(5, 9, 3), | 1185 | /* 010 */ V(5, 9, 3), |
1186 | /* 011 */ V(9, 5, 3), | 1186 | /* 011 */ V(9, 5, 3), |
@@ -1190,7 +1190,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1190 | /* 111 */ V(10, 2, 2), | 1190 | /* 111 */ V(10, 2, 2), |
1191 | 1191 | ||
1192 | /* 0000 1000 ... */ | 1192 | /* 0000 1000 ... */ |
1193 | /* 000 */ V(1, 10, 2), /* 180 */ | 1193 | /* 000 */ V(1, 10, 2), /* 180 */ |
1194 | /* 001 */ V(1, 10, 2), | 1194 | /* 001 */ V(1, 10, 2), |
1195 | /* 010 */ V(10, 1, 2), | 1195 | /* 010 */ V(10, 1, 2), |
1196 | /* 011 */ V(10, 1, 2), | 1196 | /* 011 */ V(10, 1, 2), |
@@ -1200,7 +1200,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1200 | /* 111 */ V(10, 0, 2), | 1200 | /* 111 */ V(10, 0, 2), |
1201 | 1201 | ||
1202 | /* 0000 1001 ... */ | 1202 | /* 0000 1001 ... */ |
1203 | /* 000 */ V(8, 6, 3), /* 188 */ | 1203 | /* 000 */ V(8, 6, 3), /* 188 */ |
1204 | /* 001 */ V(4, 9, 3), | 1204 | /* 001 */ V(4, 9, 3), |
1205 | /* 010 */ V(9, 3, 2), | 1205 | /* 010 */ V(9, 3, 2), |
1206 | /* 011 */ V(9, 3, 2), | 1206 | /* 011 */ V(9, 3, 2), |
@@ -1210,7 +1210,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1210 | /* 111 */ V(6, 7, 3), | 1210 | /* 111 */ V(6, 7, 3), |
1211 | 1211 | ||
1212 | /* 0000 1010 ... */ | 1212 | /* 0000 1010 ... */ |
1213 | /* 000 */ V(2, 9, 2), /* 196 */ | 1213 | /* 000 */ V(2, 9, 2), /* 196 */ |
1214 | /* 001 */ V(2, 9, 2), | 1214 | /* 001 */ V(2, 9, 2), |
1215 | /* 010 */ V(9, 2, 2), | 1215 | /* 010 */ V(9, 2, 2), |
1216 | /* 011 */ V(9, 2, 2), | 1216 | /* 011 */ V(9, 2, 2), |
@@ -1220,7 +1220,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1220 | /* 111 */ V(3, 8, 2), | 1220 | /* 111 */ V(3, 8, 2), |
1221 | 1221 | ||
1222 | /* 0000 1011 ... */ | 1222 | /* 0000 1011 ... */ |
1223 | /* 000 */ V(8, 3, 2), /* 204 */ | 1223 | /* 000 */ V(8, 3, 2), /* 204 */ |
1224 | /* 001 */ V(8, 3, 2), | 1224 | /* 001 */ V(8, 3, 2), |
1225 | /* 010 */ V(6, 6, 3), | 1225 | /* 010 */ V(6, 6, 3), |
1226 | /* 011 */ V(4, 7, 3), | 1226 | /* 011 */ V(4, 7, 3), |
@@ -1230,17 +1230,17 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1230 | /* 111 */ V(7, 3, 3), | 1230 | /* 111 */ V(7, 3, 3), |
1231 | 1231 | ||
1232 | /* 0000 1100 ... */ | 1232 | /* 0000 1100 ... */ |
1233 | /* 0 */ V(1, 9, 1), /* 212 */ | 1233 | /* 0 */ V(1, 9, 1), /* 212 */ |
1234 | /* 1 */ V(9, 1, 1), | 1234 | /* 1 */ V(9, 1, 1), |
1235 | 1235 | ||
1236 | /* 0000 1101 ... */ | 1236 | /* 0000 1101 ... */ |
1237 | /* 00 */ V(0, 9, 2), /* 214 */ | 1237 | /* 00 */ V(0, 9, 2), /* 214 */ |
1238 | /* 01 */ V(9, 0, 2), | 1238 | /* 01 */ V(9, 0, 2), |
1239 | /* 10 */ V(4, 8, 2), | 1239 | /* 10 */ V(4, 8, 2), |
1240 | /* 11 */ V(8, 4, 2), | 1240 | /* 11 */ V(8, 4, 2), |
1241 | 1241 | ||
1242 | /* 0000 1110 ... */ | 1242 | /* 0000 1110 ... */ |
1243 | /* 000 */ V(7, 2, 2), /* 218 */ | 1243 | /* 000 */ V(7, 2, 2), /* 218 */ |
1244 | /* 001 */ V(7, 2, 2), | 1244 | /* 001 */ V(7, 2, 2), |
1245 | /* 010 */ V(4, 6, 3), | 1245 | /* 010 */ V(4, 6, 3), |
1246 | /* 011 */ V(6, 4, 3), | 1246 | /* 011 */ V(6, 4, 3), |
@@ -1250,69 +1250,69 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1250 | /* 111 */ V(2, 8, 1), | 1250 | /* 111 */ V(2, 8, 1), |
1251 | 1251 | ||
1252 | /* 0000 1111 ... */ | 1252 | /* 0000 1111 ... */ |
1253 | /* 0 */ V(8, 2, 1), /* 226 */ | 1253 | /* 0 */ V(8, 2, 1), /* 226 */ |
1254 | /* 1 */ V(1, 8, 1), | 1254 | /* 1 */ V(1, 8, 1), |
1255 | 1255 | ||
1256 | /* 0001 0000 ... */ | 1256 | /* 0001 0000 ... */ |
1257 | /* 00 */ V(3, 7, 2), /* 228 */ | 1257 | /* 00 */ V(3, 7, 2), /* 228 */ |
1258 | /* 01 */ V(2, 7, 2), | 1258 | /* 01 */ V(2, 7, 2), |
1259 | /* 10 */ V(1, 7, 1), | 1259 | /* 10 */ V(1, 7, 1), |
1260 | /* 11 */ V(1, 7, 1), | 1260 | /* 11 */ V(1, 7, 1), |
1261 | 1261 | ||
1262 | /* 0001 0001 ... */ | 1262 | /* 0001 0001 ... */ |
1263 | /* 00 */ V(7, 1, 1), /* 232 */ | 1263 | /* 00 */ V(7, 1, 1), /* 232 */ |
1264 | /* 01 */ V(7, 1, 1), | 1264 | /* 01 */ V(7, 1, 1), |
1265 | /* 10 */ V(5, 5, 2), | 1265 | /* 10 */ V(5, 5, 2), |
1266 | /* 11 */ V(0, 7, 2), | 1266 | /* 11 */ V(0, 7, 2), |
1267 | 1267 | ||
1268 | /* 0001 0010 ... */ | 1268 | /* 0001 0010 ... */ |
1269 | /* 00 */ V(7, 0, 2), /* 236 */ | 1269 | /* 00 */ V(7, 0, 2), /* 236 */ |
1270 | /* 01 */ V(3, 6, 2), | 1270 | /* 01 */ V(3, 6, 2), |
1271 | /* 10 */ V(6, 3, 2), | 1271 | /* 10 */ V(6, 3, 2), |
1272 | /* 11 */ V(4, 5, 2), | 1272 | /* 11 */ V(4, 5, 2), |
1273 | 1273 | ||
1274 | /* 0001 0011 ... */ | 1274 | /* 0001 0011 ... */ |
1275 | /* 00 */ V(5, 4, 2), /* 240 */ | 1275 | /* 00 */ V(5, 4, 2), /* 240 */ |
1276 | /* 01 */ V(2, 6, 2), | 1276 | /* 01 */ V(2, 6, 2), |
1277 | /* 10 */ V(6, 2, 2), | 1277 | /* 10 */ V(6, 2, 2), |
1278 | /* 11 */ V(3, 5, 2), | 1278 | /* 11 */ V(3, 5, 2), |
1279 | 1279 | ||
1280 | /* 0001 0101 ... */ | 1280 | /* 0001 0101 ... */ |
1281 | /* 0 */ V(0, 8, 1), /* 244 */ | 1281 | /* 0 */ V(0, 8, 1), /* 244 */ |
1282 | /* 1 */ V(8, 0, 1), | 1282 | /* 1 */ V(8, 0, 1), |
1283 | 1283 | ||
1284 | /* 0001 0110 ... */ | 1284 | /* 0001 0110 ... */ |
1285 | /* 0 */ V(1, 6, 1), /* 246 */ | 1285 | /* 0 */ V(1, 6, 1), /* 246 */ |
1286 | /* 1 */ V(6, 1, 1), | 1286 | /* 1 */ V(6, 1, 1), |
1287 | 1287 | ||
1288 | /* 0001 0111 ... */ | 1288 | /* 0001 0111 ... */ |
1289 | /* 0 */ V(0, 6, 1), /* 248 */ | 1289 | /* 0 */ V(0, 6, 1), /* 248 */ |
1290 | /* 1 */ V(6, 0, 1), | 1290 | /* 1 */ V(6, 0, 1), |
1291 | 1291 | ||
1292 | /* 0001 1000 ... */ | 1292 | /* 0001 1000 ... */ |
1293 | /* 00 */ V(5, 3, 2), /* 250 */ | 1293 | /* 00 */ V(5, 3, 2), /* 250 */ |
1294 | /* 01 */ V(4, 4, 2), | 1294 | /* 01 */ V(4, 4, 2), |
1295 | /* 10 */ V(2, 5, 1), | 1295 | /* 10 */ V(2, 5, 1), |
1296 | /* 11 */ V(2, 5, 1), | 1296 | /* 11 */ V(2, 5, 1), |
1297 | 1297 | ||
1298 | /* 0001 1001 ... */ | 1298 | /* 0001 1001 ... */ |
1299 | /* 0 */ V(5, 2, 1), /* 254 */ | 1299 | /* 0 */ V(5, 2, 1), /* 254 */ |
1300 | /* 1 */ V(0, 5, 1), | 1300 | /* 1 */ V(0, 5, 1), |
1301 | 1301 | ||
1302 | /* 0001 1100 ... */ | 1302 | /* 0001 1100 ... */ |
1303 | /* 0 */ V(3, 4, 1), /* 256 */ | 1303 | /* 0 */ V(3, 4, 1), /* 256 */ |
1304 | /* 1 */ V(4, 3, 1), | 1304 | /* 1 */ V(4, 3, 1), |
1305 | 1305 | ||
1306 | /* 0001 1101 ... */ | 1306 | /* 0001 1101 ... */ |
1307 | /* 0 */ V(5, 0, 1), /* 258 */ | 1307 | /* 0 */ V(5, 0, 1), /* 258 */ |
1308 | /* 1 */ V(2, 4, 1), | 1308 | /* 1 */ V(2, 4, 1), |
1309 | 1309 | ||
1310 | /* 0001 1110 ... */ | 1310 | /* 0001 1110 ... */ |
1311 | /* 0 */ V(4, 2, 1), /* 260 */ | 1311 | /* 0 */ V(4, 2, 1), /* 260 */ |
1312 | /* 1 */ V(3, 3, 1), | 1312 | /* 1 */ V(3, 3, 1), |
1313 | 1313 | ||
1314 | /* 0000 0000 0000 ... */ | 1314 | /* 0000 0000 0000 ... */ |
1315 | /* 0000 */ PTR(388, 3), /* 262 */ | 1315 | /* 0000 */ PTR(388, 3), /* 262 */ |
1316 | /* 0001 */ V(15, 15, 4), | 1316 | /* 0001 */ V(15, 15, 4), |
1317 | /* 0010 */ V(14, 15, 4), | 1317 | /* 0010 */ V(14, 15, 4), |
1318 | /* 0011 */ V(13, 15, 4), | 1318 | /* 0011 */ V(13, 15, 4), |
@@ -1330,7 +1330,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1330 | /* 1111 */ V(13, 13, 3), | 1330 | /* 1111 */ V(13, 13, 3), |
1331 | 1331 | ||
1332 | /* 0000 0000 0001 ... */ | 1332 | /* 0000 0000 0001 ... */ |
1333 | /* 0000 */ V(15, 10, 4), /* 278 */ | 1333 | /* 0000 */ V(15, 10, 4), /* 278 */ |
1334 | /* 0001 */ V(12, 13, 4), | 1334 | /* 0001 */ V(12, 13, 4), |
1335 | /* 0010 */ V(11, 14, 3), | 1335 | /* 0010 */ V(11, 14, 3), |
1336 | /* 0011 */ V(11, 14, 3), | 1336 | /* 0011 */ V(11, 14, 3), |
@@ -1348,7 +1348,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1348 | /* 1111 */ V(13, 11, 3), | 1348 | /* 1111 */ V(13, 11, 3), |
1349 | 1349 | ||
1350 | /* 0000 0000 0010 ... */ | 1350 | /* 0000 0000 0010 ... */ |
1351 | /* 0000 */ V(8, 15, 3), /* 294 */ | 1351 | /* 0000 */ V(8, 15, 3), /* 294 */ |
1352 | /* 0001 */ V(8, 15, 3), | 1352 | /* 0001 */ V(8, 15, 3), |
1353 | /* 0010 */ V(15, 8, 3), | 1353 | /* 0010 */ V(15, 8, 3), |
1354 | /* 0011 */ V(15, 8, 3), | 1354 | /* 0011 */ V(15, 8, 3), |
@@ -1366,7 +1366,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1366 | /* 1111 */ V(15, 7, 2), | 1366 | /* 1111 */ V(15, 7, 2), |
1367 | 1367 | ||
1368 | /* 0000 0000 0011 ... */ | 1368 | /* 0000 0000 0011 ... */ |
1369 | /* 000 */ V(13, 10, 2), /* 310 */ | 1369 | /* 000 */ V(13, 10, 2), /* 310 */ |
1370 | /* 001 */ V(13, 10, 2), | 1370 | /* 001 */ V(13, 10, 2), |
1371 | /* 010 */ V(10, 13, 3), | 1371 | /* 010 */ V(10, 13, 3), |
1372 | /* 011 */ V(11, 12, 3), | 1372 | /* 011 */ V(11, 12, 3), |
@@ -1376,19 +1376,19 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1376 | /* 111 */ V(6, 15, 2), | 1376 | /* 111 */ V(6, 15, 2), |
1377 | 1377 | ||
1378 | /* 0000 0000 0100 ... */ | 1378 | /* 0000 0000 0100 ... */ |
1379 | /* 00 */ V(14, 8, 2), /* 318 */ | 1379 | /* 00 */ V(14, 8, 2), /* 318 */ |
1380 | /* 01 */ V(5, 15, 2), | 1380 | /* 01 */ V(5, 15, 2), |
1381 | /* 10 */ V(9, 13, 2), | 1381 | /* 10 */ V(9, 13, 2), |
1382 | /* 11 */ V(13, 9, 2), | 1382 | /* 11 */ V(13, 9, 2), |
1383 | 1383 | ||
1384 | /* 0000 0000 0101 ... */ | 1384 | /* 0000 0000 0101 ... */ |
1385 | /* 00 */ V(15, 5, 2), /* 322 */ | 1385 | /* 00 */ V(15, 5, 2), /* 322 */ |
1386 | /* 01 */ V(14, 7, 2), | 1386 | /* 01 */ V(14, 7, 2), |
1387 | /* 10 */ V(10, 12, 2), | 1387 | /* 10 */ V(10, 12, 2), |
1388 | /* 11 */ V(11, 11, 2), | 1388 | /* 11 */ V(11, 11, 2), |
1389 | 1389 | ||
1390 | /* 0000 0000 0110 ... */ | 1390 | /* 0000 0000 0110 ... */ |
1391 | /* 000 */ V(4, 15, 2), /* 326 */ | 1391 | /* 000 */ V(4, 15, 2), /* 326 */ |
1392 | /* 001 */ V(4, 15, 2), | 1392 | /* 001 */ V(4, 15, 2), |
1393 | /* 010 */ V(15, 4, 2), | 1393 | /* 010 */ V(15, 4, 2), |
1394 | /* 011 */ V(15, 4, 2), | 1394 | /* 011 */ V(15, 4, 2), |
@@ -1398,103 +1398,103 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1398 | /* 111 */ V(15, 3, 2), | 1398 | /* 111 */ V(15, 3, 2), |
1399 | 1399 | ||
1400 | /* 0000 0000 0111 ... */ | 1400 | /* 0000 0000 0111 ... */ |
1401 | /* 00 */ V(3, 15, 1), /* 334 */ | 1401 | /* 00 */ V(3, 15, 1), /* 334 */ |
1402 | /* 01 */ V(3, 15, 1), | 1402 | /* 01 */ V(3, 15, 1), |
1403 | /* 10 */ V(8, 13, 2), | 1403 | /* 10 */ V(8, 13, 2), |
1404 | /* 11 */ V(13, 8, 2), | 1404 | /* 11 */ V(13, 8, 2), |
1405 | 1405 | ||
1406 | /* 0000 0000 1000 ... */ | 1406 | /* 0000 0000 1000 ... */ |
1407 | /* 0 */ V(2, 15, 1), /* 338 */ | 1407 | /* 0 */ V(2, 15, 1), /* 338 */ |
1408 | /* 1 */ V(15, 2, 1), | 1408 | /* 1 */ V(15, 2, 1), |
1409 | 1409 | ||
1410 | /* 0000 0000 1001 ... */ | 1410 | /* 0000 0000 1001 ... */ |
1411 | /* 00 */ V(6, 14, 2), /* 340 */ | 1411 | /* 00 */ V(6, 14, 2), /* 340 */ |
1412 | /* 01 */ V(9, 12, 2), | 1412 | /* 01 */ V(9, 12, 2), |
1413 | /* 10 */ V(0, 15, 1), | 1413 | /* 10 */ V(0, 15, 1), |
1414 | /* 11 */ V(0, 15, 1), | 1414 | /* 11 */ V(0, 15, 1), |
1415 | 1415 | ||
1416 | /* 0000 0000 1010 ... */ | 1416 | /* 0000 0000 1010 ... */ |
1417 | /* 00 */ V(12, 9, 2), /* 344 */ | 1417 | /* 00 */ V(12, 9, 2), /* 344 */ |
1418 | /* 01 */ V(5, 14, 2), | 1418 | /* 01 */ V(5, 14, 2), |
1419 | /* 10 */ V(10, 11, 1), | 1419 | /* 10 */ V(10, 11, 1), |
1420 | /* 11 */ V(10, 11, 1), | 1420 | /* 11 */ V(10, 11, 1), |
1421 | 1421 | ||
1422 | /* 0000 0000 1011 ... */ | 1422 | /* 0000 0000 1011 ... */ |
1423 | /* 00 */ V(7, 13, 2), /* 348 */ | 1423 | /* 00 */ V(7, 13, 2), /* 348 */ |
1424 | /* 01 */ V(13, 7, 2), | 1424 | /* 01 */ V(13, 7, 2), |
1425 | /* 10 */ V(4, 14, 1), | 1425 | /* 10 */ V(4, 14, 1), |
1426 | /* 11 */ V(4, 14, 1), | 1426 | /* 11 */ V(4, 14, 1), |
1427 | 1427 | ||
1428 | /* 0000 0000 1100 ... */ | 1428 | /* 0000 0000 1100 ... */ |
1429 | /* 00 */ V(12, 8, 2), /* 352 */ | 1429 | /* 00 */ V(12, 8, 2), /* 352 */ |
1430 | /* 01 */ V(13, 6, 2), | 1430 | /* 01 */ V(13, 6, 2), |
1431 | /* 10 */ V(3, 14, 1), | 1431 | /* 10 */ V(3, 14, 1), |
1432 | /* 11 */ V(3, 14, 1), | 1432 | /* 11 */ V(3, 14, 1), |
1433 | 1433 | ||
1434 | /* 0000 0000 1101 ... */ | 1434 | /* 0000 0000 1101 ... */ |
1435 | /* 00 */ V(11, 9, 1), /* 356 */ | 1435 | /* 00 */ V(11, 9, 1), /* 356 */ |
1436 | /* 01 */ V(11, 9, 1), | 1436 | /* 01 */ V(11, 9, 1), |
1437 | /* 10 */ V(9, 11, 2), | 1437 | /* 10 */ V(9, 11, 2), |
1438 | /* 11 */ V(10, 10, 2), | 1438 | /* 11 */ V(10, 10, 2), |
1439 | 1439 | ||
1440 | /* 0000 0001 0001 ... */ | 1440 | /* 0000 0001 0001 ... */ |
1441 | /* 0 */ V(11, 10, 1), /* 360 */ | 1441 | /* 0 */ V(11, 10, 1), /* 360 */ |
1442 | /* 1 */ V(14, 5, 1), | 1442 | /* 1 */ V(14, 5, 1), |
1443 | 1443 | ||
1444 | /* 0000 0001 0010 ... */ | 1444 | /* 0000 0001 0010 ... */ |
1445 | /* 0 */ V(14, 4, 1), /* 362 */ | 1445 | /* 0 */ V(14, 4, 1), /* 362 */ |
1446 | /* 1 */ V(8, 12, 1), | 1446 | /* 1 */ V(8, 12, 1), |
1447 | 1447 | ||
1448 | /* 0000 0001 0011 ... */ | 1448 | /* 0000 0001 0011 ... */ |
1449 | /* 0 */ V(6, 13, 1), /* 364 */ | 1449 | /* 0 */ V(6, 13, 1), /* 364 */ |
1450 | /* 1 */ V(14, 3, 1), | 1450 | /* 1 */ V(14, 3, 1), |
1451 | 1451 | ||
1452 | /* 0000 0001 0101 ... */ | 1452 | /* 0000 0001 0101 ... */ |
1453 | /* 0 */ V(2, 14, 1), /* 366 */ | 1453 | /* 0 */ V(2, 14, 1), /* 366 */ |
1454 | /* 1 */ V(0, 14, 1), | 1454 | /* 1 */ V(0, 14, 1), |
1455 | 1455 | ||
1456 | /* 0000 0001 1000 ... */ | 1456 | /* 0000 0001 1000 ... */ |
1457 | /* 0 */ V(14, 0, 1), /* 368 */ | 1457 | /* 0 */ V(14, 0, 1), /* 368 */ |
1458 | /* 1 */ V(5, 13, 1), | 1458 | /* 1 */ V(5, 13, 1), |
1459 | 1459 | ||
1460 | /* 0000 0001 1001 ... */ | 1460 | /* 0000 0001 1001 ... */ |
1461 | /* 0 */ V(13, 5, 1), /* 370 */ | 1461 | /* 0 */ V(13, 5, 1), /* 370 */ |
1462 | /* 1 */ V(7, 12, 1), | 1462 | /* 1 */ V(7, 12, 1), |
1463 | 1463 | ||
1464 | /* 0000 0001 1010 ... */ | 1464 | /* 0000 0001 1010 ... */ |
1465 | /* 0 */ V(12, 7, 1), /* 372 */ | 1465 | /* 0 */ V(12, 7, 1), /* 372 */ |
1466 | /* 1 */ V(4, 13, 1), | 1466 | /* 1 */ V(4, 13, 1), |
1467 | 1467 | ||
1468 | /* 0000 0001 1011 ... */ | 1468 | /* 0000 0001 1011 ... */ |
1469 | /* 0 */ V(8, 11, 1), /* 374 */ | 1469 | /* 0 */ V(8, 11, 1), /* 374 */ |
1470 | /* 1 */ V(11, 8, 1), | 1470 | /* 1 */ V(11, 8, 1), |
1471 | 1471 | ||
1472 | /* 0000 0001 1100 ... */ | 1472 | /* 0000 0001 1100 ... */ |
1473 | /* 0 */ V(13, 4, 1), /* 376 */ | 1473 | /* 0 */ V(13, 4, 1), /* 376 */ |
1474 | /* 1 */ V(9, 10, 1), | 1474 | /* 1 */ V(9, 10, 1), |
1475 | 1475 | ||
1476 | /* 0000 0001 1101 ... */ | 1476 | /* 0000 0001 1101 ... */ |
1477 | /* 0 */ V(10, 9, 1), /* 378 */ | 1477 | /* 0 */ V(10, 9, 1), /* 378 */ |
1478 | /* 1 */ V(6, 12, 1), | 1478 | /* 1 */ V(6, 12, 1), |
1479 | 1479 | ||
1480 | /* 0000 0010 0000 ... */ | 1480 | /* 0000 0010 0000 ... */ |
1481 | /* 0 */ V(13, 3, 1), /* 380 */ | 1481 | /* 0 */ V(13, 3, 1), /* 380 */ |
1482 | /* 1 */ V(7, 11, 1), | 1482 | /* 1 */ V(7, 11, 1), |
1483 | 1483 | ||
1484 | /* 0000 0010 0101 ... */ | 1484 | /* 0000 0010 0101 ... */ |
1485 | /* 0 */ V(5, 12, 1), /* 382 */ | 1485 | /* 0 */ V(5, 12, 1), /* 382 */ |
1486 | /* 1 */ V(12, 5, 1), | 1486 | /* 1 */ V(12, 5, 1), |
1487 | 1487 | ||
1488 | /* 0000 0010 0110 ... */ | 1488 | /* 0000 0010 0110 ... */ |
1489 | /* 0 */ V(9, 9, 1), /* 384 */ | 1489 | /* 0 */ V(9, 9, 1), /* 384 */ |
1490 | /* 1 */ V(7, 10, 1), | 1490 | /* 1 */ V(7, 10, 1), |
1491 | 1491 | ||
1492 | /* 0000 0010 1000 ... */ | 1492 | /* 0000 0010 1000 ... */ |
1493 | /* 0 */ V(10, 7, 1), /* 386 */ | 1493 | /* 0 */ V(10, 7, 1), /* 386 */ |
1494 | /* 1 */ V(9, 7, 1), | 1494 | /* 1 */ V(9, 7, 1), |
1495 | 1495 | ||
1496 | /* 0000 0000 0000 0000 ... */ | 1496 | /* 0000 0000 0000 0000 ... */ |
1497 | /* 000 */ V(15, 14, 3), /* 388 */ | 1497 | /* 000 */ V(15, 14, 3), /* 388 */ |
1498 | /* 001 */ V(15, 12, 3), | 1498 | /* 001 */ V(15, 12, 3), |
1499 | /* 010 */ V(15, 13, 2), | 1499 | /* 010 */ V(15, 13, 2), |
1500 | /* 011 */ V(15, 13, 2), | 1500 | /* 011 */ V(15, 13, 2), |
@@ -1504,7 +1504,7 @@ union huffpair const hufftab13[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1504 | /* 111 */ V(14, 13, 1), | 1504 | /* 111 */ V(14, 13, 1), |
1505 | 1505 | ||
1506 | /* 0000 0000 0000 1011 ... */ | 1506 | /* 0000 0000 0000 1011 ... */ |
1507 | /* 0 */ V(10, 15, 1), /* 396 */ | 1507 | /* 0 */ V(10, 15, 1), /* 396 */ |
1508 | /* 1 */ V(14, 9, 1) | 1508 | /* 1 */ V(14, 9, 1) |
1509 | }; | 1509 | }; |
1510 | 1510 | ||
@@ -1528,7 +1528,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1528 | /* 1111 */ V(0, 0, 3), | 1528 | /* 1111 */ V(0, 0, 3), |
1529 | 1529 | ||
1530 | /* 0000 ... */ | 1530 | /* 0000 ... */ |
1531 | /* 0000 */ PTR(120, 4), /* 16 */ | 1531 | /* 0000 */ PTR(120, 4), /* 16 */ |
1532 | /* 0001 */ PTR(136, 4), | 1532 | /* 0001 */ PTR(136, 4), |
1533 | /* 0010 */ PTR(152, 4), | 1533 | /* 0010 */ PTR(152, 4), |
1534 | /* 0011 */ PTR(168, 4), | 1534 | /* 0011 */ PTR(168, 4), |
@@ -1546,7 +1546,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1546 | /* 1111 */ PTR(284, 2), | 1546 | /* 1111 */ PTR(284, 2), |
1547 | 1547 | ||
1548 | /* 0001 ... */ | 1548 | /* 0001 ... */ |
1549 | /* 0000 */ PTR(288, 2), /* 32 */ | 1549 | /* 0000 */ PTR(288, 2), /* 32 */ |
1550 | /* 0001 */ PTR(292, 2), | 1550 | /* 0001 */ PTR(292, 2), |
1551 | /* 0010 */ PTR(296, 2), | 1551 | /* 0010 */ PTR(296, 2), |
1552 | /* 0011 */ PTR(300, 2), | 1552 | /* 0011 */ PTR(300, 2), |
@@ -1564,7 +1564,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1564 | /* 1111 */ PTR(338, 1), | 1564 | /* 1111 */ PTR(338, 1), |
1565 | 1565 | ||
1566 | /* 0010 ... */ | 1566 | /* 0010 ... */ |
1567 | /* 0000 */ PTR(340, 1), /* 48 */ | 1567 | /* 0000 */ PTR(340, 1), /* 48 */ |
1568 | /* 0001 */ PTR(342, 1), | 1568 | /* 0001 */ PTR(342, 1), |
1569 | /* 0010 */ V(9, 1, 4), | 1569 | /* 0010 */ V(9, 1, 4), |
1570 | /* 0011 */ PTR(344, 1), | 1570 | /* 0011 */ PTR(344, 1), |
@@ -1582,7 +1582,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1582 | /* 1111 */ PTR(360, 1), | 1582 | /* 1111 */ PTR(360, 1), |
1583 | 1583 | ||
1584 | /* 0011 ... */ | 1584 | /* 0011 ... */ |
1585 | /* 0000 */ V(2, 7, 4), /* 64 */ | 1585 | /* 0000 */ V(2, 7, 4), /* 64 */ |
1586 | /* 0001 */ V(7, 2, 4), | 1586 | /* 0001 */ V(7, 2, 4), |
1587 | /* 0010 */ V(6, 4, 4), | 1587 | /* 0010 */ V(6, 4, 4), |
1588 | /* 0011 */ V(1, 7, 4), | 1588 | /* 0011 */ V(1, 7, 4), |
@@ -1600,7 +1600,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1600 | /* 1111 */ V(3, 5, 4), | 1600 | /* 1111 */ V(3, 5, 4), |
1601 | 1601 | ||
1602 | /* 0100 ... */ | 1602 | /* 0100 ... */ |
1603 | /* 0000 */ V(6, 1, 3), /* 80 */ | 1603 | /* 0000 */ V(6, 1, 3), /* 80 */ |
1604 | /* 0001 */ V(6, 1, 3), | 1604 | /* 0001 */ V(6, 1, 3), |
1605 | /* 0010 */ V(5, 3, 4), | 1605 | /* 0010 */ V(5, 3, 4), |
1606 | /* 0011 */ V(4, 4, 4), | 1606 | /* 0011 */ V(4, 4, 4), |
@@ -1618,7 +1618,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1618 | /* 1111 */ V(3, 4, 3), | 1618 | /* 1111 */ V(3, 4, 3), |
1619 | 1619 | ||
1620 | /* 0101 ... */ | 1620 | /* 0101 ... */ |
1621 | /* 000 */ V(4, 3, 3), /* 96 */ | 1621 | /* 000 */ V(4, 3, 3), /* 96 */ |
1622 | /* 001 */ V(2, 4, 3), | 1622 | /* 001 */ V(2, 4, 3), |
1623 | /* 010 */ V(4, 2, 3), | 1623 | /* 010 */ V(4, 2, 3), |
1624 | /* 011 */ V(3, 3, 3), | 1624 | /* 011 */ V(3, 3, 3), |
@@ -1628,7 +1628,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1628 | /* 111 */ V(0, 4, 3), | 1628 | /* 111 */ V(0, 4, 3), |
1629 | 1629 | ||
1630 | /* 0110 ... */ | 1630 | /* 0110 ... */ |
1631 | /* 000 */ V(2, 3, 2), /* 104 */ | 1631 | /* 000 */ V(2, 3, 2), /* 104 */ |
1632 | /* 001 */ V(2, 3, 2), | 1632 | /* 001 */ V(2, 3, 2), |
1633 | /* 010 */ V(3, 2, 2), | 1633 | /* 010 */ V(3, 2, 2), |
1634 | /* 011 */ V(3, 2, 2), | 1634 | /* 011 */ V(3, 2, 2), |
@@ -1638,21 +1638,21 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1638 | /* 111 */ V(1, 3, 2), | 1638 | /* 111 */ V(1, 3, 2), |
1639 | 1639 | ||
1640 | /* 0111 ... */ | 1640 | /* 0111 ... */ |
1641 | /* 00 */ V(3, 1, 2), /* 112 */ | 1641 | /* 00 */ V(3, 1, 2), /* 112 */ |
1642 | /* 01 */ V(3, 0, 2), | 1642 | /* 01 */ V(3, 0, 2), |
1643 | /* 10 */ V(2, 2, 1), | 1643 | /* 10 */ V(2, 2, 1), |
1644 | /* 11 */ V(2, 2, 1), | 1644 | /* 11 */ V(2, 2, 1), |
1645 | 1645 | ||
1646 | /* 1000 ... */ | 1646 | /* 1000 ... */ |
1647 | /* 0 */ V(1, 2, 1), /* 116 */ | 1647 | /* 0 */ V(1, 2, 1), /* 116 */ |
1648 | /* 1 */ V(2, 1, 1), | 1648 | /* 1 */ V(2, 1, 1), |
1649 | 1649 | ||
1650 | /* 1001 ... */ | 1650 | /* 1001 ... */ |
1651 | /* 0 */ V(0, 2, 1), /* 118 */ | 1651 | /* 0 */ V(0, 2, 1), /* 118 */ |
1652 | /* 1 */ V(2, 0, 1), | 1652 | /* 1 */ V(2, 0, 1), |
1653 | 1653 | ||
1654 | /* 0000 0000 ... */ | 1654 | /* 0000 0000 ... */ |
1655 | /* 0000 */ PTR(366, 1), /* 120 */ | 1655 | /* 0000 */ PTR(366, 1), /* 120 */ |
1656 | /* 0001 */ PTR(368, 1), | 1656 | /* 0001 */ PTR(368, 1), |
1657 | /* 0010 */ V(14, 14, 4), | 1657 | /* 0010 */ V(14, 14, 4), |
1658 | /* 0011 */ PTR(370, 1), | 1658 | /* 0011 */ PTR(370, 1), |
@@ -1670,7 +1670,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1670 | /* 1111 */ V(9, 15, 4), | 1670 | /* 1111 */ V(9, 15, 4), |
1671 | 1671 | ||
1672 | /* 0000 0001 ... */ | 1672 | /* 0000 0001 ... */ |
1673 | /* 0000 */ V(15, 9, 4), /* 136 */ | 1673 | /* 0000 */ V(15, 9, 4), /* 136 */ |
1674 | /* 0001 */ V(14, 10, 4), | 1674 | /* 0001 */ V(14, 10, 4), |
1675 | /* 0010 */ V(11, 13, 4), | 1675 | /* 0010 */ V(11, 13, 4), |
1676 | /* 0011 */ V(13, 11, 4), | 1676 | /* 0011 */ V(13, 11, 4), |
@@ -1688,7 +1688,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1688 | /* 1111 */ PTR(378, 1), | 1688 | /* 1111 */ PTR(378, 1), |
1689 | 1689 | ||
1690 | /* 0000 0010 ... */ | 1690 | /* 0000 0010 ... */ |
1691 | /* 0000 */ V(12, 11, 3), /* 152 */ | 1691 | /* 0000 */ V(12, 11, 3), /* 152 */ |
1692 | /* 0001 */ V(12, 11, 3), | 1692 | /* 0001 */ V(12, 11, 3), |
1693 | /* 0010 */ V(15, 6, 3), | 1693 | /* 0010 */ V(15, 6, 3), |
1694 | /* 0011 */ V(15, 6, 3), | 1694 | /* 0011 */ V(15, 6, 3), |
@@ -1706,7 +1706,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1706 | /* 1111 */ V(10, 12, 3), | 1706 | /* 1111 */ V(10, 12, 3), |
1707 | 1707 | ||
1708 | /* 0000 0011 ... */ | 1708 | /* 0000 0011 ... */ |
1709 | /* 0000 */ V(12, 10, 3), /* 168 */ | 1709 | /* 0000 */ V(12, 10, 3), /* 168 */ |
1710 | /* 0001 */ V(12, 10, 3), | 1710 | /* 0001 */ V(12, 10, 3), |
1711 | /* 0010 */ V(11, 11, 3), | 1711 | /* 0010 */ V(11, 11, 3), |
1712 | /* 0011 */ V(11, 11, 3), | 1712 | /* 0011 */ V(11, 11, 3), |
@@ -1724,7 +1724,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1724 | /* 1111 */ V(13, 8, 3), | 1724 | /* 1111 */ V(13, 8, 3), |
1725 | 1725 | ||
1726 | /* 0000 0100 ... */ | 1726 | /* 0000 0100 ... */ |
1727 | /* 0000 */ V(14, 6, 3), /* 184 */ | 1727 | /* 0000 */ V(14, 6, 3), /* 184 */ |
1728 | /* 0001 */ V(14, 6, 3), | 1728 | /* 0001 */ V(14, 6, 3), |
1729 | /* 0010 */ V(2, 15, 3), | 1729 | /* 0010 */ V(2, 15, 3), |
1730 | /* 0011 */ V(2, 15, 3), | 1730 | /* 0011 */ V(2, 15, 3), |
@@ -1742,7 +1742,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1742 | /* 1111 */ V(12, 9, 3), | 1742 | /* 1111 */ V(12, 9, 3), |
1743 | 1743 | ||
1744 | /* 0000 0101 ... */ | 1744 | /* 0000 0101 ... */ |
1745 | /* 000 */ V(5, 14, 3), /* 200 */ | 1745 | /* 000 */ V(5, 14, 3), /* 200 */ |
1746 | /* 001 */ V(10, 11, 3), | 1746 | /* 001 */ V(10, 11, 3), |
1747 | /* 010 */ V(11, 10, 3), | 1747 | /* 010 */ V(11, 10, 3), |
1748 | /* 011 */ V(14, 5, 3), | 1748 | /* 011 */ V(14, 5, 3), |
@@ -1752,7 +1752,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1752 | /* 111 */ V(14, 4, 3), | 1752 | /* 111 */ V(14, 4, 3), |
1753 | 1753 | ||
1754 | /* 0000 0110 ... */ | 1754 | /* 0000 0110 ... */ |
1755 | /* 000 */ V(8, 12, 3), /* 208 */ | 1755 | /* 000 */ V(8, 12, 3), /* 208 */ |
1756 | /* 001 */ V(12, 8, 3), | 1756 | /* 001 */ V(12, 8, 3), |
1757 | /* 010 */ V(3, 14, 3), | 1757 | /* 010 */ V(3, 14, 3), |
1758 | /* 011 */ V(6, 13, 3), | 1758 | /* 011 */ V(6, 13, 3), |
@@ -1762,7 +1762,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1762 | /* 111 */ V(11, 9, 3), | 1762 | /* 111 */ V(11, 9, 3), |
1763 | 1763 | ||
1764 | /* 0000 0111 ... */ | 1764 | /* 0000 0111 ... */ |
1765 | /* 0000 */ V(2, 14, 3), /* 216 */ | 1765 | /* 0000 */ V(2, 14, 3), /* 216 */ |
1766 | /* 0001 */ V(2, 14, 3), | 1766 | /* 0001 */ V(2, 14, 3), |
1767 | /* 0010 */ V(10, 10, 3), | 1767 | /* 0010 */ V(10, 10, 3), |
1768 | /* 0011 */ V(10, 10, 3), | 1768 | /* 0011 */ V(10, 10, 3), |
@@ -1780,7 +1780,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1780 | /* 1111 */ V(13, 5, 3), | 1780 | /* 1111 */ V(13, 5, 3), |
1781 | 1781 | ||
1782 | /* 0000 1000 ... */ | 1782 | /* 0000 1000 ... */ |
1783 | /* 000 */ V(7, 12, 3), /* 232 */ | 1783 | /* 000 */ V(7, 12, 3), /* 232 */ |
1784 | /* 001 */ V(12, 7, 3), | 1784 | /* 001 */ V(12, 7, 3), |
1785 | /* 010 */ V(4, 13, 3), | 1785 | /* 010 */ V(4, 13, 3), |
1786 | /* 011 */ V(8, 11, 3), | 1786 | /* 011 */ V(8, 11, 3), |
@@ -1790,7 +1790,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1790 | /* 111 */ V(9, 10, 3), | 1790 | /* 111 */ V(9, 10, 3), |
1791 | 1791 | ||
1792 | /* 0000 1001 ... */ | 1792 | /* 0000 1001 ... */ |
1793 | /* 000 */ V(10, 9, 3), /* 240 */ | 1793 | /* 000 */ V(10, 9, 3), /* 240 */ |
1794 | /* 001 */ V(6, 12, 3), | 1794 | /* 001 */ V(6, 12, 3), |
1795 | /* 010 */ V(12, 6, 3), | 1795 | /* 010 */ V(12, 6, 3), |
1796 | /* 011 */ V(3, 13, 3), | 1796 | /* 011 */ V(3, 13, 3), |
@@ -1800,7 +1800,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1800 | /* 111 */ V(13, 2, 2), | 1800 | /* 111 */ V(13, 2, 2), |
1801 | 1801 | ||
1802 | /* 0000 1010 ... */ | 1802 | /* 0000 1010 ... */ |
1803 | /* 000 */ V(2, 13, 3), /* 248 */ | 1803 | /* 000 */ V(2, 13, 3), /* 248 */ |
1804 | /* 001 */ V(0, 13, 3), | 1804 | /* 001 */ V(0, 13, 3), |
1805 | /* 010 */ V(1, 13, 2), | 1805 | /* 010 */ V(1, 13, 2), |
1806 | /* 011 */ V(1, 13, 2), | 1806 | /* 011 */ V(1, 13, 2), |
@@ -1810,7 +1810,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1810 | /* 111 */ V(11, 7, 2), | 1810 | /* 111 */ V(11, 7, 2), |
1811 | 1811 | ||
1812 | /* 0000 1011 ... */ | 1812 | /* 0000 1011 ... */ |
1813 | /* 000 */ V(13, 1, 2), /* 256 */ | 1813 | /* 000 */ V(13, 1, 2), /* 256 */ |
1814 | /* 001 */ V(13, 1, 2), | 1814 | /* 001 */ V(13, 1, 2), |
1815 | /* 010 */ V(5, 12, 3), | 1815 | /* 010 */ V(5, 12, 3), |
1816 | /* 011 */ V(13, 0, 3), | 1816 | /* 011 */ V(13, 0, 3), |
@@ -1820,13 +1820,13 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1820 | /* 111 */ V(8, 10, 2), | 1820 | /* 111 */ V(8, 10, 2), |
1821 | 1821 | ||
1822 | /* 0000 1100 ... */ | 1822 | /* 0000 1100 ... */ |
1823 | /* 00 */ V(10, 8, 2), /* 264 */ | 1823 | /* 00 */ V(10, 8, 2), /* 264 */ |
1824 | /* 01 */ V(4, 12, 2), | 1824 | /* 01 */ V(4, 12, 2), |
1825 | /* 10 */ V(12, 4, 2), | 1825 | /* 10 */ V(12, 4, 2), |
1826 | /* 11 */ V(6, 11, 2), | 1826 | /* 11 */ V(6, 11, 2), |
1827 | 1827 | ||
1828 | /* 0000 1101 ... */ | 1828 | /* 0000 1101 ... */ |
1829 | /* 000 */ V(11, 6, 2), /* 268 */ | 1829 | /* 000 */ V(11, 6, 2), /* 268 */ |
1830 | /* 001 */ V(11, 6, 2), | 1830 | /* 001 */ V(11, 6, 2), |
1831 | /* 010 */ V(9, 9, 3), | 1831 | /* 010 */ V(9, 9, 3), |
1832 | /* 011 */ V(0, 12, 3), | 1832 | /* 011 */ V(0, 12, 3), |
@@ -1836,7 +1836,7 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1836 | /* 111 */ V(12, 3, 2), | 1836 | /* 111 */ V(12, 3, 2), |
1837 | 1837 | ||
1838 | /* 0000 1110 ... */ | 1838 | /* 0000 1110 ... */ |
1839 | /* 000 */ V(7, 10, 2), /* 276 */ | 1839 | /* 000 */ V(7, 10, 2), /* 276 */ |
1840 | /* 001 */ V(7, 10, 2), | 1840 | /* 001 */ V(7, 10, 2), |
1841 | /* 010 */ V(10, 7, 2), | 1841 | /* 010 */ V(10, 7, 2), |
1842 | /* 011 */ V(10, 7, 2), | 1842 | /* 011 */ V(10, 7, 2), |
@@ -1846,173 +1846,173 @@ union huffpair const hufftab15[] ICONST_ATTR_MPA_HUFFMAN = { | |||
1846 | /* 111 */ V(0, 11, 3), | 1846 | /* 111 */ V(0, 11, 3), |
1847 | 1847 | ||
1848 | /* 0000 1111 ... */ | 1848 | /* 0000 1111 ... */ |
1849 | /* 00 */ V(12, 2, 1), /* 284 */ | 1849 | /* 00 */ V(12, 2, 1), /* 284 */ |
1850 | /* 01 */ V(12, 2, 1), | 1850 | /* 01 */ V(12, 2, 1), |
1851 | /* 10 */ V(2, 12, 2), | 1851 | /* 10 */ V(2, 12, 2), |
1852 | /* 11 */ V(5, 11, 2), | 1852 | /* 11 */ V(5, 11, 2), |
1853 | 1853 | ||
1854 | /* 0001 0000 ... */ | 1854 | /* 0001 0000 ... */ |
1855 | /* 00 */ V(11, 5, 2), /* 288 */ | 1855 | /* 00 */ V(11, 5, 2), /* 288 */ |
1856 | /* 01 */ V(1, 12, 2), | 1856 | /* 01 */ V(1, 12, 2), |
1857 | /* 10 */ V(8, 9, 2), | 1857 | /* 10 */ V(8, 9, 2), |
1858 | /* 11 */ V(9, 8, 2), | 1858 | /* 11 */ V(9, 8, 2), |
1859 | 1859 | ||
1860 | /* 0001 0001 ... */ | 1860 | /* 0001 0001 ... */ |
1861 | /* 00 */ V(12, 1, 2), /* 292 */ | 1861 | /* 00 */ V(12, 1, 2), /* 292 */ |
1862 | /* 01 */ V(4, 11, 2), | 1862 | /* 01 */ V(4, 11, 2), |
1863 | /* 10 */ V(11, 4, 2), | 1863 | /* 10 */ V(11, 4, 2), |
1864 | /* 11 */ V(6, 10, 2), | 1864 | /* 11 */ V(6, 10, 2), |
1865 | 1865 | ||
1866 | /* 0001 0010 ... */ | 1866 | /* 0001 0010 ... */ |
1867 | /* 00 */ V(3, 11, 2), /* 296 */ | 1867 | /* 00 */ V(3, 11, 2), /* 296 */ |
1868 | /* 01 */ V(7, 9, 2), | 1868 | /* 01 */ V(7, 9, 2), |
1869 | /* 10 */ V(11, 3, 1), | 1869 | /* 10 */ V(11, 3, 1), |
1870 | /* 11 */ V(11, 3, 1), | 1870 | /* 11 */ V(11, 3, 1), |
1871 | 1871 | ||
1872 | /* 0001 0011 ... */ | 1872 | /* 0001 0011 ... */ |
1873 | /* 00 */ V(9, 7, 2), /* 300 */ | 1873 | /* 00 */ V(9, 7, 2), /* 300 */ |
1874 | /* 01 */ V(8, 8, 2), | 1874 | /* 01 */ V(8, 8, 2), |
1875 | /* 10 */ V(2, 11, 2), | 1875 | /* 10 */ V(2, 11, 2), |
1876 | /* 11 */ V(5, 10, 2), | 1876 | /* 11 */ V(5, 10, 2), |
1877 | 1877 | ||
1878 | /* 0001 0100 ... */ | 1878 | /* 0001 0100 ... */ |
1879 | /* 00 */ V(11, 2, 1), /* 304 */ | 1879 | /* 00 */ V(11, 2, 1), /* 304 */ |
1880 | /* 01 */ V(11, 2, 1), | 1880 | /* 01 */ V(11, 2, 1), |
1881 | /* 10 */ V(10, 5, 2), | 1881 | /* 10 */ V(10, 5, 2), |
1882 | /* 11 */ V(1, 11, 2), | 1882 | /* 11 */ V(1, 11, 2), |
1883 | 1883 | ||
1884 | /* 0001 0101 ... */ | 1884 | /* 0001 0101 ... */ |
1885 | /* 00 */ V(11, 1, 1), /* 308 */ | 1885 | /* 00 */ V(11, 1, 1), /* 308 */ |
1886 | /* 01 */ V(11, 1, 1), | 1886 | /* 01 */ V(11, 1, 1), |
1887 | /* 10 */ V(11, 0, 2), | 1887 | /* 10 */ V(11, 0, 2), |
1888 | /* 11 */ V(6, 9, 2), | 1888 | /* 11 */ V(6, 9, 2), |
1889 | 1889 | ||
1890 | /* 0001 0110 ... */ | 1890 | /* 0001 0110 ... */ |
1891 | /* 00 */ V(9, 6, 2), /* 312 */ | 1891 | /* 00 */ V(9, 6, 2), /* 312 */ |
1892 | /* 01 */ V(4, 10, 2), | 1892 | /* 01 */ V(4, 10, 2), |
1893 | /* 10 */ V(10, 4, 2), | 1893 | /* 10 */ V(10, 4, 2), |
1894 | /* 11 */ V(7, 8, 2), | 1894 | /* 11 */ V(7, 8, 2), |
1895 | 1895 | ||
1896 | /* 0001 0111 ... */ | 1896 | /* 0001 0111 ... */ |
1897 | /* 00 */ V(8, 7, 2), /* 316 */ | 1897 | /* 00 */ V(8, 7, 2), /* 316 */ |
1898 | /* 01 */ V(3, 10, 2), | 1898 | /* 01 */ V(3, 10, 2), |
1899 | /* 10 */ V(10, 3, 1), | 1899 | /* 10 */ V(10, 3, 1), |
1900 | /* 11 */ V(10, 3, 1), | 1900 | /* 11 */ V(10, 3, 1), |
1901 | 1901 | ||
1902 | /* 0001 1000 ... */ | 1902 | /* 0001 1000 ... */ |
1903 | /* 0 */ V(5, 9, 1), /* 320 */ | 1903 | /* 0 */ V(5, 9, 1), /* 320 */ |
1904 | /* 1 */ V(9, 5, 1), | 1904 | /* 1 */ V(9, 5, 1), |
1905 | 1905 | ||
1906 | /* 0001 1001 ... */ | 1906 | /* 0001 1001 ... */ |
1907 | /* 0 */ V(2, 10, 1), /* 322 */ | 1907 | /* 0 */ V(2, 10, 1), /* 322 */ |
1908 | /* 1 */ V(10, 2, 1), | 1908 | /* 1 */ V(10, 2, 1), |
1909 | 1909 | ||
1910 | /* 0001 1010 ... */ | 1910 | /* 0001 1010 ... */ |
1911 | /* 0 */ V(1, 10, 1), /* 324 */ | 1911 | /* 0 */ V(1, 10, 1), /* 324 */ |
1912 | /* 1 */ V(10, 1, 1), | 1912 | /* 1 */ V(10, 1, 1), |
1913 | 1913 | ||
1914 | /* 0001 1011 ... */ | 1914 | /* 0001 1011 ... */ |
1915 | /* 00 */ V(0, 10, 2), /* 326 */ | 1915 | /* 00 */ V(0, 10, 2), /* 326 */ |
1916 | /* 01 */ V(10, 0, 2), | 1916 | /* 01 */ V(10, 0, 2), |
1917 | /* 10 */ V(6, 8, 1), | 1917 | /* 10 */ V(6, 8, 1), |
1918 | /* 11 */ V(6, 8, 1), | 1918 | /* 11 */ V(6, 8, 1), |
1919 | 1919 | ||
1920 | /* 0001 1100 ... */ | 1920 | /* 0001 1100 ... */ |
1921 | /* 0 */ V(8, 6, 1), /* 330 */ | 1921 | /* 0 */ V(8, 6, 1), /* 330 */ |
1922 | /* 1 */ V(4, 9, 1), | 1922 | /* 1 */ V(4, 9, 1), |
1923 | 1923 | ||
1924 | /* 0001 1101 ... */ | 1924 | /* 0001 1101 ... */ |
1925 | /* 0 */ V(9, 4, 1), /* 332 */ | 1925 | /* 0 */ V(9, 4, 1), /* 332 */ |
1926 | /* 1 */ V(3, 9, 1), | 1926 | /* 1 */ V(3, 9, 1), |
1927 | 1927 | ||
1928 | /* 0001 1110 ... */ | 1928 | /* 0001 1110 ... */ |
1929 | /* 00 */ V(9, 3, 1), /* 334 */ | 1929 | /* 00 */ V(9, 3, 1), /* 334 */ |
1930 | /* 01 */ V(9, 3, 1), | 1930 | /* 01 */ V(9, 3, 1), |
1931 | /* 10 */ V(7, 7, 2), | 1931 | /* 10 */ V(7, 7, 2), |
1932 | /* 11 */ V(0, 9, 2), | 1932 | /* 11 */ V(0, 9, 2), |
1933 | 1933 | ||
1934 | /* 0001 1111 ... */ | 1934 | /* 0001 1111 ... */ |
1935 | /* 0 */ V(5, 8, 1), /* 338 */ | 1935 | /* 0 */ V(5, 8, 1), /* 338 */ |
1936 | /* 1 */ V(8, 5, 1), | 1936 | /* 1 */ V(8, 5, 1), |
1937 | 1937 | ||
1938 | /* 0010 0000 ... */ | 1938 | /* 0010 0000 ... */ |
1939 | /* 0 */ V(2, 9, 1), /* 340 */ | 1939 | /* 0 */ V(2, 9, 1), /* 340 */ |
1940 | /* 1 */ V(6, 7, 1), | 1940 | /* 1 */ V(6, 7, 1), |
1941 | 1941 | ||
1942 | /* 0010 0001 ... */ | 1942 | /* 0010 0001 ... */ |
1943 | /* 0 */ V(7, 6, 1), /* 342 */ | 1943 | /* 0 */ V(7, 6, 1), /* 342 */ |
1944 | /* 1 */ V(9, 2, 1), | 1944 | /* 1 */ V(9, 2, 1), |
1945 | 1945 | ||
1946 | /* 0010 0011 ... */ | 1946 | /* 0010 0011 ... */ |
1947 | /* 0 */ V(1, 9, 1), /* 344 */ | 1947 | /* 0 */ V(1, 9, 1), /* 344 */ |
1948 | /* 1 */ V(9, 0, 1), | 1948 | /* 1 */ V(9, 0, 1), |
1949 | 1949 | ||
1950 | /* 0010 0100 ... */ | 1950 | /* 0010 0100 ... */ |
1951 | /* 0 */ V(4, 8, 1), /* 346 */ | 1951 | /* 0 */ V(4, 8, 1), /* 346 */ |
1952 | /* 1 */ V(8, 4, 1), | 1952 | /* 1 */ V(8, 4, 1), |
1953 | 1953 | ||
1954 | /* 0010 0101 ... */ | 1954 | /* 0010 0101 ... */ |
1955 | /* 0 */ V(5, 7, 1), /* 348 */ | 1955 | /* 0 */ V(5, 7, 1), /* 348 */ |
1956 | /* 1 */ V(7, 5, 1), | 1956 | /* 1 */ V(7, 5, 1), |
1957 | 1957 | ||
1958 | /* 0010 0110 ... */ | 1958 | /* 0010 0110 ... */ |
1959 | /* 0 */ V(3, 8, 1), /* 350 */ | 1959 | /* 0 */ V(3, 8, 1), /* 350 */ |
1960 | /* 1 */ V(8, 3, 1), | 1960 | /* 1 */ V(8, 3, 1), |
1961 | 1961 | ||
1962 | /* 0010 0111 ... */ | 1962 | /* 0010 0111 ... */ |
1963 | /* 0 */ V(6, 6, 1), /* 352 */ | 1963 | /* 0 */ V(6, 6, 1), /* 352 */ |
1964 | /* 1 */ V(4, 7, 1), | 1964 | /* 1 */ V(4, 7, 1), |
1965 | 1965 | ||
1966 | /* 0010 1100 ... */ | 1966 | /* 0010 1100 ... */ |
1967 | /* 0 */ V(7, 4, 1), /* 354 */ | 1967 | /* 0 */ V(7, 4, 1), /* 354 */ |
1968 | /* 1 */ V(0, 8, 1), | 1968 | /* 1 */ V(0, 8, 1), |
1969 | 1969 | ||
1970 | /* 0010 1101 ... */ | 1970 | /* 0010 1101 ... */ |
1971 | /* 0 */ V(8, 0, 1), /* 356 */ | 1971 | /* 0 */ V(8, 0, 1), /* 356 */ |
1972 | /* 1 */ V(5, 6, 1), | 1972 | /* 1 */ V(5, 6, 1), |
1973 | 1973 | ||
1974 | /* 0010 1110 ... */ | 1974 | /* 0010 1110 ... */ |
1975 | /* 0 */ V(6, 5, 1), /* 358 */ | 1975 | /* 0 */ V(6, 5, 1), /* 358 */ |
1976 | /* 1 */ V(3, 7, 1), | 1976 | /* 1 */ V(3, 7, 1), |
1977 | 1977 | ||
1978 | /* 0010 1111 ... */ | 1978 | /* 0010 1111 ... */ |
1979 | /* 0 */ V(7, 3, 1), /* 360 */ | 1979 | /* 0 */ V(7, 3, 1), /* 360 */ |
1980 | /* 1 */ V(4, 6, 1), | 1980 | /* 1 */ V(4, 6, 1), |
1981 | 1981 | ||
1982 | /* 0011 0110 ... */ | 1982 | /* 0011 0110 ... */ |
1983 | /* 0 */ V(0, 7, 1), /* 362 */ | 1983 | /* 0 */ V(0, 7, 1), /* 362 */ |
1984 | /* 1 */ V(7, 0, 1), | 1984 | /* 1 */ V(7, 0, 1), |
1985 | 1985 | ||
1986 | /* 0011 1110 ... */ | 1986 | /* 0011 1110 ... */ |
1987 | /* 0 */ V(0, 6, 1), /* 364 */ | 1987 | /* 0 */ V(0, 6, 1), /* 364 */ |
1988 | /* 1 */ V(6, 0, 1), | 1988 | /* 1 */ V(6, 0, 1), |
1989 | 1989 | ||
1990 | /* 0000 0000 0000 ... */ | 1990 | /* 0000 0000 0000 ... */ |
1991 | /* 0 */ V(15, 15, 1), /* 366 */ | 1991 | /* 0 */ V(15, 15, 1), /* 366 */ |
1992 | /* 1 */ V(14, 15, 1), | 1992 | /* 1 */ V(14, 15, 1), |
1993 | 1993 | ||
1994 | /* 0000 0000 0001 ... */ | 1994 | /* 0000 0000 0001 ... */ |
1995 | /* 0 */ V(15, 14, 1), /* 368 */ | 1995 | /* 0 */ V(15, 14, 1), /* 368 */ |
1996 | /* 1 */ V(13, 15, 1), | 1996 | /* 1 */ V(13, 15, 1), |
1997 | 1997 | ||
1998 | /* 0000 0000 0011 ... */ | 1998 | /* 0000 0000 0011 ... */ |
1999 | /* 0 */ V(15, 13, 1), /* 370 */ | 1999 | /* 0 */ V(15, 13, 1), /* 370 */ |
2000 | /* 1 */ V(12, 15, 1), | 2000 | /* 1 */ V(12, 15, 1), |
2001 | 2001 | ||
2002 | /* 0000 0000 0100 ... */ | 2002 | /* 0000 0000 0100 ... */ |
2003 | /* 0 */ V(15, 12, 1), /* 372 */ | 2003 | /* 0 */ V(15, 12, 1), /* 372 */ |
2004 | /* 1 */ V(13, 14, 1), | 2004 | /* 1 */ V(13, 14, 1), |
2005 | 2005 | ||
2006 | /* 0000 0000 0101 ... */ | 2006 | /* 0000 0000 0101 ... */ |
2007 | /* 0 */ V(14, 13, 1), /* 374 */ | 2007 | /* 0 */ V(14, 13, 1), /* 374 */ |
2008 | /* 1 */ V(11, 15, 1), | 2008 | /* 1 */ V(11, 15, 1), |
2009 | 2009 | ||
2010 | /* 0000 0000 0111 ... */ | 2010 | /* 0000 0000 0111 ... */ |
2011 | /* 0 */ V(12, 14, 1), /* 376 */ | 2011 | /* 0 */ V(12, 14, 1), /* 376 */ |
2012 | /* 1 */ V(14, 12, 1), | 2012 | /* 1 */ V(14, 12, 1), |
2013 | 2013 | ||
2014 | /* 0000 0001 1111 ... */ | 2014 | /* 0000 0001 1111 ... */ |
2015 | /* 0 */ V(10, 14, 1), /* 378 */ | 2015 | /* 0 */ V(10, 14, 1), /* 378 */ |
2016 | /* 1 */ V(0, 15, 1) | 2016 | /* 1 */ V(0, 15, 1) |
2017 | }; | 2017 | }; |
2018 | 2018 | ||
@@ -2036,7 +2036,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2036 | /* 1111 */ V(0, 0, 1), | 2036 | /* 1111 */ V(0, 0, 1), |
2037 | 2037 | ||
2038 | /* 0000 ... */ | 2038 | /* 0000 ... */ |
2039 | /* 0000 */ PTR(68, 3), /* 16 */ | 2039 | /* 0000 */ PTR(68, 3), /* 16 */ |
2040 | /* 0001 */ PTR(76, 3), | 2040 | /* 0001 */ PTR(76, 3), |
2041 | /* 0010 */ PTR(84, 2), | 2041 | /* 0010 */ PTR(84, 2), |
2042 | /* 0011 */ V(15, 15, 4), | 2042 | /* 0011 */ V(15, 15, 4), |
@@ -2054,7 +2054,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2054 | /* 1111 */ PTR(176, 4), | 2054 | /* 1111 */ PTR(176, 4), |
2055 | 2055 | ||
2056 | /* 0001 ... */ | 2056 | /* 0001 ... */ |
2057 | /* 0000 */ PTR(192, 4), /* 32 */ | 2057 | /* 0000 */ PTR(192, 4), /* 32 */ |
2058 | /* 0001 */ PTR(208, 3), | 2058 | /* 0001 */ PTR(208, 3), |
2059 | /* 0010 */ PTR(216, 3), | 2059 | /* 0010 */ PTR(216, 3), |
2060 | /* 0011 */ PTR(224, 3), | 2060 | /* 0011 */ PTR(224, 3), |
@@ -2072,7 +2072,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2072 | /* 1111 */ PTR(284, 1), | 2072 | /* 1111 */ PTR(284, 1), |
2073 | 2073 | ||
2074 | /* 0010 ... */ | 2074 | /* 0010 ... */ |
2075 | /* 0000 */ PTR(286, 1), /* 48 */ | 2075 | /* 0000 */ PTR(286, 1), /* 48 */ |
2076 | /* 0001 */ PTR(288, 1), | 2076 | /* 0001 */ PTR(288, 1), |
2077 | /* 0010 */ PTR(290, 1), | 2077 | /* 0010 */ PTR(290, 1), |
2078 | /* 0011 */ V(1, 4, 4), | 2078 | /* 0011 */ V(1, 4, 4), |
@@ -2090,13 +2090,13 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2090 | /* 1111 */ V(2, 2, 3), | 2090 | /* 1111 */ V(2, 2, 3), |
2091 | 2091 | ||
2092 | /* 0011 ... */ | 2092 | /* 0011 ... */ |
2093 | /* 00 */ V(1, 2, 2), /* 64 */ | 2093 | /* 00 */ V(1, 2, 2), /* 64 */ |
2094 | /* 01 */ V(2, 1, 2), | 2094 | /* 01 */ V(2, 1, 2), |
2095 | /* 10 */ V(0, 2, 2), | 2095 | /* 10 */ V(0, 2, 2), |
2096 | /* 11 */ V(2, 0, 2), | 2096 | /* 11 */ V(2, 0, 2), |
2097 | 2097 | ||
2098 | /* 0000 0000 ... */ | 2098 | /* 0000 0000 ... */ |
2099 | /* 000 */ V(14, 15, 3), /* 68 */ | 2099 | /* 000 */ V(14, 15, 3), /* 68 */ |
2100 | /* 001 */ V(15, 14, 3), | 2100 | /* 001 */ V(15, 14, 3), |
2101 | /* 010 */ V(13, 15, 3), | 2101 | /* 010 */ V(13, 15, 3), |
2102 | /* 011 */ V(15, 13, 3), | 2102 | /* 011 */ V(15, 13, 3), |
@@ -2106,7 +2106,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2106 | /* 111 */ V(15, 11, 3), | 2106 | /* 111 */ V(15, 11, 3), |
2107 | 2107 | ||
2108 | /* 0000 0001 ... */ | 2108 | /* 0000 0001 ... */ |
2109 | /* 000 */ V(10, 15, 2), /* 76 */ | 2109 | /* 000 */ V(10, 15, 2), /* 76 */ |
2110 | /* 001 */ V(10, 15, 2), | 2110 | /* 001 */ V(10, 15, 2), |
2111 | /* 010 */ V(15, 10, 3), | 2111 | /* 010 */ V(15, 10, 3), |
2112 | /* 011 */ V(9, 15, 3), | 2112 | /* 011 */ V(9, 15, 3), |
@@ -2116,23 +2116,23 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2116 | /* 111 */ V(8, 15, 2), | 2116 | /* 111 */ V(8, 15, 2), |
2117 | 2117 | ||
2118 | /* 0000 0010 ... */ | 2118 | /* 0000 0010 ... */ |
2119 | /* 00 */ V(7, 15, 2), /* 84 */ | 2119 | /* 00 */ V(7, 15, 2), /* 84 */ |
2120 | /* 01 */ V(15, 7, 2), | 2120 | /* 01 */ V(15, 7, 2), |
2121 | /* 10 */ V(6, 15, 2), | 2121 | /* 10 */ V(6, 15, 2), |
2122 | /* 11 */ V(15, 6, 2), | 2122 | /* 11 */ V(15, 6, 2), |
2123 | 2123 | ||
2124 | /* 0000 0100 ... */ | 2124 | /* 0000 0100 ... */ |
2125 | /* 00 */ V(5, 15, 2), /* 88 */ | 2125 | /* 00 */ V(5, 15, 2), /* 88 */ |
2126 | /* 01 */ V(15, 5, 2), | 2126 | /* 01 */ V(15, 5, 2), |
2127 | /* 10 */ V(4, 15, 1), | 2127 | /* 10 */ V(4, 15, 1), |
2128 | /* 11 */ V(4, 15, 1), | 2128 | /* 11 */ V(4, 15, 1), |
2129 | 2129 | ||
2130 | /* 0000 0101 ... */ | 2130 | /* 0000 0101 ... */ |
2131 | /* 0 */ V(15, 4, 1), /* 92 */ | 2131 | /* 0 */ V(15, 4, 1), /* 92 */ |
2132 | /* 1 */ V(15, 3, 1), | 2132 | /* 1 */ V(15, 3, 1), |
2133 | 2133 | ||
2134 | /* 0000 0110 ... */ | 2134 | /* 0000 0110 ... */ |
2135 | /* 0000 */ V(15, 0, 1), /* 94 */ | 2135 | /* 0000 */ V(15, 0, 1), /* 94 */ |
2136 | /* 0001 */ V(15, 0, 1), | 2136 | /* 0001 */ V(15, 0, 1), |
2137 | /* 0010 */ V(15, 0, 1), | 2137 | /* 0010 */ V(15, 0, 1), |
2138 | /* 0011 */ V(15, 0, 1), | 2138 | /* 0011 */ V(15, 0, 1), |
@@ -2150,11 +2150,11 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2150 | /* 1111 */ PTR(326, 3), | 2150 | /* 1111 */ PTR(326, 3), |
2151 | 2151 | ||
2152 | /* 0000 1000 ... */ | 2152 | /* 0000 1000 ... */ |
2153 | /* 0 */ V(2, 15, 1), /* 110 */ | 2153 | /* 0 */ V(2, 15, 1), /* 110 */ |
2154 | /* 1 */ V(0, 15, 1), | 2154 | /* 1 */ V(0, 15, 1), |
2155 | 2155 | ||
2156 | /* 0000 1011 ... */ | 2156 | /* 0000 1011 ... */ |
2157 | /* 0000 */ PTR(334, 2), /* 112 */ | 2157 | /* 0000 */ PTR(334, 2), /* 112 */ |
2158 | /* 0001 */ PTR(338, 2), | 2158 | /* 0001 */ PTR(338, 2), |
2159 | /* 0010 */ PTR(342, 2), | 2159 | /* 0010 */ PTR(342, 2), |
2160 | /* 0011 */ PTR(346, 1), | 2160 | /* 0011 */ PTR(346, 1), |
@@ -2172,7 +2172,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2172 | /* 1111 */ PTR(380, 1), | 2172 | /* 1111 */ PTR(380, 1), |
2173 | 2173 | ||
2174 | /* 0000 1100 ... */ | 2174 | /* 0000 1100 ... */ |
2175 | /* 0000 */ PTR(382, 1), /* 128 */ | 2175 | /* 0000 */ PTR(382, 1), /* 128 */ |
2176 | /* 0001 */ PTR(384, 1), | 2176 | /* 0001 */ PTR(384, 1), |
2177 | /* 0010 */ PTR(386, 1), | 2177 | /* 0010 */ PTR(386, 1), |
2178 | /* 0011 */ V(0, 13, 4), | 2178 | /* 0011 */ V(0, 13, 4), |
@@ -2190,7 +2190,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2190 | /* 1111 */ V(1, 14, 4), | 2190 | /* 1111 */ V(1, 14, 4), |
2191 | 2191 | ||
2192 | /* 0000 1101 ... */ | 2192 | /* 0000 1101 ... */ |
2193 | /* 0000 */ V(13, 3, 4), /* 144 */ | 2193 | /* 0000 */ V(13, 3, 4), /* 144 */ |
2194 | /* 0001 */ V(2, 13, 4), | 2194 | /* 0001 */ V(2, 13, 4), |
2195 | /* 0010 */ V(13, 2, 4), | 2195 | /* 0010 */ V(13, 2, 4), |
2196 | /* 0011 */ V(13, 1, 4), | 2196 | /* 0011 */ V(13, 1, 4), |
@@ -2208,7 +2208,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2208 | /* 1111 */ V(11, 5, 4), | 2208 | /* 1111 */ V(11, 5, 4), |
2209 | 2209 | ||
2210 | /* 0000 1110 ... */ | 2210 | /* 0000 1110 ... */ |
2211 | /* 0000 */ V(12, 1, 4), /* 160 */ | 2211 | /* 0000 */ V(12, 1, 4), /* 160 */ |
2212 | /* 0001 */ V(0, 12, 4), | 2212 | /* 0001 */ V(0, 12, 4), |
2213 | /* 0010 */ V(4, 11, 4), | 2213 | /* 0010 */ V(4, 11, 4), |
2214 | /* 0011 */ V(11, 4, 4), | 2214 | /* 0011 */ V(11, 4, 4), |
@@ -2226,7 +2226,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2226 | /* 1111 */ V(1, 11, 3), | 2226 | /* 1111 */ V(1, 11, 3), |
2227 | 2227 | ||
2228 | /* 0000 1111 ... */ | 2228 | /* 0000 1111 ... */ |
2229 | /* 0000 */ V(11, 1, 3), /* 176 */ | 2229 | /* 0000 */ V(11, 1, 3), /* 176 */ |
2230 | /* 0001 */ V(11, 1, 3), | 2230 | /* 0001 */ V(11, 1, 3), |
2231 | /* 0010 */ V(0, 11, 4), | 2231 | /* 0010 */ V(0, 11, 4), |
2232 | /* 0011 */ V(11, 0, 4), | 2232 | /* 0011 */ V(11, 0, 4), |
@@ -2244,7 +2244,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2244 | /* 1111 */ V(2, 10, 3), | 2244 | /* 1111 */ V(2, 10, 3), |
2245 | 2245 | ||
2246 | /* 0001 0000 ... */ | 2246 | /* 0001 0000 ... */ |
2247 | /* 0000 */ V(9, 5, 4), /* 192 */ | 2247 | /* 0000 */ V(9, 5, 4), /* 192 */ |
2248 | /* 0001 */ V(6, 8, 4), | 2248 | /* 0001 */ V(6, 8, 4), |
2249 | /* 0010 */ V(10, 1, 3), | 2249 | /* 0010 */ V(10, 1, 3), |
2250 | /* 0011 */ V(10, 1, 3), | 2250 | /* 0011 */ V(10, 1, 3), |
@@ -2262,7 +2262,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2262 | /* 1111 */ V(10, 2, 2), | 2262 | /* 1111 */ V(10, 2, 2), |
2263 | 2263 | ||
2264 | /* 0001 0001 ... */ | 2264 | /* 0001 0001 ... */ |
2265 | /* 000 */ V(1, 10, 2), /* 208 */ | 2265 | /* 000 */ V(1, 10, 2), /* 208 */ |
2266 | /* 001 */ V(1, 10, 2), | 2266 | /* 001 */ V(1, 10, 2), |
2267 | /* 010 */ V(0, 10, 3), | 2267 | /* 010 */ V(0, 10, 3), |
2268 | /* 011 */ V(10, 0, 3), | 2268 | /* 011 */ V(10, 0, 3), |
@@ -2272,7 +2272,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2272 | /* 111 */ V(8, 5, 3), | 2272 | /* 111 */ V(8, 5, 3), |
2273 | 2273 | ||
2274 | /* 0001 0010 ... */ | 2274 | /* 0001 0010 ... */ |
2275 | /* 000 */ V(2, 9, 2), /* 216 */ | 2275 | /* 000 */ V(2, 9, 2), /* 216 */ |
2276 | /* 001 */ V(2, 9, 2), | 2276 | /* 001 */ V(2, 9, 2), |
2277 | /* 010 */ V(9, 2, 2), | 2277 | /* 010 */ V(9, 2, 2), |
2278 | /* 011 */ V(9, 2, 2), | 2278 | /* 011 */ V(9, 2, 2), |
@@ -2282,7 +2282,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2282 | /* 111 */ V(1, 9, 2), | 2282 | /* 111 */ V(1, 9, 2), |
2283 | 2283 | ||
2284 | /* 0001 0011 ... */ | 2284 | /* 0001 0011 ... */ |
2285 | /* 000 */ V(9, 1, 2), /* 224 */ | 2285 | /* 000 */ V(9, 1, 2), /* 224 */ |
2286 | /* 001 */ V(9, 1, 2), | 2286 | /* 001 */ V(9, 1, 2), |
2287 | /* 010 */ V(9, 0, 3), | 2287 | /* 010 */ V(9, 0, 3), |
2288 | /* 011 */ V(4, 8, 3), | 2288 | /* 011 */ V(4, 8, 3), |
@@ -2292,7 +2292,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2292 | /* 111 */ V(8, 3, 3), | 2292 | /* 111 */ V(8, 3, 3), |
2293 | 2293 | ||
2294 | /* 0001 0100 ... */ | 2294 | /* 0001 0100 ... */ |
2295 | /* 000 */ V(6, 6, 3), /* 232 */ | 2295 | /* 000 */ V(6, 6, 3), /* 232 */ |
2296 | /* 001 */ V(2, 8, 3), | 2296 | /* 001 */ V(2, 8, 3), |
2297 | /* 010 */ V(8, 2, 2), | 2297 | /* 010 */ V(8, 2, 2), |
2298 | /* 011 */ V(8, 2, 2), | 2298 | /* 011 */ V(8, 2, 2), |
@@ -2302,7 +2302,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2302 | /* 111 */ V(1, 8, 2), | 2302 | /* 111 */ V(1, 8, 2), |
2303 | 2303 | ||
2304 | /* 0001 0101 ... */ | 2304 | /* 0001 0101 ... */ |
2305 | /* 000 */ V(8, 1, 2), /* 240 */ | 2305 | /* 000 */ V(8, 1, 2), /* 240 */ |
2306 | /* 001 */ V(8, 1, 2), | 2306 | /* 001 */ V(8, 1, 2), |
2307 | /* 010 */ V(8, 0, 2), | 2307 | /* 010 */ V(8, 0, 2), |
2308 | /* 011 */ V(8, 0, 2), | 2308 | /* 011 */ V(8, 0, 2), |
@@ -2312,7 +2312,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2312 | /* 111 */ V(3, 7, 2), | 2312 | /* 111 */ V(3, 7, 2), |
2313 | 2313 | ||
2314 | /* 0001 0110 ... */ | 2314 | /* 0001 0110 ... */ |
2315 | /* 000 */ V(7, 3, 2), /* 248 */ | 2315 | /* 000 */ V(7, 3, 2), /* 248 */ |
2316 | /* 001 */ V(7, 3, 2), | 2316 | /* 001 */ V(7, 3, 2), |
2317 | /* 010 */ V(6, 5, 3), | 2317 | /* 010 */ V(6, 5, 3), |
2318 | /* 011 */ V(4, 6, 3), | 2318 | /* 011 */ V(4, 6, 3), |
@@ -2322,7 +2322,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2322 | /* 111 */ V(7, 2, 2), | 2322 | /* 111 */ V(7, 2, 2), |
2323 | 2323 | ||
2324 | /* 0001 0111 ... */ | 2324 | /* 0001 0111 ... */ |
2325 | /* 000 */ V(6, 4, 3), /* 256 */ | 2325 | /* 000 */ V(6, 4, 3), /* 256 */ |
2326 | /* 001 */ V(5, 5, 3), | 2326 | /* 001 */ V(5, 5, 3), |
2327 | /* 010 */ V(0, 7, 2), | 2327 | /* 010 */ V(0, 7, 2), |
2328 | /* 011 */ V(0, 7, 2), | 2328 | /* 011 */ V(0, 7, 2), |
@@ -2332,59 +2332,59 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2332 | /* 111 */ V(1, 7, 1), | 2332 | /* 111 */ V(1, 7, 1), |
2333 | 2333 | ||
2334 | /* 0001 1000 ... */ | 2334 | /* 0001 1000 ... */ |
2335 | /* 00 */ V(7, 1, 1), /* 264 */ | 2335 | /* 00 */ V(7, 1, 1), /* 264 */ |
2336 | /* 01 */ V(7, 1, 1), | 2336 | /* 01 */ V(7, 1, 1), |
2337 | /* 10 */ V(7, 0, 2), | 2337 | /* 10 */ V(7, 0, 2), |
2338 | /* 11 */ V(3, 6, 2), | 2338 | /* 11 */ V(3, 6, 2), |
2339 | 2339 | ||
2340 | /* 0001 1001 ... */ | 2340 | /* 0001 1001 ... */ |
2341 | /* 00 */ V(6, 3, 2), /* 268 */ | 2341 | /* 00 */ V(6, 3, 2), /* 268 */ |
2342 | /* 01 */ V(4, 5, 2), | 2342 | /* 01 */ V(4, 5, 2), |
2343 | /* 10 */ V(5, 4, 2), | 2343 | /* 10 */ V(5, 4, 2), |
2344 | /* 11 */ V(2, 6, 2), | 2344 | /* 11 */ V(2, 6, 2), |
2345 | 2345 | ||
2346 | /* 0001 1010 ... */ | 2346 | /* 0001 1010 ... */ |
2347 | /* 0 */ V(6, 2, 1), /* 272 */ | 2347 | /* 0 */ V(6, 2, 1), /* 272 */ |
2348 | /* 1 */ V(1, 6, 1), | 2348 | /* 1 */ V(1, 6, 1), |
2349 | 2349 | ||
2350 | /* 0001 1011 ... */ | 2350 | /* 0001 1011 ... */ |
2351 | /* 00 */ V(6, 1, 1), /* 274 */ | 2351 | /* 00 */ V(6, 1, 1), /* 274 */ |
2352 | /* 01 */ V(6, 1, 1), | 2352 | /* 01 */ V(6, 1, 1), |
2353 | /* 10 */ V(0, 6, 2), | 2353 | /* 10 */ V(0, 6, 2), |
2354 | /* 11 */ V(6, 0, 2), | 2354 | /* 11 */ V(6, 0, 2), |
2355 | 2355 | ||
2356 | /* 0001 1100 ... */ | 2356 | /* 0001 1100 ... */ |
2357 | /* 00 */ V(5, 3, 1), /* 278 */ | 2357 | /* 00 */ V(5, 3, 1), /* 278 */ |
2358 | /* 01 */ V(5, 3, 1), | 2358 | /* 01 */ V(5, 3, 1), |
2359 | /* 10 */ V(3, 5, 2), | 2359 | /* 10 */ V(3, 5, 2), |
2360 | /* 11 */ V(4, 4, 2), | 2360 | /* 11 */ V(4, 4, 2), |
2361 | 2361 | ||
2362 | /* 0001 1101 ... */ | 2362 | /* 0001 1101 ... */ |
2363 | /* 0 */ V(2, 5, 1), /* 282 */ | 2363 | /* 0 */ V(2, 5, 1), /* 282 */ |
2364 | /* 1 */ V(5, 2, 1), | 2364 | /* 1 */ V(5, 2, 1), |
2365 | 2365 | ||
2366 | /* 0001 1111 ... */ | 2366 | /* 0001 1111 ... */ |
2367 | /* 0 */ V(1, 5, 1), /* 284 */ | 2367 | /* 0 */ V(1, 5, 1), /* 284 */ |
2368 | /* 1 */ V(0, 5, 1), | 2368 | /* 1 */ V(0, 5, 1), |
2369 | 2369 | ||
2370 | /* 0010 0000 ... */ | 2370 | /* 0010 0000 ... */ |
2371 | /* 0 */ V(3, 4, 1), /* 286 */ | 2371 | /* 0 */ V(3, 4, 1), /* 286 */ |
2372 | /* 1 */ V(4, 3, 1), | 2372 | /* 1 */ V(4, 3, 1), |
2373 | 2373 | ||
2374 | /* 0010 0001 ... */ | 2374 | /* 0010 0001 ... */ |
2375 | /* 0 */ V(5, 0, 1), /* 288 */ | 2375 | /* 0 */ V(5, 0, 1), /* 288 */ |
2376 | /* 1 */ V(2, 4, 1), | 2376 | /* 1 */ V(2, 4, 1), |
2377 | 2377 | ||
2378 | /* 0010 0010 ... */ | 2378 | /* 0010 0010 ... */ |
2379 | /* 0 */ V(4, 2, 1), /* 290 */ | 2379 | /* 0 */ V(4, 2, 1), /* 290 */ |
2380 | /* 1 */ V(3, 3, 1), | 2380 | /* 1 */ V(3, 3, 1), |
2381 | 2381 | ||
2382 | /* 0010 0101 ... */ | 2382 | /* 0010 0101 ... */ |
2383 | /* 0 */ V(0, 4, 1), /* 292 */ | 2383 | /* 0 */ V(0, 4, 1), /* 292 */ |
2384 | /* 1 */ V(4, 0, 1), | 2384 | /* 1 */ V(4, 0, 1), |
2385 | 2385 | ||
2386 | /* 0000 0110 1100 ... */ | 2386 | /* 0000 0110 1100 ... */ |
2387 | /* 0000 */ V(12, 14, 4), /* 294 */ | 2387 | /* 0000 */ V(12, 14, 4), /* 294 */ |
2388 | /* 0001 */ PTR(400, 1), | 2388 | /* 0001 */ PTR(400, 1), |
2389 | /* 0010 */ V(13, 14, 3), | 2389 | /* 0010 */ V(13, 14, 3), |
2390 | /* 0011 */ V(13, 14, 3), | 2390 | /* 0011 */ V(13, 14, 3), |
@@ -2402,7 +2402,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2402 | /* 1111 */ V(14, 11, 3), | 2402 | /* 1111 */ V(14, 11, 3), |
2403 | 2403 | ||
2404 | /* 0000 0110 1101 ... */ | 2404 | /* 0000 0110 1101 ... */ |
2405 | /* 000 */ V(11, 14, 2), /* 310 */ | 2405 | /* 000 */ V(11, 14, 2), /* 310 */ |
2406 | /* 001 */ V(11, 14, 2), | 2406 | /* 001 */ V(11, 14, 2), |
2407 | /* 010 */ V(12, 13, 2), | 2407 | /* 010 */ V(12, 13, 2), |
2408 | /* 011 */ V(12, 13, 2), | 2408 | /* 011 */ V(12, 13, 2), |
@@ -2412,7 +2412,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2412 | /* 111 */ V(10, 14, 2), | 2412 | /* 111 */ V(10, 14, 2), |
2413 | 2413 | ||
2414 | /* 0000 0110 1110 ... */ | 2414 | /* 0000 0110 1110 ... */ |
2415 | /* 000 */ V(12, 12, 2), /* 318 */ | 2415 | /* 000 */ V(12, 12, 2), /* 318 */ |
2416 | /* 001 */ V(12, 12, 2), | 2416 | /* 001 */ V(12, 12, 2), |
2417 | /* 010 */ V(10, 13, 3), | 2417 | /* 010 */ V(10, 13, 3), |
2418 | /* 011 */ V(13, 10, 3), | 2418 | /* 011 */ V(13, 10, 3), |
@@ -2422,7 +2422,7 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2422 | /* 111 */ V(12, 10, 2), | 2422 | /* 111 */ V(12, 10, 2), |
2423 | 2423 | ||
2424 | /* 0000 0110 1111 ... */ | 2424 | /* 0000 0110 1111 ... */ |
2425 | /* 000 */ V(12, 9, 3), /* 326 */ | 2425 | /* 000 */ V(12, 9, 3), /* 326 */ |
2426 | /* 001 */ V(7, 13, 3), | 2426 | /* 001 */ V(7, 13, 3), |
2427 | /* 010 */ V(5, 14, 2), | 2427 | /* 010 */ V(5, 14, 2), |
2428 | /* 011 */ V(5, 14, 2), | 2428 | /* 011 */ V(5, 14, 2), |
@@ -2432,121 +2432,121 @@ union huffpair const hufftab16[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2432 | /* 111 */ V(11, 13, 1), | 2432 | /* 111 */ V(11, 13, 1), |
2433 | 2433 | ||
2434 | /* 0000 1011 0000 ... */ | 2434 | /* 0000 1011 0000 ... */ |
2435 | /* 00 */ V(9, 14, 1), /* 334 */ | 2435 | /* 00 */ V(9, 14, 1), /* 334 */ |
2436 | /* 01 */ V(9, 14, 1), | 2436 | /* 01 */ V(9, 14, 1), |
2437 | /* 10 */ V(11, 12, 2), | 2437 | /* 10 */ V(11, 12, 2), |
2438 | /* 11 */ V(12, 11, 2), | 2438 | /* 11 */ V(12, 11, 2), |
2439 | 2439 | ||
2440 | /* 0000 1011 0001 ... */ | 2440 | /* 0000 1011 0001 ... */ |
2441 | /* 00 */ V(8, 14, 2), /* 338 */ | 2441 | /* 00 */ V(8, 14, 2), /* 338 */ |
2442 | /* 01 */ V(14, 8, 2), | 2442 | /* 01 */ V(14, 8, 2), |
2443 | /* 10 */ V(9, 13, 2), | 2443 | /* 10 */ V(9, 13, 2), |
2444 | /* 11 */ V(14, 7, 2), | 2444 | /* 11 */ V(14, 7, 2), |
2445 | 2445 | ||
2446 | /* 0000 1011 0010 ... */ | 2446 | /* 0000 1011 0010 ... */ |
2447 | /* 00 */ V(11, 11, 2), /* 342 */ | 2447 | /* 00 */ V(11, 11, 2), /* 342 */ |
2448 | /* 01 */ V(8, 13, 2), | 2448 | /* 01 */ V(8, 13, 2), |
2449 | /* 10 */ V(13, 8, 2), | 2449 | /* 10 */ V(13, 8, 2), |
2450 | /* 11 */ V(6, 14, 2), | 2450 | /* 11 */ V(6, 14, 2), |
2451 | 2451 | ||
2452 | /* 0000 1011 0011 ... */ | 2452 | /* 0000 1011 0011 ... */ |
2453 | /* 0 */ V(14, 6, 1), /* 346 */ | 2453 | /* 0 */ V(14, 6, 1), /* 346 */ |
2454 | /* 1 */ V(9, 12, 1), | 2454 | /* 1 */ V(9, 12, 1), |
2455 | 2455 | ||
2456 | /* 0000 1011 0100 ... */ | 2456 | /* 0000 1011 0100 ... */ |
2457 | /* 00 */ V(10, 11, 2), /* 348 */ | 2457 | /* 00 */ V(10, 11, 2), /* 348 */ |
2458 | /* 01 */ V(11, 10, 2), | 2458 | /* 01 */ V(11, 10, 2), |
2459 | /* 10 */ V(14, 5, 2), | 2459 | /* 10 */ V(14, 5, 2), |
2460 | /* 11 */ V(13, 7, 2), | 2460 | /* 11 */ V(13, 7, 2), |
2461 | 2461 | ||
2462 | /* 0000 1011 0101 ... */ | 2462 | /* 0000 1011 0101 ... */ |
2463 | /* 00 */ V(4, 14, 1), /* 352 */ | 2463 | /* 00 */ V(4, 14, 1), /* 352 */ |
2464 | /* 01 */ V(4, 14, 1), | 2464 | /* 01 */ V(4, 14, 1), |
2465 | /* 10 */ V(14, 4, 2), | 2465 | /* 10 */ V(14, 4, 2), |
2466 | /* 11 */ V(8, 12, 2), | 2466 | /* 11 */ V(8, 12, 2), |
2467 | 2467 | ||
2468 | /* 0000 1011 0110 ... */ | 2468 | /* 0000 1011 0110 ... */ |
2469 | /* 0 */ V(12, 8, 1), /* 356 */ | 2469 | /* 0 */ V(12, 8, 1), /* 356 */ |
2470 | /* 1 */ V(3, 14, 1), | 2470 | /* 1 */ V(3, 14, 1), |
2471 | 2471 | ||
2472 | /* 0000 1011 0111 ... */ | 2472 | /* 0000 1011 0111 ... */ |
2473 | /* 00 */ V(6, 13, 1), /* 358 */ | 2473 | /* 00 */ V(6, 13, 1), /* 358 */ |
2474 | /* 01 */ V(6, 13, 1), | 2474 | /* 01 */ V(6, 13, 1), |
2475 | /* 10 */ V(13, 6, 2), | 2475 | /* 10 */ V(13, 6, 2), |
2476 | /* 11 */ V(9, 11, 2), | 2476 | /* 11 */ V(9, 11, 2), |
2477 | 2477 | ||
2478 | /* 0000 1011 1000 ... */ | 2478 | /* 0000 1011 1000 ... */ |
2479 | /* 00 */ V(11, 9, 2), /* 362 */ | 2479 | /* 00 */ V(11, 9, 2), /* 362 */ |
2480 | /* 01 */ V(10, 10, 2), | 2480 | /* 01 */ V(10, 10, 2), |
2481 | /* 10 */ V(14, 1, 1), | 2481 | /* 10 */ V(14, 1, 1), |
2482 | /* 11 */ V(14, 1, 1), | 2482 | /* 11 */ V(14, 1, 1), |
2483 | 2483 | ||
2484 | /* 0000 1011 1001 ... */ | 2484 | /* 0000 1011 1001 ... */ |
2485 | /* 00 */ V(13, 4, 1), /* 366 */ | 2485 | /* 00 */ V(13, 4, 1), /* 366 */ |
2486 | /* 01 */ V(13, 4, 1), | 2486 | /* 01 */ V(13, 4, 1), |
2487 | /* 10 */ V(11, 8, 2), | 2487 | /* 10 */ V(11, 8, 2), |
2488 | /* 11 */ V(10, 9, 2), | 2488 | /* 11 */ V(10, 9, 2), |
2489 | 2489 | ||
2490 | /* 0000 1011 1010 ... */ | 2490 | /* 0000 1011 1010 ... */ |
2491 | /* 00 */ V(7, 11, 1), /* 370 */ | 2491 | /* 00 */ V(7, 11, 1), /* 370 */ |
2492 | /* 01 */ V(7, 11, 1), | 2492 | /* 01 */ V(7, 11, 1), |
2493 | /* 10 */ V(11, 7, 2), | 2493 | /* 10 */ V(11, 7, 2), |
2494 | /* 11 */ V(13, 0, 2), | 2494 | /* 11 */ V(13, 0, 2), |
2495 | 2495 | ||
2496 | /* 0000 1011 1100 ... */ | 2496 | /* 0000 1011 1100 ... */ |
2497 | /* 0 */ V(0, 14, 1), /* 374 */ | 2497 | /* 0 */ V(0, 14, 1), /* 374 */ |
2498 | /* 1 */ V(14, 0, 1), | 2498 | /* 1 */ V(14, 0, 1), |
2499 | 2499 | ||
2500 | /* 0000 1011 1101 ... */ | 2500 | /* 0000 1011 1101 ... */ |
2501 | /* 0 */ V(5, 13, 1), /* 376 */ | 2501 | /* 0 */ V(5, 13, 1), /* 376 */ |
2502 | /* 1 */ V(13, 5, 1), | 2502 | /* 1 */ V(13, 5, 1), |
2503 | 2503 | ||
2504 | /* 0000 1011 1110 ... */ | 2504 | /* 0000 1011 1110 ... */ |
2505 | /* 0 */ V(7, 12, 1), /* 378 */ | 2505 | /* 0 */ V(7, 12, 1), /* 378 */ |
2506 | /* 1 */ V(12, 7, 1), | 2506 | /* 1 */ V(12, 7, 1), |
2507 | 2507 | ||
2508 | /* 0000 1011 1111 ... */ | 2508 | /* 0000 1011 1111 ... */ |
2509 | /* 0 */ V(4, 13, 1), /* 380 */ | 2509 | /* 0 */ V(4, 13, 1), /* 380 */ |
2510 | /* 1 */ V(8, 11, 1), | 2510 | /* 1 */ V(8, 11, 1), |
2511 | 2511 | ||
2512 | /* 0000 1100 0000 ... */ | 2512 | /* 0000 1100 0000 ... */ |
2513 | /* 0 */ V(9, 10, 1), /* 382 */ | 2513 | /* 0 */ V(9, 10, 1), /* 382 */ |
2514 | /* 1 */ V(6, 12, 1), | 2514 | /* 1 */ V(6, 12, 1), |
2515 | 2515 | ||
2516 | /* 0000 1100 0001 ... */ | 2516 | /* 0000 1100 0001 ... */ |
2517 | /* 0 */ V(12, 6, 1), /* 384 */ | 2517 | /* 0 */ V(12, 6, 1), /* 384 */ |
2518 | /* 1 */ V(3, 13, 1), | 2518 | /* 1 */ V(3, 13, 1), |
2519 | 2519 | ||
2520 | /* 0000 1100 0010 ... */ | 2520 | /* 0000 1100 0010 ... */ |
2521 | /* 0 */ V(5, 12, 1), /* 386 */ | 2521 | /* 0 */ V(5, 12, 1), /* 386 */ |
2522 | /* 1 */ V(12, 5, 1), | 2522 | /* 1 */ V(12, 5, 1), |
2523 | 2523 | ||
2524 | /* 0000 1100 0100 ... */ | 2524 | /* 0000 1100 0100 ... */ |
2525 | /* 0 */ V(8, 10, 1), /* 388 */ | 2525 | /* 0 */ V(8, 10, 1), /* 388 */ |
2526 | /* 1 */ V(10, 8, 1), | 2526 | /* 1 */ V(10, 8, 1), |
2527 | 2527 | ||
2528 | /* 0000 1100 0101 ... */ | 2528 | /* 0000 1100 0101 ... */ |
2529 | /* 0 */ V(9, 9, 1), /* 390 */ | 2529 | /* 0 */ V(9, 9, 1), /* 390 */ |
2530 | /* 1 */ V(4, 12, 1), | 2530 | /* 1 */ V(4, 12, 1), |
2531 | 2531 | ||
2532 | /* 0000 1100 0110 ... */ | 2532 | /* 0000 1100 0110 ... */ |
2533 | /* 0 */ V(11, 6, 1), /* 392 */ | 2533 | /* 0 */ V(11, 6, 1), /* 392 */ |
2534 | /* 1 */ V(7, 10, 1), | 2534 | /* 1 */ V(7, 10, 1), |
2535 | 2535 | ||
2536 | /* 0000 1100 1000 ... */ | 2536 | /* 0000 1100 1000 ... */ |
2537 | /* 0 */ V(5, 11, 1), /* 394 */ | 2537 | /* 0 */ V(5, 11, 1), /* 394 */ |
2538 | /* 1 */ V(8, 9, 1), | 2538 | /* 1 */ V(8, 9, 1), |
2539 | 2539 | ||
2540 | /* 0000 1100 1011 ... */ | 2540 | /* 0000 1100 1011 ... */ |
2541 | /* 0 */ V(9, 8, 1), /* 396 */ | 2541 | /* 0 */ V(9, 8, 1), /* 396 */ |
2542 | /* 1 */ V(7, 9, 1), | 2542 | /* 1 */ V(7, 9, 1), |
2543 | 2543 | ||
2544 | /* 0000 1101 0101 ... */ | 2544 | /* 0000 1101 0101 ... */ |
2545 | /* 0 */ V(9, 7, 1), /* 398 */ | 2545 | /* 0 */ V(9, 7, 1), /* 398 */ |
2546 | /* 1 */ V(8, 8, 1), | 2546 | /* 1 */ V(8, 8, 1), |
2547 | 2547 | ||
2548 | /* 0000 0110 1100 0001 ... */ | 2548 | /* 0000 0110 1100 0001 ... */ |
2549 | /* 0 */ V(14, 12, 1), /* 400 */ | 2549 | /* 0 */ V(14, 12, 1), /* 400 */ |
2550 | /* 1 */ V(13, 13, 1) | 2550 | /* 1 */ V(13, 13, 1) |
2551 | }; | 2551 | }; |
2552 | 2552 | ||
@@ -2570,7 +2570,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2570 | /* 1111 */ V(0, 0, 4), | 2570 | /* 1111 */ V(0, 0, 4), |
2571 | 2571 | ||
2572 | /* 0000 ... */ | 2572 | /* 0000 ... */ |
2573 | /* 0000 */ V(14, 15, 4), /* 16 */ | 2573 | /* 0000 */ V(14, 15, 4), /* 16 */ |
2574 | /* 0001 */ V(15, 14, 4), | 2574 | /* 0001 */ V(15, 14, 4), |
2575 | /* 0010 */ V(13, 15, 4), | 2575 | /* 0010 */ V(13, 15, 4), |
2576 | /* 0011 */ V(15, 13, 4), | 2576 | /* 0011 */ V(15, 13, 4), |
@@ -2588,7 +2588,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2588 | /* 1111 */ V(15, 8, 3), | 2588 | /* 1111 */ V(15, 8, 3), |
2589 | 2589 | ||
2590 | /* 0001 ... */ | 2590 | /* 0001 ... */ |
2591 | /* 0000 */ V(8, 15, 4), /* 32 */ | 2591 | /* 0000 */ V(8, 15, 4), /* 32 */ |
2592 | /* 0001 */ V(7, 15, 4), | 2592 | /* 0001 */ V(7, 15, 4), |
2593 | /* 0010 */ V(15, 7, 3), | 2593 | /* 0010 */ V(15, 7, 3), |
2594 | /* 0011 */ V(15, 7, 3), | 2594 | /* 0011 */ V(15, 7, 3), |
@@ -2606,7 +2606,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2606 | /* 1111 */ V(15, 4, 3), | 2606 | /* 1111 */ V(15, 4, 3), |
2607 | 2607 | ||
2608 | /* 0010 ... */ | 2608 | /* 0010 ... */ |
2609 | /* 0000 */ V(3, 15, 3), /* 48 */ | 2609 | /* 0000 */ V(3, 15, 3), /* 48 */ |
2610 | /* 0001 */ V(3, 15, 3), | 2610 | /* 0001 */ V(3, 15, 3), |
2611 | /* 0010 */ V(15, 3, 3), | 2611 | /* 0010 */ V(15, 3, 3), |
2612 | /* 0011 */ V(15, 3, 3), | 2612 | /* 0011 */ V(15, 3, 3), |
@@ -2624,7 +2624,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2624 | /* 1111 */ PTR(196, 3), | 2624 | /* 1111 */ PTR(196, 3), |
2625 | 2625 | ||
2626 | /* 0100 ... */ | 2626 | /* 0100 ... */ |
2627 | /* 0000 */ PTR(204, 4), /* 64 */ | 2627 | /* 0000 */ PTR(204, 4), /* 64 */ |
2628 | /* 0001 */ PTR(220, 3), | 2628 | /* 0001 */ PTR(220, 3), |
2629 | /* 0010 */ PTR(228, 3), | 2629 | /* 0010 */ PTR(228, 3), |
2630 | /* 0011 */ PTR(236, 3), | 2630 | /* 0011 */ PTR(236, 3), |
@@ -2642,7 +2642,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2642 | /* 1111 */ PTR(292, 2), | 2642 | /* 1111 */ PTR(292, 2), |
2643 | 2643 | ||
2644 | /* 0101 ... */ | 2644 | /* 0101 ... */ |
2645 | /* 0000 */ PTR(296, 2), /* 80 */ | 2645 | /* 0000 */ PTR(296, 2), /* 80 */ |
2646 | /* 0001 */ PTR(300, 3), | 2646 | /* 0001 */ PTR(300, 3), |
2647 | /* 0010 */ PTR(308, 2), | 2647 | /* 0010 */ PTR(308, 2), |
2648 | /* 0011 */ PTR(312, 3), | 2648 | /* 0011 */ PTR(312, 3), |
@@ -2660,7 +2660,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2660 | /* 1111 */ PTR(348, 1), | 2660 | /* 1111 */ PTR(348, 1), |
2661 | 2661 | ||
2662 | /* 0110 ... */ | 2662 | /* 0110 ... */ |
2663 | /* 0000 */ PTR(350, 1), /* 96 */ | 2663 | /* 0000 */ PTR(350, 1), /* 96 */ |
2664 | /* 0001 */ PTR(352, 1), | 2664 | /* 0001 */ PTR(352, 1), |
2665 | /* 0010 */ PTR(354, 1), | 2665 | /* 0010 */ PTR(354, 1), |
2666 | /* 0011 */ PTR(356, 1), | 2666 | /* 0011 */ PTR(356, 1), |
@@ -2678,7 +2678,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2678 | /* 1111 */ V(7, 2, 4), | 2678 | /* 1111 */ V(7, 2, 4), |
2679 | 2679 | ||
2680 | /* 0111 ... */ | 2680 | /* 0111 ... */ |
2681 | /* 0000 */ V(4, 6, 4), /* 112 */ | 2681 | /* 0000 */ V(4, 6, 4), /* 112 */ |
2682 | /* 0001 */ V(6, 4, 4), | 2682 | /* 0001 */ V(6, 4, 4), |
2683 | /* 0010 */ V(5, 5, 4), | 2683 | /* 0010 */ V(5, 5, 4), |
2684 | /* 0011 */ V(7, 1, 4), | 2684 | /* 0011 */ V(7, 1, 4), |
@@ -2696,7 +2696,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2696 | /* 1111 */ V(4, 4, 4), | 2696 | /* 1111 */ V(4, 4, 4), |
2697 | 2697 | ||
2698 | /* 1000 ... */ | 2698 | /* 1000 ... */ |
2699 | /* 0000 */ V(2, 5, 4), /* 128 */ | 2699 | /* 0000 */ V(2, 5, 4), /* 128 */ |
2700 | /* 0001 */ V(5, 2, 4), | 2700 | /* 0001 */ V(5, 2, 4), |
2701 | /* 0010 */ V(1, 5, 4), | 2701 | /* 0010 */ V(1, 5, 4), |
2702 | /* 0011 */ PTR(384, 1), | 2702 | /* 0011 */ PTR(384, 1), |
@@ -2714,7 +2714,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2714 | /* 1111 */ V(1, 4, 3), | 2714 | /* 1111 */ V(1, 4, 3), |
2715 | 2715 | ||
2716 | /* 1001 ... */ | 2716 | /* 1001 ... */ |
2717 | /* 0000 */ V(4, 1, 3), /* 144 */ | 2717 | /* 0000 */ V(4, 1, 3), /* 144 */ |
2718 | /* 0001 */ V(4, 1, 3), | 2718 | /* 0001 */ V(4, 1, 3), |
2719 | /* 0010 */ V(0, 4, 4), | 2719 | /* 0010 */ V(0, 4, 4), |
2720 | /* 0011 */ V(4, 0, 4), | 2720 | /* 0011 */ V(4, 0, 4), |
@@ -2732,7 +2732,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2732 | /* 1111 */ V(3, 1, 2), | 2732 | /* 1111 */ V(3, 1, 2), |
2733 | 2733 | ||
2734 | /* 1010 ... */ | 2734 | /* 1010 ... */ |
2735 | /* 000 */ V(0, 3, 3), /* 160 */ | 2735 | /* 000 */ V(0, 3, 3), /* 160 */ |
2736 | /* 001 */ V(3, 0, 3), | 2736 | /* 001 */ V(3, 0, 3), |
2737 | /* 010 */ V(2, 2, 2), | 2737 | /* 010 */ V(2, 2, 2), |
2738 | /* 011 */ V(2, 2, 2), | 2738 | /* 011 */ V(2, 2, 2), |
@@ -2742,13 +2742,13 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2742 | /* 111 */ V(1, 2, 1), | 2742 | /* 111 */ V(1, 2, 1), |
2743 | 2743 | ||
2744 | /* 1011 ... */ | 2744 | /* 1011 ... */ |
2745 | /* 00 */ V(2, 1, 1), /* 168 */ | 2745 | /* 00 */ V(2, 1, 1), /* 168 */ |
2746 | /* 01 */ V(2, 1, 1), | 2746 | /* 01 */ V(2, 1, 1), |
2747 | /* 10 */ V(0, 2, 2), | 2747 | /* 10 */ V(0, 2, 2), |
2748 | /* 11 */ V(2, 0, 2), | 2748 | /* 11 */ V(2, 0, 2), |
2749 | 2749 | ||
2750 | /* 0010 1100 ... */ | 2750 | /* 0010 1100 ... */ |
2751 | /* 000 */ V(0, 15, 1), /* 172 */ | 2751 | /* 000 */ V(0, 15, 1), /* 172 */ |
2752 | /* 001 */ V(0, 15, 1), | 2752 | /* 001 */ V(0, 15, 1), |
2753 | /* 010 */ V(0, 15, 1), | 2753 | /* 010 */ V(0, 15, 1), |
2754 | /* 011 */ V(0, 15, 1), | 2754 | /* 011 */ V(0, 15, 1), |
@@ -2758,7 +2758,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2758 | /* 111 */ V(12, 14, 3), | 2758 | /* 111 */ V(12, 14, 3), |
2759 | 2759 | ||
2760 | /* 0010 1101 ... */ | 2760 | /* 0010 1101 ... */ |
2761 | /* 000 */ V(14, 12, 3), /* 180 */ | 2761 | /* 000 */ V(14, 12, 3), /* 180 */ |
2762 | /* 001 */ V(13, 13, 3), | 2762 | /* 001 */ V(13, 13, 3), |
2763 | /* 010 */ V(11, 14, 3), | 2763 | /* 010 */ V(11, 14, 3), |
2764 | /* 011 */ V(14, 11, 3), | 2764 | /* 011 */ V(14, 11, 3), |
@@ -2768,7 +2768,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2768 | /* 111 */ V(14, 10, 3), | 2768 | /* 111 */ V(14, 10, 3), |
2769 | 2769 | ||
2770 | /* 0010 1110 ... */ | 2770 | /* 0010 1110 ... */ |
2771 | /* 000 */ V(11, 13, 3), /* 188 */ | 2771 | /* 000 */ V(11, 13, 3), /* 188 */ |
2772 | /* 001 */ V(13, 11, 3), | 2772 | /* 001 */ V(13, 11, 3), |
2773 | /* 010 */ V(12, 12, 3), | 2773 | /* 010 */ V(12, 12, 3), |
2774 | /* 011 */ V(9, 14, 3), | 2774 | /* 011 */ V(9, 14, 3), |
@@ -2778,7 +2778,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2778 | /* 111 */ V(11, 12, 3), | 2778 | /* 111 */ V(11, 12, 3), |
2779 | 2779 | ||
2780 | /* 0010 1111 ... */ | 2780 | /* 0010 1111 ... */ |
2781 | /* 000 */ V(12, 11, 3), /* 196 */ | 2781 | /* 000 */ V(12, 11, 3), /* 196 */ |
2782 | /* 001 */ V(8, 14, 3), | 2782 | /* 001 */ V(8, 14, 3), |
2783 | /* 010 */ V(14, 8, 3), | 2783 | /* 010 */ V(14, 8, 3), |
2784 | /* 011 */ V(9, 13, 3), | 2784 | /* 011 */ V(9, 13, 3), |
@@ -2788,7 +2788,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2788 | /* 111 */ V(10, 12, 3), | 2788 | /* 111 */ V(10, 12, 3), |
2789 | 2789 | ||
2790 | /* 0100 0000 ... */ | 2790 | /* 0100 0000 ... */ |
2791 | /* 0000 */ V(12, 10, 3), /* 204 */ | 2791 | /* 0000 */ V(12, 10, 3), /* 204 */ |
2792 | /* 0001 */ V(12, 10, 3), | 2792 | /* 0001 */ V(12, 10, 3), |
2793 | /* 0010 */ V(11, 11, 3), | 2793 | /* 0010 */ V(11, 11, 3), |
2794 | /* 0011 */ V(11, 11, 3), | 2794 | /* 0011 */ V(11, 11, 3), |
@@ -2806,7 +2806,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2806 | /* 1111 */ V(14, 6, 2), | 2806 | /* 1111 */ V(14, 6, 2), |
2807 | 2807 | ||
2808 | /* 0100 0001 ... */ | 2808 | /* 0100 0001 ... */ |
2809 | /* 000 */ V(6, 14, 3), /* 220 */ | 2809 | /* 000 */ V(6, 14, 3), /* 220 */ |
2810 | /* 001 */ V(9, 12, 3), | 2810 | /* 001 */ V(9, 12, 3), |
2811 | /* 010 */ V(12, 9, 2), | 2811 | /* 010 */ V(12, 9, 2), |
2812 | /* 011 */ V(12, 9, 2), | 2812 | /* 011 */ V(12, 9, 2), |
@@ -2816,7 +2816,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2816 | /* 111 */ V(11, 10, 2), | 2816 | /* 111 */ V(11, 10, 2), |
2817 | 2817 | ||
2818 | /* 0100 0010 ... */ | 2818 | /* 0100 0010 ... */ |
2819 | /* 000 */ V(14, 5, 2), /* 228 */ | 2819 | /* 000 */ V(14, 5, 2), /* 228 */ |
2820 | /* 001 */ V(14, 5, 2), | 2820 | /* 001 */ V(14, 5, 2), |
2821 | /* 010 */ V(10, 11, 3), | 2821 | /* 010 */ V(10, 11, 3), |
2822 | /* 011 */ V(7, 13, 3), | 2822 | /* 011 */ V(7, 13, 3), |
@@ -2826,7 +2826,7 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2826 | /* 111 */ V(14, 4, 2), | 2826 | /* 111 */ V(14, 4, 2), |
2827 | 2827 | ||
2828 | /* 0100 0011 ... */ | 2828 | /* 0100 0011 ... */ |
2829 | /* 000 */ V(8, 12, 2), /* 236 */ | 2829 | /* 000 */ V(8, 12, 2), /* 236 */ |
2830 | /* 001 */ V(8, 12, 2), | 2830 | /* 001 */ V(8, 12, 2), |
2831 | /* 010 */ V(12, 8, 2), | 2831 | /* 010 */ V(12, 8, 2), |
2832 | /* 011 */ V(12, 8, 2), | 2832 | /* 011 */ V(12, 8, 2), |
@@ -2836,61 +2836,61 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2836 | /* 111 */ V(3, 14, 2), | 2836 | /* 111 */ V(3, 14, 2), |
2837 | 2837 | ||
2838 | /* 0100 0100 ... */ | 2838 | /* 0100 0100 ... */ |
2839 | /* 00 */ V(6, 13, 2), /* 244 */ | 2839 | /* 00 */ V(6, 13, 2), /* 244 */ |
2840 | /* 01 */ V(13, 6, 2), | 2840 | /* 01 */ V(13, 6, 2), |
2841 | /* 10 */ V(14, 3, 2), | 2841 | /* 10 */ V(14, 3, 2), |
2842 | /* 11 */ V(9, 11, 2), | 2842 | /* 11 */ V(9, 11, 2), |
2843 | 2843 | ||
2844 | /* 0100 0101 ... */ | 2844 | /* 0100 0101 ... */ |
2845 | /* 00 */ V(11, 9, 2), /* 248 */ | 2845 | /* 00 */ V(11, 9, 2), /* 248 */ |
2846 | /* 01 */ V(10, 10, 2), | 2846 | /* 01 */ V(10, 10, 2), |
2847 | /* 10 */ V(14, 2, 2), | 2847 | /* 10 */ V(14, 2, 2), |
2848 | /* 11 */ V(1, 14, 2), | 2848 | /* 11 */ V(1, 14, 2), |
2849 | 2849 | ||
2850 | /* 0100 0110 ... */ | 2850 | /* 0100 0110 ... */ |
2851 | /* 00 */ V(14, 1, 2), /* 252 */ | 2851 | /* 00 */ V(14, 1, 2), /* 252 */ |
2852 | /* 01 */ V(5, 13, 2), | 2852 | /* 01 */ V(5, 13, 2), |
2853 | /* 10 */ V(13, 5, 2), | 2853 | /* 10 */ V(13, 5, 2), |
2854 | /* 11 */ V(7, 12, 2), | 2854 | /* 11 */ V(7, 12, 2), |
2855 | 2855 | ||
2856 | /* 0100 0111 ... */ | 2856 | /* 0100 0111 ... */ |
2857 | /* 00 */ V(12, 7, 2), /* 256 */ | 2857 | /* 00 */ V(12, 7, 2), /* 256 */ |
2858 | /* 01 */ V(4, 13, 2), | 2858 | /* 01 */ V(4, 13, 2), |
2859 | /* 10 */ V(8, 11, 2), | 2859 | /* 10 */ V(8, 11, 2), |
2860 | /* 11 */ V(11, 8, 2), | 2860 | /* 11 */ V(11, 8, 2), |
2861 | 2861 | ||
2862 | /* 0100 1000 ... */ | 2862 | /* 0100 1000 ... */ |
2863 | /* 00 */ V(13, 4, 2), /* 260 */ | 2863 | /* 00 */ V(13, 4, 2), /* 260 */ |
2864 | /* 01 */ V(9, 10, 2), | 2864 | /* 01 */ V(9, 10, 2), |
2865 | /* 10 */ V(10, 9, 2), | 2865 | /* 10 */ V(10, 9, 2), |
2866 | /* 11 */ V(6, 12, 2), | 2866 | /* 11 */ V(6, 12, 2), |
2867 | 2867 | ||
2868 | /* 0100 1001 ... */ | 2868 | /* 0100 1001 ... */ |
2869 | /* 00 */ V(12, 6, 2), /* 264 */ | 2869 | /* 00 */ V(12, 6, 2), /* 264 */ |
2870 | /* 01 */ V(3, 13, 2), | 2870 | /* 01 */ V(3, 13, 2), |
2871 | /* 10 */ V(13, 3, 2), | 2871 | /* 10 */ V(13, 3, 2), |
2872 | /* 11 */ V(2, 13, 2), | 2872 | /* 11 */ V(2, 13, 2), |
2873 | 2873 | ||
2874 | /* 0100 1010 ... */ | 2874 | /* 0100 1010 ... */ |
2875 | /* 00 */ V(13, 2, 2), /* 268 */ | 2875 | /* 00 */ V(13, 2, 2), /* 268 */ |
2876 | /* 01 */ V(1, 13, 2), | 2876 | /* 01 */ V(1, 13, 2), |
2877 | /* 10 */ V(7, 11, 2), | 2877 | /* 10 */ V(7, 11, 2), |
2878 | /* 11 */ V(11, 7, 2), | 2878 | /* 11 */ V(11, 7, 2), |
2879 | 2879 | ||
2880 | /* 0100 1011 ... */ | 2880 | /* 0100 1011 ... */ |
2881 | /* 00 */ V(13, 1, 2), /* 272 */ | 2881 | /* 00 */ V(13, 1, 2), /* 272 */ |
2882 | /* 01 */ V(5, 12, 2), | 2882 | /* 01 */ V(5, 12, 2), |
2883 | /* 10 */ V(12, 5, 2), | 2883 | /* 10 */ V(12, 5, 2), |
2884 | /* 11 */ V(8, 10, 2), | 2884 | /* 11 */ V(8, 10, 2), |
2885 | 2885 | ||
2886 | /* 0100 1100 ... */ | 2886 | /* 0100 1100 ... */ |
2887 | /* 00 */ V(10, 8, 2), /* 276 */ | 2887 | /* 00 */ V(10, 8, 2), /* 276 */ |
2888 | /* 01 */ V(9, 9, 2), | 2888 | /* 01 */ V(9, 9, 2), |
2889 | /* 10 */ V(4, 12, 2), | 2889 | /* 10 */ V(4, 12, 2), |
2890 | /* 11 */ V(12, 4, 2), | 2890 | /* 11 */ V(12, 4, 2), |
2891 | 2891 | ||
2892 | /* 0100 1101 ... */ | 2892 | /* 0100 1101 ... */ |
2893 | /* 000 */ V(6, 11, 2), /* 280 */ | 2893 | /* 000 */ V(6, 11, 2), /* 280 */ |
2894 | /* 001 */ V(6, 11, 2), | 2894 | /* 001 */ V(6, 11, 2), |
2895 | /* 010 */ V(11, 6, 2), | 2895 | /* 010 */ V(11, 6, 2), |
2896 | /* 011 */ V(11, 6, 2), | 2896 | /* 011 */ V(11, 6, 2), |
@@ -2900,25 +2900,25 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2900 | /* 111 */ V(3, 12, 2), | 2900 | /* 111 */ V(3, 12, 2), |
2901 | 2901 | ||
2902 | /* 0100 1110 ... */ | 2902 | /* 0100 1110 ... */ |
2903 | /* 00 */ V(12, 3, 2), /* 288 */ | 2903 | /* 00 */ V(12, 3, 2), /* 288 */ |
2904 | /* 01 */ V(7, 10, 2), | 2904 | /* 01 */ V(7, 10, 2), |
2905 | /* 10 */ V(10, 7, 2), | 2905 | /* 10 */ V(10, 7, 2), |
2906 | /* 11 */ V(2, 12, 2), | 2906 | /* 11 */ V(2, 12, 2), |
2907 | 2907 | ||
2908 | /* 0100 1111 ... */ | 2908 | /* 0100 1111 ... */ |
2909 | /* 00 */ V(12, 2, 2), /* 292 */ | 2909 | /* 00 */ V(12, 2, 2), /* 292 */ |
2910 | /* 01 */ V(5, 11, 2), | 2910 | /* 01 */ V(5, 11, 2), |
2911 | /* 10 */ V(11, 5, 2), | 2911 | /* 10 */ V(11, 5, 2), |
2912 | /* 11 */ V(1, 12, 2), | 2912 | /* 11 */ V(1, 12, 2), |
2913 | 2913 | ||
2914 | /* 0101 0000 ... */ | 2914 | /* 0101 0000 ... */ |
2915 | /* 00 */ V(8, 9, 2), /* 296 */ | 2915 | /* 00 */ V(8, 9, 2), /* 296 */ |
2916 | /* 01 */ V(9, 8, 2), | 2916 | /* 01 */ V(9, 8, 2), |
2917 | /* 10 */ V(12, 1, 2), | 2917 | /* 10 */ V(12, 1, 2), |
2918 | /* 11 */ V(4, 11, 2), | 2918 | /* 11 */ V(4, 11, 2), |
2919 | 2919 | ||
2920 | /* 0101 0001 ... */ | 2920 | /* 0101 0001 ... */ |
2921 | /* 000 */ V(12, 0, 3), /* 300 */ | 2921 | /* 000 */ V(12, 0, 3), /* 300 */ |
2922 | /* 001 */ V(0, 11, 3), | 2922 | /* 001 */ V(0, 11, 3), |
2923 | /* 010 */ V(3, 11, 2), | 2923 | /* 010 */ V(3, 11, 2), |
2924 | /* 011 */ V(3, 11, 2), | 2924 | /* 011 */ V(3, 11, 2), |
@@ -2928,13 +2928,13 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2928 | /* 111 */ V(1, 10, 2), | 2928 | /* 111 */ V(1, 10, 2), |
2929 | 2929 | ||
2930 | /* 0101 0010 ... */ | 2930 | /* 0101 0010 ... */ |
2931 | /* 00 */ V(11, 4, 1), /* 308 */ | 2931 | /* 00 */ V(11, 4, 1), /* 308 */ |
2932 | /* 01 */ V(11, 4, 1), | 2932 | /* 01 */ V(11, 4, 1), |
2933 | /* 10 */ V(6, 10, 2), | 2933 | /* 10 */ V(6, 10, 2), |
2934 | /* 11 */ V(10, 6, 2), | 2934 | /* 11 */ V(10, 6, 2), |
2935 | 2935 | ||
2936 | /* 0101 0011 ... */ | 2936 | /* 0101 0011 ... */ |
2937 | /* 000 */ V(7, 9, 2), /* 312 */ | 2937 | /* 000 */ V(7, 9, 2), /* 312 */ |
2938 | /* 001 */ V(7, 9, 2), | 2938 | /* 001 */ V(7, 9, 2), |
2939 | /* 010 */ V(9, 7, 2), | 2939 | /* 010 */ V(9, 7, 2), |
2940 | /* 011 */ V(9, 7, 2), | 2940 | /* 011 */ V(9, 7, 2), |
@@ -2944,125 +2944,125 @@ union huffpair const hufftab24[] ICONST_ATTR_MPA_HUFFMAN = { | |||
2944 | /* 111 */ V(9, 0, 2), | 2944 | /* 111 */ V(9, 0, 2), |
2945 | 2945 | ||
2946 | /* 0101 0100 ... */ | 2946 | /* 0101 0100 ... */ |
2947 | /* 0 */ V(11, 3, 1), /* 320 */ | 2947 | /* 0 */ V(11, 3, 1), /* 320 */ |
2948 | /* 1 */ V(8, 8, 1), | 2948 | /* 1 */ V(8, 8, 1), |
2949 | 2949 | ||
2950 | /* 0101 0101 ... */ | 2950 | /* 0101 0101 ... */ |
2951 | /* 00 */ V(2, 11, 2), /* 322 */ | 2951 | /* 00 */ V(2, 11, 2), /* 322 */ |
2952 | /* 01 */ V(5, 10, 2), | 2952 | /* 01 */ V(5, 10, 2), |
2953 | /* 10 */ V(11, 2, 1), | 2953 | /* 10 */ V(11, 2, 1), |
2954 | /* 11 */ V(11, 2, 1), | 2954 | /* 11 */ V(11, 2, 1), |
2955 | 2955 | ||
2956 | /* 0101 0110 ... */ | 2956 | /* 0101 0110 ... */ |
2957 | /* 00 */ V(10, 5, 2), /* 326 */ | 2957 | /* 00 */ V(10, 5, 2), /* 326 */ |
2958 | /* 01 */ V(1, 11, 2), | 2958 | /* 01 */ V(1, 11, 2), |
2959 | /* 10 */ V(11, 1, 2), | 2959 | /* 10 */ V(11, 1, 2), |
2960 | /* 11 */ V(6, 9, 2), | 2960 | /* 11 */ V(6, 9, 2), |
2961 | 2961 | ||
2962 | /* 0101 0111 ... */ | 2962 | /* 0101 0111 ... */ |
2963 | /* 0 */ V(9, 6, 1), /* 330 */ | 2963 | /* 0 */ V(9, 6, 1), /* 330 */ |
2964 | /* 1 */ V(10, 4, 1), | 2964 | /* 1 */ V(10, 4, 1), |
2965 | 2965 | ||
2966 | /* 0101 1000 ... */ | 2966 | /* 0101 1000 ... */ |
2967 | /* 00 */ V(4, 10, 2), /* 332 */ | 2967 | /* 00 */ V(4, 10, 2), /* 332 */ |
2968 | /* 01 */ V(7, 8, 2), | 2968 | /* 01 */ V(7, 8, 2), |
2969 | /* 10 */ V(8, 7, 1), | 2969 | /* 10 */ V(8, 7, 1), |
2970 | /* 11 */ V(8, 7, 1), | 2970 | /* 11 */ V(8, 7, 1), |
2971 | 2971 | ||
2972 | /* 0101 1001 ... */ | 2972 | /* 0101 1001 ... */ |
2973 | /* 0 */ V(3, 10, 1), /* 336 */ | 2973 | /* 0 */ V(3, 10, 1), /* 336 */ |
2974 | /* 1 */ V(10, 3, 1), | 2974 | /* 1 */ V(10, 3, 1), |
2975 | 2975 | ||
2976 | /* 0101 1010 ... */ | 2976 | /* 0101 1010 ... */ |
2977 | /* 0 */ V(5, 9, 1), /* 338 */ | 2977 | /* 0 */ V(5, 9, 1), /* 338 */ |
2978 | /* 1 */ V(9, 5, 1), | 2978 | /* 1 */ V(9, 5, 1), |
2979 | 2979 | ||
2980 | /* 0101 1011 ... */ | 2980 | /* 0101 1011 ... */ |
2981 | /* 0 */ V(2, 10, 1), /* 340 */ | 2981 | /* 0 */ V(2, 10, 1), /* 340 */ |
2982 | /* 1 */ V(10, 2, 1), | 2982 | /* 1 */ V(10, 2, 1), |
2983 | 2983 | ||
2984 | /* 0101 1100 ... */ | 2984 | /* 0101 1100 ... */ |
2985 | /* 0 */ V(10, 1, 1), /* 342 */ | 2985 | /* 0 */ V(10, 1, 1), /* 342 */ |
2986 | /* 1 */ V(6, 8, 1), | 2986 | /* 1 */ V(6, 8, 1), |
2987 | 2987 | ||
2988 | /* 0101 1101 ... */ | 2988 | /* 0101 1101 ... */ |
2989 | /* 0 */ V(8, 6, 1), /* 344 */ | 2989 | /* 0 */ V(8, 6, 1), /* 344 */ |
2990 | /* 1 */ V(7, 7, 1), | 2990 | /* 1 */ V(7, 7, 1), |
2991 | 2991 | ||
2992 | /* 0101 1110 ... */ | 2992 | /* 0101 1110 ... */ |
2993 | /* 0 */ V(4, 9, 1), /* 346 */ | 2993 | /* 0 */ V(4, 9, 1), /* 346 */ |
2994 | /* 1 */ V(9, 4, 1), | 2994 | /* 1 */ V(9, 4, 1), |
2995 | 2995 | ||
2996 | /* 0101 1111 ... */ | 2996 | /* 0101 1111 ... */ |
2997 | /* 0 */ V(3, 9, 1), /* 348 */ | 2997 | /* 0 */ V(3, 9, 1), /* 348 */ |
2998 | /* 1 */ V(9, 3, 1), | 2998 | /* 1 */ V(9, 3, 1), |
2999 | 2999 | ||
3000 | /* 0110 0000 ... */ | 3000 | /* 0110 0000 ... */ |
3001 | /* 0 */ V(5, 8, 1), /* 350 */ | 3001 | /* 0 */ V(5, 8, 1), /* 350 */ |
3002 | /* 1 */ V(8, 5, 1), | 3002 | /* 1 */ V(8, 5, 1), |
3003 | 3003 | ||
3004 | /* 0110 0001 ... */ | 3004 | /* 0110 0001 ... */ |
3005 | /* 0 */ V(2, 9, 1), /* 352 */ | 3005 | /* 0 */ V(2, 9, 1), /* 352 */ |
3006 | /* 1 */ V(6, 7, 1), | 3006 | /* 1 */ V(6, 7, 1), |
3007 | 3007 | ||
3008 | /* 0110 0010 ... */ | 3008 | /* 0110 0010 ... */ |
3009 | /* 0 */ V(7, 6, 1), /* 354 */ | 3009 | /* 0 */ V(7, 6, 1), /* 354 */ |
3010 | /* 1 */ V(9, 2, 1), | 3010 | /* 1 */ V(9, 2, 1), |
3011 | 3011 | ||
3012 | /* 0110 0011 ... */ | 3012 | /* 0110 0011 ... */ |
3013 | /* 0 */ V(1, 9, 1), /* 356 */ | 3013 | /* 0 */ V(1, 9, 1), /* 356 */ |
3014 | /* 1 */ V(9, 1, 1), | 3014 | /* 1 */ V(9, 1, 1), |
3015 | 3015 | ||
3016 | /* 0110 0100 ... */ | 3016 | /* 0110 0100 ... */ |
3017 | /* 0 */ V(4, 8, 1), /* 358 */ | 3017 | /* 0 */ V(4, 8, 1), /* 358 */ |
3018 | /* 1 */ V(8, 4, 1), | 3018 | /* 1 */ V(8, 4, 1), |
3019 | 3019 | ||
3020 | /* 0110 0101 ... */ | 3020 | /* 0110 0101 ... */ |
3021 | /* 0 */ V(5, 7, 1), /* 360 */ | 3021 | /* 0 */ V(5, 7, 1), /* 360 */ |
3022 | /* 1 */ V(7, 5, 1), | 3022 | /* 1 */ V(7, 5, 1), |
3023 | 3023 | ||
3024 | /* 0110 0110 ... */ | 3024 | /* 0110 0110 ... */ |
3025 | /* 0 */ V(3, 8, 1), /* 362 */ | 3025 | /* 0 */ V(3, 8, 1), /* 362 */ |
3026 | /* 1 */ V(8, 3, 1), | 3026 | /* 1 */ V(8, 3, 1), |
3027 | 3027 | ||
3028 | /* 0110 0111 ... */ | 3028 | /* 0110 0111 ... */ |
3029 | /* 0 */ V(6, 6, 1), /* 364 */ | 3029 | /* 0 */ V(6, 6, 1), /* 364 */ |
3030 | /* 1 */ V(2, 8, 1), | 3030 | /* 1 */ V(2, 8, 1), |
3031 | 3031 | ||
3032 | /* 0110 1000 ... */ | 3032 | /* 0110 1000 ... */ |
3033 | /* 0 */ V(8, 2, 1), /* 366 */ | 3033 | /* 0 */ V(8, 2, 1), /* 366 */ |
3034 | /* 1 */ V(1, 8, 1), | 3034 | /* 1 */ V(1, 8, 1), |
3035 | 3035 | ||
3036 | /* 0110 1001 ... */ | 3036 | /* 0110 1001 ... */ |
3037 | /* 0 */ V(4, 7, 1), /* 368 */ | 3037 | /* 0 */ V(4, 7, 1), /* 368 */ |
3038 | /* 1 */ V(7, 4, 1), | 3038 | /* 1 */ V(7, 4, 1), |
3039 | 3039 | ||
3040 | /* 0110 1010 ... */ | 3040 | /* 0110 1010 ... */ |
3041 | /* 00 */ V(8, 1, 1), /* 370 */ | 3041 | /* 00 */ V(8, 1, 1), /* 370 */ |
3042 | /* 01 */ V(8, 1, 1), | 3042 | /* 01 */ V(8, 1, 1), |
3043 | /* 10 */ V(0, 8, 2), | 3043 | /* 10 */ V(0, 8, 2), |
3044 | /* 11 */ V(8, 0, 2), | 3044 | /* 11 */ V(8, 0, 2), |
3045 | 3045 | ||
3046 | /* 0110 1011 ... */ | 3046 | /* 0110 1011 ... */ |
3047 | /* 0 */ V(5, 6, 1), /* 374 */ | 3047 | /* 0 */ V(5, 6, 1), /* 374 */ |
3048 | /* 1 */ V(6, 5, 1), | 3048 | /* 1 */ V(6, 5, 1), |
3049 | 3049 | ||
3050 | /* 0110 1100 ... */ | 3050 | /* 0110 1100 ... */ |
3051 | /* 00 */ V(1, 7, 1), /* 376 */ | 3051 | /* 00 */ V(1, 7, 1), /* 376 */ |
3052 | /* 01 */ V(1, 7, 1), | 3052 | /* 01 */ V(1, 7, 1), |
3053 | /* 10 */ V(0, 7, 2), | 3053 | /* 10 */ V(0, 7, 2), |
3054 | /* 11 */ V(7, 0, 2), | 3054 | /* 11 */ V(7, 0, 2), |
3055 | 3055 | ||
3056 | /* 0110 1110 ... */ | 3056 | /* 0110 1110 ... */ |
3057 | /* 0 */ V(3, 7, 1), /* 380 */ | 3057 | /* 0 */ V(3, 7, 1), /* 380 */ |
3058 | /* 1 */ V(2, 7, 1), | 3058 | /* 1 */ V(2, 7, 1), |
3059 | 3059 | ||
3060 | /* 0111 1100 ... */ | 3060 | /* 0111 1100 ... */ |
3061 | /* 0 */ V(0, 6, 1), /* 382 */ | 3061 | /* 0 */ V(0, 6, 1), /* 382 */ |
3062 | /* 1 */ V(6, 0, 1), | 3062 | /* 1 */ V(6, 0, 1), |
3063 | 3063 | ||
3064 | /* 1000 0011 ... */ | 3064 | /* 1000 0011 ... */ |
3065 | /* 0 */ V(0, 5, 1), /* 384 */ | 3065 | /* 0 */ V(0, 5, 1), /* 384 */ |
3066 | /* 1 */ V(5, 0, 1) | 3066 | /* 1 */ V(5, 0, 1) |
3067 | }; | 3067 | }; |
3068 | 3068 | ||
diff --git a/apps/codecs/libmad/layer12.c b/apps/codecs/libmad/layer12.c index ccac392b42..d294266e69 100644 --- a/apps/codecs/libmad/layer12.c +++ b/apps/codecs/libmad/layer12.c | |||
@@ -69,8 +69,8 @@ mad_fixed_t const linear_table[14] ICONST_ATTR = { | |||
69 | }; | 69 | }; |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * NAME: I_sample() | 72 | * NAME: I_sample() |
73 | * DESCRIPTION: decode one requantized Layer I sample from a bitstream | 73 | * DESCRIPTION: decode one requantized Layer I sample from a bitstream |
74 | */ | 74 | */ |
75 | static inline | 75 | static inline |
76 | mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb) | 76 | mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb) |
@@ -99,8 +99,8 @@ mad_fixed_t I_sample(struct mad_bitptr *ptr, unsigned int nb) | |||
99 | } | 99 | } |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * NAME: layer->I() | 102 | * NAME: layer->I() |
103 | * DESCRIPTION: decode a single Layer I frame | 103 | * DESCRIPTION: decode a single Layer I frame |
104 | */ | 104 | */ |
105 | int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame) | 105 | int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame) |
106 | { | 106 | { |
@@ -121,10 +121,10 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame) | |||
121 | if (header->flags & MAD_FLAG_PROTECTION) { | 121 | if (header->flags & MAD_FLAG_PROTECTION) { |
122 | header->crc_check = | 122 | header->crc_check = |
123 | mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)), | 123 | mad_bit_crc(stream->ptr, 4 * (bound * nch + (32 - bound)), |
124 | header->crc_check); | 124 | header->crc_check); |
125 | 125 | ||
126 | if (header->crc_check != header->crc_target && | 126 | if (header->crc_check != header->crc_target && |
127 | !(frame->options & MAD_OPTION_IGNORECRC)) { | 127 | !(frame->options & MAD_OPTION_IGNORECRC)) { |
128 | stream->error = MAD_ERROR_BADCRC; | 128 | stream->error = MAD_ERROR_BADCRC; |
129 | return -1; | 129 | return -1; |
130 | } | 130 | } |
@@ -137,8 +137,8 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame) | |||
137 | nb = mad_bit_read(&stream->ptr, 4); | 137 | nb = mad_bit_read(&stream->ptr, 4); |
138 | 138 | ||
139 | if (nb == 15) { | 139 | if (nb == 15) { |
140 | stream->error = MAD_ERROR_BADBITALLOC; | 140 | stream->error = MAD_ERROR_BADBITALLOC; |
141 | return -1; | 141 | return -1; |
142 | } | 142 | } |
143 | 143 | ||
144 | allocation[ch][sb] = nb ? nb + 1 : 0; | 144 | allocation[ch][sb] = nb ? nb + 1 : 0; |
@@ -162,18 +162,18 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame) | |||
162 | for (sb = 0; sb < 32; ++sb) { | 162 | for (sb = 0; sb < 32; ++sb) { |
163 | for (ch = 0; ch < nch; ++ch) { | 163 | for (ch = 0; ch < nch; ++ch) { |
164 | if (allocation[ch][sb]) { | 164 | if (allocation[ch][sb]) { |
165 | scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6); | 165 | scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6); |
166 | 166 | ||
167 | # if defined(OPT_STRICT) | 167 | # if defined(OPT_STRICT) |
168 | /* | 168 | /* |
169 | * Scalefactor index 63 does not appear in Table B.1 of | 169 | * Scalefactor index 63 does not appear in Table B.1 of |
170 | * ISO/IEC 11172-3. Nonetheless, other implementations accept it, | 170 | * ISO/IEC 11172-3. Nonetheless, other implementations accept it, |
171 | * so we only reject it if OPT_STRICT is defined. | 171 | * so we only reject it if OPT_STRICT is defined. |
172 | */ | 172 | */ |
173 | if (scalefactor[ch][sb] == 63) { | 173 | if (scalefactor[ch][sb] == 63) { |
174 | stream->error = MAD_ERROR_BADSCALEFACTOR; | 174 | stream->error = MAD_ERROR_BADSCALEFACTOR; |
175 | return -1; | 175 | return -1; |
176 | } | 176 | } |
177 | # endif | 177 | # endif |
178 | } | 178 | } |
179 | } | 179 | } |
@@ -184,27 +184,27 @@ int mad_layer_I(struct mad_stream *stream, struct mad_frame *frame) | |||
184 | for (s = 0; s < 12; ++s) { | 184 | for (s = 0; s < 12; ++s) { |
185 | for (sb = 0; sb < bound; ++sb) { | 185 | for (sb = 0; sb < bound; ++sb) { |
186 | for (ch = 0; ch < nch; ++ch) { | 186 | for (ch = 0; ch < nch; ++ch) { |
187 | nb = allocation[ch][sb]; | 187 | nb = allocation[ch][sb]; |
188 | (*frame->sbsample)[ch][s][sb] = nb ? | 188 | (*frame->sbsample)[ch][s][sb] = nb ? |
189 | mad_f_mul(I_sample(&stream->ptr, nb), | 189 | mad_f_mul(I_sample(&stream->ptr, nb), |
190 | sf_table[scalefactor[ch][sb]]) : 0; | 190 | sf_table[scalefactor[ch][sb]]) : 0; |
191 | } | 191 | } |
192 | } | 192 | } |
193 | 193 | ||
194 | for (sb = bound; sb < 32; ++sb) { | 194 | for (sb = bound; sb < 32; ++sb) { |
195 | if ((nb = allocation[0][sb])) { | 195 | if ((nb = allocation[0][sb])) { |
196 | mad_fixed_t sample; | 196 | mad_fixed_t sample; |
197 | 197 | ||
198 | sample = I_sample(&stream->ptr, nb); | 198 | sample = I_sample(&stream->ptr, nb); |
199 | 199 | ||
200 | for (ch = 0; ch < nch; ++ch) { | 200 | for (ch = 0; ch < nch; ++ch) { |
201 | (*frame->sbsample)[ch][s][sb] = | 201 | (*frame->sbsample)[ch][s][sb] = |
202 | mad_f_mul(sample, sf_table[scalefactor[ch][sb]]); | 202 | mad_f_mul(sample, sf_table[scalefactor[ch][sb]]); |
203 | } | 203 | } |
204 | } | 204 | } |
205 | else { | 205 | else { |
206 | for (ch = 0; ch < nch; ++ch) | 206 | for (ch = 0; ch < nch; ++ch) |
207 | (*frame->sbsample)[ch][s][sb] = 0; | 207 | (*frame->sbsample)[ch][s][sb] = 0; |
208 | } | 208 | } |
209 | } | 209 | } |
210 | } | 210 | } |
@@ -221,18 +221,18 @@ struct { | |||
221 | unsigned char const offsets[30]; | 221 | unsigned char const offsets[30]; |
222 | } const sbquant_table[5] = { | 222 | } const sbquant_table[5] = { |
223 | /* ISO/IEC 11172-3 Table B.2a */ | 223 | /* ISO/IEC 11172-3 Table B.2a */ |
224 | { 27, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, /* 0 */ | 224 | { 27, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, /* 0 */ |
225 | 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 } }, | 225 | 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0 } }, |
226 | /* ISO/IEC 11172-3 Table B.2b */ | 226 | /* ISO/IEC 11172-3 Table B.2b */ |
227 | { 30, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, /* 1 */ | 227 | { 30, { 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, /* 1 */ |
228 | 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 } }, | 228 | 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0 } }, |
229 | /* ISO/IEC 11172-3 Table B.2c */ | 229 | /* ISO/IEC 11172-3 Table B.2c */ |
230 | { 8, { 5, 5, 2, 2, 2, 2, 2, 2 } }, /* 2 */ | 230 | { 8, { 5, 5, 2, 2, 2, 2, 2, 2 } }, /* 2 */ |
231 | /* ISO/IEC 11172-3 Table B.2d */ | 231 | /* ISO/IEC 11172-3 Table B.2d */ |
232 | { 12, { 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } }, /* 3 */ | 232 | { 12, { 5, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 } }, /* 3 */ |
233 | /* ISO/IEC 13818-3 Table B.1 */ | 233 | /* ISO/IEC 13818-3 Table B.1 */ |
234 | { 30, { 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, /* 4 */ | 234 | { 30, { 4, 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, /* 4 */ |
235 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } } | 235 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } } |
236 | }; | 236 | }; |
237 | 237 | ||
238 | /* bit allocation table */ | 238 | /* bit allocation table */ |
@@ -275,13 +275,13 @@ struct quantclass { | |||
275 | }; | 275 | }; |
276 | 276 | ||
277 | /* | 277 | /* |
278 | * NAME: II_samples() | 278 | * NAME: II_samples() |
279 | * DESCRIPTION: decode three requantized Layer II samples from a bitstream | 279 | * DESCRIPTION: decode three requantized Layer II samples from a bitstream |
280 | */ | 280 | */ |
281 | static | 281 | static |
282 | void II_samples(struct mad_bitptr *ptr, | 282 | void II_samples(struct mad_bitptr *ptr, |
283 | struct quantclass const *quantclass, | 283 | struct quantclass const *quantclass, |
284 | mad_fixed_t output[3]) | 284 | mad_fixed_t output[3]) |
285 | { | 285 | { |
286 | unsigned int nb, s, sample[3]; | 286 | unsigned int nb, s, sample[3]; |
287 | 287 | ||
@@ -326,8 +326,8 @@ void II_samples(struct mad_bitptr *ptr, | |||
326 | } | 326 | } |
327 | 327 | ||
328 | /* | 328 | /* |
329 | * NAME: layer->II() | 329 | * NAME: layer->II() |
330 | * DESCRIPTION: decode a single Layer II frame | 330 | * DESCRIPTION: decode a single Layer II frame |
331 | */ | 331 | */ |
332 | int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | 332 | int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) |
333 | { | 333 | { |
@@ -358,19 +358,19 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | |||
358 | * restriction. We enforce it if OPT_STRICT is defined. | 358 | * restriction. We enforce it if OPT_STRICT is defined. |
359 | */ | 359 | */ |
360 | if (bitrate_per_channel <= 28000 || bitrate_per_channel == 40000) { | 360 | if (bitrate_per_channel <= 28000 || bitrate_per_channel == 40000) { |
361 | stream->error = MAD_ERROR_BADMODE; | 361 | stream->error = MAD_ERROR_BADMODE; |
362 | return -1; | 362 | return -1; |
363 | } | 363 | } |
364 | # endif | 364 | # endif |
365 | } | 365 | } |
366 | else { /* nch == 1 */ | 366 | else { /* nch == 1 */ |
367 | if (bitrate_per_channel > 192000) { | 367 | if (bitrate_per_channel > 192000) { |
368 | /* | 368 | /* |
369 | * ISO/IEC 11172-3 does not allow single channel mode for 224, 256, | 369 | * ISO/IEC 11172-3 does not allow single channel mode for 224, 256, |
370 | * 320, or 384 kbps bitrates in Layer II. | 370 | * 320, or 384 kbps bitrates in Layer II. |
371 | */ | 371 | */ |
372 | stream->error = MAD_ERROR_BADMODE; | 372 | stream->error = MAD_ERROR_BADMODE; |
373 | return -1; | 373 | return -1; |
374 | } | 374 | } |
375 | } | 375 | } |
376 | 376 | ||
@@ -419,7 +419,7 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | |||
419 | for (sb = 0; sb < sblimit; ++sb) { | 419 | for (sb = 0; sb < sblimit; ++sb) { |
420 | for (ch = 0; ch < nch; ++ch) { | 420 | for (ch = 0; ch < nch; ++ch) { |
421 | if (allocation[ch][sb]) | 421 | if (allocation[ch][sb]) |
422 | scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2); | 422 | scfsi[ch][sb] = mad_bit_read(&stream->ptr, 2); |
423 | } | 423 | } |
424 | } | 424 | } |
425 | 425 | ||
@@ -428,10 +428,10 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | |||
428 | if (header->flags & MAD_FLAG_PROTECTION) { | 428 | if (header->flags & MAD_FLAG_PROTECTION) { |
429 | header->crc_check = | 429 | header->crc_check = |
430 | mad_bit_crc(start, mad_bit_length(&start, &stream->ptr), | 430 | mad_bit_crc(start, mad_bit_length(&start, &stream->ptr), |
431 | header->crc_check); | 431 | header->crc_check); |
432 | 432 | ||
433 | if (header->crc_check != header->crc_target && | 433 | if (header->crc_check != header->crc_target && |
434 | !(frame->options & MAD_OPTION_IGNORECRC)) { | 434 | !(frame->options & MAD_OPTION_IGNORECRC)) { |
435 | stream->error = MAD_ERROR_BADCRC; | 435 | stream->error = MAD_ERROR_BADCRC; |
436 | return -1; | 436 | return -1; |
437 | } | 437 | } |
@@ -442,39 +442,39 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | |||
442 | for (sb = 0; sb < sblimit; ++sb) { | 442 | for (sb = 0; sb < sblimit; ++sb) { |
443 | for (ch = 0; ch < nch; ++ch) { | 443 | for (ch = 0; ch < nch; ++ch) { |
444 | if (allocation[ch][sb]) { | 444 | if (allocation[ch][sb]) { |
445 | scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6); | 445 | scalefactor[ch][sb][0] = mad_bit_read(&stream->ptr, 6); |
446 | 446 | ||
447 | switch (scfsi[ch][sb]) { | 447 | switch (scfsi[ch][sb]) { |
448 | case 2: | 448 | case 2: |
449 | scalefactor[ch][sb][2] = | 449 | scalefactor[ch][sb][2] = |
450 | scalefactor[ch][sb][1] = | 450 | scalefactor[ch][sb][1] = |
451 | scalefactor[ch][sb][0]; | 451 | scalefactor[ch][sb][0]; |
452 | break; | 452 | break; |
453 | 453 | ||
454 | case 0: | 454 | case 0: |
455 | scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6); | 455 | scalefactor[ch][sb][1] = mad_bit_read(&stream->ptr, 6); |
456 | /* fall through */ | 456 | /* fall through */ |
457 | 457 | ||
458 | case 1: | 458 | case 1: |
459 | case 3: | 459 | case 3: |
460 | scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6); | 460 | scalefactor[ch][sb][2] = mad_bit_read(&stream->ptr, 6); |
461 | } | 461 | } |
462 | 462 | ||
463 | if (scfsi[ch][sb] & 1) | 463 | if (scfsi[ch][sb] & 1) |
464 | scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1]; | 464 | scalefactor[ch][sb][1] = scalefactor[ch][sb][scfsi[ch][sb] - 1]; |
465 | 465 | ||
466 | # if defined(OPT_STRICT) | 466 | # if defined(OPT_STRICT) |
467 | /* | 467 | /* |
468 | * Scalefactor index 63 does not appear in Table B.1 of | 468 | * Scalefactor index 63 does not appear in Table B.1 of |
469 | * ISO/IEC 11172-3. Nonetheless, other implementations accept it, | 469 | * ISO/IEC 11172-3. Nonetheless, other implementations accept it, |
470 | * so we only reject it if OPT_STRICT is defined. | 470 | * so we only reject it if OPT_STRICT is defined. |
471 | */ | 471 | */ |
472 | if (scalefactor[ch][sb][0] == 63 || | 472 | if (scalefactor[ch][sb][0] == 63 || |
473 | scalefactor[ch][sb][1] == 63 || | 473 | scalefactor[ch][sb][1] == 63 || |
474 | scalefactor[ch][sb][2] == 63) { | 474 | scalefactor[ch][sb][2] == 63) { |
475 | stream->error = MAD_ERROR_BADSCALEFACTOR; | 475 | stream->error = MAD_ERROR_BADSCALEFACTOR; |
476 | return -1; | 476 | return -1; |
477 | } | 477 | } |
478 | # endif | 478 | # endif |
479 | } | 479 | } |
480 | } | 480 | } |
@@ -485,50 +485,50 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | |||
485 | for (gr = 0; gr < 12; ++gr) { | 485 | for (gr = 0; gr < 12; ++gr) { |
486 | for (sb = 0; sb < bound; ++sb) { | 486 | for (sb = 0; sb < bound; ++sb) { |
487 | for (ch = 0; ch < nch; ++ch) { | 487 | for (ch = 0; ch < nch; ++ch) { |
488 | if ((index = allocation[ch][sb])) { | 488 | if ((index = allocation[ch][sb])) { |
489 | int off = bitalloc_table[offsets[sb]].offset; | 489 | int off = bitalloc_table[offsets[sb]].offset; |
490 | index = offset_table[off][index - 1]; | 490 | index = offset_table[off][index - 1]; |
491 | 491 | ||
492 | II_samples(&stream->ptr, &qc_table[index], samples); | 492 | II_samples(&stream->ptr, &qc_table[index], samples); |
493 | 493 | ||
494 | for (s = 0; s < 3; ++s) { | 494 | for (s = 0; s < 3; ++s) { |
495 | (*frame->sbsample)[ch][3 * gr + s][sb] = | 495 | (*frame->sbsample)[ch][3 * gr + s][sb] = |
496 | mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]); | 496 | mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]); |
497 | } | 497 | } |
498 | } | 498 | } |
499 | else { | 499 | else { |
500 | for (s = 0; s < 3; ++s) | 500 | for (s = 0; s < 3; ++s) |
501 | (*frame->sbsample)[ch][3 * gr + s][sb] = 0; | 501 | (*frame->sbsample)[ch][3 * gr + s][sb] = 0; |
502 | } | 502 | } |
503 | } | 503 | } |
504 | } | 504 | } |
505 | 505 | ||
506 | for (sb = bound; sb < sblimit; ++sb) { | 506 | for (sb = bound; sb < sblimit; ++sb) { |
507 | if ((index = allocation[0][sb])) { | 507 | if ((index = allocation[0][sb])) { |
508 | int off = bitalloc_table[offsets[sb]].offset; | 508 | int off = bitalloc_table[offsets[sb]].offset; |
509 | index = offset_table[off][index - 1]; | 509 | index = offset_table[off][index - 1]; |
510 | 510 | ||
511 | II_samples(&stream->ptr, &qc_table[index], samples); | 511 | II_samples(&stream->ptr, &qc_table[index], samples); |
512 | 512 | ||
513 | for (ch = 0; ch < nch; ++ch) { | 513 | for (ch = 0; ch < nch; ++ch) { |
514 | for (s = 0; s < 3; ++s) { | 514 | for (s = 0; s < 3; ++s) { |
515 | (*frame->sbsample)[ch][3 * gr + s][sb] = | 515 | (*frame->sbsample)[ch][3 * gr + s][sb] = |
516 | mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]); | 516 | mad_f_mul(samples[s], sf_table[scalefactor[ch][sb][gr / 4]]); |
517 | } | 517 | } |
518 | } | 518 | } |
519 | } | 519 | } |
520 | else { | 520 | else { |
521 | for (ch = 0; ch < nch; ++ch) { | 521 | for (ch = 0; ch < nch; ++ch) { |
522 | for (s = 0; s < 3; ++s) | 522 | for (s = 0; s < 3; ++s) |
523 | (*frame->sbsample)[ch][3 * gr + s][sb] = 0; | 523 | (*frame->sbsample)[ch][3 * gr + s][sb] = 0; |
524 | } | 524 | } |
525 | } | 525 | } |
526 | } | 526 | } |
527 | 527 | ||
528 | for (ch = 0; ch < nch; ++ch) { | 528 | for (ch = 0; ch < nch; ++ch) { |
529 | for (s = 0; s < 3; ++s) { | 529 | for (s = 0; s < 3; ++s) { |
530 | for (sb = sblimit; sb < 32; ++sb) | 530 | for (sb = sblimit; sb < 32; ++sb) |
531 | (*frame->sbsample)[ch][3 * gr + s][sb] = 0; | 531 | (*frame->sbsample)[ch][3 * gr + s][sb] = 0; |
532 | } | 532 | } |
533 | } | 533 | } |
534 | } | 534 | } |
diff --git a/apps/codecs/libmad/layer3.c b/apps/codecs/libmad/layer3.c index 0a53086d78..2dcdeb96d4 100644 --- a/apps/codecs/libmad/layer3.c +++ b/apps/codecs/libmad/layer3.c | |||
@@ -57,7 +57,7 @@ | |||
57 | enum { | 57 | enum { |
58 | count1table_select = 0x01, | 58 | count1table_select = 0x01, |
59 | scalefac_scale = 0x02, | 59 | scalefac_scale = 0x02, |
60 | preflag = 0x04, | 60 | preflag = 0x04, |
61 | mixed_block_flag = 0x08 | 61 | mixed_block_flag = 0x08 |
62 | }; | 62 | }; |
63 | 63 | ||
@@ -88,7 +88,7 @@ struct sideinfo { | |||
88 | unsigned char region1_count; | 88 | unsigned char region1_count; |
89 | 89 | ||
90 | /* from main_data */ | 90 | /* from main_data */ |
91 | unsigned char scalefac[39]; /* scalefac_l and/or scalefac_s */ | 91 | unsigned char scalefac[39]; /* scalefac_l and/or scalefac_s */ |
92 | } ch[2]; | 92 | } ch[2]; |
93 | } gr[2]; | 93 | } gr[2]; |
94 | }; | 94 | }; |
@@ -502,14 +502,14 @@ mad_fixed_t const is_lsf_table[2][15] = { | |||
502 | }; | 502 | }; |
503 | 503 | ||
504 | /* | 504 | /* |
505 | * NAME: III_sideinfo() | 505 | * NAME: III_sideinfo() |
506 | * DESCRIPTION: decode frame side information from a bitstream | 506 | * DESCRIPTION: decode frame side information from a bitstream |
507 | */ | 507 | */ |
508 | static | 508 | static |
509 | enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch, | 509 | enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch, |
510 | int lsf, struct sideinfo *si, | 510 | int lsf, struct sideinfo *si, |
511 | unsigned int *data_bitlen, | 511 | unsigned int *data_bitlen, |
512 | unsigned int *priv_bitlen) | 512 | unsigned int *priv_bitlen) |
513 | { | 513 | { |
514 | unsigned int ngr, gr, ch, i; | 514 | unsigned int ngr, gr, ch, i; |
515 | enum mad_error result = MAD_ERROR_NONE; | 515 | enum mad_error result = MAD_ERROR_NONE; |
@@ -542,46 +542,46 @@ enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch, | |||
542 | *data_bitlen += channel->part2_3_length; | 542 | *data_bitlen += channel->part2_3_length; |
543 | 543 | ||
544 | if (channel->big_values > 288 && result == 0) | 544 | if (channel->big_values > 288 && result == 0) |
545 | result = MAD_ERROR_BADBIGVALUES; | 545 | result = MAD_ERROR_BADBIGVALUES; |
546 | 546 | ||
547 | channel->flags = 0; | 547 | channel->flags = 0; |
548 | 548 | ||
549 | /* window_switching_flag */ | 549 | /* window_switching_flag */ |
550 | if (mad_bit_read(ptr, 1)) { | 550 | if (mad_bit_read(ptr, 1)) { |
551 | channel->block_type = mad_bit_read(ptr, 2); | 551 | channel->block_type = mad_bit_read(ptr, 2); |
552 | 552 | ||
553 | if (channel->block_type == 0 && result == 0) | 553 | if (channel->block_type == 0 && result == 0) |
554 | result = MAD_ERROR_BADBLOCKTYPE; | 554 | result = MAD_ERROR_BADBLOCKTYPE; |
555 | 555 | ||
556 | if (!lsf && channel->block_type == 2 && si->scfsi[ch] && result == 0) | 556 | if (!lsf && channel->block_type == 2 && si->scfsi[ch] && result == 0) |
557 | result = MAD_ERROR_BADSCFSI; | 557 | result = MAD_ERROR_BADSCFSI; |
558 | 558 | ||
559 | channel->region0_count = 7; | 559 | channel->region0_count = 7; |
560 | channel->region1_count = 36; | 560 | channel->region1_count = 36; |
561 | 561 | ||
562 | if (mad_bit_read(ptr, 1)) | 562 | if (mad_bit_read(ptr, 1)) |
563 | channel->flags |= mixed_block_flag; | 563 | channel->flags |= mixed_block_flag; |
564 | else if (channel->block_type == 2) | 564 | else if (channel->block_type == 2) |
565 | channel->region0_count = 8; | 565 | channel->region0_count = 8; |
566 | 566 | ||
567 | for (i = 0; i < 2; ++i) | 567 | for (i = 0; i < 2; ++i) |
568 | channel->table_select[i] = mad_bit_read(ptr, 5); | 568 | channel->table_select[i] = mad_bit_read(ptr, 5); |
569 | 569 | ||
570 | # if defined(DEBUG) | 570 | # if defined(DEBUG) |
571 | channel->table_select[2] = 4; /* not used */ | 571 | channel->table_select[2] = 4; /* not used */ |
572 | # endif | 572 | # endif |
573 | 573 | ||
574 | for (i = 0; i < 3; ++i) | 574 | for (i = 0; i < 3; ++i) |
575 | channel->subblock_gain[i] = mad_bit_read(ptr, 3); | 575 | channel->subblock_gain[i] = mad_bit_read(ptr, 3); |
576 | } | 576 | } |
577 | else { | 577 | else { |
578 | channel->block_type = 0; | 578 | channel->block_type = 0; |
579 | 579 | ||
580 | for (i = 0; i < 3; ++i) | 580 | for (i = 0; i < 3; ++i) |
581 | channel->table_select[i] = mad_bit_read(ptr, 5); | 581 | channel->table_select[i] = mad_bit_read(ptr, 5); |
582 | 582 | ||
583 | channel->region0_count = mad_bit_read(ptr, 4); | 583 | channel->region0_count = mad_bit_read(ptr, 4); |
584 | channel->region1_count = mad_bit_read(ptr, 3); | 584 | channel->region1_count = mad_bit_read(ptr, 3); |
585 | } | 585 | } |
586 | 586 | ||
587 | /* [preflag,] scalefac_scale, count1table_select */ | 587 | /* [preflag,] scalefac_scale, count1table_select */ |
@@ -593,13 +593,13 @@ enum mad_error III_sideinfo(struct mad_bitptr *ptr, unsigned int nch, | |||
593 | } | 593 | } |
594 | 594 | ||
595 | /* | 595 | /* |
596 | * NAME: III_scalefactors_lsf() | 596 | * NAME: III_scalefactors_lsf() |
597 | * DESCRIPTION: decode channel scalefactors for LSF from a bitstream | 597 | * DESCRIPTION: decode channel scalefactors for LSF from a bitstream |
598 | */ | 598 | */ |
599 | static | 599 | static |
600 | unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, | 600 | unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, |
601 | struct channel *channel, | 601 | struct channel *channel, |
602 | struct channel *gr1ch, int mode_extension) | 602 | struct channel *gr1ch, int mode_extension) |
603 | { | 603 | { |
604 | struct mad_bitptr start; | 604 | struct mad_bitptr start; |
605 | unsigned int scalefac_compress, index, slen[4], part, n, i; | 605 | unsigned int scalefac_compress, index, slen[4], part, n, i; |
@@ -646,7 +646,7 @@ unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, | |||
646 | n = 0; | 646 | n = 0; |
647 | for (part = 0; part < 4; ++part) { | 647 | for (part = 0; part < 4; ++part) { |
648 | for (i = 0; i < nsfb[part]; ++i) | 648 | for (i = 0; i < nsfb[part]; ++i) |
649 | channel->scalefac[n++] = mad_bit_read(ptr, slen[part]); | 649 | channel->scalefac[n++] = mad_bit_read(ptr, slen[part]); |
650 | } | 650 | } |
651 | 651 | ||
652 | while (n < 39) | 652 | while (n < 39) |
@@ -691,10 +691,10 @@ unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, | |||
691 | max = (1 << slen[part]) - 1; | 691 | max = (1 << slen[part]) - 1; |
692 | 692 | ||
693 | for (i = 0; i < nsfb[part]; ++i) { | 693 | for (i = 0; i < nsfb[part]; ++i) { |
694 | is_pos = mad_bit_read(ptr, slen[part]); | 694 | is_pos = mad_bit_read(ptr, slen[part]); |
695 | 695 | ||
696 | channel->scalefac[n] = is_pos; | 696 | channel->scalefac[n] = is_pos; |
697 | gr1ch->scalefac[n++] = (is_pos == max); | 697 | gr1ch->scalefac[n++] = (is_pos == max); |
698 | } | 698 | } |
699 | } | 699 | } |
700 | 700 | ||
@@ -708,12 +708,12 @@ unsigned int III_scalefactors_lsf(struct mad_bitptr *ptr, | |||
708 | } | 708 | } |
709 | 709 | ||
710 | /* | 710 | /* |
711 | * NAME: III_scalefactors() | 711 | * NAME: III_scalefactors() |
712 | * DESCRIPTION: decode channel scalefactors of one granule from a bitstream | 712 | * DESCRIPTION: decode channel scalefactors of one granule from a bitstream |
713 | */ | 713 | */ |
714 | static | 714 | static |
715 | unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel, | 715 | unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel, |
716 | struct channel const *gr0ch, unsigned int scfsi) | 716 | struct channel const *gr0ch, unsigned int scfsi) |
717 | { | 717 | { |
718 | struct mad_bitptr start; | 718 | struct mad_bitptr start; |
719 | unsigned int slen1, slen2, sfbi; | 719 | unsigned int slen1, slen2, sfbi; |
@@ -743,38 +743,38 @@ unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel, | |||
743 | else { /* channel->block_type != 2 */ | 743 | else { /* channel->block_type != 2 */ |
744 | if (scfsi & 0x8) { | 744 | if (scfsi & 0x8) { |
745 | for (sfbi = 0; sfbi < 6; ++sfbi) | 745 | for (sfbi = 0; sfbi < 6; ++sfbi) |
746 | channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; | 746 | channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; |
747 | } | 747 | } |
748 | else { | 748 | else { |
749 | for (sfbi = 0; sfbi < 6; ++sfbi) | 749 | for (sfbi = 0; sfbi < 6; ++sfbi) |
750 | channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); | 750 | channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); |
751 | } | 751 | } |
752 | 752 | ||
753 | if (scfsi & 0x4) { | 753 | if (scfsi & 0x4) { |
754 | for (sfbi = 6; sfbi < 11; ++sfbi) | 754 | for (sfbi = 6; sfbi < 11; ++sfbi) |
755 | channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; | 755 | channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; |
756 | } | 756 | } |
757 | else { | 757 | else { |
758 | for (sfbi = 6; sfbi < 11; ++sfbi) | 758 | for (sfbi = 6; sfbi < 11; ++sfbi) |
759 | channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); | 759 | channel->scalefac[sfbi] = mad_bit_read(ptr, slen1); |
760 | } | 760 | } |
761 | 761 | ||
762 | if (scfsi & 0x2) { | 762 | if (scfsi & 0x2) { |
763 | for (sfbi = 11; sfbi < 16; ++sfbi) | 763 | for (sfbi = 11; sfbi < 16; ++sfbi) |
764 | channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; | 764 | channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; |
765 | } | 765 | } |
766 | else { | 766 | else { |
767 | for (sfbi = 11; sfbi < 16; ++sfbi) | 767 | for (sfbi = 11; sfbi < 16; ++sfbi) |
768 | channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); | 768 | channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); |
769 | } | 769 | } |
770 | 770 | ||
771 | if (scfsi & 0x1) { | 771 | if (scfsi & 0x1) { |
772 | for (sfbi = 16; sfbi < 21; ++sfbi) | 772 | for (sfbi = 16; sfbi < 21; ++sfbi) |
773 | channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; | 773 | channel->scalefac[sfbi] = gr0ch->scalefac[sfbi]; |
774 | } | 774 | } |
775 | else { | 775 | else { |
776 | for (sfbi = 16; sfbi < 21; ++sfbi) | 776 | for (sfbi = 16; sfbi < 21; ++sfbi) |
777 | channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); | 777 | channel->scalefac[sfbi] = mad_bit_read(ptr, slen2); |
778 | } | 778 | } |
779 | 779 | ||
780 | channel->scalefac[21] = 0; | 780 | channel->scalefac[21] = 0; |
@@ -806,12 +806,12 @@ unsigned int III_scalefactors(struct mad_bitptr *ptr, struct channel *channel, | |||
806 | */ | 806 | */ |
807 | 807 | ||
808 | /* | 808 | /* |
809 | * NAME: III_exponents() | 809 | * NAME: III_exponents() |
810 | * DESCRIPTION: calculate scalefactor exponents | 810 | * DESCRIPTION: calculate scalefactor exponents |
811 | */ | 811 | */ |
812 | static | 812 | static |
813 | void III_exponents(struct channel const *channel, | 813 | void III_exponents(struct channel const *channel, |
814 | unsigned char const *sfbwidth, signed int exponents[39]) | 814 | unsigned char const *sfbwidth, signed int exponents[39]) |
815 | { | 815 | { |
816 | signed int gain; | 816 | signed int gain; |
817 | unsigned int scalefac_multiplier, sfbi; | 817 | unsigned int scalefac_multiplier, sfbi; |
@@ -833,11 +833,11 @@ void III_exponents(struct channel const *channel, | |||
833 | /* long block subbands 0-1 */ | 833 | /* long block subbands 0-1 */ |
834 | 834 | ||
835 | while (l < 36) { | 835 | while (l < 36) { |
836 | exponents[sfbi] = gain - | 836 | exponents[sfbi] = gain - |
837 | (signed int) ((channel->scalefac[sfbi] + (pretab[sfbi] & premask)) << | 837 | (signed int) ((channel->scalefac[sfbi] + (pretab[sfbi] & premask)) << |
838 | scalefac_multiplier); | 838 | scalefac_multiplier); |
839 | 839 | ||
840 | l += sfbwidth[sfbi++]; | 840 | l += sfbwidth[sfbi++]; |
841 | } | 841 | } |
842 | } | 842 | } |
843 | 843 | ||
@@ -849,11 +849,11 @@ void III_exponents(struct channel const *channel, | |||
849 | 849 | ||
850 | while (l < 576) { | 850 | while (l < 576) { |
851 | exponents[sfbi + 0] = gain0 - | 851 | exponents[sfbi + 0] = gain0 - |
852 | (signed int) (channel->scalefac[sfbi + 0] << scalefac_multiplier); | 852 | (signed int) (channel->scalefac[sfbi + 0] << scalefac_multiplier); |
853 | exponents[sfbi + 1] = gain1 - | 853 | exponents[sfbi + 1] = gain1 - |
854 | (signed int) (channel->scalefac[sfbi + 1] << scalefac_multiplier); | 854 | (signed int) (channel->scalefac[sfbi + 1] << scalefac_multiplier); |
855 | exponents[sfbi + 2] = gain2 - | 855 | exponents[sfbi + 2] = gain2 - |
856 | (signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier); | 856 | (signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier); |
857 | unsigned int w = sfbwidth[sfbi]; | 857 | unsigned int w = sfbwidth[sfbi]; |
858 | l += 3 * w; | 858 | l += 3 * w; |
859 | sfbi += 3; | 859 | sfbi += 3; |
@@ -862,23 +862,23 @@ void III_exponents(struct channel const *channel, | |||
862 | else { /* channel->block_type != 2 */ | 862 | else { /* channel->block_type != 2 */ |
863 | if (channel->flags & preflag) { | 863 | if (channel->flags & preflag) { |
864 | for (sfbi = 0; sfbi < 22; ++sfbi) { | 864 | for (sfbi = 0; sfbi < 22; ++sfbi) { |
865 | exponents[sfbi] = gain - | 865 | exponents[sfbi] = gain - |
866 | (signed int) ((channel->scalefac[sfbi] + pretab[sfbi]) << | 866 | (signed int) ((channel->scalefac[sfbi] + pretab[sfbi]) << |
867 | scalefac_multiplier); | 867 | scalefac_multiplier); |
868 | } | 868 | } |
869 | } | 869 | } |
870 | else { | 870 | else { |
871 | for (sfbi = 0; sfbi < 22; ++sfbi) { | 871 | for (sfbi = 0; sfbi < 22; ++sfbi) { |
872 | exponents[sfbi] = gain - | 872 | exponents[sfbi] = gain - |
873 | (signed int) (channel->scalefac[sfbi] << scalefac_multiplier); | 873 | (signed int) (channel->scalefac[sfbi] << scalefac_multiplier); |
874 | } | 874 | } |
875 | } | 875 | } |
876 | } | 876 | } |
877 | } | 877 | } |
878 | 878 | ||
879 | /* | 879 | /* |
880 | * NAME: III_requantize() | 880 | * NAME: III_requantize() |
881 | * DESCRIPTION: requantize one (positive) value | 881 | * DESCRIPTION: requantize one (positive) value |
882 | */ | 882 | */ |
883 | static | 883 | static |
884 | mad_fixed_t III_requantize(unsigned int value, signed int exp) | 884 | mad_fixed_t III_requantize(unsigned int value, signed int exp) |
@@ -910,7 +910,7 @@ mad_fixed_t III_requantize(unsigned int value, signed int exp) | |||
910 | /* overflow */ | 910 | /* overflow */ |
911 | # if defined(DEBUG) | 911 | # if defined(DEBUG) |
912 | fprintf(stderr, "requantize overflow (%f * 2^%d)\n", | 912 | fprintf(stderr, "requantize overflow (%f * 2^%d)\n", |
913 | mad_f_todouble(requantized), exp); | 913 | mad_f_todouble(requantized), exp); |
914 | # endif | 914 | # endif |
915 | requantized = MAD_F_MAX; | 915 | requantized = MAD_F_MAX; |
916 | } | 916 | } |
@@ -932,21 +932,21 @@ mad_fixed_t III_requantize(unsigned int value, signed int exp) | |||
932 | res; \ | 932 | res; \ |
933 | }) | 933 | }) |
934 | #else | 934 | #else |
935 | # define MASK(cache, sz, bits) \ | 935 | # define MASK(cache, sz, bits) \ |
936 | (((cache) >> ((sz) - (bits))) & ((1 << (bits)) - 1)) | 936 | (((cache) >> ((sz) - (bits))) & ((1 << (bits)) - 1)) |
937 | #endif | 937 | #endif |
938 | # define MASK1BIT(cache, sz) \ | 938 | # define MASK1BIT(cache, sz) \ |
939 | ((cache) & (1 << ((sz) - 1))) | 939 | ((cache) & (1 << ((sz) - 1))) |
940 | 940 | ||
941 | /* | 941 | /* |
942 | * NAME: III_huffdecode() | 942 | * NAME: III_huffdecode() |
943 | * DESCRIPTION: decode Huffman code words of one channel of one granule | 943 | * DESCRIPTION: decode Huffman code words of one channel of one granule |
944 | */ | 944 | */ |
945 | static | 945 | static |
946 | enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | 946 | enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], |
947 | struct channel *channel, | 947 | struct channel *channel, |
948 | unsigned char const *sfbwidth, | 948 | unsigned char const *sfbwidth, |
949 | unsigned int part2_length) | 949 | unsigned int part2_length) |
950 | { | 950 | { |
951 | unsigned int bits; | 951 | unsigned int bits; |
952 | signed int exponents[39], exp; | 952 | signed int exponents[39], exp; |
@@ -999,23 +999,23 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
999 | else | 999 | else |
1000 | if(region == 0) | 1000 | if(region == 0) |
1001 | rcount = channel->region1_count + 1; | 1001 | rcount = channel->region1_count + 1; |
1002 | else | 1002 | else |
1003 | rcount = 0; /* all remaining */ | 1003 | rcount = 0; /* all remaining */ |
1004 | 1004 | ||
1005 | entry = &mad_huff_pair_table[channel->table_select[++region]]; | 1005 | entry = &mad_huff_pair_table[channel->table_select[++region]]; |
1006 | table = entry->table; | 1006 | table = entry->table; |
1007 | linbits = entry->linbits; | 1007 | linbits = entry->linbits; |
1008 | startbits = entry->startbits; | 1008 | startbits = entry->startbits; |
1009 | 1009 | ||
1010 | if(table == 0) | 1010 | if(table == 0) |
1011 | return MAD_ERROR_BADHUFFTABLE; | 1011 | return MAD_ERROR_BADHUFFTABLE; |
1012 | } | 1012 | } |
1013 | 1013 | ||
1014 | if(exp != *expptr) | 1014 | if(exp != *expptr) |
1015 | { | 1015 | { |
1016 | exp = *expptr; | 1016 | exp = *expptr; |
1017 | /* clear cache */ | 1017 | /* clear cache */ |
1018 | memset(reqcache, 0, sizeof(reqcache)); | 1018 | memset(reqcache, 0, sizeof(reqcache)); |
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | ++expptr; | 1021 | ++expptr; |
@@ -1052,10 +1052,10 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
1052 | 1052 | ||
1053 | cachesz -= pair->value.hlen; | 1053 | cachesz -= pair->value.hlen; |
1054 | 1054 | ||
1055 | /* x (0..14) */ | 1055 | /* x (0..14) */ |
1056 | value = pair->value.x; | 1056 | value = pair->value.x; |
1057 | if(value == 0) | 1057 | if(value == 0) |
1058 | xr[0] = 0; | 1058 | xr[0] = 0; |
1059 | else | 1059 | else |
1060 | { | 1060 | { |
1061 | if(value == 15) | 1061 | if(value == 15) |
@@ -1071,24 +1071,24 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
1071 | cachesz += bits; | 1071 | cachesz += bits; |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | requantized = III_requantize(15+MASK(bitcache, cachesz, linbits), exp); | 1074 | requantized = III_requantize(15+MASK(bitcache, cachesz, linbits), exp); |
1075 | cachesz -= linbits; | 1075 | cachesz -= linbits; |
1076 | } | 1076 | } |
1077 | else | 1077 | else |
1078 | { | 1078 | { |
1079 | if(reqcache[value]) | 1079 | if(reqcache[value]) |
1080 | requantized = reqcache[value]; | 1080 | requantized = reqcache[value]; |
1081 | else | 1081 | else |
1082 | requantized = reqcache[value] = III_requantize(value, exp); | 1082 | requantized = reqcache[value] = III_requantize(value, exp); |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | xr[0] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; | 1085 | xr[0] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; |
1086 | } | 1086 | } |
1087 | 1087 | ||
1088 | /* y (0..14) */ | 1088 | /* y (0..14) */ |
1089 | value = pair->value.y; | 1089 | value = pair->value.y; |
1090 | if(value == 0) | 1090 | if(value == 0) |
1091 | xr[1] = 0; | 1091 | xr[1] = 0; |
1092 | else | 1092 | else |
1093 | { | 1093 | { |
1094 | if(value == 15) | 1094 | if(value == 15) |
@@ -1109,12 +1109,12 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
1109 | } | 1109 | } |
1110 | else | 1110 | else |
1111 | { | 1111 | { |
1112 | if(reqcache[value]) | 1112 | if(reqcache[value]) |
1113 | requantized = reqcache[value]; | 1113 | requantized = reqcache[value]; |
1114 | else | 1114 | else |
1115 | requantized = reqcache[value] = III_requantize(value, exp); | 1115 | requantized = reqcache[value] = III_requantize(value, exp); |
1116 | } | 1116 | } |
1117 | xr[1] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; | 1117 | xr[1] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; |
1118 | } | 1118 | } |
1119 | } | 1119 | } |
1120 | } | 1120 | } |
@@ -1162,32 +1162,32 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
1162 | 1162 | ||
1163 | cachesz -= pair->value.hlen; | 1163 | cachesz -= pair->value.hlen; |
1164 | 1164 | ||
1165 | /* x (0..1) */ | 1165 | /* x (0..1) */ |
1166 | value = pair->value.x; | 1166 | value = pair->value.x; |
1167 | if(value == 0) | 1167 | if(value == 0) |
1168 | xr[0] = 0; | 1168 | xr[0] = 0; |
1169 | else | 1169 | else |
1170 | { | 1170 | { |
1171 | if(reqcache[value]) | 1171 | if(reqcache[value]) |
1172 | requantized = reqcache[value]; | 1172 | requantized = reqcache[value]; |
1173 | else | 1173 | else |
1174 | requantized = reqcache[value] = III_requantize(value, exp); | 1174 | requantized = reqcache[value] = III_requantize(value, exp); |
1175 | 1175 | ||
1176 | xr[0] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; | 1176 | xr[0] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | /* y (0..1) */ | 1179 | /* y (0..1) */ |
1180 | value = pair->value.y; | 1180 | value = pair->value.y; |
1181 | if(value == 0) | 1181 | if(value == 0) |
1182 | xr[1] = 0; | 1182 | xr[1] = 0; |
1183 | else | 1183 | else |
1184 | { | 1184 | { |
1185 | if(reqcache[value]) | 1185 | if(reqcache[value]) |
1186 | requantized = reqcache[value]; | 1186 | requantized = reqcache[value]; |
1187 | else | 1187 | else |
1188 | requantized = reqcache[value] = III_requantize(value, exp); | 1188 | requantized = reqcache[value] = III_requantize(value, exp); |
1189 | 1189 | ||
1190 | xr[1] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; | 1190 | xr[1] = MASK1BIT(bitcache, cachesz--) ? -requantized : requantized; |
1191 | } | 1191 | } |
1192 | } | 1192 | } |
1193 | } | 1193 | } |
@@ -1218,9 +1218,9 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
1218 | if(cachesz < 0) | 1218 | if(cachesz < 0) |
1219 | return MAD_ERROR_BADHUFFDATA; /* cache underrun */ | 1219 | return MAD_ERROR_BADHUFFDATA; /* cache underrun */ |
1220 | 1220 | ||
1221 | bits = MAXLSHIFT - cachesz; | 1221 | bits = MAXLSHIFT - cachesz; |
1222 | bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); | 1222 | bitcache = (bitcache << bits) | mad_bit_read(&peek, bits); |
1223 | cachesz += bits; | 1223 | cachesz += bits; |
1224 | bits_left -= bits; | 1224 | bits_left -= bits; |
1225 | } | 1225 | } |
1226 | 1226 | ||
@@ -1228,53 +1228,53 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
1228 | 1228 | ||
1229 | /* quad tables guaranteed to have at most one extra lookup */ | 1229 | /* quad tables guaranteed to have at most one extra lookup */ |
1230 | if (!quad->final) { | 1230 | if (!quad->final) { |
1231 | cachesz -= 4; | 1231 | cachesz -= 4; |
1232 | 1232 | ||
1233 | quad = &table[quad->ptr.offset + | 1233 | quad = &table[quad->ptr.offset + |
1234 | MASK(bitcache, cachesz, quad->ptr.bits)]; | 1234 | MASK(bitcache, cachesz, quad->ptr.bits)]; |
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | cachesz -= quad->value.hlen; | 1237 | cachesz -= quad->value.hlen; |
1238 | 1238 | ||
1239 | if (xr == sfbound) { | 1239 | if (xr == sfbound) { |
1240 | sfbound += *sfbwidth++; | 1240 | sfbound += *sfbwidth++; |
1241 | 1241 | ||
1242 | if (exp != *expptr) { | 1242 | if (exp != *expptr) { |
1243 | exp = *expptr; | 1243 | exp = *expptr; |
1244 | requantized = III_requantize(1, exp); | 1244 | requantized = III_requantize(1, exp); |
1245 | } | 1245 | } |
1246 | 1246 | ||
1247 | ++expptr; | 1247 | ++expptr; |
1248 | } | 1248 | } |
1249 | 1249 | ||
1250 | /* v (0..1) */ | 1250 | /* v (0..1) */ |
1251 | xr[0] = quad->value.v ? | 1251 | xr[0] = quad->value.v ? |
1252 | (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; | 1252 | (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; |
1253 | 1253 | ||
1254 | /* w (0..1) */ | 1254 | /* w (0..1) */ |
1255 | xr[1] = quad->value.w ? | 1255 | xr[1] = quad->value.w ? |
1256 | (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; | 1256 | (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; |
1257 | 1257 | ||
1258 | xr += 2; | 1258 | xr += 2; |
1259 | 1259 | ||
1260 | if (xr == sfbound) { | 1260 | if (xr == sfbound) { |
1261 | sfbound += *sfbwidth++; | 1261 | sfbound += *sfbwidth++; |
1262 | 1262 | ||
1263 | if (exp != *expptr) { | 1263 | if (exp != *expptr) { |
1264 | exp = *expptr; | 1264 | exp = *expptr; |
1265 | requantized = III_requantize(1, exp); | 1265 | requantized = III_requantize(1, exp); |
1266 | } | 1266 | } |
1267 | 1267 | ||
1268 | ++expptr; | 1268 | ++expptr; |
1269 | } | 1269 | } |
1270 | 1270 | ||
1271 | /* x (0..1) */ | 1271 | /* x (0..1) */ |
1272 | xr[0] = quad->value.x ? | 1272 | xr[0] = quad->value.x ? |
1273 | (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; | 1273 | (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; |
1274 | 1274 | ||
1275 | /* y (0..1) */ | 1275 | /* y (0..1) */ |
1276 | xr[1] = quad->value.y ? | 1276 | xr[1] = quad->value.y ? |
1277 | (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; | 1277 | (MASK1BIT(bitcache, cachesz--) ? -requantized : requantized) : 0; |
1278 | 1278 | ||
1279 | xr += 2; | 1279 | xr += 2; |
1280 | } | 1280 | } |
@@ -1282,7 +1282,7 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
1282 | if(bits_left + cachesz < 0) | 1282 | if(bits_left + cachesz < 0) |
1283 | { | 1283 | { |
1284 | /* technically the bitstream is misformatted, but apparently | 1284 | /* technically the bitstream is misformatted, but apparently |
1285 | some encoders are just a bit sloppy with stuffing bits */ | 1285 | some encoders are just a bit sloppy with stuffing bits */ |
1286 | xr -= 4; | 1286 | xr -= 4; |
1287 | } | 1287 | } |
1288 | } | 1288 | } |
@@ -1297,12 +1297,12 @@ enum mad_error III_huffdecode(struct mad_bitptr *ptr, mad_fixed_t xrarr[576], | |||
1297 | # undef MASK1BIT | 1297 | # undef MASK1BIT |
1298 | 1298 | ||
1299 | /* | 1299 | /* |
1300 | * NAME: III_reorder() | 1300 | * NAME: III_reorder() |
1301 | * DESCRIPTION: reorder frequency lines of a short block into subband order | 1301 | * DESCRIPTION: reorder frequency lines of a short block into subband order |
1302 | */ | 1302 | */ |
1303 | static | 1303 | static |
1304 | void III_reorder(mad_fixed_t xr[576], struct channel const *channel, | 1304 | void III_reorder(mad_fixed_t xr[576], struct channel const *channel, |
1305 | unsigned char const sfbwidth[39]) | 1305 | unsigned char const sfbwidth[39]) |
1306 | { | 1306 | { |
1307 | mad_fixed_t tmp[32][3][6]; | 1307 | mad_fixed_t tmp[32][3][6]; |
1308 | unsigned int sb, l, f, w, sbw[3], sw[3]; | 1308 | unsigned int sb, l, f, w, sbw[3], sw[3]; |
@@ -1345,14 +1345,14 @@ void III_reorder(mad_fixed_t xr[576], struct channel const *channel, | |||
1345 | } | 1345 | } |
1346 | 1346 | ||
1347 | /* | 1347 | /* |
1348 | * NAME: III_stereo() | 1348 | * NAME: III_stereo() |
1349 | * DESCRIPTION: perform joint stereo processing on a granule | 1349 | * DESCRIPTION: perform joint stereo processing on a granule |
1350 | */ | 1350 | */ |
1351 | static | 1351 | static |
1352 | enum mad_error III_stereo(mad_fixed_t xr[2][576], | 1352 | enum mad_error III_stereo(mad_fixed_t xr[2][576], |
1353 | struct granule const *granule, | 1353 | struct granule const *granule, |
1354 | struct mad_header *header, | 1354 | struct mad_header *header, |
1355 | unsigned char const *sfbwidth) | 1355 | unsigned char const *sfbwidth) |
1356 | { | 1356 | { |
1357 | short modes[39]; | 1357 | short modes[39]; |
1358 | unsigned int sfbi, l, n, i; | 1358 | unsigned int sfbi, l, n, i; |
@@ -1385,55 +1385,55 @@ enum mad_error III_stereo(mad_fixed_t xr[2][576], | |||
1385 | sfbi = l = 0; | 1385 | sfbi = l = 0; |
1386 | 1386 | ||
1387 | if (right_ch->flags & mixed_block_flag) { | 1387 | if (right_ch->flags & mixed_block_flag) { |
1388 | while (l < 36) { | 1388 | while (l < 36) { |
1389 | n = sfbwidth[sfbi++]; | 1389 | n = sfbwidth[sfbi++]; |
1390 | 1390 | ||
1391 | for (i = 0; i < n; ++i) { | 1391 | for (i = 0; i < n; ++i) { |
1392 | if (right_xr[i]) { | 1392 | if (right_xr[i]) { |
1393 | lower = sfbi; | 1393 | lower = sfbi; |
1394 | break; | 1394 | break; |
1395 | } | 1395 | } |
1396 | } | 1396 | } |
1397 | 1397 | ||
1398 | right_xr += n; | 1398 | right_xr += n; |
1399 | l += n; | 1399 | l += n; |
1400 | } | 1400 | } |
1401 | 1401 | ||
1402 | start = sfbi; | 1402 | start = sfbi; |
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | w = 0; | 1405 | w = 0; |
1406 | while (l < 576) { | 1406 | while (l < 576) { |
1407 | n = sfbwidth[sfbi++]; | 1407 | n = sfbwidth[sfbi++]; |
1408 | 1408 | ||
1409 | for (i = 0; i < n; ++i) { | 1409 | for (i = 0; i < n; ++i) { |
1410 | if (right_xr[i]) { | 1410 | if (right_xr[i]) { |
1411 | max = bound[w] = sfbi; | 1411 | max = bound[w] = sfbi; |
1412 | break; | 1412 | break; |
1413 | } | 1413 | } |
1414 | } | 1414 | } |
1415 | 1415 | ||
1416 | right_xr += n; | 1416 | right_xr += n; |
1417 | l += n; | 1417 | l += n; |
1418 | w = (w + 1) % 3; | 1418 | w = (w + 1) % 3; |
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | if (max) | 1421 | if (max) |
1422 | lower = start; | 1422 | lower = start; |
1423 | 1423 | ||
1424 | /* long blocks */ | 1424 | /* long blocks */ |
1425 | 1425 | ||
1426 | for (i = 0; i < lower; ++i) | 1426 | for (i = 0; i < lower; ++i) |
1427 | modes[i] = header->mode_extension & ~I_STEREO; | 1427 | modes[i] = header->mode_extension & ~I_STEREO; |
1428 | 1428 | ||
1429 | /* short blocks */ | 1429 | /* short blocks */ |
1430 | 1430 | ||
1431 | w = 0; | 1431 | w = 0; |
1432 | for (i = start; i < max; ++i) { | 1432 | for (i = start; i < max; ++i) { |
1433 | if (i < bound[w]) | 1433 | if (i < bound[w]) |
1434 | modes[i] = header->mode_extension & ~I_STEREO; | 1434 | modes[i] = header->mode_extension & ~I_STEREO; |
1435 | 1435 | ||
1436 | w = (w + 1) % 3; | 1436 | w = (w + 1) % 3; |
1437 | } | 1437 | } |
1438 | } | 1438 | } |
1439 | else { /* right_ch->block_type != 2 */ | 1439 | else { /* right_ch->block_type != 2 */ |
@@ -1441,20 +1441,20 @@ enum mad_error III_stereo(mad_fixed_t xr[2][576], | |||
1441 | 1441 | ||
1442 | bound = 0; | 1442 | bound = 0; |
1443 | for (sfbi = l = 0; l < 576; l += n) { | 1443 | for (sfbi = l = 0; l < 576; l += n) { |
1444 | n = sfbwidth[sfbi++]; | 1444 | n = sfbwidth[sfbi++]; |
1445 | 1445 | ||
1446 | for (i = 0; i < n; ++i) { | 1446 | for (i = 0; i < n; ++i) { |
1447 | if (right_xr[i]) { | 1447 | if (right_xr[i]) { |
1448 | bound = sfbi; | 1448 | bound = sfbi; |
1449 | break; | 1449 | break; |
1450 | } | 1450 | } |
1451 | } | 1451 | } |
1452 | 1452 | ||
1453 | right_xr += n; | 1453 | right_xr += n; |
1454 | } | 1454 | } |
1455 | 1455 | ||
1456 | for (i = 0; i < bound; ++i) | 1456 | for (i = 0; i < bound; ++i) |
1457 | modes[i] = header->mode_extension & ~I_STEREO; | 1457 | modes[i] = header->mode_extension & ~I_STEREO; |
1458 | } | 1458 | } |
1459 | 1459 | ||
1460 | /* now do the actual processing */ | 1460 | /* now do the actual processing */ |
@@ -1467,62 +1467,62 @@ enum mad_error III_stereo(mad_fixed_t xr[2][576], | |||
1467 | lsf_scale = is_lsf_table[right_ch->scalefac_compress & 0x1]; | 1467 | lsf_scale = is_lsf_table[right_ch->scalefac_compress & 0x1]; |
1468 | 1468 | ||
1469 | for (sfbi = l = 0; l < 576; ++sfbi, l += n) { | 1469 | for (sfbi = l = 0; l < 576; ++sfbi, l += n) { |
1470 | n = sfbwidth[sfbi]; | 1470 | n = sfbwidth[sfbi]; |
1471 | 1471 | ||
1472 | if (!(modes[sfbi] & I_STEREO)) | 1472 | if (!(modes[sfbi] & I_STEREO)) |
1473 | continue; | 1473 | continue; |
1474 | 1474 | ||
1475 | if (illegal_pos[sfbi]) { | 1475 | if (illegal_pos[sfbi]) { |
1476 | modes[sfbi] &= ~I_STEREO; | 1476 | modes[sfbi] &= ~I_STEREO; |
1477 | continue; | 1477 | continue; |
1478 | } | 1478 | } |
1479 | 1479 | ||
1480 | is_pos = right_ch->scalefac[sfbi]; | 1480 | is_pos = right_ch->scalefac[sfbi]; |
1481 | 1481 | ||
1482 | for (i = 0; i < n; ++i) { | 1482 | for (i = 0; i < n; ++i) { |
1483 | register mad_fixed_t left; | 1483 | register mad_fixed_t left; |
1484 | 1484 | ||
1485 | left = xr[0][l + i]; | 1485 | left = xr[0][l + i]; |
1486 | 1486 | ||
1487 | if (is_pos == 0) | 1487 | if (is_pos == 0) |
1488 | xr[1][l + i] = left; | 1488 | xr[1][l + i] = left; |
1489 | else { | 1489 | else { |
1490 | register mad_fixed_t opposite; | 1490 | register mad_fixed_t opposite; |
1491 | 1491 | ||
1492 | opposite = mad_f_mul(left, lsf_scale[(is_pos - 1) / 2]); | 1492 | opposite = mad_f_mul(left, lsf_scale[(is_pos - 1) / 2]); |
1493 | 1493 | ||
1494 | if (is_pos & 1) { | 1494 | if (is_pos & 1) { |
1495 | xr[0][l + i] = opposite; | 1495 | xr[0][l + i] = opposite; |
1496 | xr[1][l + i] = left; | 1496 | xr[1][l + i] = left; |
1497 | } | 1497 | } |
1498 | else | 1498 | else |
1499 | xr[1][l + i] = opposite; | 1499 | xr[1][l + i] = opposite; |
1500 | } | 1500 | } |
1501 | } | 1501 | } |
1502 | } | 1502 | } |
1503 | } | 1503 | } |
1504 | else { /* !(header->flags & MAD_FLAG_LSF_EXT) */ | 1504 | else { /* !(header->flags & MAD_FLAG_LSF_EXT) */ |
1505 | for (sfbi = l = 0; l < 576; ++sfbi, l += n) { | 1505 | for (sfbi = l = 0; l < 576; ++sfbi, l += n) { |
1506 | n = sfbwidth[sfbi]; | 1506 | n = sfbwidth[sfbi]; |
1507 | 1507 | ||
1508 | if (!(modes[sfbi] & I_STEREO)) | 1508 | if (!(modes[sfbi] & I_STEREO)) |
1509 | continue; | 1509 | continue; |
1510 | 1510 | ||
1511 | is_pos = right_ch->scalefac[sfbi]; | 1511 | is_pos = right_ch->scalefac[sfbi]; |
1512 | 1512 | ||
1513 | if (is_pos >= 7) { /* illegal intensity position */ | 1513 | if (is_pos >= 7) { /* illegal intensity position */ |
1514 | modes[sfbi] &= ~I_STEREO; | 1514 | modes[sfbi] &= ~I_STEREO; |
1515 | continue; | 1515 | continue; |
1516 | } | 1516 | } |
1517 | 1517 | ||
1518 | for (i = 0; i < n; ++i) { | 1518 | for (i = 0; i < n; ++i) { |
1519 | register mad_fixed_t left; | 1519 | register mad_fixed_t left; |
1520 | 1520 | ||
1521 | left = xr[0][l + i]; | 1521 | left = xr[0][l + i]; |
1522 | 1522 | ||
1523 | xr[0][l + i] = mad_f_mul(left, is_table[ is_pos]); | 1523 | xr[0][l + i] = mad_f_mul(left, is_table[ is_pos]); |
1524 | xr[1][l + i] = mad_f_mul(left, is_table[6 - is_pos]); | 1524 | xr[1][l + i] = mad_f_mul(left, is_table[6 - is_pos]); |
1525 | } | 1525 | } |
1526 | } | 1526 | } |
1527 | } | 1527 | } |
1528 | } | 1528 | } |
@@ -1540,16 +1540,16 @@ enum mad_error III_stereo(mad_fixed_t xr[2][576], | |||
1540 | n = sfbwidth[sfbi]; | 1540 | n = sfbwidth[sfbi]; |
1541 | 1541 | ||
1542 | if (modes[sfbi] != MS_STEREO) | 1542 | if (modes[sfbi] != MS_STEREO) |
1543 | continue; | 1543 | continue; |
1544 | 1544 | ||
1545 | for (i = 0; i < n; ++i) { | 1545 | for (i = 0; i < n; ++i) { |
1546 | register mad_fixed_t m, s; | 1546 | register mad_fixed_t m, s; |
1547 | 1547 | ||
1548 | m = xr[0][l + i]; | 1548 | m = xr[0][l + i]; |
1549 | s = xr[1][l + i]; | 1549 | s = xr[1][l + i]; |
1550 | 1550 | ||
1551 | xr[0][l + i] = mad_f_mul(m + s, invsqrt2); /* l = (m + s) / sqrt(2) */ | 1551 | xr[0][l + i] = mad_f_mul(m + s, invsqrt2); /* l = (m + s) / sqrt(2) */ |
1552 | xr[1][l + i] = mad_f_mul(m - s, invsqrt2); /* r = (m - s) / sqrt(2) */ | 1552 | xr[1][l + i] = mad_f_mul(m - s, invsqrt2); /* r = (m - s) / sqrt(2) */ |
1553 | } | 1553 | } |
1554 | } | 1554 | } |
1555 | } | 1555 | } |
@@ -1561,8 +1561,8 @@ enum mad_error III_stereo(mad_fixed_t xr[2][576], | |||
1561 | void III_aliasreduce(mad_fixed_t xr[576], int lines); | 1561 | void III_aliasreduce(mad_fixed_t xr[576], int lines); |
1562 | #else | 1562 | #else |
1563 | /* | 1563 | /* |
1564 | * NAME: III_aliasreduce() | 1564 | * NAME: III_aliasreduce() |
1565 | * DESCRIPTION: perform frequency line alias reduction | 1565 | * DESCRIPTION: perform frequency line alias reduction |
1566 | */ | 1566 | */ |
1567 | static | 1567 | static |
1568 | void III_aliasreduce(mad_fixed_t xr[576], int lines) | 1568 | void III_aliasreduce(mad_fixed_t xr[576], int lines) |
@@ -1598,15 +1598,15 @@ void III_aliasreduce(mad_fixed_t xr[576], int lines) | |||
1598 | xr[-1 - i] = a; | 1598 | xr[-1 - i] = a; |
1599 | xr[ i] = b; | 1599 | xr[ i] = b; |
1600 | # else | 1600 | # else |
1601 | MAD_F_ML0(hi, lo, a, cs[i]); | 1601 | MAD_F_ML0(hi, lo, a, cs[i]); |
1602 | MAD_F_MLA(hi, lo, -b, ca[i]); | 1602 | MAD_F_MLA(hi, lo, -b, ca[i]); |
1603 | 1603 | ||
1604 | xr[-1 - i] = MAD_F_MLZ(hi, lo); | 1604 | xr[-1 - i] = MAD_F_MLZ(hi, lo); |
1605 | 1605 | ||
1606 | MAD_F_ML0(hi, lo, b, cs[i]); | 1606 | MAD_F_ML0(hi, lo, b, cs[i]); |
1607 | MAD_F_MLA(hi, lo, a, ca[i]); | 1607 | MAD_F_MLA(hi, lo, a, ca[i]); |
1608 | 1608 | ||
1609 | xr[ i] = MAD_F_MLZ(hi, lo); | 1609 | xr[ i] = MAD_F_MLZ(hi, lo); |
1610 | # endif | 1610 | # endif |
1611 | # if defined(ASO_ZEROCHECK) | 1611 | # if defined(ASO_ZEROCHECK) |
1612 | } | 1612 | } |
@@ -1774,8 +1774,8 @@ void dctIV(mad_fixed_t const y[18], mad_fixed_t X[18]) | |||
1774 | } | 1774 | } |
1775 | 1775 | ||
1776 | /* | 1776 | /* |
1777 | * NAME: imdct36 | 1777 | * NAME: imdct36 |
1778 | * DESCRIPTION: perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm | 1778 | * DESCRIPTION: perform X[18]->x[36] IMDCT using Szu-Wei Lee's fast algorithm |
1779 | */ | 1779 | */ |
1780 | static inline | 1780 | static inline |
1781 | void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36]) | 1781 | void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36]) |
@@ -1807,8 +1807,8 @@ void imdct36(mad_fixed_t const x[18], mad_fixed_t y[36]) | |||
1807 | } | 1807 | } |
1808 | # else | 1808 | # else |
1809 | /* | 1809 | /* |
1810 | * NAME: imdct36 | 1810 | * NAME: imdct36 |
1811 | * DESCRIPTION: perform X[18]->x[36] IMDCT | 1811 | * DESCRIPTION: perform X[18]->x[36] IMDCT |
1812 | */ | 1812 | */ |
1813 | 1813 | ||
1814 | # if defined(CPU_COLDFIRE) | 1814 | # if defined(CPU_COLDFIRE) |
@@ -2737,12 +2737,12 @@ void imdct36(mad_fixed_t const X[18], mad_fixed_t x[36]) | |||
2737 | # endif | 2737 | # endif |
2738 | 2738 | ||
2739 | /* | 2739 | /* |
2740 | * NAME: III_imdct_l() | 2740 | * NAME: III_imdct_l() |
2741 | * DESCRIPTION: perform IMDCT and windowing for long blocks | 2741 | * DESCRIPTION: perform IMDCT and windowing for long blocks |
2742 | */ | 2742 | */ |
2743 | static | 2743 | static |
2744 | void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36], | 2744 | void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36], |
2745 | unsigned int block_type) | 2745 | unsigned int block_type) |
2746 | { | 2746 | { |
2747 | unsigned int i; | 2747 | unsigned int i; |
2748 | 2748 | ||
@@ -2762,10 +2762,10 @@ void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36], | |||
2762 | tmp2 = window_l[1]; | 2762 | tmp2 = window_l[1]; |
2763 | 2763 | ||
2764 | for (i = 0; i < 34; i += 2) { | 2764 | for (i = 0; i < 34; i += 2) { |
2765 | z[i + 0] = mad_f_mul(z[i + 0], tmp1); | 2765 | z[i + 0] = mad_f_mul(z[i + 0], tmp1); |
2766 | tmp1 = window_l[i + 2]; | 2766 | tmp1 = window_l[i + 2]; |
2767 | z[i + 1] = mad_f_mul(z[i + 1], tmp2); | 2767 | z[i + 1] = mad_f_mul(z[i + 1], tmp2); |
2768 | tmp2 = window_l[i + 3]; | 2768 | tmp2 = window_l[i + 3]; |
2769 | } | 2769 | } |
2770 | 2770 | ||
2771 | z[34] = mad_f_mul(z[34], tmp1); | 2771 | z[34] = mad_f_mul(z[34], tmp1); |
@@ -2779,9 +2779,9 @@ void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36], | |||
2779 | tmp2 = window_l[0]; | 2779 | tmp2 = window_l[0]; |
2780 | 2780 | ||
2781 | for (i = 0; i < 35; ++i) { | 2781 | for (i = 0; i < 35; ++i) { |
2782 | z[i] = mad_f_mul(tmp1, tmp2); | 2782 | z[i] = mad_f_mul(tmp1, tmp2); |
2783 | tmp1 = z[i + 1]; | 2783 | tmp1 = z[i + 1]; |
2784 | tmp2 = window_l[i + 1]; | 2784 | tmp2 = window_l[i + 1]; |
2785 | } | 2785 | } |
2786 | 2786 | ||
2787 | z[35] = mad_f_mul(tmp1, tmp2); | 2787 | z[35] = mad_f_mul(tmp1, tmp2); |
@@ -2824,8 +2824,8 @@ void III_imdct_l(mad_fixed_t const X[18], mad_fixed_t z[36], | |||
2824 | # endif /* ASO_IMDCT */ | 2824 | # endif /* ASO_IMDCT */ |
2825 | 2825 | ||
2826 | /* | 2826 | /* |
2827 | * NAME: III_imdct_s() | 2827 | * NAME: III_imdct_s() |
2828 | * DESCRIPTION: perform IMDCT and windowing for short blocks | 2828 | * DESCRIPTION: perform IMDCT and windowing for short blocks |
2829 | */ | 2829 | */ |
2830 | 2830 | ||
2831 | # if defined(CPU_COLDFIRE) | 2831 | # if defined(CPU_COLDFIRE) |
@@ -2911,16 +2911,16 @@ void III_imdct_s(mad_fixed_t const X[18], mad_fixed_t z[36]) | |||
2911 | 2911 | ||
2912 | #ifdef CPU_ARM | 2912 | #ifdef CPU_ARM |
2913 | void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18], | 2913 | void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18], |
2914 | mad_fixed_t sample[18][32], unsigned int sb); | 2914 | mad_fixed_t sample[18][32], unsigned int sb); |
2915 | #else | 2915 | #else |
2916 | 2916 | ||
2917 | /* | 2917 | /* |
2918 | * NAME: III_overlap() | 2918 | * NAME: III_overlap() |
2919 | * DESCRIPTION: perform overlap-add of windowed IMDCT outputs | 2919 | * DESCRIPTION: perform overlap-add of windowed IMDCT outputs |
2920 | */ | 2920 | */ |
2921 | static | 2921 | static |
2922 | void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18], | 2922 | void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18], |
2923 | mad_fixed_t sample[18][32], unsigned int sb) | 2923 | mad_fixed_t sample[18][32], unsigned int sb) |
2924 | { | 2924 | { |
2925 | unsigned int i; | 2925 | unsigned int i; |
2926 | 2926 | ||
@@ -2964,12 +2964,12 @@ void III_overlap(mad_fixed_t const output[36], mad_fixed_t overlap[18], | |||
2964 | #endif | 2964 | #endif |
2965 | 2965 | ||
2966 | /* | 2966 | /* |
2967 | * NAME: III_overlap_z() | 2967 | * NAME: III_overlap_z() |
2968 | * DESCRIPTION: perform "overlap-add" of zero IMDCT outputs | 2968 | * DESCRIPTION: perform "overlap-add" of zero IMDCT outputs |
2969 | */ | 2969 | */ |
2970 | static inline | 2970 | static inline |
2971 | void III_overlap_z(mad_fixed_t overlap[18], | 2971 | void III_overlap_z(mad_fixed_t overlap[18], |
2972 | mad_fixed_t sample[18][32], unsigned int sb) | 2972 | mad_fixed_t sample[18][32], unsigned int sb) |
2973 | { | 2973 | { |
2974 | unsigned int i; | 2974 | unsigned int i; |
2975 | 2975 | ||
@@ -3004,8 +3004,8 @@ void III_overlap_z(mad_fixed_t overlap[18], | |||
3004 | } | 3004 | } |
3005 | 3005 | ||
3006 | /* | 3006 | /* |
3007 | * NAME: III_freqinver() | 3007 | * NAME: III_freqinver() |
3008 | * DESCRIPTION: perform subband frequency inversion for odd sample lines | 3008 | * DESCRIPTION: perform subband frequency inversion for odd sample lines |
3009 | */ | 3009 | */ |
3010 | static | 3010 | static |
3011 | void III_freqinver(mad_fixed_t sample[18][32], unsigned int sb) | 3011 | void III_freqinver(mad_fixed_t sample[18][32], unsigned int sb) |
@@ -3038,12 +3038,12 @@ void III_freqinver(mad_fixed_t sample[18][32], unsigned int sb) | |||
3038 | } | 3038 | } |
3039 | 3039 | ||
3040 | /* | 3040 | /* |
3041 | * NAME: III_decode() | 3041 | * NAME: III_decode() |
3042 | * DESCRIPTION: decode frame main_data | 3042 | * DESCRIPTION: decode frame main_data |
3043 | */ | 3043 | */ |
3044 | static | 3044 | static |
3045 | enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, | 3045 | enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, |
3046 | struct sideinfo *si, unsigned int nch) | 3046 | struct sideinfo *si, unsigned int nch) |
3047 | { | 3047 | { |
3048 | struct mad_header *header = &frame->header; | 3048 | struct mad_header *header = &frame->header; |
3049 | unsigned int sfreqi, ngr, gr; | 3049 | unsigned int sfreqi, ngr, gr; |
@@ -3081,23 +3081,23 @@ enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, | |||
3081 | 3081 | ||
3082 | sfbwidth[ch] = sfbwidth_table[sfreqi].l; | 3082 | sfbwidth[ch] = sfbwidth_table[sfreqi].l; |
3083 | if (channel->block_type == 2) { | 3083 | if (channel->block_type == 2) { |
3084 | sfbwidth[ch] = (channel->flags & mixed_block_flag) ? | 3084 | sfbwidth[ch] = (channel->flags & mixed_block_flag) ? |
3085 | sfbwidth_table[sfreqi].m : sfbwidth_table[sfreqi].s; | 3085 | sfbwidth_table[sfreqi].m : sfbwidth_table[sfreqi].s; |
3086 | } | 3086 | } |
3087 | 3087 | ||
3088 | if (header->flags & MAD_FLAG_LSF_EXT) { | 3088 | if (header->flags & MAD_FLAG_LSF_EXT) { |
3089 | part2_length = III_scalefactors_lsf(ptr, channel, | 3089 | part2_length = III_scalefactors_lsf(ptr, channel, |
3090 | ch == 0 ? 0 : &si->gr[1].ch[1], | 3090 | ch == 0 ? 0 : &si->gr[1].ch[1], |
3091 | header->mode_extension); | 3091 | header->mode_extension); |
3092 | } | 3092 | } |
3093 | else { | 3093 | else { |
3094 | part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch], | 3094 | part2_length = III_scalefactors(ptr, channel, &si->gr[0].ch[ch], |
3095 | gr == 0 ? 0 : si->scfsi[ch]); | 3095 | gr == 0 ? 0 : si->scfsi[ch]); |
3096 | } | 3096 | } |
3097 | 3097 | ||
3098 | error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length); | 3098 | error = III_huffdecode(ptr, xr[ch], channel, sfbwidth[ch], part2_length); |
3099 | if (error) | 3099 | if (error) |
3100 | return error; | 3100 | return error; |
3101 | } | 3101 | } |
3102 | 3102 | ||
3103 | /* joint stereo processing */ | 3103 | /* joint stereo processing */ |
@@ -3105,7 +3105,7 @@ enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, | |||
3105 | if (header->mode == MAD_MODE_JOINT_STEREO && header->mode_extension) { | 3105 | if (header->mode == MAD_MODE_JOINT_STEREO && header->mode_extension) { |
3106 | error = III_stereo(xr, granule, header, sfbwidth[0]); | 3106 | error = III_stereo(xr, granule, header, sfbwidth[0]); |
3107 | if (error) | 3107 | if (error) |
3108 | return error; | 3108 | return error; |
3109 | } | 3109 | } |
3110 | 3110 | ||
3111 | /* reordering, alias reduction, IMDCT, overlap-add, frequency inversion */ | 3111 | /* reordering, alias reduction, IMDCT, overlap-add, frequency inversion */ |
@@ -3117,46 +3117,46 @@ enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, | |||
3117 | mad_fixed_t output[36]; | 3117 | mad_fixed_t output[36]; |
3118 | 3118 | ||
3119 | if (channel->block_type == 2) { | 3119 | if (channel->block_type == 2) { |
3120 | III_reorder(xr[ch], channel, sfbwidth[ch]); | 3120 | III_reorder(xr[ch], channel, sfbwidth[ch]); |
3121 | 3121 | ||
3122 | # if !defined(OPT_STRICT) | 3122 | # if !defined(OPT_STRICT) |
3123 | /* | 3123 | /* |
3124 | * According to ISO/IEC 11172-3, "Alias reduction is not applied for | 3124 | * According to ISO/IEC 11172-3, "Alias reduction is not applied for |
3125 | * granules with block_type == 2 (short block)." However, other | 3125 | * granules with block_type == 2 (short block)." However, other |
3126 | * sources suggest alias reduction should indeed be performed on the | 3126 | * sources suggest alias reduction should indeed be performed on the |
3127 | * lower two subbands of mixed blocks. Most other implementations do | 3127 | * lower two subbands of mixed blocks. Most other implementations do |
3128 | * this, so by default we will too. | 3128 | * this, so by default we will too. |
3129 | */ | 3129 | */ |
3130 | if (channel->flags & mixed_block_flag) | 3130 | if (channel->flags & mixed_block_flag) |
3131 | III_aliasreduce(xr[ch], 36); | 3131 | III_aliasreduce(xr[ch], 36); |
3132 | # endif | 3132 | # endif |
3133 | } | 3133 | } |
3134 | else | 3134 | else |
3135 | III_aliasreduce(xr[ch], 576); | 3135 | III_aliasreduce(xr[ch], 576); |
3136 | 3136 | ||
3137 | l = 0; | 3137 | l = 0; |
3138 | 3138 | ||
3139 | /* subbands 0-1 */ | 3139 | /* subbands 0-1 */ |
3140 | 3140 | ||
3141 | if (channel->block_type != 2 || (channel->flags & mixed_block_flag)) { | 3141 | if (channel->block_type != 2 || (channel->flags & mixed_block_flag)) { |
3142 | unsigned int block_type; | 3142 | unsigned int block_type; |
3143 | 3143 | ||
3144 | block_type = channel->block_type; | 3144 | block_type = channel->block_type; |
3145 | if (channel->flags & mixed_block_flag) | 3145 | if (channel->flags & mixed_block_flag) |
3146 | block_type = 0; | 3146 | block_type = 0; |
3147 | 3147 | ||
3148 | /* long blocks */ | 3148 | /* long blocks */ |
3149 | for (sb = 0; sb < 2; ++sb, l += 18) { | 3149 | for (sb = 0; sb < 2; ++sb, l += 18) { |
3150 | III_imdct_l(&xr[ch][l], output, block_type); | 3150 | III_imdct_l(&xr[ch][l], output, block_type); |
3151 | III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); | 3151 | III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); |
3152 | } | 3152 | } |
3153 | } | 3153 | } |
3154 | else { | 3154 | else { |
3155 | /* short blocks */ | 3155 | /* short blocks */ |
3156 | for (sb = 0; sb < 2; ++sb, l += 18) { | 3156 | for (sb = 0; sb < 2; ++sb, l += 18) { |
3157 | III_imdct_s(&xr[ch][l], output); | 3157 | III_imdct_s(&xr[ch][l], output); |
3158 | III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); | 3158 | III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); |
3159 | } | 3159 | } |
3160 | } | 3160 | } |
3161 | 3161 | ||
3162 | III_freqinver(sample, 1); | 3162 | III_freqinver(sample, 1); |
@@ -3166,7 +3166,7 @@ enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, | |||
3166 | /* | 3166 | /* |
3167 | i = 576; | 3167 | i = 576; |
3168 | while (i > 36 && xr[ch][i - 1] == 0) | 3168 | while (i > 36 && xr[ch][i - 1] == 0) |
3169 | --i; | 3169 | --i; |
3170 | */ | 3170 | */ |
3171 | 3171 | ||
3172 | { | 3172 | { |
@@ -3181,33 +3181,33 @@ enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, | |||
3181 | sblimit = 32 - (576 - i) / 18; | 3181 | sblimit = 32 - (576 - i) / 18; |
3182 | 3182 | ||
3183 | if (channel->block_type != 2) { | 3183 | if (channel->block_type != 2) { |
3184 | /* long blocks */ | 3184 | /* long blocks */ |
3185 | for (sb = 2; sb < sblimit; ++sb, l += 18) { | 3185 | for (sb = 2; sb < sblimit; ++sb, l += 18) { |
3186 | III_imdct_l(&xr[ch][l], output, channel->block_type); | 3186 | III_imdct_l(&xr[ch][l], output, channel->block_type); |
3187 | III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); | 3187 | III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); |
3188 | 3188 | ||
3189 | if (sb & 1) | 3189 | if (sb & 1) |
3190 | III_freqinver(sample, sb); | 3190 | III_freqinver(sample, sb); |
3191 | } | 3191 | } |
3192 | } | 3192 | } |
3193 | else { | 3193 | else { |
3194 | /* short blocks */ | 3194 | /* short blocks */ |
3195 | for (sb = 2; sb < sblimit; ++sb, l += 18) { | 3195 | for (sb = 2; sb < sblimit; ++sb, l += 18) { |
3196 | III_imdct_s(&xr[ch][l], output); | 3196 | III_imdct_s(&xr[ch][l], output); |
3197 | III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); | 3197 | III_overlap(output, (*frame->overlap)[ch][sb], sample, sb); |
3198 | 3198 | ||
3199 | if (sb & 1) | 3199 | if (sb & 1) |
3200 | III_freqinver(sample, sb); | 3200 | III_freqinver(sample, sb); |
3201 | } | 3201 | } |
3202 | } | 3202 | } |
3203 | 3203 | ||
3204 | /* remaining (zero) subbands */ | 3204 | /* remaining (zero) subbands */ |
3205 | 3205 | ||
3206 | for (sb = sblimit; sb < 32; ++sb) { | 3206 | for (sb = sblimit; sb < 32; ++sb) { |
3207 | III_overlap_z((*frame->overlap)[ch][sb], sample, sb); | 3207 | III_overlap_z((*frame->overlap)[ch][sb], sample, sb); |
3208 | 3208 | ||
3209 | if (sb & 1) | 3209 | if (sb & 1) |
3210 | III_freqinver(sample, sb); | 3210 | III_freqinver(sample, sb); |
3211 | } | 3211 | } |
3212 | } | 3212 | } |
3213 | } | 3213 | } |
@@ -3216,8 +3216,8 @@ enum mad_error III_decode(struct mad_bitptr *ptr, struct mad_frame *frame, | |||
3216 | } | 3216 | } |
3217 | 3217 | ||
3218 | /* | 3218 | /* |
3219 | * NAME: layer->III() | 3219 | * NAME: layer->III() |
3220 | * DESCRIPTION: decode a single Layer III frame | 3220 | * DESCRIPTION: decode a single Layer III frame |
3221 | */ | 3221 | */ |
3222 | int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) | 3222 | int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) |
3223 | { | 3223 | { |
@@ -3268,7 +3268,7 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) | |||
3268 | mad_bit_crc(stream->ptr, si_len * CHAR_BIT, header->crc_check); | 3268 | mad_bit_crc(stream->ptr, si_len * CHAR_BIT, header->crc_check); |
3269 | 3269 | ||
3270 | if (header->crc_check != header->crc_target && | 3270 | if (header->crc_check != header->crc_target && |
3271 | !(frame->options & MAD_OPTION_IGNORECRC)) { | 3271 | !(frame->options & MAD_OPTION_IGNORECRC)) { |
3272 | stream->error = MAD_ERROR_BADCRC; | 3272 | stream->error = MAD_ERROR_BADCRC; |
3273 | result = -1; | 3273 | result = -1; |
3274 | } | 3274 | } |
@@ -3277,7 +3277,7 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) | |||
3277 | /* decode frame side information */ | 3277 | /* decode frame side information */ |
3278 | 3278 | ||
3279 | error = III_sideinfo(&stream->ptr, nch, header->flags & MAD_FLAG_LSF_EXT, | 3279 | error = III_sideinfo(&stream->ptr, nch, header->flags & MAD_FLAG_LSF_EXT, |
3280 | &si, &data_bitlen, &priv_bitlen); | 3280 | &si, &data_bitlen, &priv_bitlen); |
3281 | if (error && result == 0) { | 3281 | if (error && result == 0) { |
3282 | stream->error = error; | 3282 | stream->error = error; |
3283 | result = -1; | 3283 | result = -1; |
@@ -3297,10 +3297,10 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) | |||
3297 | header = mad_bit_read(&peek, 32); | 3297 | header = mad_bit_read(&peek, 32); |
3298 | if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) { | 3298 | if ((header & 0xffe60000L) /* syncword | layer */ == 0xffe20000L) { |
3299 | if (!(header & 0x00010000L)) /* protection_bit */ | 3299 | if (!(header & 0x00010000L)) /* protection_bit */ |
3300 | mad_bit_skip(&peek, 16); /* crc_check */ | 3300 | mad_bit_skip(&peek, 16); /* crc_check */ |
3301 | 3301 | ||
3302 | next_md_begin = | 3302 | next_md_begin = |
3303 | mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8); | 3303 | mad_bit_read(&peek, (header & 0x00080000L) /* ID */ ? 9 : 8); |
3304 | } | 3304 | } |
3305 | 3305 | ||
3306 | mad_bit_finish(&peek); | 3306 | mad_bit_finish(&peek); |
@@ -3326,22 +3326,22 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) | |||
3326 | else { | 3326 | else { |
3327 | if (si.main_data_begin > stream->md_len) { | 3327 | if (si.main_data_begin > stream->md_len) { |
3328 | if (result == 0) { | 3328 | if (result == 0) { |
3329 | stream->error = MAD_ERROR_BADDATAPTR; | 3329 | stream->error = MAD_ERROR_BADDATAPTR; |
3330 | result = -1; | 3330 | result = -1; |
3331 | } | 3331 | } |
3332 | } | 3332 | } |
3333 | else { | 3333 | else { |
3334 | mad_bit_init(&ptr, | 3334 | mad_bit_init(&ptr, |
3335 | *stream->main_data + stream->md_len - si.main_data_begin); | 3335 | *stream->main_data + stream->md_len - si.main_data_begin); |
3336 | 3336 | ||
3337 | if (md_len > si.main_data_begin) { | 3337 | if (md_len > si.main_data_begin) { |
3338 | assert(stream->md_len + md_len - | 3338 | assert(stream->md_len + md_len - |
3339 | si.main_data_begin <= MAD_BUFFER_MDLEN); | 3339 | si.main_data_begin <= MAD_BUFFER_MDLEN); |
3340 | 3340 | ||
3341 | memcpy(*stream->main_data + stream->md_len, | 3341 | memcpy(*stream->main_data + stream->md_len, |
3342 | mad_bit_nextbyte(&stream->ptr), | 3342 | mad_bit_nextbyte(&stream->ptr), |
3343 | frame_used = md_len - si.main_data_begin); | 3343 | frame_used = md_len - si.main_data_begin); |
3344 | stream->md_len += frame_used; | 3344 | stream->md_len += frame_used; |
3345 | } | 3345 | } |
3346 | } | 3346 | } |
3347 | } | 3347 | } |
@@ -3365,17 +3365,17 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) | |||
3365 | 3365 | ||
3366 | # if 0 && defined(DEBUG) | 3366 | # if 0 && defined(DEBUG) |
3367 | fprintf(stderr, | 3367 | fprintf(stderr, |
3368 | "main_data_begin:%u, md_len:%u, frame_free:%u, " | 3368 | "main_data_begin:%u, md_len:%u, frame_free:%u, " |
3369 | "data_bitlen:%u, anc_bitlen: %u\n", | 3369 | "data_bitlen:%u, anc_bitlen: %u\n", |
3370 | si.main_data_begin, md_len, frame_free, | 3370 | si.main_data_begin, md_len, frame_free, |
3371 | data_bitlen, stream->anc_bitlen); | 3371 | data_bitlen, stream->anc_bitlen); |
3372 | # endif | 3372 | # endif |
3373 | 3373 | ||
3374 | /* preload main_data buffer with up to 511 bytes for next frame(s) */ | 3374 | /* preload main_data buffer with up to 511 bytes for next frame(s) */ |
3375 | 3375 | ||
3376 | if (frame_free >= next_md_begin) { | 3376 | if (frame_free >= next_md_begin) { |
3377 | memcpy(*stream->main_data, | 3377 | memcpy(*stream->main_data, |
3378 | stream->next_frame - next_md_begin, next_md_begin); | 3378 | stream->next_frame - next_md_begin, next_md_begin); |
3379 | stream->md_len = next_md_begin; | 3379 | stream->md_len = next_md_begin; |
3380 | } | 3380 | } |
3381 | else { | 3381 | else { |
@@ -3384,19 +3384,19 @@ int mad_layer_III(struct mad_stream *stream, struct mad_frame *frame) | |||
3384 | 3384 | ||
3385 | extra = si.main_data_begin - md_len; | 3385 | extra = si.main_data_begin - md_len; |
3386 | if (extra + frame_free > next_md_begin) | 3386 | if (extra + frame_free > next_md_begin) |
3387 | extra = next_md_begin - frame_free; | 3387 | extra = next_md_begin - frame_free; |
3388 | 3388 | ||
3389 | if (extra < stream->md_len) { | 3389 | if (extra < stream->md_len) { |
3390 | memmove(*stream->main_data, | 3390 | memmove(*stream->main_data, |
3391 | *stream->main_data + stream->md_len - extra, extra); | 3391 | *stream->main_data + stream->md_len - extra, extra); |
3392 | stream->md_len = extra; | 3392 | stream->md_len = extra; |
3393 | } | 3393 | } |
3394 | } | 3394 | } |
3395 | else | 3395 | else |
3396 | stream->md_len = 0; | 3396 | stream->md_len = 0; |
3397 | 3397 | ||
3398 | memcpy(*stream->main_data + stream->md_len, | 3398 | memcpy(*stream->main_data + stream->md_len, |
3399 | stream->next_frame - frame_free, frame_free); | 3399 | stream->next_frame - frame_free, frame_free); |
3400 | stream->md_len += frame_free; | 3400 | stream->md_len += frame_free; |
3401 | } | 3401 | } |
3402 | 3402 | ||
diff --git a/apps/codecs/libmad/mad.h b/apps/codecs/libmad/mad.h index 52a74d122c..6e75e3bf09 100644 --- a/apps/codecs/libmad/mad.h +++ b/apps/codecs/libmad/mad.h | |||
@@ -27,28 +27,28 @@ extern "C" { | |||
27 | # endif | 27 | # endif |
28 | 28 | ||
29 | # define FPM_DEFAULT | 29 | # define FPM_DEFAULT |
30 | 30 | ||
31 | /* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */ | 31 | /* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */ |
32 | 32 | ||
33 | # ifndef LIBMAD_VERSION_H | 33 | # ifndef LIBMAD_VERSION_H |
34 | # define LIBMAD_VERSION_H | 34 | # define LIBMAD_VERSION_H |
35 | 35 | ||
36 | # define MAD_VERSION_MAJOR 0 | 36 | # define MAD_VERSION_MAJOR 0 |
37 | # define MAD_VERSION_MINOR 15 | 37 | # define MAD_VERSION_MINOR 15 |
38 | # define MAD_VERSION_PATCH 1 | 38 | # define MAD_VERSION_PATCH 1 |
39 | # define MAD_VERSION_EXTRA " (beta)" | 39 | # define MAD_VERSION_EXTRA " (beta)" |
40 | 40 | ||
41 | # define MAD_VERSION_STRINGIZE(str) #str | 41 | # define MAD_VERSION_STRINGIZE(str) #str |
42 | # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) | 42 | # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) |
43 | 43 | ||
44 | # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ | 44 | # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ |
45 | MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ | 45 | MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ |
46 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ | 46 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ |
47 | MAD_VERSION_EXTRA | 47 | MAD_VERSION_EXTRA |
48 | 48 | ||
49 | # define MAD_PUBLISHYEAR "2000-2004" | 49 | # define MAD_PUBLISHYEAR "2000-2004" |
50 | # define MAD_AUTHOR "Underbit Technologies, Inc." | 50 | # define MAD_AUTHOR "Underbit Technologies, Inc." |
51 | # define MAD_EMAIL "info@underbit.com" | 51 | # define MAD_EMAIL "info@underbit.com" |
52 | 52 | ||
53 | extern char const mad_version[]; | 53 | extern char const mad_version[]; |
54 | extern char const mad_copyright[]; | 54 | extern char const mad_copyright[]; |
@@ -102,50 +102,50 @@ typedef mad_fixed_t mad_sample_t; | |||
102 | * supported, and must be done with care. | 102 | * supported, and must be done with care. |
103 | */ | 103 | */ |
104 | 104 | ||
105 | # define MAD_F_FRACBITS 28 | 105 | # define MAD_F_FRACBITS 28 |
106 | 106 | ||
107 | # if MAD_F_FRACBITS == 28 | 107 | # if MAD_F_FRACBITS == 28 |
108 | # define MAD_F(x) ((mad_fixed_t) (x##L)) | 108 | # define MAD_F(x) ((mad_fixed_t) (x##L)) |
109 | # else | 109 | # else |
110 | # if MAD_F_FRACBITS < 28 | 110 | # if MAD_F_FRACBITS < 28 |
111 | # warning "MAD_F_FRACBITS < 28" | 111 | # warning "MAD_F_FRACBITS < 28" |
112 | # define MAD_F(x) ((mad_fixed_t) \ | 112 | # define MAD_F(x) ((mad_fixed_t) \ |
113 | (((x##L) + \ | 113 | (((x##L) + \ |
114 | (1L << (28 - MAD_F_FRACBITS - 1))) >> \ | 114 | (1L << (28 - MAD_F_FRACBITS - 1))) >> \ |
115 | (28 - MAD_F_FRACBITS))) | 115 | (28 - MAD_F_FRACBITS))) |
116 | # elif MAD_F_FRACBITS > 28 | 116 | # elif MAD_F_FRACBITS > 28 |
117 | # error "MAD_F_FRACBITS > 28 not currently supported" | 117 | # error "MAD_F_FRACBITS > 28 not currently supported" |
118 | # define MAD_F(x) ((mad_fixed_t) \ | 118 | # define MAD_F(x) ((mad_fixed_t) \ |
119 | ((x##L) << (MAD_F_FRACBITS - 28))) | 119 | ((x##L) << (MAD_F_FRACBITS - 28))) |
120 | # endif | 120 | # endif |
121 | # endif | 121 | # endif |
122 | 122 | ||
123 | # define MAD_F_MIN ((mad_fixed_t) -0x80000000L) | 123 | # define MAD_F_MIN ((mad_fixed_t) -0x80000000L) |
124 | # define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) | 124 | # define MAD_F_MAX ((mad_fixed_t) +0x7fffffffL) |
125 | 125 | ||
126 | # define MAD_F_ONE MAD_F(0x10000000) | 126 | # define MAD_F_ONE MAD_F(0x10000000) |
127 | 127 | ||
128 | # define mad_f_tofixed(x) ((mad_fixed_t) \ | 128 | # define mad_f_tofixed(x) ((mad_fixed_t) \ |
129 | ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) | 129 | ((x) * (double) (1L << MAD_F_FRACBITS) + 0.5)) |
130 | # define mad_f_todouble(x) ((double) \ | 130 | # define mad_f_todouble(x) ((double) \ |
131 | ((x) / (double) (1L << MAD_F_FRACBITS))) | 131 | ((x) / (double) (1L << MAD_F_FRACBITS))) |
132 | 132 | ||
133 | # define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) | 133 | # define mad_f_intpart(x) ((x) >> MAD_F_FRACBITS) |
134 | # define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) | 134 | # define mad_f_fracpart(x) ((x) & ((1L << MAD_F_FRACBITS) - 1)) |
135 | /* (x should be positive) */ | 135 | /* (x should be positive) */ |
136 | 136 | ||
137 | # define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) | 137 | # define mad_f_fromint(x) ((x) << MAD_F_FRACBITS) |
138 | 138 | ||
139 | # define mad_f_add(x, y) ((x) + (y)) | 139 | # define mad_f_add(x, y) ((x) + (y)) |
140 | # define mad_f_sub(x, y) ((x) - (y)) | 140 | # define mad_f_sub(x, y) ((x) - (y)) |
141 | 141 | ||
142 | # if defined(FPM_FLOAT) | 142 | # if defined(FPM_FLOAT) |
143 | # error "FPM_FLOAT not yet supported" | 143 | # error "FPM_FLOAT not yet supported" |
144 | 144 | ||
145 | # undef MAD_F | 145 | # undef MAD_F |
146 | # define MAD_F(x) mad_f_todouble(x) | 146 | # define MAD_F(x) mad_f_todouble(x) |
147 | 147 | ||
148 | # define mad_f_mul(x, y) ((x) * (y)) | 148 | # define mad_f_mul(x, y) ((x) * (y)) |
149 | # define mad_f_scale64 | 149 | # define mad_f_scale64 |
150 | 150 | ||
151 | # undef ASO_ZEROCHECK | 151 | # undef ASO_ZEROCHECK |
@@ -192,7 +192,7 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
192 | } | 192 | } |
193 | # pragma warning(pop) | 193 | # pragma warning(pop) |
194 | 194 | ||
195 | # define mad_f_mul mad_f_mul_inline | 195 | # define mad_f_mul mad_f_mul_inline |
196 | # define mad_f_scale64 | 196 | # define mad_f_scale64 |
197 | # else | 197 | # else |
198 | /* | 198 | /* |
@@ -201,9 +201,9 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
201 | */ | 201 | */ |
202 | # define MAD_F_MLX(hi, lo, x, y) \ | 202 | # define MAD_F_MLX(hi, lo, x, y) \ |
203 | asm ("imull %3" \ | 203 | asm ("imull %3" \ |
204 | : "=a" (lo), "=d" (hi) \ | 204 | : "=a" (lo), "=d" (hi) \ |
205 | : "%a" (x), "rm" (y) \ | 205 | : "%a" (x), "rm" (y) \ |
206 | : "cc") | 206 | : "cc") |
207 | 207 | ||
208 | # if defined(OPT_ACCURACY) | 208 | # if defined(OPT_ACCURACY) |
209 | /* | 209 | /* |
@@ -214,10 +214,10 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
214 | mad_fixed64lo_t __lo; \ | 214 | mad_fixed64lo_t __lo; \ |
215 | MAD_F_MLX(__hi, __lo, (x), (y)); \ | 215 | MAD_F_MLX(__hi, __lo, (x), (y)); \ |
216 | asm ("addl %2,%0\n\t" \ | 216 | asm ("addl %2,%0\n\t" \ |
217 | "adcl %3,%1" \ | 217 | "adcl %3,%1" \ |
218 | : "=rm" (lo), "=rm" (hi) \ | 218 | : "=rm" (lo), "=rm" (hi) \ |
219 | : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ | 219 | : "r" (__lo), "r" (__hi), "0" (lo), "1" (hi) \ |
220 | : "cc"); \ | 220 | : "cc"); \ |
221 | }) | 221 | }) |
222 | # endif /* OPT_ACCURACY */ | 222 | # endif /* OPT_ACCURACY */ |
223 | 223 | ||
@@ -230,15 +230,15 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
230 | mad_fixed64lo_t __lo_; \ | 230 | mad_fixed64lo_t __lo_; \ |
231 | mad_fixed_t __result; \ | 231 | mad_fixed_t __result; \ |
232 | asm ("addl %4,%2\n\t" \ | 232 | asm ("addl %4,%2\n\t" \ |
233 | "adcl %5,%3" \ | 233 | "adcl %5,%3" \ |
234 | : "=rm" (__lo_), "=rm" (__hi_) \ | 234 | : "=rm" (__lo_), "=rm" (__hi_) \ |
235 | : "0" (lo), "1" (hi), \ | 235 | : "0" (lo), "1" (hi), \ |
236 | "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ | 236 | "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0) \ |
237 | : "cc"); \ | 237 | : "cc"); \ |
238 | asm ("shrdl %3,%2,%1" \ | 238 | asm ("shrdl %3,%2,%1" \ |
239 | : "=rm" (__result) \ | 239 | : "=rm" (__result) \ |
240 | : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ | 240 | : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS) \ |
241 | : "cc"); \ | 241 | : "cc"); \ |
242 | __result; \ | 242 | __result; \ |
243 | }) | 243 | }) |
244 | # elif defined(OPT_INTEL) | 244 | # elif defined(OPT_INTEL) |
@@ -248,21 +248,21 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
248 | # define mad_f_scale64(hi, lo) \ | 248 | # define mad_f_scale64(hi, lo) \ |
249 | ({ mad_fixed_t __result; \ | 249 | ({ mad_fixed_t __result; \ |
250 | asm ("shrl %3,%1\n\t" \ | 250 | asm ("shrl %3,%1\n\t" \ |
251 | "shll %4,%2\n\t" \ | 251 | "shll %4,%2\n\t" \ |
252 | "orl %2,%1" \ | 252 | "orl %2,%1" \ |
253 | : "=rm" (__result) \ | 253 | : "=rm" (__result) \ |
254 | : "0" (lo), "r" (hi), \ | 254 | : "0" (lo), "r" (hi), \ |
255 | "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ | 255 | "I" (MAD_F_SCALEBITS), "I" (32 - MAD_F_SCALEBITS) \ |
256 | : "cc"); \ | 256 | : "cc"); \ |
257 | __result; \ | 257 | __result; \ |
258 | }) | 258 | }) |
259 | # else | 259 | # else |
260 | # define mad_f_scale64(hi, lo) \ | 260 | # define mad_f_scale64(hi, lo) \ |
261 | ({ mad_fixed_t __result; \ | 261 | ({ mad_fixed_t __result; \ |
262 | asm ("shrdl %3,%2,%1" \ | 262 | asm ("shrdl %3,%2,%1" \ |
263 | : "=rm" (__result) \ | 263 | : "=rm" (__result) \ |
264 | : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ | 264 | : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS) \ |
265 | : "cc"); \ | 265 | : "cc"); \ |
266 | __result; \ | 266 | __result; \ |
267 | }) | 267 | }) |
268 | # endif /* OPT_ACCURACY */ | 268 | # endif /* OPT_ACCURACY */ |
@@ -287,42 +287,42 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
287 | ({ mad_fixed64hi_t __hi; \ | 287 | ({ mad_fixed64hi_t __hi; \ |
288 | mad_fixed64lo_t __lo; \ | 288 | mad_fixed64lo_t __lo; \ |
289 | mad_fixed_t __result; \ | 289 | mad_fixed_t __result; \ |
290 | asm ("smull %0, %1, %3, %4\n\t" \ | 290 | asm ("smull %0, %1, %3, %4\n\t" \ |
291 | "movs %0, %0, lsr %5\n\t" \ | 291 | "movs %0, %0, lsr %5\n\t" \ |
292 | "adc %2, %0, %1, lsl %6" \ | 292 | "adc %2, %0, %1, lsl %6" \ |
293 | : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ | 293 | : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \ |
294 | : "%r" (x), "r" (y), \ | 294 | : "%r" (x), "r" (y), \ |
295 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ | 295 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ |
296 | : "cc"); \ | 296 | : "cc"); \ |
297 | __result; \ | 297 | __result; \ |
298 | }) | 298 | }) |
299 | # endif | 299 | # endif |
300 | 300 | ||
301 | # define MAD_F_MLX(hi, lo, x, y) \ | 301 | # define MAD_F_MLX(hi, lo, x, y) \ |
302 | asm ("smull %0, %1, %2, %3" \ | 302 | asm ("smull %0, %1, %2, %3" \ |
303 | : "=&r" (lo), "=&r" (hi) \ | 303 | : "=&r" (lo), "=&r" (hi) \ |
304 | : "%r" (x), "r" (y)) | 304 | : "%r" (x), "r" (y)) |
305 | 305 | ||
306 | # define MAD_F_MLA(hi, lo, x, y) \ | 306 | # define MAD_F_MLA(hi, lo, x, y) \ |
307 | asm ("smlal %0, %1, %2, %3" \ | 307 | asm ("smlal %0, %1, %2, %3" \ |
308 | : "+r" (lo), "+r" (hi) \ | 308 | : "+r" (lo), "+r" (hi) \ |
309 | : "%r" (x), "r" (y)) | 309 | : "%r" (x), "r" (y)) |
310 | 310 | ||
311 | # define MAD_F_MLN(hi, lo) \ | 311 | # define MAD_F_MLN(hi, lo) \ |
312 | asm ("rsbs %0, %2, #0\n\t" \ | 312 | asm ("rsbs %0, %2, #0\n\t" \ |
313 | "rsc %1, %3, #0" \ | 313 | "rsc %1, %3, #0" \ |
314 | : "=r" (lo), "=r" (hi) \ | 314 | : "=r" (lo), "=r" (hi) \ |
315 | : "0" (lo), "1" (hi) \ | 315 | : "0" (lo), "1" (hi) \ |
316 | : "cc") | 316 | : "cc") |
317 | 317 | ||
318 | # define mad_f_scale64(hi, lo) \ | 318 | # define mad_f_scale64(hi, lo) \ |
319 | ({ mad_fixed_t __result; \ | 319 | ({ mad_fixed_t __result; \ |
320 | asm ("movs %0, %1, lsr %3\n\t" \ | 320 | asm ("movs %0, %1, lsr %3\n\t" \ |
321 | "adc %0, %0, %2, lsl %4" \ | 321 | "adc %0, %0, %2, lsl %4" \ |
322 | : "=&r" (__result) \ | 322 | : "=&r" (__result) \ |
323 | : "r" (lo), "r" (hi), \ | 323 | : "r" (lo), "r" (hi), \ |
324 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ | 324 | "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \ |
325 | : "cc"); \ | 325 | : "cc"); \ |
326 | __result; \ | 326 | __result; \ |
327 | }) | 327 | }) |
328 | 328 | ||
@@ -337,28 +337,28 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
337 | * significant bit depends on OPT_ACCURACY via mad_f_scale64(). | 337 | * significant bit depends on OPT_ACCURACY via mad_f_scale64(). |
338 | */ | 338 | */ |
339 | # define MAD_F_MLX(hi, lo, x, y) \ | 339 | # define MAD_F_MLX(hi, lo, x, y) \ |
340 | asm ("mult %2,%3" \ | 340 | asm ("mult %2,%3" \ |
341 | : "=l" (lo), "=h" (hi) \ | 341 | : "=l" (lo), "=h" (hi) \ |
342 | : "%r" (x), "r" (y)) | 342 | : "%r" (x), "r" (y)) |
343 | 343 | ||
344 | # if defined(HAVE_MADD_ASM) | 344 | # if defined(HAVE_MADD_ASM) |
345 | # define MAD_F_MLA(hi, lo, x, y) \ | 345 | # define MAD_F_MLA(hi, lo, x, y) \ |
346 | asm ("madd %2,%3" \ | 346 | asm ("madd %2,%3" \ |
347 | : "+l" (lo), "+h" (hi) \ | 347 | : "+l" (lo), "+h" (hi) \ |
348 | : "%r" (x), "r" (y)) | 348 | : "%r" (x), "r" (y)) |
349 | # elif defined(HAVE_MADD16_ASM) | 349 | # elif defined(HAVE_MADD16_ASM) |
350 | /* | 350 | /* |
351 | * This loses significant accuracy due to the 16-bit integer limit in the | 351 | * This loses significant accuracy due to the 16-bit integer limit in the |
352 | * multiply/accumulate instruction. | 352 | * multiply/accumulate instruction. |
353 | */ | 353 | */ |
354 | # define MAD_F_ML0(hi, lo, x, y) \ | 354 | # define MAD_F_ML0(hi, lo, x, y) \ |
355 | asm ("mult %2,%3" \ | 355 | asm ("mult %2,%3" \ |
356 | : "=l" (lo), "=h" (hi) \ | 356 | : "=l" (lo), "=h" (hi) \ |
357 | : "%r" ((x) >> 12), "r" ((y) >> 16)) | 357 | : "%r" ((x) >> 12), "r" ((y) >> 16)) |
358 | # define MAD_F_MLA(hi, lo, x, y) \ | 358 | # define MAD_F_MLA(hi, lo, x, y) \ |
359 | asm ("madd16 %2,%3" \ | 359 | asm ("madd16 %2,%3" \ |
360 | : "+l" (lo), "+h" (hi) \ | 360 | : "+l" (lo), "+h" (hi) \ |
361 | : "%r" ((x) >> 12), "r" ((y) >> 16)) | 361 | : "%r" ((x) >> 12), "r" ((y) >> 16)) |
362 | # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) | 362 | # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) |
363 | # endif | 363 | # endif |
364 | 364 | ||
@@ -378,9 +378,9 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
378 | */ | 378 | */ |
379 | # define MAD_F_MLX(hi, lo, x, y) \ | 379 | # define MAD_F_MLX(hi, lo, x, y) \ |
380 | asm ("smul %2, %3, %0\n\t" \ | 380 | asm ("smul %2, %3, %0\n\t" \ |
381 | "rd %%y, %1" \ | 381 | "rd %%y, %1" \ |
382 | : "=r" (lo), "=r" (hi) \ | 382 | : "=r" (lo), "=r" (hi) \ |
383 | : "%r" (x), "rI" (y)) | 383 | : "%r" (x), "rI" (y)) |
384 | 384 | ||
385 | /* --- PowerPC ------------------------------------------------------------- */ | 385 | /* --- PowerPC ------------------------------------------------------------- */ |
386 | 386 | ||
@@ -393,11 +393,11 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
393 | # define MAD_F_MLX(hi, lo, x, y) \ | 393 | # define MAD_F_MLX(hi, lo, x, y) \ |
394 | do { \ | 394 | do { \ |
395 | asm ("mullw %0,%1,%2" \ | 395 | asm ("mullw %0,%1,%2" \ |
396 | : "=r" (lo) \ | 396 | : "=r" (lo) \ |
397 | : "%r" (x), "r" (y)); \ | 397 | : "%r" (x), "r" (y)); \ |
398 | asm ("mulhw %0,%1,%2" \ | 398 | asm ("mulhw %0,%1,%2" \ |
399 | : "=r" (hi) \ | 399 | : "=r" (hi) \ |
400 | : "%r" (x), "r" (y)); \ | 400 | : "%r" (x), "r" (y)); \ |
401 | } \ | 401 | } \ |
402 | while (0) | 402 | while (0) |
403 | 403 | ||
@@ -410,11 +410,11 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
410 | mad_fixed64lo_t __lo; \ | 410 | mad_fixed64lo_t __lo; \ |
411 | MAD_F_MLX(__hi, __lo, (x), (y)); \ | 411 | MAD_F_MLX(__hi, __lo, (x), (y)); \ |
412 | asm ("addc %0,%2,%3\n\t" \ | 412 | asm ("addc %0,%2,%3\n\t" \ |
413 | "adde %1,%4,%5" \ | 413 | "adde %1,%4,%5" \ |
414 | : "=r" (lo), "=r" (hi) \ | 414 | : "=r" (lo), "=r" (hi) \ |
415 | : "%r" (lo), "r" (__lo), \ | 415 | : "%r" (lo), "r" (__lo), \ |
416 | "%r" (hi), "r" (__hi) \ | 416 | "%r" (hi), "r" (__hi) \ |
417 | : "xer"); \ | 417 | : "xer"); \ |
418 | }) | 418 | }) |
419 | # endif | 419 | # endif |
420 | 420 | ||
@@ -425,28 +425,28 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
425 | # define mad_f_scale64(hi, lo) \ | 425 | # define mad_f_scale64(hi, lo) \ |
426 | ({ mad_fixed_t __result, __round; \ | 426 | ({ mad_fixed_t __result, __round; \ |
427 | asm ("rotrwi %0,%1,%2" \ | 427 | asm ("rotrwi %0,%1,%2" \ |
428 | : "=r" (__result) \ | 428 | : "=r" (__result) \ |
429 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ | 429 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ |
430 | asm ("extrwi %0,%1,1,0" \ | 430 | asm ("extrwi %0,%1,1,0" \ |
431 | : "=r" (__round) \ | 431 | : "=r" (__round) \ |
432 | : "r" (__result)); \ | 432 | : "r" (__result)); \ |
433 | asm ("insrwi %0,%1,%2,0" \ | 433 | asm ("insrwi %0,%1,%2,0" \ |
434 | : "+r" (__result) \ | 434 | : "+r" (__result) \ |
435 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ | 435 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ |
436 | asm ("add %0,%1,%2" \ | 436 | asm ("add %0,%1,%2" \ |
437 | : "=r" (__result) \ | 437 | : "=r" (__result) \ |
438 | : "%r" (__result), "r" (__round)); \ | 438 | : "%r" (__result), "r" (__round)); \ |
439 | __result; \ | 439 | __result; \ |
440 | }) | 440 | }) |
441 | # else | 441 | # else |
442 | # define mad_f_scale64(hi, lo) \ | 442 | # define mad_f_scale64(hi, lo) \ |
443 | ({ mad_fixed_t __result; \ | 443 | ({ mad_fixed_t __result; \ |
444 | asm ("rotrwi %0,%1,%2" \ | 444 | asm ("rotrwi %0,%1,%2" \ |
445 | : "=r" (__result) \ | 445 | : "=r" (__result) \ |
446 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ | 446 | : "r" (lo), "i" (MAD_F_SCALEBITS)); \ |
447 | asm ("insrwi %0,%1,%2,0" \ | 447 | asm ("insrwi %0,%1,%2,0" \ |
448 | : "+r" (__result) \ | 448 | : "+r" (__result) \ |
449 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ | 449 | : "r" (hi), "i" (MAD_F_SCALEBITS)); \ |
450 | __result; \ | 450 | __result; \ |
451 | }) | 451 | }) |
452 | # endif | 452 | # endif |
@@ -467,10 +467,10 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
467 | * Pre-rounding is required to stay within the limits of compliance. | 467 | * Pre-rounding is required to stay within the limits of compliance. |
468 | */ | 468 | */ |
469 | # if defined(OPT_SPEED) | 469 | # if defined(OPT_SPEED) |
470 | # define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) | 470 | # define mad_f_mul(x, y) (((x) >> 12) * ((y) >> 16)) |
471 | # else | 471 | # else |
472 | # define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ | 472 | # define mad_f_mul(x, y) ((((x) + (1L << 11)) >> 12) * \ |
473 | (((y) + (1L << 15)) >> 16)) | 473 | (((y) + (1L << 15)) >> 16)) |
474 | # endif | 474 | # endif |
475 | 475 | ||
476 | /* ------------------------------------------------------------------------- */ | 476 | /* ------------------------------------------------------------------------- */ |
@@ -491,22 +491,22 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
491 | # endif | 491 | # endif |
492 | 492 | ||
493 | # if !defined(MAD_F_MLA) | 493 | # if !defined(MAD_F_MLA) |
494 | # define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) | 494 | # define MAD_F_ML0(hi, lo, x, y) ((lo) = mad_f_mul((x), (y))) |
495 | # define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) | 495 | # define MAD_F_MLA(hi, lo, x, y) ((lo) += mad_f_mul((x), (y))) |
496 | # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) | 496 | # define MAD_F_MLN(hi, lo) ((lo) = -(lo)) |
497 | # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) | 497 | # define MAD_F_MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) |
498 | # endif | 498 | # endif |
499 | 499 | ||
500 | # if !defined(MAD_F_ML0) | 500 | # if !defined(MAD_F_ML0) |
501 | # define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) | 501 | # define MAD_F_ML0(hi, lo, x, y) MAD_F_MLX((hi), (lo), (x), (y)) |
502 | # endif | 502 | # endif |
503 | 503 | ||
504 | # if !defined(MAD_F_MLN) | 504 | # if !defined(MAD_F_MLN) |
505 | # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) | 505 | # define MAD_F_MLN(hi, lo) ((hi) = ((lo) = -(lo)) ? ~(hi) : -(hi)) |
506 | # endif | 506 | # endif |
507 | 507 | ||
508 | # if !defined(MAD_F_MLZ) | 508 | # if !defined(MAD_F_MLZ) |
509 | # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) | 509 | # define MAD_F_MLZ(hi, lo) mad_f_scale64((hi), (lo)) |
510 | # endif | 510 | # endif |
511 | 511 | ||
512 | # if !defined(mad_f_scale64) | 512 | # if !defined(mad_f_scale64) |
@@ -514,7 +514,7 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) | |||
514 | # define mad_f_scale64(hi, lo) \ | 514 | # define mad_f_scale64(hi, lo) \ |
515 | ((((mad_fixed_t) \ | 515 | ((((mad_fixed_t) \ |
516 | (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ | 516 | (((hi) << (32 - (MAD_F_SCALEBITS - 1))) | \ |
517 | ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) | 517 | ((lo) >> (MAD_F_SCALEBITS - 1)))) + 1) >> 1) |
518 | # else | 518 | # else |
519 | # define mad_f_scale64(hi, lo) \ | 519 | # define mad_f_scale64(hi, lo) \ |
520 | ((mad_fixed_t) \ | 520 | ((mad_fixed_t) \ |
@@ -544,10 +544,10 @@ struct mad_bitptr { | |||
544 | 544 | ||
545 | void mad_bit_init(struct mad_bitptr *, unsigned char const *); | 545 | void mad_bit_init(struct mad_bitptr *, unsigned char const *); |
546 | 546 | ||
547 | # define mad_bit_finish(bitptr) /* nothing */ | 547 | # define mad_bit_finish(bitptr) /* nothing */ |
548 | 548 | ||
549 | unsigned int mad_bit_length(struct mad_bitptr const *, | 549 | unsigned int mad_bit_length(struct mad_bitptr const *, |
550 | struct mad_bitptr const *); | 550 | struct mad_bitptr const *); |
551 | 551 | ||
552 | # define mad_bit_bitsleft(bitptr) ((bitptr)->left) | 552 | # define mad_bit_bitsleft(bitptr) ((bitptr)->left) |
553 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); | 553 | unsigned char const *mad_bit_nextbyte(struct mad_bitptr const *); |
@@ -566,67 +566,67 @@ unsigned short mad_bit_crc(struct mad_bitptr, unsigned int, unsigned short); | |||
566 | # define LIBMAD_TIMER_H | 566 | # define LIBMAD_TIMER_H |
567 | 567 | ||
568 | typedef struct { | 568 | typedef struct { |
569 | signed long seconds; /* whole seconds */ | 569 | signed long seconds; /* whole seconds */ |
570 | unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ | 570 | unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ |
571 | } mad_timer_t; | 571 | } mad_timer_t; |
572 | 572 | ||
573 | extern mad_timer_t const mad_timer_zero; | 573 | extern mad_timer_t const mad_timer_zero; |
574 | 574 | ||
575 | # define MAD_TIMER_RESOLUTION 352800000UL | 575 | # define MAD_TIMER_RESOLUTION 352800000UL |
576 | 576 | ||
577 | enum mad_units { | 577 | enum mad_units { |
578 | MAD_UNITS_HOURS = -2, | 578 | MAD_UNITS_HOURS = -2, |
579 | MAD_UNITS_MINUTES = -1, | 579 | MAD_UNITS_MINUTES = -1, |
580 | MAD_UNITS_SECONDS = 0, | 580 | MAD_UNITS_SECONDS = 0, |
581 | 581 | ||
582 | /* metric units */ | 582 | /* metric units */ |
583 | 583 | ||
584 | MAD_UNITS_DECISECONDS = 10, | 584 | MAD_UNITS_DECISECONDS = 10, |
585 | MAD_UNITS_CENTISECONDS = 100, | 585 | MAD_UNITS_CENTISECONDS = 100, |
586 | MAD_UNITS_MILLISECONDS = 1000, | 586 | MAD_UNITS_MILLISECONDS = 1000, |
587 | 587 | ||
588 | /* audio sample units */ | 588 | /* audio sample units */ |
589 | 589 | ||
590 | MAD_UNITS_8000_HZ = 8000, | 590 | MAD_UNITS_8000_HZ = 8000, |
591 | MAD_UNITS_11025_HZ = 11025, | 591 | MAD_UNITS_11025_HZ = 11025, |
592 | MAD_UNITS_12000_HZ = 12000, | 592 | MAD_UNITS_12000_HZ = 12000, |
593 | 593 | ||
594 | MAD_UNITS_16000_HZ = 16000, | 594 | MAD_UNITS_16000_HZ = 16000, |
595 | MAD_UNITS_22050_HZ = 22050, | 595 | MAD_UNITS_22050_HZ = 22050, |
596 | MAD_UNITS_24000_HZ = 24000, | 596 | MAD_UNITS_24000_HZ = 24000, |
597 | 597 | ||
598 | MAD_UNITS_32000_HZ = 32000, | 598 | MAD_UNITS_32000_HZ = 32000, |
599 | MAD_UNITS_44100_HZ = 44100, | 599 | MAD_UNITS_44100_HZ = 44100, |
600 | MAD_UNITS_48000_HZ = 48000, | 600 | MAD_UNITS_48000_HZ = 48000, |
601 | 601 | ||
602 | /* video frame/field units */ | 602 | /* video frame/field units */ |
603 | 603 | ||
604 | MAD_UNITS_24_FPS = 24, | 604 | MAD_UNITS_24_FPS = 24, |
605 | MAD_UNITS_25_FPS = 25, | 605 | MAD_UNITS_25_FPS = 25, |
606 | MAD_UNITS_30_FPS = 30, | 606 | MAD_UNITS_30_FPS = 30, |
607 | MAD_UNITS_48_FPS = 48, | 607 | MAD_UNITS_48_FPS = 48, |
608 | MAD_UNITS_50_FPS = 50, | 608 | MAD_UNITS_50_FPS = 50, |
609 | MAD_UNITS_60_FPS = 60, | 609 | MAD_UNITS_60_FPS = 60, |
610 | 610 | ||
611 | /* CD audio frames */ | 611 | /* CD audio frames */ |
612 | 612 | ||
613 | MAD_UNITS_75_FPS = 75, | 613 | MAD_UNITS_75_FPS = 75, |
614 | 614 | ||
615 | /* video drop-frame units */ | 615 | /* video drop-frame units */ |
616 | 616 | ||
617 | MAD_UNITS_23_976_FPS = -24, | 617 | MAD_UNITS_23_976_FPS = -24, |
618 | MAD_UNITS_24_975_FPS = -25, | 618 | MAD_UNITS_24_975_FPS = -25, |
619 | MAD_UNITS_29_97_FPS = -30, | 619 | MAD_UNITS_29_97_FPS = -30, |
620 | MAD_UNITS_47_952_FPS = -48, | 620 | MAD_UNITS_47_952_FPS = -48, |
621 | MAD_UNITS_49_95_FPS = -50, | 621 | MAD_UNITS_49_95_FPS = -50, |
622 | MAD_UNITS_59_94_FPS = -60 | 622 | MAD_UNITS_59_94_FPS = -60 |
623 | }; | 623 | }; |
624 | 624 | ||
625 | # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) | 625 | # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) |
626 | 626 | ||
627 | int mad_timer_compare(mad_timer_t, mad_timer_t); | 627 | int mad_timer_compare(mad_timer_t, mad_timer_t); |
628 | 628 | ||
629 | # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) | 629 | # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) |
630 | 630 | ||
631 | void mad_timer_negate(mad_timer_t *); | 631 | void mad_timer_negate(mad_timer_t *); |
632 | mad_timer_t mad_timer_abs(mad_timer_t); | 632 | mad_timer_t mad_timer_abs(mad_timer_t); |
@@ -638,7 +638,7 @@ void mad_timer_multiply(mad_timer_t *, signed long); | |||
638 | signed long mad_timer_count(mad_timer_t, enum mad_units); | 638 | signed long mad_timer_count(mad_timer_t, enum mad_units); |
639 | unsigned long mad_timer_fraction(mad_timer_t, unsigned long); | 639 | unsigned long mad_timer_fraction(mad_timer_t, unsigned long); |
640 | void mad_timer_string(mad_timer_t, char *, char const *, | 640 | void mad_timer_string(mad_timer_t, char *, char const *, |
641 | enum mad_units, enum mad_units, unsigned long); | 641 | enum mad_units, enum mad_units, unsigned long); |
642 | 642 | ||
643 | # endif | 643 | # endif |
644 | 644 | ||
@@ -648,70 +648,70 @@ void mad_timer_string(mad_timer_t, char *, char const *, | |||
648 | # define LIBMAD_STREAM_H | 648 | # define LIBMAD_STREAM_H |
649 | 649 | ||
650 | 650 | ||
651 | # define MAD_BUFFER_GUARD 8 | 651 | # define MAD_BUFFER_GUARD 8 |
652 | # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) | 652 | # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) |
653 | 653 | ||
654 | enum mad_error { | 654 | enum mad_error { |
655 | MAD_ERROR_NONE = 0x0000, /* no error */ | 655 | MAD_ERROR_NONE = 0x0000, /* no error */ |
656 | 656 | ||
657 | MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ | 657 | MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ |
658 | MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ | 658 | MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ |
659 | 659 | ||
660 | MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ | 660 | MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ |
661 | 661 | ||
662 | MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ | 662 | MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ |
663 | MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ | 663 | MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ |
664 | MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ | 664 | MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ |
665 | MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ | 665 | MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ |
666 | MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ | 666 | MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ |
667 | 667 | ||
668 | MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ | 668 | MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ |
669 | MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ | 669 | MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ |
670 | MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ | 670 | MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ |
671 | MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ | 671 | MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ |
672 | MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ | 672 | MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ |
673 | MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ | 673 | MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ |
674 | MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ | 674 | MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ |
675 | MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ | 675 | MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ |
676 | MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ | 676 | MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ |
677 | MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ | 677 | MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ |
678 | MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ | 678 | MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ |
679 | MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ | 679 | MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ |
680 | MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ | 680 | MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ |
681 | }; | 681 | }; |
682 | 682 | ||
683 | # define MAD_RECOVERABLE(error) ((error) & 0xff00) | 683 | # define MAD_RECOVERABLE(error) ((error) & 0xff00) |
684 | 684 | ||
685 | struct mad_stream { | 685 | struct mad_stream { |
686 | unsigned char const *buffer; /* input bitstream buffer */ | 686 | unsigned char const *buffer; /* input bitstream buffer */ |
687 | unsigned char const *bufend; /* end of buffer */ | 687 | unsigned char const *bufend; /* end of buffer */ |
688 | unsigned long skiplen; /* bytes to skip before next frame */ | 688 | unsigned long skiplen; /* bytes to skip before next frame */ |
689 | 689 | ||
690 | int sync; /* stream sync found */ | 690 | int sync; /* stream sync found */ |
691 | unsigned long freerate; /* free bitrate (fixed) */ | 691 | unsigned long freerate; /* free bitrate (fixed) */ |
692 | 692 | ||
693 | unsigned char const *this_frame; /* start of current frame */ | 693 | unsigned char const *this_frame; /* start of current frame */ |
694 | unsigned char const *next_frame; /* start of next frame */ | 694 | unsigned char const *next_frame; /* start of next frame */ |
695 | struct mad_bitptr ptr; /* current processing bit pointer */ | 695 | struct mad_bitptr ptr; /* current processing bit pointer */ |
696 | 696 | ||
697 | struct mad_bitptr anc_ptr; /* ancillary bits pointer */ | 697 | struct mad_bitptr anc_ptr; /* ancillary bits pointer */ |
698 | unsigned int anc_bitlen; /* number of ancillary bits */ | 698 | unsigned int anc_bitlen; /* number of ancillary bits */ |
699 | 699 | ||
700 | unsigned char (*main_data)[MAD_BUFFER_MDLEN]; | 700 | unsigned char (*main_data)[MAD_BUFFER_MDLEN]; |
701 | /* Layer III main_data() */ | 701 | /* Layer III main_data() */ |
702 | unsigned int md_len; /* bytes in main_data */ | 702 | unsigned int md_len; /* bytes in main_data */ |
703 | 703 | ||
704 | int options; /* decoding options (see below) */ | 704 | int options; /* decoding options (see below) */ |
705 | enum mad_error error; /* error code (see above) */ | 705 | enum mad_error error; /* error code (see above) */ |
706 | }; | 706 | }; |
707 | 707 | ||
708 | enum { | 708 | enum { |
709 | MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ | 709 | MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ |
710 | MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ | 710 | MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ |
711 | # if 0 /* not yet implemented */ | 711 | # if 0 /* not yet implemented */ |
712 | MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ | 712 | MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ |
713 | MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ | 713 | MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ |
714 | MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ | 714 | MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ |
715 | # endif | 715 | # endif |
716 | }; | 716 | }; |
717 | 717 | ||
@@ -722,7 +722,7 @@ void mad_stream_finish(struct mad_stream *); | |||
722 | ((void) ((stream)->options = (opts))) | 722 | ((void) ((stream)->options = (opts))) |
723 | 723 | ||
724 | void mad_stream_buffer(struct mad_stream *, | 724 | void mad_stream_buffer(struct mad_stream *, |
725 | unsigned char const *, unsigned long); | 725 | unsigned char const *, unsigned long); |
726 | void mad_stream_skip(struct mad_stream *, unsigned long); | 726 | void mad_stream_skip(struct mad_stream *, unsigned long); |
727 | 727 | ||
728 | int mad_stream_sync(struct mad_stream *); | 728 | int mad_stream_sync(struct mad_stream *); |
@@ -738,82 +738,82 @@ char const *mad_stream_errorstr(struct mad_stream const *); | |||
738 | 738 | ||
739 | 739 | ||
740 | enum mad_layer { | 740 | enum mad_layer { |
741 | MAD_LAYER_I = 1, /* Layer I */ | 741 | MAD_LAYER_I = 1, /* Layer I */ |
742 | MAD_LAYER_II = 2, /* Layer II */ | 742 | MAD_LAYER_II = 2, /* Layer II */ |
743 | MAD_LAYER_III = 3 /* Layer III */ | 743 | MAD_LAYER_III = 3 /* Layer III */ |
744 | }; | 744 | }; |
745 | 745 | ||
746 | enum mad_mode { | 746 | enum mad_mode { |
747 | MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ | 747 | MAD_MODE_SINGLE_CHANNEL = 0, /* single channel */ |
748 | MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ | 748 | MAD_MODE_DUAL_CHANNEL = 1, /* dual channel */ |
749 | MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ | 749 | MAD_MODE_JOINT_STEREO = 2, /* joint (MS/intensity) stereo */ |
750 | MAD_MODE_STEREO = 3 /* normal LR stereo */ | 750 | MAD_MODE_STEREO = 3 /* normal LR stereo */ |
751 | }; | 751 | }; |
752 | 752 | ||
753 | enum mad_emphasis { | 753 | enum mad_emphasis { |
754 | MAD_EMPHASIS_NONE = 0, /* no emphasis */ | 754 | MAD_EMPHASIS_NONE = 0, /* no emphasis */ |
755 | MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ | 755 | MAD_EMPHASIS_50_15_US = 1, /* 50/15 microseconds emphasis */ |
756 | MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ | 756 | MAD_EMPHASIS_CCITT_J_17 = 3, /* CCITT J.17 emphasis */ |
757 | MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ | 757 | MAD_EMPHASIS_RESERVED = 2 /* unknown emphasis */ |
758 | }; | 758 | }; |
759 | 759 | ||
760 | struct mad_header { | 760 | struct mad_header { |
761 | enum mad_layer layer; /* audio layer (1, 2, or 3) */ | 761 | enum mad_layer layer; /* audio layer (1, 2, or 3) */ |
762 | enum mad_mode mode; /* channel mode (see above) */ | 762 | enum mad_mode mode; /* channel mode (see above) */ |
763 | int mode_extension; /* additional mode info */ | 763 | int mode_extension; /* additional mode info */ |
764 | enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ | 764 | enum mad_emphasis emphasis; /* de-emphasis to use (see above) */ |
765 | 765 | ||
766 | unsigned long bitrate; /* stream bitrate (bps) */ | 766 | unsigned long bitrate; /* stream bitrate (bps) */ |
767 | unsigned int samplerate; /* sampling frequency (Hz) */ | 767 | unsigned int samplerate; /* sampling frequency (Hz) */ |
768 | 768 | ||
769 | unsigned short crc_check; /* frame CRC accumulator */ | 769 | unsigned short crc_check; /* frame CRC accumulator */ |
770 | unsigned short crc_target; /* final target CRC checksum */ | 770 | unsigned short crc_target; /* final target CRC checksum */ |
771 | 771 | ||
772 | int flags; /* flags (see below) */ | 772 | int flags; /* flags (see below) */ |
773 | int private_bits; /* private bits (see below) */ | 773 | int private_bits; /* private bits (see below) */ |
774 | 774 | ||
775 | mad_timer_t duration; /* audio playing time of frame */ | 775 | mad_timer_t duration; /* audio playing time of frame */ |
776 | }; | 776 | }; |
777 | 777 | ||
778 | struct mad_frame { | 778 | struct mad_frame { |
779 | struct mad_header header; /* MPEG audio header */ | 779 | struct mad_header header; /* MPEG audio header */ |
780 | int options; /* decoding options (from stream) */ | 780 | int options; /* decoding options (from stream) */ |
781 | 781 | ||
782 | mad_fixed_t (*sbsample)[2][36][32]; /* synthesis subband filter samples */ | 782 | mad_fixed_t (*sbsample)[2][36][32]; /* synthesis subband filter samples */ |
783 | mad_fixed_t (*sbsample_prev)[2][36][32]; /* synthesis subband filter samples | 783 | mad_fixed_t (*sbsample_prev)[2][36][32]; /* synthesis subband filter samples |
784 | from previous frame only needed | 784 | from previous frame only needed |
785 | when synthesis is on cop */ | 785 | when synthesis is on cop */ |
786 | 786 | ||
787 | mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ | 787 | mad_fixed_t (*overlap)[2][32][18]; /* Layer III block overlap data */ |
788 | }; | 788 | }; |
789 | 789 | ||
790 | # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) | 790 | # define MAD_NCHANNELS(header) ((header)->mode ? 2 : 1) |
791 | # define MAD_NSBSAMPLES(header) \ | 791 | # define MAD_NSBSAMPLES(header) \ |
792 | ((header)->layer == MAD_LAYER_I ? 12 : \ | 792 | ((header)->layer == MAD_LAYER_I ? 12 : \ |
793 | (((header)->layer == MAD_LAYER_III && \ | 793 | (((header)->layer == MAD_LAYER_III && \ |
794 | ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) | 794 | ((header)->flags & MAD_FLAG_LSF_EXT)) ? 18 : 36)) |
795 | 795 | ||
796 | enum { | 796 | enum { |
797 | MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ | 797 | MAD_FLAG_NPRIVATE_III = 0x0007, /* number of Layer III private bits */ |
798 | MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ | 798 | MAD_FLAG_INCOMPLETE = 0x0008, /* header but not data is decoded */ |
799 | 799 | ||
800 | MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ | 800 | MAD_FLAG_PROTECTION = 0x0010, /* frame has CRC protection */ |
801 | MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ | 801 | MAD_FLAG_COPYRIGHT = 0x0020, /* frame is copyright */ |
802 | MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ | 802 | MAD_FLAG_ORIGINAL = 0x0040, /* frame is original (else copy) */ |
803 | MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ | 803 | MAD_FLAG_PADDING = 0x0080, /* frame has additional slot */ |
804 | 804 | ||
805 | MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ | 805 | MAD_FLAG_I_STEREO = 0x0100, /* uses intensity joint stereo */ |
806 | MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ | 806 | MAD_FLAG_MS_STEREO = 0x0200, /* uses middle/side joint stereo */ |
807 | MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ | 807 | MAD_FLAG_FREEFORMAT = 0x0400, /* uses free format bitrate */ |
808 | 808 | ||
809 | MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ | 809 | MAD_FLAG_LSF_EXT = 0x1000, /* lower sampling freq. extension */ |
810 | MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ | 810 | MAD_FLAG_MC_EXT = 0x2000, /* multichannel audio extension */ |
811 | MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ | 811 | MAD_FLAG_MPEG_2_5_EXT = 0x4000 /* MPEG 2.5 (unofficial) extension */ |
812 | }; | 812 | }; |
813 | 813 | ||
814 | enum { | 814 | enum { |
815 | MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ | 815 | MAD_PRIVATE_HEADER = 0x0100, /* header private bit */ |
816 | MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ | 816 | MAD_PRIVATE_III = 0x001f /* Layer III private bits (up to 5) */ |
817 | }; | 817 | }; |
818 | 818 | ||
819 | void mad_header_init(struct mad_header *); | 819 | void mad_header_init(struct mad_header *); |
@@ -838,19 +838,19 @@ void mad_frame_mute(struct mad_frame *); | |||
838 | 838 | ||
839 | 839 | ||
840 | struct mad_pcm { | 840 | struct mad_pcm { |
841 | unsigned int samplerate; /* sampling frequency (Hz) */ | 841 | unsigned int samplerate; /* sampling frequency (Hz) */ |
842 | unsigned short channels; /* number of channels */ | 842 | unsigned short channels; /* number of channels */ |
843 | unsigned short length; /* number of samples per channel */ | 843 | unsigned short length; /* number of samples per channel */ |
844 | mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ | 844 | mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ |
845 | }; | 845 | }; |
846 | 846 | ||
847 | struct mad_synth { | 847 | struct mad_synth { |
848 | mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ | 848 | mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ |
849 | /* [ch][eo][peo][s][v] */ | 849 | /* [ch][eo][peo][s][v] */ |
850 | 850 | ||
851 | unsigned int phase; /* current processing phase */ | 851 | unsigned int phase; /* current processing phase */ |
852 | 852 | ||
853 | struct mad_pcm pcm; /* PCM output */ | 853 | struct mad_pcm pcm; /* PCM output */ |
854 | }; | 854 | }; |
855 | 855 | ||
856 | /* single channel PCM selector */ | 856 | /* single channel PCM selector */ |
@@ -892,10 +892,10 @@ enum mad_decoder_mode { | |||
892 | }; | 892 | }; |
893 | 893 | ||
894 | enum mad_flow { | 894 | enum mad_flow { |
895 | MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ | 895 | MAD_FLOW_CONTINUE = 0x0000, /* continue normally */ |
896 | MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ | 896 | MAD_FLOW_STOP = 0x0010, /* stop decoding normally */ |
897 | MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ | 897 | MAD_FLOW_BREAK = 0x0011, /* stop decoding and signal an error */ |
898 | MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ | 898 | MAD_FLOW_IGNORE = 0x0020 /* ignore the current frame */ |
899 | }; | 899 | }; |
900 | 900 | ||
901 | struct mad_decoder { | 901 | struct mad_decoder { |
@@ -920,26 +920,26 @@ struct mad_decoder { | |||
920 | enum mad_flow (*input_func)(void *, struct mad_stream *); | 920 | enum mad_flow (*input_func)(void *, struct mad_stream *); |
921 | enum mad_flow (*header_func)(void *, struct mad_header const *); | 921 | enum mad_flow (*header_func)(void *, struct mad_header const *); |
922 | enum mad_flow (*filter_func)(void *, | 922 | enum mad_flow (*filter_func)(void *, |
923 | struct mad_stream const *, struct mad_frame *); | 923 | struct mad_stream const *, struct mad_frame *); |
924 | enum mad_flow (*output_func)(void *, | 924 | enum mad_flow (*output_func)(void *, |
925 | struct mad_header const *, struct mad_pcm *); | 925 | struct mad_header const *, struct mad_pcm *); |
926 | enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); | 926 | enum mad_flow (*error_func)(void *, struct mad_stream *, struct mad_frame *); |
927 | enum mad_flow (*message_func)(void *, void *, unsigned int *); | 927 | enum mad_flow (*message_func)(void *, void *, unsigned int *); |
928 | }; | 928 | }; |
929 | 929 | ||
930 | void mad_decoder_init(struct mad_decoder *, void *, | 930 | void mad_decoder_init(struct mad_decoder *, void *, |
931 | enum mad_flow (*)(void *, struct mad_stream *), | 931 | enum mad_flow (*)(void *, struct mad_stream *), |
932 | enum mad_flow (*)(void *, struct mad_header const *), | 932 | enum mad_flow (*)(void *, struct mad_header const *), |
933 | enum mad_flow (*)(void *, | 933 | enum mad_flow (*)(void *, |
934 | struct mad_stream const *, | 934 | struct mad_stream const *, |
935 | struct mad_frame *), | 935 | struct mad_frame *), |
936 | enum mad_flow (*)(void *, | 936 | enum mad_flow (*)(void *, |
937 | struct mad_header const *, | 937 | struct mad_header const *, |
938 | struct mad_pcm *), | 938 | struct mad_pcm *), |
939 | enum mad_flow (*)(void *, | 939 | enum mad_flow (*)(void *, |
940 | struct mad_stream *, | 940 | struct mad_stream *, |
941 | struct mad_frame *), | 941 | struct mad_frame *), |
942 | enum mad_flow (*)(void *, void *, unsigned int *)); | 942 | enum mad_flow (*)(void *, void *, unsigned int *)); |
943 | int mad_decoder_finish(struct mad_decoder *); | 943 | int mad_decoder_finish(struct mad_decoder *); |
944 | 944 | ||
945 | # define mad_decoder_options(decoder, opts) \ | 945 | # define mad_decoder_options(decoder, opts) \ |
diff --git a/apps/codecs/libmad/minimad.c b/apps/codecs/libmad/minimad.c index e32e0d6a38..6b443cf859 100644 --- a/apps/codecs/libmad/minimad.c +++ b/apps/codecs/libmad/minimad.c | |||
@@ -82,7 +82,7 @@ struct buffer { | |||
82 | 82 | ||
83 | static | 83 | static |
84 | enum mad_flow input(void *data, | 84 | enum mad_flow input(void *data, |
85 | struct mad_stream *stream) | 85 | struct mad_stream *stream) |
86 | { | 86 | { |
87 | struct buffer *buffer = data; | 87 | struct buffer *buffer = data; |
88 | 88 | ||
@@ -128,8 +128,8 @@ signed int scale(mad_fixed_t sample) | |||
128 | 128 | ||
129 | static | 129 | static |
130 | enum mad_flow output(void *data, | 130 | enum mad_flow output(void *data, |
131 | struct mad_header const *header, | 131 | struct mad_header const *header, |
132 | struct mad_pcm *pcm) | 132 | struct mad_pcm *pcm) |
133 | { | 133 | { |
134 | unsigned int nchannels, nsamples; | 134 | unsigned int nchannels, nsamples; |
135 | mad_fixed_t const *left_ch, *right_ch; | 135 | mad_fixed_t const *left_ch, *right_ch; |
@@ -169,14 +169,14 @@ enum mad_flow output(void *data, | |||
169 | 169 | ||
170 | static | 170 | static |
171 | enum mad_flow error(void *data, | 171 | enum mad_flow error(void *data, |
172 | struct mad_stream *stream, | 172 | struct mad_stream *stream, |
173 | struct mad_frame *frame) | 173 | struct mad_frame *frame) |
174 | { | 174 | { |
175 | struct buffer *buffer = data; | 175 | struct buffer *buffer = data; |
176 | 176 | ||
177 | fprintf(stderr, "decoding error 0x%04x (%s) at byte offset %u\n", | 177 | fprintf(stderr, "decoding error 0x%04x (%s) at byte offset %u\n", |
178 | stream->error, mad_stream_errorstr(stream), | 178 | stream->error, mad_stream_errorstr(stream), |
179 | stream->this_frame - buffer->start); | 179 | stream->this_frame - buffer->start); |
180 | 180 | ||
181 | /* return MAD_FLOW_BREAK here to stop decoding (and propagate an error) */ | 181 | /* return MAD_FLOW_BREAK here to stop decoding (and propagate an error) */ |
182 | 182 | ||
@@ -207,8 +207,8 @@ int decode(unsigned char const *start, unsigned long length) | |||
207 | /* configure input, output, and error functions */ | 207 | /* configure input, output, and error functions */ |
208 | 208 | ||
209 | mad_decoder_init(&decoder, &buffer, | 209 | mad_decoder_init(&decoder, &buffer, |
210 | input, 0 /* header */, 0 /* filter */, output, | 210 | input, 0 /* header */, 0 /* filter */, output, |
211 | error, 0 /* message */); | 211 | error, 0 /* message */); |
212 | 212 | ||
213 | /* start decoding */ | 213 | /* start decoding */ |
214 | 214 | ||
diff --git a/apps/codecs/libmad/stream.c b/apps/codecs/libmad/stream.c index 69c963bb0d..2936736f76 100644 --- a/apps/codecs/libmad/stream.c +++ b/apps/codecs/libmad/stream.c | |||
@@ -29,8 +29,8 @@ | |||
29 | # include "stream.h" | 29 | # include "stream.h" |
30 | 30 | ||
31 | /* | 31 | /* |
32 | * NAME: stream->init() | 32 | * NAME: stream->init() |
33 | * DESCRIPTION: initialize stream struct | 33 | * DESCRIPTION: initialize stream struct |
34 | */ | 34 | */ |
35 | void mad_stream_init(struct mad_stream *stream) | 35 | void mad_stream_init(struct mad_stream *stream) |
36 | { | 36 | { |
@@ -56,8 +56,8 @@ void mad_stream_init(struct mad_stream *stream) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * NAME: stream->finish() | 59 | * NAME: stream->finish() |
60 | * DESCRIPTION: deallocate any dynamic memory associated with stream | 60 | * DESCRIPTION: deallocate any dynamic memory associated with stream |
61 | */ | 61 | */ |
62 | void mad_stream_finish(struct mad_stream *stream) | 62 | void mad_stream_finish(struct mad_stream *stream) |
63 | { | 63 | { |
@@ -71,11 +71,11 @@ void mad_stream_finish(struct mad_stream *stream) | |||
71 | } | 71 | } |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * NAME: stream->buffer() | 74 | * NAME: stream->buffer() |
75 | * DESCRIPTION: set stream buffer pointers | 75 | * DESCRIPTION: set stream buffer pointers |
76 | */ | 76 | */ |
77 | void mad_stream_buffer(struct mad_stream *stream, | 77 | void mad_stream_buffer(struct mad_stream *stream, |
78 | unsigned char const *buffer, unsigned long length) | 78 | unsigned char const *buffer, unsigned long length) |
79 | { | 79 | { |
80 | stream->buffer = buffer; | 80 | stream->buffer = buffer; |
81 | stream->bufend = buffer + length; | 81 | stream->bufend = buffer + length; |
@@ -89,8 +89,8 @@ void mad_stream_buffer(struct mad_stream *stream, | |||
89 | } | 89 | } |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * NAME: stream->skip() | 92 | * NAME: stream->skip() |
93 | * DESCRIPTION: arrange to skip bytes before the next frame | 93 | * DESCRIPTION: arrange to skip bytes before the next frame |
94 | */ | 94 | */ |
95 | void mad_stream_skip(struct mad_stream *stream, unsigned long length) | 95 | void mad_stream_skip(struct mad_stream *stream, unsigned long length) |
96 | { | 96 | { |
@@ -98,8 +98,8 @@ void mad_stream_skip(struct mad_stream *stream, unsigned long length) | |||
98 | } | 98 | } |
99 | 99 | ||
100 | /* | 100 | /* |
101 | * NAME: stream->sync() | 101 | * NAME: stream->sync() |
102 | * DESCRIPTION: locate the next stream sync word | 102 | * DESCRIPTION: locate the next stream sync word |
103 | */ | 103 | */ |
104 | int mad_stream_sync(struct mad_stream *stream) | 104 | int mad_stream_sync(struct mad_stream *stream) |
105 | { | 105 | { |
@@ -109,7 +109,7 @@ int mad_stream_sync(struct mad_stream *stream) | |||
109 | end = stream->bufend; | 109 | end = stream->bufend; |
110 | 110 | ||
111 | while (ptr < end - 1 && | 111 | while (ptr < end - 1 && |
112 | !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) | 112 | !(ptr[0] == 0xff && (ptr[1] & 0xe0) == 0xe0)) |
113 | ++ptr; | 113 | ++ptr; |
114 | 114 | ||
115 | if (end - ptr < MAD_BUFFER_GUARD) | 115 | if (end - ptr < MAD_BUFFER_GUARD) |
@@ -121,38 +121,38 @@ int mad_stream_sync(struct mad_stream *stream) | |||
121 | } | 121 | } |
122 | 122 | ||
123 | /* | 123 | /* |
124 | * NAME: stream->errorstr() | 124 | * NAME: stream->errorstr() |
125 | * DESCRIPTION: return a string description of the current error condition | 125 | * DESCRIPTION: return a string description of the current error condition |
126 | */ | 126 | */ |
127 | char const *mad_stream_errorstr(struct mad_stream const *stream) | 127 | char const *mad_stream_errorstr(struct mad_stream const *stream) |
128 | { | 128 | { |
129 | switch (stream->error) { | 129 | switch (stream->error) { |
130 | case MAD_ERROR_NONE: return "no error"; | 130 | case MAD_ERROR_NONE: return "no error"; |
131 | 131 | ||
132 | case MAD_ERROR_BUFLEN: return "input buffer too small (or EOF)"; | 132 | case MAD_ERROR_BUFLEN: return "input buffer too small (or EOF)"; |
133 | case MAD_ERROR_BUFPTR: return "invalid (null) buffer pointer"; | 133 | case MAD_ERROR_BUFPTR: return "invalid (null) buffer pointer"; |
134 | 134 | ||
135 | case MAD_ERROR_NOMEM: return "not enough memory"; | 135 | case MAD_ERROR_NOMEM: return "not enough memory"; |
136 | 136 | ||
137 | case MAD_ERROR_LOSTSYNC: return "lost synchronization"; | 137 | case MAD_ERROR_LOSTSYNC: return "lost synchronization"; |
138 | case MAD_ERROR_BADLAYER: return "reserved header layer value"; | 138 | case MAD_ERROR_BADLAYER: return "reserved header layer value"; |
139 | case MAD_ERROR_BADBITRATE: return "forbidden bitrate value"; | 139 | case MAD_ERROR_BADBITRATE: return "forbidden bitrate value"; |
140 | case MAD_ERROR_BADSAMPLERATE: return "reserved sample frequency value"; | 140 | case MAD_ERROR_BADSAMPLERATE: return "reserved sample frequency value"; |
141 | case MAD_ERROR_BADEMPHASIS: return "reserved emphasis value"; | 141 | case MAD_ERROR_BADEMPHASIS: return "reserved emphasis value"; |
142 | 142 | ||
143 | case MAD_ERROR_BADCRC: return "CRC check failed"; | 143 | case MAD_ERROR_BADCRC: return "CRC check failed"; |
144 | case MAD_ERROR_BADBITALLOC: return "forbidden bit allocation value"; | 144 | case MAD_ERROR_BADBITALLOC: return "forbidden bit allocation value"; |
145 | case MAD_ERROR_BADSCALEFACTOR: return "bad scalefactor index"; | 145 | case MAD_ERROR_BADSCALEFACTOR: return "bad scalefactor index"; |
146 | case MAD_ERROR_BADMODE: return "bad bitrate/mode combination"; | 146 | case MAD_ERROR_BADMODE: return "bad bitrate/mode combination"; |
147 | case MAD_ERROR_BADFRAMELEN: return "bad frame length"; | 147 | case MAD_ERROR_BADFRAMELEN: return "bad frame length"; |
148 | case MAD_ERROR_BADBIGVALUES: return "bad big_values count"; | 148 | case MAD_ERROR_BADBIGVALUES: return "bad big_values count"; |
149 | case MAD_ERROR_BADBLOCKTYPE: return "reserved block_type"; | 149 | case MAD_ERROR_BADBLOCKTYPE: return "reserved block_type"; |
150 | case MAD_ERROR_BADSCFSI: return "bad scalefactor selection info"; | 150 | case MAD_ERROR_BADSCFSI: return "bad scalefactor selection info"; |
151 | case MAD_ERROR_BADDATAPTR: return "bad main_data_begin pointer"; | 151 | case MAD_ERROR_BADDATAPTR: return "bad main_data_begin pointer"; |
152 | case MAD_ERROR_BADPART3LEN: return "bad audio data length"; | 152 | case MAD_ERROR_BADPART3LEN: return "bad audio data length"; |
153 | case MAD_ERROR_BADHUFFTABLE: return "bad Huffman table select"; | 153 | case MAD_ERROR_BADHUFFTABLE: return "bad Huffman table select"; |
154 | case MAD_ERROR_BADHUFFDATA: return "Huffman data overrun"; | 154 | case MAD_ERROR_BADHUFFDATA: return "Huffman data overrun"; |
155 | case MAD_ERROR_BADSTEREO: return "incompatible block_type for JS"; | 155 | case MAD_ERROR_BADSTEREO: return "incompatible block_type for JS"; |
156 | } | 156 | } |
157 | 157 | ||
158 | return 0; | 158 | return 0; |
diff --git a/apps/codecs/libmad/stream.h b/apps/codecs/libmad/stream.h index 5fca48fdb8..c89c40e088 100644 --- a/apps/codecs/libmad/stream.h +++ b/apps/codecs/libmad/stream.h | |||
@@ -24,70 +24,70 @@ | |||
24 | 24 | ||
25 | # include "bit.h" | 25 | # include "bit.h" |
26 | 26 | ||
27 | # define MAD_BUFFER_GUARD 8 | 27 | # define MAD_BUFFER_GUARD 8 |
28 | # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) | 28 | # define MAD_BUFFER_MDLEN (511 + 2048 + MAD_BUFFER_GUARD) |
29 | 29 | ||
30 | enum mad_error { | 30 | enum mad_error { |
31 | MAD_ERROR_NONE = 0x0000, /* no error */ | 31 | MAD_ERROR_NONE = 0x0000, /* no error */ |
32 | 32 | ||
33 | MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ | 33 | MAD_ERROR_BUFLEN = 0x0001, /* input buffer too small (or EOF) */ |
34 | MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ | 34 | MAD_ERROR_BUFPTR = 0x0002, /* invalid (null) buffer pointer */ |
35 | 35 | ||
36 | MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ | 36 | MAD_ERROR_NOMEM = 0x0031, /* not enough memory */ |
37 | 37 | ||
38 | MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ | 38 | MAD_ERROR_LOSTSYNC = 0x0101, /* lost synchronization */ |
39 | MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ | 39 | MAD_ERROR_BADLAYER = 0x0102, /* reserved header layer value */ |
40 | MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ | 40 | MAD_ERROR_BADBITRATE = 0x0103, /* forbidden bitrate value */ |
41 | MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ | 41 | MAD_ERROR_BADSAMPLERATE = 0x0104, /* reserved sample frequency value */ |
42 | MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ | 42 | MAD_ERROR_BADEMPHASIS = 0x0105, /* reserved emphasis value */ |
43 | 43 | ||
44 | MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ | 44 | MAD_ERROR_BADCRC = 0x0201, /* CRC check failed */ |
45 | MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ | 45 | MAD_ERROR_BADBITALLOC = 0x0211, /* forbidden bit allocation value */ |
46 | MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ | 46 | MAD_ERROR_BADSCALEFACTOR = 0x0221, /* bad scalefactor index */ |
47 | MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ | 47 | MAD_ERROR_BADMODE = 0x0222, /* bad bitrate/mode combination */ |
48 | MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ | 48 | MAD_ERROR_BADFRAMELEN = 0x0231, /* bad frame length */ |
49 | MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ | 49 | MAD_ERROR_BADBIGVALUES = 0x0232, /* bad big_values count */ |
50 | MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ | 50 | MAD_ERROR_BADBLOCKTYPE = 0x0233, /* reserved block_type */ |
51 | MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ | 51 | MAD_ERROR_BADSCFSI = 0x0234, /* bad scalefactor selection info */ |
52 | MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ | 52 | MAD_ERROR_BADDATAPTR = 0x0235, /* bad main_data_begin pointer */ |
53 | MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ | 53 | MAD_ERROR_BADPART3LEN = 0x0236, /* bad audio data length */ |
54 | MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ | 54 | MAD_ERROR_BADHUFFTABLE = 0x0237, /* bad Huffman table select */ |
55 | MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ | 55 | MAD_ERROR_BADHUFFDATA = 0x0238, /* Huffman data overrun */ |
56 | MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ | 56 | MAD_ERROR_BADSTEREO = 0x0239 /* incompatible block_type for JS */ |
57 | }; | 57 | }; |
58 | 58 | ||
59 | # define MAD_RECOVERABLE(error) ((error) & 0xff00) | 59 | # define MAD_RECOVERABLE(error) ((error) & 0xff00) |
60 | 60 | ||
61 | struct mad_stream { | 61 | struct mad_stream { |
62 | unsigned char const *buffer; /* input bitstream buffer */ | 62 | unsigned char const *buffer; /* input bitstream buffer */ |
63 | unsigned char const *bufend; /* end of buffer */ | 63 | unsigned char const *bufend; /* end of buffer */ |
64 | unsigned long skiplen; /* bytes to skip before next frame */ | 64 | unsigned long skiplen; /* bytes to skip before next frame */ |
65 | 65 | ||
66 | int sync; /* stream sync found */ | 66 | int sync; /* stream sync found */ |
67 | unsigned long freerate; /* free bitrate (fixed) */ | 67 | unsigned long freerate; /* free bitrate (fixed) */ |
68 | 68 | ||
69 | unsigned char const *this_frame; /* start of current frame */ | 69 | unsigned char const *this_frame; /* start of current frame */ |
70 | unsigned char const *next_frame; /* start of next frame */ | 70 | unsigned char const *next_frame; /* start of next frame */ |
71 | struct mad_bitptr ptr; /* current processing bit pointer */ | 71 | struct mad_bitptr ptr; /* current processing bit pointer */ |
72 | 72 | ||
73 | struct mad_bitptr anc_ptr; /* ancillary bits pointer */ | 73 | struct mad_bitptr anc_ptr; /* ancillary bits pointer */ |
74 | unsigned int anc_bitlen; /* number of ancillary bits */ | 74 | unsigned int anc_bitlen; /* number of ancillary bits */ |
75 | 75 | ||
76 | unsigned char (*main_data)[MAD_BUFFER_MDLEN]; | 76 | unsigned char (*main_data)[MAD_BUFFER_MDLEN]; |
77 | /* Layer III main_data() */ | 77 | /* Layer III main_data() */ |
78 | unsigned int md_len; /* bytes in main_data */ | 78 | unsigned int md_len; /* bytes in main_data */ |
79 | 79 | ||
80 | int options; /* decoding options (see below) */ | 80 | int options; /* decoding options (see below) */ |
81 | enum mad_error error; /* error code (see above) */ | 81 | enum mad_error error; /* error code (see above) */ |
82 | }; | 82 | }; |
83 | 83 | ||
84 | enum { | 84 | enum { |
85 | MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ | 85 | MAD_OPTION_IGNORECRC = 0x0001, /* ignore CRC errors */ |
86 | MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ | 86 | MAD_OPTION_HALFSAMPLERATE = 0x0002 /* generate PCM at 1/2 sample rate */ |
87 | # if 0 /* not yet implemented */ | 87 | # if 0 /* not yet implemented */ |
88 | MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ | 88 | MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */ |
89 | MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ | 89 | MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */ |
90 | MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ | 90 | MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */ |
91 | # endif | 91 | # endif |
92 | }; | 92 | }; |
93 | 93 | ||
@@ -98,7 +98,7 @@ void mad_stream_finish(struct mad_stream *); | |||
98 | ((void) ((stream)->options = (opts))) | 98 | ((void) ((stream)->options = (opts))) |
99 | 99 | ||
100 | void mad_stream_buffer(struct mad_stream *, | 100 | void mad_stream_buffer(struct mad_stream *, |
101 | unsigned char const *, unsigned long); | 101 | unsigned char const *, unsigned long); |
102 | void mad_stream_skip(struct mad_stream *, unsigned long); | 102 | void mad_stream_skip(struct mad_stream *, unsigned long); |
103 | 103 | ||
104 | int mad_stream_sync(struct mad_stream *); | 104 | int mad_stream_sync(struct mad_stream *); |
diff --git a/apps/codecs/libmad/synth.c b/apps/codecs/libmad/synth.c index bc7ac742fe..9b320b594d 100644 --- a/apps/codecs/libmad/synth.c +++ b/apps/codecs/libmad/synth.c | |||
@@ -30,8 +30,8 @@ | |||
30 | # include "synth.h" | 30 | # include "synth.h" |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * NAME: synth->init() | 33 | * NAME: synth->init() |
34 | * DESCRIPTION: initialize synth struct | 34 | * DESCRIPTION: initialize synth struct |
35 | */ | 35 | */ |
36 | void mad_synth_init(struct mad_synth *synth) | 36 | void mad_synth_init(struct mad_synth *synth) |
37 | { | 37 | { |
@@ -50,8 +50,8 @@ void mad_synth_init(struct mad_synth *synth) | |||
50 | } | 50 | } |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * NAME: synth->mute() | 53 | * NAME: synth->mute() |
54 | * DESCRIPTION: zero all polyphase filterbank values, resetting synthesis | 54 | * DESCRIPTION: zero all polyphase filterbank values, resetting synthesis |
55 | */ | 55 | */ |
56 | void mad_synth_mute(struct mad_synth *synth) | 56 | void mad_synth_mute(struct mad_synth *synth) |
57 | { | 57 | { |
@@ -60,8 +60,8 @@ void mad_synth_mute(struct mad_synth *synth) | |||
60 | for (ch = 0; ch < 2; ++ch) { | 60 | for (ch = 0; ch < 2; ++ch) { |
61 | for (s = 0; s < 16; ++s) { | 61 | for (s = 0; s < 16; ++s) { |
62 | for (v = 0; v < 8; ++v) { | 62 | for (v = 0; v < 8; ++v) { |
63 | synth->filter[ch][0][0][s][v] = synth->filter[ch][0][1][s][v] = | 63 | synth->filter[ch][0][0][s][v] = synth->filter[ch][0][1][s][v] = |
64 | synth->filter[ch][1][0][s][v] = synth->filter[ch][1][1][s][v] = 0; | 64 | synth->filter[ch][1][0][s][v] = synth->filter[ch][1][1][s][v] = 0; |
65 | } | 65 | } |
66 | } | 66 | } |
67 | } | 67 | } |
@@ -142,12 +142,12 @@ void dct32(mad_fixed_t const in[32], unsigned int slot, | |||
142 | # endif | 142 | # endif |
143 | 143 | ||
144 | /* | 144 | /* |
145 | * NAME: dct32() | 145 | * NAME: dct32() |
146 | * DESCRIPTION: perform fast in[32]->out[32] DCT | 146 | * DESCRIPTION: perform fast in[32]->out[32] DCT |
147 | */ | 147 | */ |
148 | static | 148 | static |
149 | void dct32(mad_fixed_t const in[32], unsigned int slot, | 149 | void dct32(mad_fixed_t const in[32], unsigned int slot, |
150 | mad_fixed_t lo[16][8], mad_fixed_t hi[16][8]) | 150 | mad_fixed_t lo[16][8], mad_fixed_t hi[16][8]) |
151 | { | 151 | { |
152 | mad_fixed_t t0, t1, t2, t3, t4, t5, t6, t7; | 152 | mad_fixed_t t0, t1, t2, t3, t4, t5, t6, t7; |
153 | mad_fixed_t t8, t9, t10, t11, t12, t13, t14, t15; | 153 | mad_fixed_t t8, t9, t10, t11, t12, t13, t14, t15; |
@@ -176,69 +176,69 @@ void dct32(mad_fixed_t const in[32], unsigned int slot, | |||
176 | /* costab[i] = cos(PI / (2 * 32) * i) */ | 176 | /* costab[i] = cos(PI / (2 * 32) * i) */ |
177 | 177 | ||
178 | # if defined(OPT_DCTO) | 178 | # if defined(OPT_DCTO) |
179 | # define costab1 MAD_F(0x7fd8878e) | 179 | # define costab1 MAD_F(0x7fd8878e) |
180 | # define costab2 MAD_F(0x7f62368f) | 180 | # define costab2 MAD_F(0x7f62368f) |
181 | # define costab3 MAD_F(0x7e9d55fc) | 181 | # define costab3 MAD_F(0x7e9d55fc) |
182 | # define costab4 MAD_F(0x7d8a5f40) | 182 | # define costab4 MAD_F(0x7d8a5f40) |
183 | # define costab5 MAD_F(0x7c29fbee) | 183 | # define costab5 MAD_F(0x7c29fbee) |
184 | # define costab6 MAD_F(0x7a7d055b) | 184 | # define costab6 MAD_F(0x7a7d055b) |
185 | # define costab7 MAD_F(0x78848414) | 185 | # define costab7 MAD_F(0x78848414) |
186 | # define costab8 MAD_F(0x7641af3d) | 186 | # define costab8 MAD_F(0x7641af3d) |
187 | # define costab9 MAD_F(0x73b5ebd1) | 187 | # define costab9 MAD_F(0x73b5ebd1) |
188 | # define costab10 MAD_F(0x70e2cbc6) | 188 | # define costab10 MAD_F(0x70e2cbc6) |
189 | # define costab11 MAD_F(0x6dca0d14) | 189 | # define costab11 MAD_F(0x6dca0d14) |
190 | # define costab12 MAD_F(0x6a5d98a4) | 190 | # define costab12 MAD_F(0x6a5d98a4) |
191 | # define costab13 MAD_F(0x66cf8120) | 191 | # define costab13 MAD_F(0x66cf8120) |
192 | # define costab14 MAD_F(0x62f201ac) | 192 | # define costab14 MAD_F(0x62f201ac) |
193 | # define costab15 MAD_F(0x5ed77c8a) | 193 | # define costab15 MAD_F(0x5ed77c8a) |
194 | # define costab16 MAD_F(0x5a82799a) | 194 | # define costab16 MAD_F(0x5a82799a) |
195 | # define costab17 MAD_F(0x55f5a4d2) | 195 | # define costab17 MAD_F(0x55f5a4d2) |
196 | # define costab18 MAD_F(0x5133cc94) | 196 | # define costab18 MAD_F(0x5133cc94) |
197 | # define costab19 MAD_F(0x4c3fdff4) | 197 | # define costab19 MAD_F(0x4c3fdff4) |
198 | # define costab20 MAD_F(0x471cece7) | 198 | # define costab20 MAD_F(0x471cece7) |
199 | # define costab21 MAD_F(0x41ce1e65) | 199 | # define costab21 MAD_F(0x41ce1e65) |
200 | # define costab22 MAD_F(0x3c56ba70) | 200 | # define costab22 MAD_F(0x3c56ba70) |
201 | # define costab23 MAD_F(0x36ba2014) | 201 | # define costab23 MAD_F(0x36ba2014) |
202 | # define costab24 MAD_F(0x30fbc54d) | 202 | # define costab24 MAD_F(0x30fbc54d) |
203 | # define costab25 MAD_F(0x2b1f34eb) | 203 | # define costab25 MAD_F(0x2b1f34eb) |
204 | # define costab26 MAD_F(0x25280c5e) | 204 | # define costab26 MAD_F(0x25280c5e) |
205 | # define costab27 MAD_F(0x1f19f97b) | 205 | # define costab27 MAD_F(0x1f19f97b) |
206 | # define costab28 MAD_F(0x18f8b83c) | 206 | # define costab28 MAD_F(0x18f8b83c) |
207 | # define costab29 MAD_F(0x12c8106f) | 207 | # define costab29 MAD_F(0x12c8106f) |
208 | # define costab30 MAD_F(0x0c8bd35e) | 208 | # define costab30 MAD_F(0x0c8bd35e) |
209 | # define costab31 MAD_F(0x0647d97c) | 209 | # define costab31 MAD_F(0x0647d97c) |
210 | # else | 210 | # else |
211 | # define costab1 MAD_F(0x0ffb10f2) /* 0.998795456 */ | 211 | # define costab1 MAD_F(0x0ffb10f2) /* 0.998795456 */ |
212 | # define costab2 MAD_F(0x0fec46d2) /* 0.995184727 */ | 212 | # define costab2 MAD_F(0x0fec46d2) /* 0.995184727 */ |
213 | # define costab3 MAD_F(0x0fd3aac0) /* 0.989176510 */ | 213 | # define costab3 MAD_F(0x0fd3aac0) /* 0.989176510 */ |
214 | # define costab4 MAD_F(0x0fb14be8) /* 0.980785280 */ | 214 | # define costab4 MAD_F(0x0fb14be8) /* 0.980785280 */ |
215 | # define costab5 MAD_F(0x0f853f7e) /* 0.970031253 */ | 215 | # define costab5 MAD_F(0x0f853f7e) /* 0.970031253 */ |
216 | # define costab6 MAD_F(0x0f4fa0ab) /* 0.956940336 */ | 216 | # define costab6 MAD_F(0x0f4fa0ab) /* 0.956940336 */ |
217 | # define costab7 MAD_F(0x0f109082) /* 0.941544065 */ | 217 | # define costab7 MAD_F(0x0f109082) /* 0.941544065 */ |
218 | # define costab8 MAD_F(0x0ec835e8) /* 0.923879533 */ | 218 | # define costab8 MAD_F(0x0ec835e8) /* 0.923879533 */ |
219 | # define costab9 MAD_F(0x0e76bd7a) /* 0.903989293 */ | 219 | # define costab9 MAD_F(0x0e76bd7a) /* 0.903989293 */ |
220 | # define costab10 MAD_F(0x0e1c5979) /* 0.881921264 */ | 220 | # define costab10 MAD_F(0x0e1c5979) /* 0.881921264 */ |
221 | # define costab11 MAD_F(0x0db941a3) /* 0.857728610 */ | 221 | # define costab11 MAD_F(0x0db941a3) /* 0.857728610 */ |
222 | # define costab12 MAD_F(0x0d4db315) /* 0.831469612 */ | 222 | # define costab12 MAD_F(0x0d4db315) /* 0.831469612 */ |
223 | # define costab13 MAD_F(0x0cd9f024) /* 0.803207531 */ | 223 | # define costab13 MAD_F(0x0cd9f024) /* 0.803207531 */ |
224 | # define costab14 MAD_F(0x0c5e4036) /* 0.773010453 */ | 224 | # define costab14 MAD_F(0x0c5e4036) /* 0.773010453 */ |
225 | # define costab15 MAD_F(0x0bdaef91) /* 0.740951125 */ | 225 | # define costab15 MAD_F(0x0bdaef91) /* 0.740951125 */ |
226 | # define costab16 MAD_F(0x0b504f33) /* 0.707106781 */ | 226 | # define costab16 MAD_F(0x0b504f33) /* 0.707106781 */ |
227 | # define costab17 MAD_F(0x0abeb49a) /* 0.671558955 */ | 227 | # define costab17 MAD_F(0x0abeb49a) /* 0.671558955 */ |
228 | # define costab18 MAD_F(0x0a267993) /* 0.634393284 */ | 228 | # define costab18 MAD_F(0x0a267993) /* 0.634393284 */ |
229 | # define costab19 MAD_F(0x0987fbfe) /* 0.595699304 */ | 229 | # define costab19 MAD_F(0x0987fbfe) /* 0.595699304 */ |
230 | # define costab20 MAD_F(0x08e39d9d) /* 0.555570233 */ | 230 | # define costab20 MAD_F(0x08e39d9d) /* 0.555570233 */ |
231 | # define costab21 MAD_F(0x0839c3cd) /* 0.514102744 */ | 231 | # define costab21 MAD_F(0x0839c3cd) /* 0.514102744 */ |
232 | # define costab22 MAD_F(0x078ad74e) /* 0.471396737 */ | 232 | # define costab22 MAD_F(0x078ad74e) /* 0.471396737 */ |
233 | # define costab23 MAD_F(0x06d74402) /* 0.427555093 */ | 233 | # define costab23 MAD_F(0x06d74402) /* 0.427555093 */ |
234 | # define costab24 MAD_F(0x061f78aa) /* 0.382683432 */ | 234 | # define costab24 MAD_F(0x061f78aa) /* 0.382683432 */ |
235 | # define costab25 MAD_F(0x0563e69d) /* 0.336889853 */ | 235 | # define costab25 MAD_F(0x0563e69d) /* 0.336889853 */ |
236 | # define costab26 MAD_F(0x04a5018c) /* 0.290284677 */ | 236 | # define costab26 MAD_F(0x04a5018c) /* 0.290284677 */ |
237 | # define costab27 MAD_F(0x03e33f2f) /* 0.242980180 */ | 237 | # define costab27 MAD_F(0x03e33f2f) /* 0.242980180 */ |
238 | # define costab28 MAD_F(0x031f1708) /* 0.195090322 */ | 238 | # define costab28 MAD_F(0x031f1708) /* 0.195090322 */ |
239 | # define costab29 MAD_F(0x0259020e) /* 0.146730474 */ | 239 | # define costab29 MAD_F(0x0259020e) /* 0.146730474 */ |
240 | # define costab30 MAD_F(0x01917a5c) /* 0.098017140 */ | 240 | # define costab30 MAD_F(0x01917a5c) /* 0.098017140 */ |
241 | # define costab31 MAD_F(0x00c8fb30) /* 0.049067674 */ | 241 | # define costab31 MAD_F(0x00c8fb30) /* 0.049067674 */ |
242 | # endif | 242 | # endif |
243 | 243 | ||
244 | t0 = in[0] + in[31]; t16 = MUL(in[0] - in[31], costab1); | 244 | t0 = in[0] + in[31]; t16 = MUL(in[0] - in[31], costab1); |
@@ -395,7 +395,7 @@ void dct32(mad_fixed_t const in[32], unsigned int slot, | |||
395 | 395 | ||
396 | /* 8 */ hi[ 7][slot] = SHIFT(t143); | 396 | /* 8 */ hi[ 7][slot] = SHIFT(t143); |
397 | /* 24 */ lo[ 8][slot] = | 397 | /* 24 */ lo[ 8][slot] = |
398 | SHIFT((MUL(t141 - t142, costab16) * 2) - t143); | 398 | SHIFT((MUL(t141 - t142, costab16) * 2) - t143); |
399 | 399 | ||
400 | t144 = MUL(t73 - t74, costab8); | 400 | t144 = MUL(t73 - t74, costab8); |
401 | t145 = MUL(t75 - t76, costab24); | 401 | t145 = MUL(t75 - t76, costab24); |
@@ -435,7 +435,7 @@ void dct32(mad_fixed_t const in[32], unsigned int slot, | |||
435 | 435 | ||
436 | /* 20 */ lo[ 4][slot] = SHIFT(t160); | 436 | /* 20 */ lo[ 4][slot] = SHIFT(t160); |
437 | /* 28 */ lo[12][slot] = | 437 | /* 28 */ lo[12][slot] = |
438 | SHIFT((((MUL(t157 - t158, costab16) * 2) - t159) * 2) - t160); | 438 | SHIFT((((MUL(t157 - t158, costab16) * 2) - t159) * 2) - t160); |
439 | 439 | ||
440 | t161 = MUL(t94 - t95, costab8); | 440 | t161 = MUL(t94 - t95, costab8); |
441 | t162 = MUL(t96 - t97, costab24); | 441 | t162 = MUL(t96 - t97, costab24); |
@@ -473,8 +473,8 @@ void dct32(mad_fixed_t const in[32], unsigned int slot, | |||
473 | 473 | ||
474 | /* 26 */ lo[10][slot] = SHIFT(t170); | 474 | /* 26 */ lo[10][slot] = SHIFT(t170); |
475 | /* 30 */ lo[14][slot] = | 475 | /* 30 */ lo[14][slot] = |
476 | SHIFT((((((MUL(t166 - t167, costab16) * 2) - | 476 | SHIFT((((((MUL(t166 - t167, costab16) * 2) - |
477 | t168) * 2) - t169) * 2) - t170); | 477 | t168) * 2) - t169) * 2) - t170); |
478 | 478 | ||
479 | t171 = MUL(t106 - t107, costab8); | 479 | t171 = MUL(t106 - t107, costab8); |
480 | t172 = MUL(t108 - t109, costab24); | 480 | t172 = MUL(t108 - t109, costab24); |
@@ -521,12 +521,12 @@ void dct32(mad_fixed_t const in[32], unsigned int slot, | |||
521 | /* 27 */ lo[11][slot] = SHIFT(t165); | 521 | /* 27 */ lo[11][slot] = SHIFT(t165); |
522 | 522 | ||
523 | t176 = (((((MUL(t161 - t162, costab16) * 2) - | 523 | t176 = (((((MUL(t161 - t162, costab16) * 2) - |
524 | t163) * 2) - t164) * 2) - t165; | 524 | t163) * 2) - t164) * 2) - t165; |
525 | 525 | ||
526 | /* 29 */ lo[13][slot] = SHIFT(t176); | 526 | /* 29 */ lo[13][slot] = SHIFT(t176); |
527 | /* 31 */ lo[15][slot] = | 527 | /* 31 */ lo[15][slot] = |
528 | SHIFT((((((((MUL(t171 - t172, costab16) * 2) - | 528 | SHIFT((((((((MUL(t171 - t172, costab16) * 2) - |
529 | t173) * 2) - t174) * 2) - t175) * 2) - t176); | 529 | t173) * 2) - t174) * 2) - t175) * 2) - t176); |
530 | 530 | ||
531 | /* | 531 | /* |
532 | * Totals: | 532 | * Totals: |
@@ -548,24 +548,24 @@ void dct32(mad_fixed_t const in[32], unsigned int slot, | |||
548 | # if MAD_F_FRACBITS != 28 | 548 | # if MAD_F_FRACBITS != 28 |
549 | # error "MAD_F_FRACBITS must be 28 to use OPT_SSO" | 549 | # error "MAD_F_FRACBITS must be 28 to use OPT_SSO" |
550 | # endif | 550 | # endif |
551 | # define ML0(hi, lo, x, y) ((lo) = (x) * (y)) | 551 | # define ML0(hi, lo, x, y) ((lo) = (x) * (y)) |
552 | # define MLA(hi, lo, x, y) ((lo) += (x) * (y)) | 552 | # define MLA(hi, lo, x, y) ((lo) += (x) * (y)) |
553 | # define MLN(hi, lo) ((lo) = -(lo)) | 553 | # define MLN(hi, lo) ((lo) = -(lo)) |
554 | # define MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) | 554 | # define MLZ(hi, lo) ((void) (hi), (mad_fixed_t) (lo)) |
555 | # define SHIFT(x) ((x) >> 2) | 555 | # define SHIFT(x) ((x) >> 2) |
556 | # define PRESHIFT(x) ((MAD_F(x) + (1L << 13)) >> 14) | 556 | # define PRESHIFT(x) ((MAD_F(x) + (1L << 13)) >> 14) |
557 | # else | 557 | # else |
558 | # define ML0(hi, lo, x, y) MAD_F_ML0((hi), (lo), (x), (y)) | 558 | # define ML0(hi, lo, x, y) MAD_F_ML0((hi), (lo), (x), (y)) |
559 | # define MLA(hi, lo, x, y) MAD_F_MLA((hi), (lo), (x), (y)) | 559 | # define MLA(hi, lo, x, y) MAD_F_MLA((hi), (lo), (x), (y)) |
560 | # define MLN(hi, lo) MAD_F_MLN((hi), (lo)) | 560 | # define MLN(hi, lo) MAD_F_MLN((hi), (lo)) |
561 | # define MLZ(hi, lo) MAD_F_MLZ((hi), (lo)) | 561 | # define MLZ(hi, lo) MAD_F_MLZ((hi), (lo)) |
562 | # define SHIFT(x) (x) | 562 | # define SHIFT(x) (x) |
563 | # if defined(MAD_F_SCALEBITS) | 563 | # if defined(MAD_F_SCALEBITS) |
564 | # undef MAD_F_SCALEBITS | 564 | # undef MAD_F_SCALEBITS |
565 | # define MAD_F_SCALEBITS (MAD_F_FRACBITS - 12) | 565 | # define MAD_F_SCALEBITS (MAD_F_FRACBITS - 12) |
566 | # define PRESHIFT(x) (MAD_F(x) >> 12) | 566 | # define PRESHIFT(x) (MAD_F(x) >> 12) |
567 | # else | 567 | # else |
568 | # define PRESHIFT(x) MAD_F(x) | 568 | # define PRESHIFT(x) MAD_F(x) |
569 | # endif | 569 | # endif |
570 | # endif | 570 | # endif |
571 | 571 | ||
@@ -576,18 +576,18 @@ mad_fixed_t const D[17][32] ICONST_ATTR = { | |||
576 | 576 | ||
577 | # if defined(ASO_SYNTH) | 577 | # if defined(ASO_SYNTH) |
578 | void synth_full(struct mad_synth *, struct mad_frame const *, | 578 | void synth_full(struct mad_synth *, struct mad_frame const *, |
579 | unsigned int, unsigned int); | 579 | unsigned int, unsigned int); |
580 | # else | 580 | # else |
581 | /* | 581 | /* |
582 | * NAME: synth->full() | 582 | * NAME: synth->full() |
583 | * DESCRIPTION: perform full frequency PCM synthesis | 583 | * DESCRIPTION: perform full frequency PCM synthesis |
584 | */ | 584 | */ |
585 | 585 | ||
586 | /* optimised version of synth_full */ | 586 | /* optimised version of synth_full */ |
587 | # ifdef FPM_COLDFIRE_EMAC | 587 | # ifdef FPM_COLDFIRE_EMAC |
588 | static | 588 | static |
589 | void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | 589 | void synth_full(struct mad_synth *synth, struct mad_frame const *frame, |
590 | unsigned int nch, unsigned int ns) | 590 | unsigned int nch, unsigned int ns) |
591 | { | 591 | { |
592 | int sb; | 592 | int sb; |
593 | unsigned int phase, ch, s, p; | 593 | unsigned int phase, ch, s, p; |
@@ -606,7 +606,7 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
606 | 606 | ||
607 | for (s = 0; s < ns; ++s) { | 607 | for (s = 0; s < ns; ++s) { |
608 | dct32((*sbsample)[s], phase >> 1, | 608 | dct32((*sbsample)[s], phase >> 1, |
609 | (*filter)[0][phase & 1], (*filter)[1][phase & 1]); | 609 | (*filter)[0][phase & 1], (*filter)[1][phase & 1]); |
610 | 610 | ||
611 | p = (phase - 1) & 0xf; | 611 | p = (phase - 1) & 0xf; |
612 | 612 | ||
@@ -649,11 +649,11 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
649 | pcm += 16; | 649 | pcm += 16; |
650 | 650 | ||
651 | for (sb = 15; sb; sb--, fo++) { | 651 | for (sb = 15; sb; sb--, fo++) { |
652 | ++fe; | 652 | ++fe; |
653 | ++D0ptr; | 653 | ++D0ptr; |
654 | ++D1ptr; | 654 | ++D1ptr; |
655 | 655 | ||
656 | /* D[32 - sb][i] == -D[sb][31 - i] */ | 656 | /* D[32 - sb][i] == -D[sb][31 - i] */ |
657 | asm volatile ( | 657 | asm volatile ( |
658 | "movem.l (%0), %%d0-%%d7\n\t" | 658 | "movem.l (%0), %%d0-%%d7\n\t" |
659 | "move.l 4(%2), %%a5\n\t" | 659 | "move.l 4(%2), %%a5\n\t" |
@@ -697,8 +697,8 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
697 | "movclr.l %%acc0, %0\n\t" | 697 | "movclr.l %%acc0, %0\n\t" |
698 | "movclr.l %%acc1, %1\n\t" : "=d" (hi0), "=d" (hi1) ); | 698 | "movclr.l %%acc1, %1\n\t" : "=d" (hi0), "=d" (hi1) ); |
699 | 699 | ||
700 | pcm[-sb] = hi0 << 3; | 700 | pcm[-sb] = hi0 << 3; |
701 | pcm[ sb] = hi1 << 3; | 701 | pcm[ sb] = hi1 << 3; |
702 | } | 702 | } |
703 | 703 | ||
704 | ++D0ptr; | 704 | ++D0ptr; |
@@ -750,11 +750,11 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
750 | pcm += 16; | 750 | pcm += 16; |
751 | 751 | ||
752 | for (sb = 15; sb; sb--, fo++) { | 752 | for (sb = 15; sb; sb--, fo++) { |
753 | ++fe; | 753 | ++fe; |
754 | ++D0ptr; | 754 | ++D0ptr; |
755 | ++D1ptr; | 755 | ++D1ptr; |
756 | 756 | ||
757 | /* D[32 - sb][i] == -D[sb][31 - i] */ | 757 | /* D[32 - sb][i] == -D[sb][31 - i] */ |
758 | asm volatile ( | 758 | asm volatile ( |
759 | "movem.l (%0), %%d0-%%d7\n\t" | 759 | "movem.l (%0), %%d0-%%d7\n\t" |
760 | "move.l (%2), %%a5\n\t" | 760 | "move.l (%2), %%a5\n\t" |
@@ -798,8 +798,8 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
798 | "movclr.l %%acc0, %0\n\t" | 798 | "movclr.l %%acc0, %0\n\t" |
799 | "movclr.l %%acc1, %1\n\t" : "=d" (hi0), "=d" (hi1) ); | 799 | "movclr.l %%acc1, %1\n\t" : "=d" (hi0), "=d" (hi1) ); |
800 | 800 | ||
801 | pcm[-sb] = hi0 << 3; | 801 | pcm[-sb] = hi0 << 3; |
802 | pcm[ sb] = hi1 << 3; | 802 | pcm[ sb] = hi1 << 3; |
803 | } | 803 | } |
804 | 804 | ||
805 | ++D0ptr; | 805 | ++D0ptr; |
@@ -1045,10 +1045,10 @@ void synth_full2(mad_fixed_t *pcm, mad_fixed_t (*fo)[8], mad_fixed_t (*fe)[8], | |||
1045 | 1045 | ||
1046 | static | 1046 | static |
1047 | void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | 1047 | void synth_full(struct mad_synth *synth, struct mad_frame const *frame, |
1048 | unsigned int nch, unsigned int ns) ICODE_ATTR_MPA_SYNTH; | 1048 | unsigned int nch, unsigned int ns) ICODE_ATTR_MPA_SYNTH; |
1049 | static | 1049 | static |
1050 | void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | 1050 | void synth_full(struct mad_synth *synth, struct mad_frame const *frame, |
1051 | unsigned int nch, unsigned int ns) | 1051 | unsigned int nch, unsigned int ns) |
1052 | { | 1052 | { |
1053 | int p; | 1053 | int p; |
1054 | unsigned int phase, ch, s; | 1054 | unsigned int phase, ch, s; |
@@ -1068,7 +1068,7 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
1068 | 1068 | ||
1069 | for (s = 0; s < ns; ++s) { | 1069 | for (s = 0; s < ns; ++s) { |
1070 | dct32((*sbsample)[s], phase >> 1, | 1070 | dct32((*sbsample)[s], phase >> 1, |
1071 | (*filter)[0][phase & 1], (*filter)[1][phase & 1]); | 1071 | (*filter)[0][phase & 1], (*filter)[1][phase & 1]); |
1072 | 1072 | ||
1073 | p = (phase - 1) & 0xf; | 1073 | p = (phase - 1) & 0xf; |
1074 | 1074 | ||
@@ -1189,7 +1189,7 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
1189 | 1189 | ||
1190 | static | 1190 | static |
1191 | void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | 1191 | void synth_full(struct mad_synth *synth, struct mad_frame const *frame, |
1192 | unsigned int nch, unsigned int ns) | 1192 | unsigned int nch, unsigned int ns) |
1193 | { | 1193 | { |
1194 | int p, sb; | 1194 | int p, sb; |
1195 | unsigned int phase, ch, s; | 1195 | unsigned int phase, ch, s; |
@@ -1209,7 +1209,7 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
1209 | 1209 | ||
1210 | for (s = 0; s < ns; ++s) { | 1210 | for (s = 0; s < ns; ++s) { |
1211 | dct32((*sbsample)[s], phase >> 1, | 1211 | dct32((*sbsample)[s], phase >> 1, |
1212 | (*filter)[0][phase & 1], (*filter)[1][phase & 1]); | 1212 | (*filter)[0][phase & 1], (*filter)[1][phase & 1]); |
1213 | 1213 | ||
1214 | p = (phase - 1) & 0xf; | 1214 | p = (phase - 1) & 0xf; |
1215 | 1215 | ||
@@ -1246,49 +1246,49 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
1246 | 1246 | ||
1247 | for (sb = 15; sb; sb--, fo++) | 1247 | for (sb = 15; sb; sb--, fo++) |
1248 | { | 1248 | { |
1249 | ++fe; | 1249 | ++fe; |
1250 | ++D0ptr; | 1250 | ++D0ptr; |
1251 | ++D1ptr; | 1251 | ++D1ptr; |
1252 | 1252 | ||
1253 | /* D[32 - sb][i] == -D[sb][31 - i] */ | 1253 | /* D[32 - sb][i] == -D[sb][31 - i] */ |
1254 | ptr = *D0ptr; | 1254 | ptr = *D0ptr; |
1255 | ML0(hi, lo, (*fo)[0], ptr[ 1]); | 1255 | ML0(hi, lo, (*fo)[0], ptr[ 1]); |
1256 | MLA(hi, lo, (*fo)[1], ptr[15]); | 1256 | MLA(hi, lo, (*fo)[1], ptr[15]); |
1257 | MLA(hi, lo, (*fo)[2], ptr[13]); | 1257 | MLA(hi, lo, (*fo)[2], ptr[13]); |
1258 | MLA(hi, lo, (*fo)[3], ptr[11]); | 1258 | MLA(hi, lo, (*fo)[3], ptr[11]); |
1259 | MLA(hi, lo, (*fo)[4], ptr[ 9]); | 1259 | MLA(hi, lo, (*fo)[4], ptr[ 9]); |
1260 | MLA(hi, lo, (*fo)[5], ptr[ 7]); | 1260 | MLA(hi, lo, (*fo)[5], ptr[ 7]); |
1261 | MLA(hi, lo, (*fo)[6], ptr[ 5]); | 1261 | MLA(hi, lo, (*fo)[6], ptr[ 5]); |
1262 | MLA(hi, lo, (*fo)[7], ptr[ 3]); | 1262 | MLA(hi, lo, (*fo)[7], ptr[ 3]); |
1263 | MLN(hi, lo); | 1263 | MLN(hi, lo); |
1264 | MLA(hi, lo, (*fe)[7], ptr[ 2]); | 1264 | MLA(hi, lo, (*fe)[7], ptr[ 2]); |
1265 | MLA(hi, lo, (*fe)[6], ptr[ 4]); | 1265 | MLA(hi, lo, (*fe)[6], ptr[ 4]); |
1266 | MLA(hi, lo, (*fe)[5], ptr[ 6]); | 1266 | MLA(hi, lo, (*fe)[5], ptr[ 6]); |
1267 | MLA(hi, lo, (*fe)[4], ptr[ 8]); | 1267 | MLA(hi, lo, (*fe)[4], ptr[ 8]); |
1268 | MLA(hi, lo, (*fe)[3], ptr[10]); | 1268 | MLA(hi, lo, (*fe)[3], ptr[10]); |
1269 | MLA(hi, lo, (*fe)[2], ptr[12]); | 1269 | MLA(hi, lo, (*fe)[2], ptr[12]); |
1270 | MLA(hi, lo, (*fe)[1], ptr[14]); | 1270 | MLA(hi, lo, (*fe)[1], ptr[14]); |
1271 | MLA(hi, lo, (*fe)[0], ptr[ 0]); | 1271 | MLA(hi, lo, (*fe)[0], ptr[ 0]); |
1272 | pcm[-sb] = SHIFT(MLZ(hi, lo)); | 1272 | pcm[-sb] = SHIFT(MLZ(hi, lo)); |
1273 | 1273 | ||
1274 | ptr = *D1ptr; | 1274 | ptr = *D1ptr; |
1275 | ML0(hi, lo, (*fe)[0], ptr[31 - 16]); | 1275 | ML0(hi, lo, (*fe)[0], ptr[31 - 16]); |
1276 | MLA(hi, lo, (*fe)[1], ptr[31 - 14]); | 1276 | MLA(hi, lo, (*fe)[1], ptr[31 - 14]); |
1277 | MLA(hi, lo, (*fe)[2], ptr[31 - 12]); | 1277 | MLA(hi, lo, (*fe)[2], ptr[31 - 12]); |
1278 | MLA(hi, lo, (*fe)[3], ptr[31 - 10]); | 1278 | MLA(hi, lo, (*fe)[3], ptr[31 - 10]); |
1279 | MLA(hi, lo, (*fe)[4], ptr[31 - 8]); | 1279 | MLA(hi, lo, (*fe)[4], ptr[31 - 8]); |
1280 | MLA(hi, lo, (*fe)[5], ptr[31 - 6]); | 1280 | MLA(hi, lo, (*fe)[5], ptr[31 - 6]); |
1281 | MLA(hi, lo, (*fe)[6], ptr[31 - 4]); | 1281 | MLA(hi, lo, (*fe)[6], ptr[31 - 4]); |
1282 | MLA(hi, lo, (*fe)[7], ptr[31 - 2]); | 1282 | MLA(hi, lo, (*fe)[7], ptr[31 - 2]); |
1283 | MLA(hi, lo, (*fo)[7], ptr[31 - 3]); | 1283 | MLA(hi, lo, (*fo)[7], ptr[31 - 3]); |
1284 | MLA(hi, lo, (*fo)[6], ptr[31 - 5]); | 1284 | MLA(hi, lo, (*fo)[6], ptr[31 - 5]); |
1285 | MLA(hi, lo, (*fo)[5], ptr[31 - 7]); | 1285 | MLA(hi, lo, (*fo)[5], ptr[31 - 7]); |
1286 | MLA(hi, lo, (*fo)[4], ptr[31 - 9]); | 1286 | MLA(hi, lo, (*fo)[4], ptr[31 - 9]); |
1287 | MLA(hi, lo, (*fo)[3], ptr[31 - 11]); | 1287 | MLA(hi, lo, (*fo)[3], ptr[31 - 11]); |
1288 | MLA(hi, lo, (*fo)[2], ptr[31 - 13]); | 1288 | MLA(hi, lo, (*fo)[2], ptr[31 - 13]); |
1289 | MLA(hi, lo, (*fo)[1], ptr[31 - 15]); | 1289 | MLA(hi, lo, (*fo)[1], ptr[31 - 15]); |
1290 | MLA(hi, lo, (*fo)[0], ptr[31 - 1]); | 1290 | MLA(hi, lo, (*fo)[0], ptr[31 - 1]); |
1291 | pcm[sb] = SHIFT(MLZ(hi, lo)); | 1291 | pcm[sb] = SHIFT(MLZ(hi, lo)); |
1292 | } | 1292 | } |
1293 | 1293 | ||
1294 | ptr = *(D0ptr + 1); | 1294 | ptr = *(D0ptr + 1); |
@@ -1327,49 +1327,49 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
1327 | 1327 | ||
1328 | for (sb = 15; sb; sb--, fo++) | 1328 | for (sb = 15; sb; sb--, fo++) |
1329 | { | 1329 | { |
1330 | ++fe; | 1330 | ++fe; |
1331 | ++D0ptr; | 1331 | ++D0ptr; |
1332 | ++D1ptr; | 1332 | ++D1ptr; |
1333 | 1333 | ||
1334 | /* D[32 - sb][i] == -D[sb][31 - i] */ | 1334 | /* D[32 - sb][i] == -D[sb][31 - i] */ |
1335 | ptr = *D0ptr; | 1335 | ptr = *D0ptr; |
1336 | ML0(hi, lo, (*fo)[0], ptr[ 0]); | 1336 | ML0(hi, lo, (*fo)[0], ptr[ 0]); |
1337 | MLA(hi, lo, (*fo)[1], ptr[14]); | 1337 | MLA(hi, lo, (*fo)[1], ptr[14]); |
1338 | MLA(hi, lo, (*fo)[2], ptr[12]); | 1338 | MLA(hi, lo, (*fo)[2], ptr[12]); |
1339 | MLA(hi, lo, (*fo)[3], ptr[10]); | 1339 | MLA(hi, lo, (*fo)[3], ptr[10]); |
1340 | MLA(hi, lo, (*fo)[4], ptr[ 8]); | 1340 | MLA(hi, lo, (*fo)[4], ptr[ 8]); |
1341 | MLA(hi, lo, (*fo)[5], ptr[ 6]); | 1341 | MLA(hi, lo, (*fo)[5], ptr[ 6]); |
1342 | MLA(hi, lo, (*fo)[6], ptr[ 4]); | 1342 | MLA(hi, lo, (*fo)[6], ptr[ 4]); |
1343 | MLA(hi, lo, (*fo)[7], ptr[ 2]); | 1343 | MLA(hi, lo, (*fo)[7], ptr[ 2]); |
1344 | MLN(hi, lo); | 1344 | MLN(hi, lo); |
1345 | MLA(hi, lo, (*fe)[7], ptr[ 3]); | 1345 | MLA(hi, lo, (*fe)[7], ptr[ 3]); |
1346 | MLA(hi, lo, (*fe)[6], ptr[ 5]); | 1346 | MLA(hi, lo, (*fe)[6], ptr[ 5]); |
1347 | MLA(hi, lo, (*fe)[5], ptr[ 7]); | 1347 | MLA(hi, lo, (*fe)[5], ptr[ 7]); |
1348 | MLA(hi, lo, (*fe)[4], ptr[ 9]); | 1348 | MLA(hi, lo, (*fe)[4], ptr[ 9]); |
1349 | MLA(hi, lo, (*fe)[3], ptr[11]); | 1349 | MLA(hi, lo, (*fe)[3], ptr[11]); |
1350 | MLA(hi, lo, (*fe)[2], ptr[13]); | 1350 | MLA(hi, lo, (*fe)[2], ptr[13]); |
1351 | MLA(hi, lo, (*fe)[1], ptr[15]); | 1351 | MLA(hi, lo, (*fe)[1], ptr[15]); |
1352 | MLA(hi, lo, (*fe)[0], ptr[ 1]); | 1352 | MLA(hi, lo, (*fe)[0], ptr[ 1]); |
1353 | pcm[-sb] = SHIFT(MLZ(hi, lo)); | 1353 | pcm[-sb] = SHIFT(MLZ(hi, lo)); |
1354 | 1354 | ||
1355 | ptr = *D1ptr; | 1355 | ptr = *D1ptr; |
1356 | ML0(hi, lo, (*fe)[0], ptr[31 - 1]); | 1356 | ML0(hi, lo, (*fe)[0], ptr[31 - 1]); |
1357 | MLA(hi, lo, (*fe)[1], ptr[31 - 15]); | 1357 | MLA(hi, lo, (*fe)[1], ptr[31 - 15]); |
1358 | MLA(hi, lo, (*fe)[2], ptr[31 - 13]); | 1358 | MLA(hi, lo, (*fe)[2], ptr[31 - 13]); |
1359 | MLA(hi, lo, (*fe)[3], ptr[31 - 11]); | 1359 | MLA(hi, lo, (*fe)[3], ptr[31 - 11]); |
1360 | MLA(hi, lo, (*fe)[4], ptr[31 - 9]); | 1360 | MLA(hi, lo, (*fe)[4], ptr[31 - 9]); |
1361 | MLA(hi, lo, (*fe)[5], ptr[31 - 7]); | 1361 | MLA(hi, lo, (*fe)[5], ptr[31 - 7]); |
1362 | MLA(hi, lo, (*fe)[6], ptr[31 - 5]); | 1362 | MLA(hi, lo, (*fe)[6], ptr[31 - 5]); |
1363 | MLA(hi, lo, (*fe)[7], ptr[31 - 3]); | 1363 | MLA(hi, lo, (*fe)[7], ptr[31 - 3]); |
1364 | MLA(hi, lo, (*fo)[7], ptr[31 - 2]); | 1364 | MLA(hi, lo, (*fo)[7], ptr[31 - 2]); |
1365 | MLA(hi, lo, (*fo)[6], ptr[31 - 4]); | 1365 | MLA(hi, lo, (*fo)[6], ptr[31 - 4]); |
1366 | MLA(hi, lo, (*fo)[5], ptr[31 - 6]); | 1366 | MLA(hi, lo, (*fo)[5], ptr[31 - 6]); |
1367 | MLA(hi, lo, (*fo)[4], ptr[31 - 8]); | 1367 | MLA(hi, lo, (*fo)[4], ptr[31 - 8]); |
1368 | MLA(hi, lo, (*fo)[3], ptr[31 - 10]); | 1368 | MLA(hi, lo, (*fo)[3], ptr[31 - 10]); |
1369 | MLA(hi, lo, (*fo)[2], ptr[31 - 12]); | 1369 | MLA(hi, lo, (*fo)[2], ptr[31 - 12]); |
1370 | MLA(hi, lo, (*fo)[1], ptr[31 - 14]); | 1370 | MLA(hi, lo, (*fo)[1], ptr[31 - 14]); |
1371 | MLA(hi, lo, (*fo)[0], ptr[31 - 16]); | 1371 | MLA(hi, lo, (*fo)[0], ptr[31 - 16]); |
1372 | pcm[sb] = SHIFT(MLZ(hi, lo)); | 1372 | pcm[sb] = SHIFT(MLZ(hi, lo)); |
1373 | } | 1373 | } |
1374 | 1374 | ||
1375 | ptr = *(D0ptr + 1); | 1375 | ptr = *(D0ptr + 1); |
@@ -1394,12 +1394,12 @@ void synth_full(struct mad_synth *synth, struct mad_frame const *frame, | |||
1394 | # endif | 1394 | # endif |
1395 | 1395 | ||
1396 | /* | 1396 | /* |
1397 | * NAME: synth->half() | 1397 | * NAME: synth->half() |
1398 | * DESCRIPTION: perform half frequency PCM synthesis | 1398 | * DESCRIPTION: perform half frequency PCM synthesis |
1399 | */ | 1399 | */ |
1400 | static | 1400 | static |
1401 | void synth_half(struct mad_synth *synth, struct mad_frame const *frame, | 1401 | void synth_half(struct mad_synth *synth, struct mad_frame const *frame, |
1402 | unsigned int nch, unsigned int ns) | 1402 | unsigned int nch, unsigned int ns) |
1403 | { | 1403 | { |
1404 | unsigned int phase, ch, s, sb, pe, po; | 1404 | unsigned int phase, ch, s, sb, pe, po; |
1405 | mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8]; | 1405 | mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8]; |
@@ -1417,7 +1417,7 @@ void synth_half(struct mad_synth *synth, struct mad_frame const *frame, | |||
1417 | 1417 | ||
1418 | for (s = 0; s < ns; ++s) { | 1418 | for (s = 0; s < ns; ++s) { |
1419 | dct32((*sbsample)[s], phase >> 1, | 1419 | dct32((*sbsample)[s], phase >> 1, |
1420 | (*filter)[0][phase & 1], (*filter)[1][phase & 1]); | 1420 | (*filter)[0][phase & 1], (*filter)[1][phase & 1]); |
1421 | 1421 | ||
1422 | pe = phase & ~1; | 1422 | pe = phase & ~1; |
1423 | po = ((phase - 1) & 0xf) | 1; | 1423 | po = ((phase - 1) & 0xf) | 1; |
@@ -1456,59 +1456,59 @@ void synth_half(struct mad_synth *synth, struct mad_frame const *frame, | |||
1456 | pcm2 = pcm1 + 14; | 1456 | pcm2 = pcm1 + 14; |
1457 | 1457 | ||
1458 | for (sb = 1; sb < 16; ++sb) { | 1458 | for (sb = 1; sb < 16; ++sb) { |
1459 | ++fe; | 1459 | ++fe; |
1460 | ++Dptr; | 1460 | ++Dptr; |
1461 | 1461 | ||
1462 | /* D[32 - sb][i] == -D[sb][31 - i] */ | 1462 | /* D[32 - sb][i] == -D[sb][31 - i] */ |
1463 | 1463 | ||
1464 | if (!(sb & 1)) { | 1464 | if (!(sb & 1)) { |
1465 | ptr = *Dptr + po; | 1465 | ptr = *Dptr + po; |
1466 | ML0(hi, lo, (*fo)[0], ptr[ 0]); | 1466 | ML0(hi, lo, (*fo)[0], ptr[ 0]); |
1467 | MLA(hi, lo, (*fo)[1], ptr[14]); | 1467 | MLA(hi, lo, (*fo)[1], ptr[14]); |
1468 | MLA(hi, lo, (*fo)[2], ptr[12]); | 1468 | MLA(hi, lo, (*fo)[2], ptr[12]); |
1469 | MLA(hi, lo, (*fo)[3], ptr[10]); | 1469 | MLA(hi, lo, (*fo)[3], ptr[10]); |
1470 | MLA(hi, lo, (*fo)[4], ptr[ 8]); | 1470 | MLA(hi, lo, (*fo)[4], ptr[ 8]); |
1471 | MLA(hi, lo, (*fo)[5], ptr[ 6]); | 1471 | MLA(hi, lo, (*fo)[5], ptr[ 6]); |
1472 | MLA(hi, lo, (*fo)[6], ptr[ 4]); | 1472 | MLA(hi, lo, (*fo)[6], ptr[ 4]); |
1473 | MLA(hi, lo, (*fo)[7], ptr[ 2]); | 1473 | MLA(hi, lo, (*fo)[7], ptr[ 2]); |
1474 | MLN(hi, lo); | 1474 | MLN(hi, lo); |
1475 | 1475 | ||
1476 | ptr = *Dptr + pe; | 1476 | ptr = *Dptr + pe; |
1477 | MLA(hi, lo, (*fe)[7], ptr[ 2]); | 1477 | MLA(hi, lo, (*fe)[7], ptr[ 2]); |
1478 | MLA(hi, lo, (*fe)[6], ptr[ 4]); | 1478 | MLA(hi, lo, (*fe)[6], ptr[ 4]); |
1479 | MLA(hi, lo, (*fe)[5], ptr[ 6]); | 1479 | MLA(hi, lo, (*fe)[5], ptr[ 6]); |
1480 | MLA(hi, lo, (*fe)[4], ptr[ 8]); | 1480 | MLA(hi, lo, (*fe)[4], ptr[ 8]); |
1481 | MLA(hi, lo, (*fe)[3], ptr[10]); | 1481 | MLA(hi, lo, (*fe)[3], ptr[10]); |
1482 | MLA(hi, lo, (*fe)[2], ptr[12]); | 1482 | MLA(hi, lo, (*fe)[2], ptr[12]); |
1483 | MLA(hi, lo, (*fe)[1], ptr[14]); | 1483 | MLA(hi, lo, (*fe)[1], ptr[14]); |
1484 | MLA(hi, lo, (*fe)[0], ptr[ 0]); | 1484 | MLA(hi, lo, (*fe)[0], ptr[ 0]); |
1485 | 1485 | ||
1486 | *pcm1++ = SHIFT(MLZ(hi, lo)); | 1486 | *pcm1++ = SHIFT(MLZ(hi, lo)); |
1487 | 1487 | ||
1488 | ptr = *Dptr - po; | 1488 | ptr = *Dptr - po; |
1489 | ML0(hi, lo, (*fo)[7], ptr[31 - 2]); | 1489 | ML0(hi, lo, (*fo)[7], ptr[31 - 2]); |
1490 | MLA(hi, lo, (*fo)[6], ptr[31 - 4]); | 1490 | MLA(hi, lo, (*fo)[6], ptr[31 - 4]); |
1491 | MLA(hi, lo, (*fo)[5], ptr[31 - 6]); | 1491 | MLA(hi, lo, (*fo)[5], ptr[31 - 6]); |
1492 | MLA(hi, lo, (*fo)[4], ptr[31 - 8]); | 1492 | MLA(hi, lo, (*fo)[4], ptr[31 - 8]); |
1493 | MLA(hi, lo, (*fo)[3], ptr[31 - 10]); | 1493 | MLA(hi, lo, (*fo)[3], ptr[31 - 10]); |
1494 | MLA(hi, lo, (*fo)[2], ptr[31 - 12]); | 1494 | MLA(hi, lo, (*fo)[2], ptr[31 - 12]); |
1495 | MLA(hi, lo, (*fo)[1], ptr[31 - 14]); | 1495 | MLA(hi, lo, (*fo)[1], ptr[31 - 14]); |
1496 | MLA(hi, lo, (*fo)[0], ptr[31 - 16]); | 1496 | MLA(hi, lo, (*fo)[0], ptr[31 - 16]); |
1497 | 1497 | ||
1498 | ptr = *Dptr - pe; | 1498 | ptr = *Dptr - pe; |
1499 | MLA(hi, lo, (*fe)[0], ptr[31 - 16]); | 1499 | MLA(hi, lo, (*fe)[0], ptr[31 - 16]); |
1500 | MLA(hi, lo, (*fe)[1], ptr[31 - 14]); | 1500 | MLA(hi, lo, (*fe)[1], ptr[31 - 14]); |
1501 | MLA(hi, lo, (*fe)[2], ptr[31 - 12]); | 1501 | MLA(hi, lo, (*fe)[2], ptr[31 - 12]); |
1502 | MLA(hi, lo, (*fe)[3], ptr[31 - 10]); | 1502 | MLA(hi, lo, (*fe)[3], ptr[31 - 10]); |
1503 | MLA(hi, lo, (*fe)[4], ptr[31 - 8]); | 1503 | MLA(hi, lo, (*fe)[4], ptr[31 - 8]); |
1504 | MLA(hi, lo, (*fe)[5], ptr[31 - 6]); | 1504 | MLA(hi, lo, (*fe)[5], ptr[31 - 6]); |
1505 | MLA(hi, lo, (*fe)[6], ptr[31 - 4]); | 1505 | MLA(hi, lo, (*fe)[6], ptr[31 - 4]); |
1506 | MLA(hi, lo, (*fe)[7], ptr[31 - 2]); | 1506 | MLA(hi, lo, (*fe)[7], ptr[31 - 2]); |
1507 | 1507 | ||
1508 | *pcm2-- = SHIFT(MLZ(hi, lo)); | 1508 | *pcm2-- = SHIFT(MLZ(hi, lo)); |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | ++fo; | 1511 | ++fo; |
1512 | } | 1512 | } |
1513 | 1513 | ||
1514 | ++Dptr; | 1514 | ++Dptr; |
@@ -1532,14 +1532,14 @@ void synth_half(struct mad_synth *synth, struct mad_frame const *frame, | |||
1532 | } | 1532 | } |
1533 | 1533 | ||
1534 | /* | 1534 | /* |
1535 | * NAME: synth->frame() | 1535 | * NAME: synth->frame() |
1536 | * DESCRIPTION: perform PCM synthesis of frame subband samples | 1536 | * DESCRIPTION: perform PCM synthesis of frame subband samples |
1537 | */ | 1537 | */ |
1538 | void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame) | 1538 | void mad_synth_frame(struct mad_synth *synth, struct mad_frame const *frame) |
1539 | { | 1539 | { |
1540 | unsigned int nch, ns; | 1540 | unsigned int nch, ns; |
1541 | void (*synth_frame)(struct mad_synth *, struct mad_frame const *, | 1541 | void (*synth_frame)(struct mad_synth *, struct mad_frame const *, |
1542 | unsigned int, unsigned int); | 1542 | unsigned int, unsigned int); |
1543 | 1543 | ||
1544 | nch = MAD_NCHANNELS(&frame->header); | 1544 | nch = MAD_NCHANNELS(&frame->header); |
1545 | ns = MAD_NSBSAMPLES(&frame->header); | 1545 | ns = MAD_NSBSAMPLES(&frame->header); |
diff --git a/apps/codecs/libmad/synth.h b/apps/codecs/libmad/synth.h index d284d01556..74975b9ad8 100644 --- a/apps/codecs/libmad/synth.h +++ b/apps/codecs/libmad/synth.h | |||
@@ -26,19 +26,19 @@ | |||
26 | # include "frame.h" | 26 | # include "frame.h" |
27 | 27 | ||
28 | struct mad_pcm { | 28 | struct mad_pcm { |
29 | unsigned int samplerate; /* sampling frequency (Hz) */ | 29 | unsigned int samplerate; /* sampling frequency (Hz) */ |
30 | unsigned short channels; /* number of channels */ | 30 | unsigned short channels; /* number of channels */ |
31 | unsigned short length; /* number of samples per channel */ | 31 | unsigned short length; /* number of samples per channel */ |
32 | mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ | 32 | mad_fixed_t samples[2][1152]; /* PCM output samples [ch][sample] */ |
33 | }; | 33 | }; |
34 | 34 | ||
35 | struct mad_synth { | 35 | struct mad_synth { |
36 | mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ | 36 | mad_fixed_t filter[2][2][2][16][8]; /* polyphase filterbank outputs */ |
37 | /* [ch][eo][peo][s][v] */ | 37 | /* [ch][eo][peo][s][v] */ |
38 | 38 | ||
39 | unsigned int phase; /* current processing phase */ | 39 | unsigned int phase; /* current processing phase */ |
40 | 40 | ||
41 | struct mad_pcm pcm; /* PCM output */ | 41 | struct mad_pcm pcm; /* PCM output */ |
42 | }; | 42 | }; |
43 | 43 | ||
44 | /* single channel PCM selector */ | 44 | /* single channel PCM selector */ |
diff --git a/apps/codecs/libmad/timer.c b/apps/codecs/libmad/timer.c index a24595dde3..33ea4a6fbc 100644 --- a/apps/codecs/libmad/timer.c +++ b/apps/codecs/libmad/timer.c | |||
@@ -36,8 +36,8 @@ | |||
36 | mad_timer_t const mad_timer_zero = { 0, 0 }; | 36 | mad_timer_t const mad_timer_zero = { 0, 0 }; |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * NAME: timer->compare() | 39 | * NAME: timer->compare() |
40 | * DESCRIPTION: indicate relative order of two timers | 40 | * DESCRIPTION: indicate relative order of two timers |
41 | */ | 41 | */ |
42 | int mad_timer_compare(mad_timer_t timer1, mad_timer_t timer2) | 42 | int mad_timer_compare(mad_timer_t timer1, mad_timer_t timer2) |
43 | { | 43 | { |
@@ -59,8 +59,8 @@ int mad_timer_compare(mad_timer_t timer1, mad_timer_t timer2) | |||
59 | } | 59 | } |
60 | 60 | ||
61 | /* | 61 | /* |
62 | * NAME: timer->negate() | 62 | * NAME: timer->negate() |
63 | * DESCRIPTION: invert the sign of a timer | 63 | * DESCRIPTION: invert the sign of a timer |
64 | */ | 64 | */ |
65 | void mad_timer_negate(mad_timer_t *timer) | 65 | void mad_timer_negate(mad_timer_t *timer) |
66 | { | 66 | { |
@@ -73,8 +73,8 @@ void mad_timer_negate(mad_timer_t *timer) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /* | 75 | /* |
76 | * NAME: timer->abs() | 76 | * NAME: timer->abs() |
77 | * DESCRIPTION: return the absolute value of a timer | 77 | * DESCRIPTION: return the absolute value of a timer |
78 | */ | 78 | */ |
79 | mad_timer_t mad_timer_abs(mad_timer_t timer) | 79 | mad_timer_t mad_timer_abs(mad_timer_t timer) |
80 | { | 80 | { |
@@ -85,8 +85,8 @@ mad_timer_t mad_timer_abs(mad_timer_t timer) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * NAME: reduce_timer() | 88 | * NAME: reduce_timer() |
89 | * DESCRIPTION: carry timer fraction into seconds | 89 | * DESCRIPTION: carry timer fraction into seconds |
90 | */ | 90 | */ |
91 | static | 91 | static |
92 | void reduce_timer(mad_timer_t *timer) | 92 | void reduce_timer(mad_timer_t *timer) |
@@ -96,8 +96,8 @@ void reduce_timer(mad_timer_t *timer) | |||
96 | } | 96 | } |
97 | 97 | ||
98 | /* | 98 | /* |
99 | * NAME: gcd() | 99 | * NAME: gcd() |
100 | * DESCRIPTION: compute greatest common denominator | 100 | * DESCRIPTION: compute greatest common denominator |
101 | */ | 101 | */ |
102 | static | 102 | static |
103 | unsigned long gcd(unsigned long num1, unsigned long num2) | 103 | unsigned long gcd(unsigned long num1, unsigned long num2) |
@@ -114,8 +114,8 @@ unsigned long gcd(unsigned long num1, unsigned long num2) | |||
114 | } | 114 | } |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * NAME: reduce_rational() | 117 | * NAME: reduce_rational() |
118 | * DESCRIPTION: convert rational expression to lowest terms | 118 | * DESCRIPTION: convert rational expression to lowest terms |
119 | */ | 119 | */ |
120 | static | 120 | static |
121 | void reduce_rational(unsigned long *numer, unsigned long *denom) | 121 | void reduce_rational(unsigned long *numer, unsigned long *denom) |
@@ -131,12 +131,12 @@ void reduce_rational(unsigned long *numer, unsigned long *denom) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | /* | 133 | /* |
134 | * NAME: scale_rational() | 134 | * NAME: scale_rational() |
135 | * DESCRIPTION: solve numer/denom == ?/scale avoiding overflowing | 135 | * DESCRIPTION: solve numer/denom == ?/scale avoiding overflowing |
136 | */ | 136 | */ |
137 | static | 137 | static |
138 | unsigned long scale_rational(unsigned long numer, unsigned long denom, | 138 | unsigned long scale_rational(unsigned long numer, unsigned long denom, |
139 | unsigned long scale) | 139 | unsigned long scale) |
140 | { | 140 | { |
141 | reduce_rational(&numer, &denom); | 141 | reduce_rational(&numer, &denom); |
142 | reduce_rational(&scale, &denom); | 142 | reduce_rational(&scale, &denom); |
@@ -152,11 +152,11 @@ unsigned long scale_rational(unsigned long numer, unsigned long denom, | |||
152 | } | 152 | } |
153 | 153 | ||
154 | /* | 154 | /* |
155 | * NAME: timer->set() | 155 | * NAME: timer->set() |
156 | * DESCRIPTION: set timer to specific (positive) value | 156 | * DESCRIPTION: set timer to specific (positive) value |
157 | */ | 157 | */ |
158 | void mad_timer_set(mad_timer_t *timer, unsigned long seconds, | 158 | void mad_timer_set(mad_timer_t *timer, unsigned long seconds, |
159 | unsigned long numer, unsigned long denom) | 159 | unsigned long numer, unsigned long denom) |
160 | { | 160 | { |
161 | timer->seconds = seconds; | 161 | timer->seconds = seconds; |
162 | if (numer >= denom && denom > 0) { | 162 | if (numer >= denom && denom > 0) { |
@@ -224,8 +224,8 @@ void mad_timer_set(mad_timer_t *timer, unsigned long seconds, | |||
224 | } | 224 | } |
225 | 225 | ||
226 | /* | 226 | /* |
227 | * NAME: timer->add() | 227 | * NAME: timer->add() |
228 | * DESCRIPTION: add one timer to another | 228 | * DESCRIPTION: add one timer to another |
229 | */ | 229 | */ |
230 | void mad_timer_add(mad_timer_t *timer, mad_timer_t incr) | 230 | void mad_timer_add(mad_timer_t *timer, mad_timer_t incr) |
231 | { | 231 | { |
@@ -237,8 +237,8 @@ void mad_timer_add(mad_timer_t *timer, mad_timer_t incr) | |||
237 | } | 237 | } |
238 | 238 | ||
239 | /* | 239 | /* |
240 | * NAME: timer->multiply() | 240 | * NAME: timer->multiply() |
241 | * DESCRIPTION: multiply a timer by a scalar value | 241 | * DESCRIPTION: multiply a timer by a scalar value |
242 | */ | 242 | */ |
243 | void mad_timer_multiply(mad_timer_t *timer, signed long scalar) | 243 | void mad_timer_multiply(mad_timer_t *timer, signed long scalar) |
244 | { | 244 | { |
@@ -264,8 +264,8 @@ void mad_timer_multiply(mad_timer_t *timer, signed long scalar) | |||
264 | } | 264 | } |
265 | 265 | ||
266 | /* | 266 | /* |
267 | * NAME: timer->count() | 267 | * NAME: timer->count() |
268 | * DESCRIPTION: return timer value in selected units | 268 | * DESCRIPTION: return timer value in selected units |
269 | */ | 269 | */ |
270 | signed long mad_timer_count(mad_timer_t timer, enum mad_units units) | 270 | signed long mad_timer_count(mad_timer_t timer, enum mad_units units) |
271 | { | 271 | { |
@@ -302,7 +302,7 @@ signed long mad_timer_count(mad_timer_t timer, enum mad_units units) | |||
302 | case MAD_UNITS_75_FPS: | 302 | case MAD_UNITS_75_FPS: |
303 | return timer.seconds * (signed long) units + | 303 | return timer.seconds * (signed long) units + |
304 | (signed long) scale_rational(timer.fraction, MAD_TIMER_RESOLUTION, | 304 | (signed long) scale_rational(timer.fraction, MAD_TIMER_RESOLUTION, |
305 | units); | 305 | units); |
306 | 306 | ||
307 | case MAD_UNITS_23_976_FPS: | 307 | case MAD_UNITS_23_976_FPS: |
308 | case MAD_UNITS_24_975_FPS: | 308 | case MAD_UNITS_24_975_FPS: |
@@ -318,8 +318,8 @@ signed long mad_timer_count(mad_timer_t timer, enum mad_units units) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | /* | 320 | /* |
321 | * NAME: timer->fraction() | 321 | * NAME: timer->fraction() |
322 | * DESCRIPTION: return fractional part of timer in arbitrary terms | 322 | * DESCRIPTION: return fractional part of timer in arbitrary terms |
323 | */ | 323 | */ |
324 | unsigned long mad_timer_fraction(mad_timer_t timer, unsigned long denom) | 324 | unsigned long mad_timer_fraction(mad_timer_t timer, unsigned long denom) |
325 | { | 325 | { |
@@ -339,12 +339,12 @@ unsigned long mad_timer_fraction(mad_timer_t timer, unsigned long denom) | |||
339 | } | 339 | } |
340 | 340 | ||
341 | /* | 341 | /* |
342 | * NAME: timer->string() | 342 | * NAME: timer->string() |
343 | * DESCRIPTION: write a string representation of a timer using a template | 343 | * DESCRIPTION: write a string representation of a timer using a template |
344 | */ | 344 | */ |
345 | void mad_timer_string(mad_timer_t timer, | 345 | void mad_timer_string(mad_timer_t timer, |
346 | char *dest, char const *format, enum mad_units units, | 346 | char *dest, char const *format, enum mad_units units, |
347 | enum mad_units fracunits, unsigned long subparts) | 347 | enum mad_units fracunits, unsigned long subparts) |
348 | { | 348 | { |
349 | unsigned long hours, minutes, seconds, sub; | 349 | unsigned long hours, minutes, seconds, sub; |
350 | unsigned int frac; | 350 | unsigned int frac; |
@@ -413,7 +413,7 @@ void mad_timer_string(mad_timer_t timer, | |||
413 | m = frame % cycle; | 413 | m = frame % cycle; |
414 | frame += (10 - 1) * 2 * d; | 414 | frame += (10 - 1) * 2 * d; |
415 | if (m > 2) | 415 | if (m > 2) |
416 | frame += 2 * ((m - 2) / (cycle / 10)); | 416 | frame += 2 * ((m - 2) / (cycle / 10)); |
417 | 417 | ||
418 | frac = frame % -fracunits; | 418 | frac = frame % -fracunits; |
419 | seconds = frame / -fracunits; | 419 | seconds = frame / -fracunits; |
@@ -427,25 +427,25 @@ void mad_timer_string(mad_timer_t timer, | |||
427 | hours = minutes / 60; | 427 | hours = minutes / 60; |
428 | 428 | ||
429 | // sprintf(dest, format, | 429 | // sprintf(dest, format, |
430 | // hours, | 430 | // hours, |
431 | // (unsigned int) (minutes % 60), | 431 | // (unsigned int) (minutes % 60), |
432 | // (unsigned int) (seconds % 60), | 432 | // (unsigned int) (seconds % 60), |
433 | // frac, sub); | 433 | // frac, sub); |
434 | break; | 434 | break; |
435 | 435 | ||
436 | case MAD_UNITS_MINUTES: | 436 | case MAD_UNITS_MINUTES: |
437 | minutes = seconds / 60; | 437 | minutes = seconds / 60; |
438 | 438 | ||
439 | // sprintf(dest, format, | 439 | // sprintf(dest, format, |
440 | // minutes, | 440 | // minutes, |
441 | // (unsigned int) (seconds % 60), | 441 | // (unsigned int) (seconds % 60), |
442 | // frac, sub); | 442 | // frac, sub); |
443 | break; | 443 | break; |
444 | 444 | ||
445 | case MAD_UNITS_SECONDS: | 445 | case MAD_UNITS_SECONDS: |
446 | // sprintf(dest, format, | 446 | // sprintf(dest, format, |
447 | // seconds, | 447 | // seconds, |
448 | // frac, sub); | 448 | // frac, sub); |
449 | break; | 449 | break; |
450 | 450 | ||
451 | case MAD_UNITS_23_976_FPS: | 451 | case MAD_UNITS_23_976_FPS: |
diff --git a/apps/codecs/libmad/timer.h b/apps/codecs/libmad/timer.h index 4f2be57b46..23fdccf929 100644 --- a/apps/codecs/libmad/timer.h +++ b/apps/codecs/libmad/timer.h | |||
@@ -23,67 +23,67 @@ | |||
23 | # define LIBMAD_TIMER_H | 23 | # define LIBMAD_TIMER_H |
24 | 24 | ||
25 | typedef struct { | 25 | typedef struct { |
26 | signed long seconds; /* whole seconds */ | 26 | signed long seconds; /* whole seconds */ |
27 | unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ | 27 | unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ |
28 | } mad_timer_t; | 28 | } mad_timer_t; |
29 | 29 | ||
30 | extern mad_timer_t const mad_timer_zero; | 30 | extern mad_timer_t const mad_timer_zero; |
31 | 31 | ||
32 | # define MAD_TIMER_RESOLUTION 352800000UL | 32 | # define MAD_TIMER_RESOLUTION 352800000UL |
33 | 33 | ||
34 | enum mad_units { | 34 | enum mad_units { |
35 | MAD_UNITS_HOURS = -2, | 35 | MAD_UNITS_HOURS = -2, |
36 | MAD_UNITS_MINUTES = -1, | 36 | MAD_UNITS_MINUTES = -1, |
37 | MAD_UNITS_SECONDS = 0, | 37 | MAD_UNITS_SECONDS = 0, |
38 | 38 | ||
39 | /* metric units */ | 39 | /* metric units */ |
40 | 40 | ||
41 | MAD_UNITS_DECISECONDS = 10, | 41 | MAD_UNITS_DECISECONDS = 10, |
42 | MAD_UNITS_CENTISECONDS = 100, | 42 | MAD_UNITS_CENTISECONDS = 100, |
43 | MAD_UNITS_MILLISECONDS = 1000, | 43 | MAD_UNITS_MILLISECONDS = 1000, |
44 | 44 | ||
45 | /* audio sample units */ | 45 | /* audio sample units */ |
46 | 46 | ||
47 | MAD_UNITS_8000_HZ = 8000, | 47 | MAD_UNITS_8000_HZ = 8000, |
48 | MAD_UNITS_11025_HZ = 11025, | 48 | MAD_UNITS_11025_HZ = 11025, |
49 | MAD_UNITS_12000_HZ = 12000, | 49 | MAD_UNITS_12000_HZ = 12000, |
50 | 50 | ||
51 | MAD_UNITS_16000_HZ = 16000, | 51 | MAD_UNITS_16000_HZ = 16000, |
52 | MAD_UNITS_22050_HZ = 22050, | 52 | MAD_UNITS_22050_HZ = 22050, |
53 | MAD_UNITS_24000_HZ = 24000, | 53 | MAD_UNITS_24000_HZ = 24000, |
54 | 54 | ||
55 | MAD_UNITS_32000_HZ = 32000, | 55 | MAD_UNITS_32000_HZ = 32000, |
56 | MAD_UNITS_44100_HZ = 44100, | 56 | MAD_UNITS_44100_HZ = 44100, |
57 | MAD_UNITS_48000_HZ = 48000, | 57 | MAD_UNITS_48000_HZ = 48000, |
58 | 58 | ||
59 | /* video frame/field units */ | 59 | /* video frame/field units */ |
60 | 60 | ||
61 | MAD_UNITS_24_FPS = 24, | 61 | MAD_UNITS_24_FPS = 24, |
62 | MAD_UNITS_25_FPS = 25, | 62 | MAD_UNITS_25_FPS = 25, |
63 | MAD_UNITS_30_FPS = 30, | 63 | MAD_UNITS_30_FPS = 30, |
64 | MAD_UNITS_48_FPS = 48, | 64 | MAD_UNITS_48_FPS = 48, |
65 | MAD_UNITS_50_FPS = 50, | 65 | MAD_UNITS_50_FPS = 50, |
66 | MAD_UNITS_60_FPS = 60, | 66 | MAD_UNITS_60_FPS = 60, |
67 | 67 | ||
68 | /* CD audio frames */ | 68 | /* CD audio frames */ |
69 | 69 | ||
70 | MAD_UNITS_75_FPS = 75, | 70 | MAD_UNITS_75_FPS = 75, |
71 | 71 | ||
72 | /* video drop-frame units */ | 72 | /* video drop-frame units */ |
73 | 73 | ||
74 | MAD_UNITS_23_976_FPS = -24, | 74 | MAD_UNITS_23_976_FPS = -24, |
75 | MAD_UNITS_24_975_FPS = -25, | 75 | MAD_UNITS_24_975_FPS = -25, |
76 | MAD_UNITS_29_97_FPS = -30, | 76 | MAD_UNITS_29_97_FPS = -30, |
77 | MAD_UNITS_47_952_FPS = -48, | 77 | MAD_UNITS_47_952_FPS = -48, |
78 | MAD_UNITS_49_95_FPS = -50, | 78 | MAD_UNITS_49_95_FPS = -50, |
79 | MAD_UNITS_59_94_FPS = -60 | 79 | MAD_UNITS_59_94_FPS = -60 |
80 | }; | 80 | }; |
81 | 81 | ||
82 | # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) | 82 | # define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) |
83 | 83 | ||
84 | int mad_timer_compare(mad_timer_t, mad_timer_t); | 84 | int mad_timer_compare(mad_timer_t, mad_timer_t); |
85 | 85 | ||
86 | # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) | 86 | # define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) |
87 | 87 | ||
88 | void mad_timer_negate(mad_timer_t *); | 88 | void mad_timer_negate(mad_timer_t *); |
89 | mad_timer_t mad_timer_abs(mad_timer_t); | 89 | mad_timer_t mad_timer_abs(mad_timer_t); |
@@ -95,6 +95,6 @@ void mad_timer_multiply(mad_timer_t *, signed long); | |||
95 | signed long mad_timer_count(mad_timer_t, enum mad_units); | 95 | signed long mad_timer_count(mad_timer_t, enum mad_units); |
96 | unsigned long mad_timer_fraction(mad_timer_t, unsigned long); | 96 | unsigned long mad_timer_fraction(mad_timer_t, unsigned long); |
97 | void mad_timer_string(mad_timer_t, char *, char const *, | 97 | void mad_timer_string(mad_timer_t, char *, char const *, |
98 | enum mad_units, enum mad_units, unsigned long); | 98 | enum mad_units, enum mad_units, unsigned long); |
99 | 99 | ||
100 | # endif | 100 | # endif |
diff --git a/apps/codecs/libmad/version.h b/apps/codecs/libmad/version.h index d40e42538a..3a98543de3 100644 --- a/apps/codecs/libmad/version.h +++ b/apps/codecs/libmad/version.h | |||
@@ -22,22 +22,22 @@ | |||
22 | # ifndef LIBMAD_VERSION_H | 22 | # ifndef LIBMAD_VERSION_H |
23 | # define LIBMAD_VERSION_H | 23 | # define LIBMAD_VERSION_H |
24 | 24 | ||
25 | # define MAD_VERSION_MAJOR 0 | 25 | # define MAD_VERSION_MAJOR 0 |
26 | # define MAD_VERSION_MINOR 15 | 26 | # define MAD_VERSION_MINOR 15 |
27 | # define MAD_VERSION_PATCH 1 | 27 | # define MAD_VERSION_PATCH 1 |
28 | # define MAD_VERSION_EXTRA " (beta)" | 28 | # define MAD_VERSION_EXTRA " (beta)" |
29 | 29 | ||
30 | # define MAD_VERSION_STRINGIZE(str) #str | 30 | # define MAD_VERSION_STRINGIZE(str) #str |
31 | # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) | 31 | # define MAD_VERSION_STRING(num) MAD_VERSION_STRINGIZE(num) |
32 | 32 | ||
33 | # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ | 33 | # define MAD_VERSION MAD_VERSION_STRING(MAD_VERSION_MAJOR) "." \ |
34 | MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ | 34 | MAD_VERSION_STRING(MAD_VERSION_MINOR) "." \ |
35 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ | 35 | MAD_VERSION_STRING(MAD_VERSION_PATCH) \ |
36 | MAD_VERSION_EXTRA | 36 | MAD_VERSION_EXTRA |
37 | 37 | ||
38 | # define MAD_PUBLISHYEAR "2000-2004" | 38 | # define MAD_PUBLISHYEAR "2000-2004" |
39 | # define MAD_AUTHOR "Underbit Technologies, Inc." | 39 | # define MAD_AUTHOR "Underbit Technologies, Inc." |
40 | # define MAD_EMAIL "info@underbit.com" | 40 | # define MAD_EMAIL "info@underbit.com" |
41 | 41 | ||
42 | extern char const mad_version[]; | 42 | extern char const mad_version[]; |
43 | extern char const mad_copyright[]; | 43 | extern char const mad_copyright[]; |