Mercurial > libavcodec.hg
comparison mlp.h @ 7560:0dc289443426 libavcodec
mlp: Cosmetics: Close comments in an extra line and
remove empty lines between doxy comments and function declarations.
author | ramiro |
---|---|
date | Wed, 13 Aug 2008 19:43:18 +0000 |
parents | fd24c8628221 |
children | d112b4655bbd |
comparison
equal
deleted
inserted
replaced
7559:fd24c8628221 | 7560:0dc289443426 |
---|---|
30 #define MAX_CHANNELS 16 | 30 #define MAX_CHANNELS 16 |
31 | 31 |
32 /** Maximum number of matrices used in decoding; most streams have one matrix | 32 /** Maximum number of matrices used in decoding; most streams have one matrix |
33 * per output channel, but some rematrix a channel (usually 0) more than once. | 33 * per output channel, but some rematrix a channel (usually 0) more than once. |
34 */ | 34 */ |
35 | |
36 #define MAX_MATRICES 15 | 35 #define MAX_MATRICES 15 |
37 | 36 |
38 /** Maximum number of substreams that can be decoded. This could also be set | 37 /** Maximum number of substreams that can be decoded. This could also be set |
39 * higher, but I haven't seen any examples with more than two. */ | 38 * higher, but I haven't seen any examples with more than two. |
39 */ | |
40 #define MAX_SUBSTREAMS 2 | 40 #define MAX_SUBSTREAMS 2 |
41 | 41 |
42 /** maximum sample frequency seen in files */ | 42 /** maximum sample frequency seen in files */ |
43 #define MAX_SAMPLERATE 192000 | 43 #define MAX_SAMPLERATE 192000 |
44 | 44 |
50 /** number of allowed filters */ | 50 /** number of allowed filters */ |
51 #define NUM_FILTERS 2 | 51 #define NUM_FILTERS 2 |
52 | 52 |
53 /** The maximum number of taps in either the IIR or FIR filter; | 53 /** The maximum number of taps in either the IIR or FIR filter; |
54 * I believe MLP actually specifies the maximum order for IIR filters as four, | 54 * I believe MLP actually specifies the maximum order for IIR filters as four, |
55 * and that the sum of the orders of both filters must be <= 8. */ | 55 * and that the sum of the orders of both filters must be <= 8. |
56 */ | |
56 #define MAX_FILTER_ORDER 8 | 57 #define MAX_FILTER_ORDER 8 |
57 | 58 |
58 #define FIR 0 | 59 #define FIR 0 |
59 #define IIR 1 | 60 #define IIR 1 |
60 | 61 |
78 } ChannelParams; | 79 } ChannelParams; |
79 | 80 |
80 /** Tables defining the Huffman codes. | 81 /** Tables defining the Huffman codes. |
81 * There are three entropy coding methods used in MLP (four if you count | 82 * There are three entropy coding methods used in MLP (four if you count |
82 * "none" as a method). These use the same sequences for codes starting with | 83 * "none" as a method). These use the same sequences for codes starting with |
83 * 00 or 01, but have different codes starting with 1. */ | 84 * 00 or 01, but have different codes starting with 1. |
84 | 85 */ |
85 extern const uint8_t ff_mlp_huffman_tables[3][18][2]; | 86 extern const uint8_t ff_mlp_huffman_tables[3][18][2]; |
86 | 87 |
87 /** MLP uses checksums that seem to be based on the standard CRC algorithm, but | 88 /** MLP uses checksums that seem to be based on the standard CRC algorithm, but |
88 * are not (in implementation terms, the table lookup and XOR are reversed). | 89 * are not (in implementation terms, the table lookup and XOR are reversed). |
89 * We can implement this behavior using a standard av_crc on all but the | 90 * We can implement this behavior using a standard av_crc on all but the |
90 * last element, then XOR that with the last element. */ | 91 * last element, then XOR that with the last element. |
91 | 92 */ |
92 uint8_t ff_mlp_checksum8 (const uint8_t *buf, unsigned int buf_size); | 93 uint8_t ff_mlp_checksum8 (const uint8_t *buf, unsigned int buf_size); |
93 uint16_t ff_mlp_checksum16(const uint8_t *buf, unsigned int buf_size); | 94 uint16_t ff_mlp_checksum16(const uint8_t *buf, unsigned int buf_size); |
94 | 95 |
95 /** Calculate an 8-bit checksum over a restart header -- a non-multiple-of-8 | 96 /** Calculate an 8-bit checksum over a restart header -- a non-multiple-of-8 |
96 * number of bits, starting two bits into the first byte of buf. */ | 97 * number of bits, starting two bits into the first byte of buf. |
97 | 98 */ |
98 uint8_t ff_mlp_restart_checksum(const uint8_t *buf, unsigned int bit_size); | 99 uint8_t ff_mlp_restart_checksum(const uint8_t *buf, unsigned int bit_size); |
99 | 100 |
100 /** XOR together all the bytes of a buffer. | 101 /** XOR together all the bytes of a buffer. |
101 * Does this belong in dspcontext? */ | 102 * Does this belong in dspcontext? |
102 | 103 */ |
103 uint8_t ff_mlp_calculate_parity(const uint8_t *buf, unsigned int buf_size); | 104 uint8_t ff_mlp_calculate_parity(const uint8_t *buf, unsigned int buf_size); |
104 | 105 |
105 int ff_mlp_init_crc2D(AVCodecParserContext *s); | 106 int ff_mlp_init_crc2D(AVCodecParserContext *s); |
106 | 107 |
107 void ff_mlp_init_crc(); | 108 void ff_mlp_init_crc(); |