comparison ac3tab.h @ 1064:b32afefe7d33 libavcodec

* UINTX -> uintx_t INTX -> intx_t
author kabi
date Tue, 11 Feb 2003 16:35:48 +0000
parents dd7d5748d064
children 1e39f273ecd6
comparison
equal deleted inserted replaced
1063:fdeac9642346 1064:b32afefe7d33
1 /* tables taken directly from AC3 spec */ 1 /* tables taken directly from AC3 spec */
2 2
3 /* possible frequencies */ 3 /* possible frequencies */
4 const UINT16 ac3_freqs[3] = { 48000, 44100, 32000 }; 4 const uint16_t ac3_freqs[3] = { 48000, 44100, 32000 };
5 5
6 /* possible bitrates */ 6 /* possible bitrates */
7 const UINT16 ac3_bitratetab[19] = { 7 const uint16_t ac3_bitratetab[19] = {
8 32, 40, 48, 56, 64, 80, 96, 112, 128, 8 32, 40, 48, 56, 64, 80, 96, 112, 128,
9 160, 192, 224, 256, 320, 384, 448, 512, 576, 640 9 160, 192, 224, 256, 320, 384, 448, 512, 576, 640
10 }; 10 };
11 11
12 /* AC3 MDCT window */ 12 /* AC3 MDCT window */
13 13
14 /* MDCT window */ 14 /* MDCT window */
15 const INT16 ac3_window[256] = { 15 const int16_t ac3_window[256] = {
16 4, 7, 12, 16, 21, 28, 34, 42, 16 4, 7, 12, 16, 21, 28, 34, 42,
17 51, 61, 72, 84, 97, 111, 127, 145, 17 51, 61, 72, 84, 97, 111, 127, 145,
18 164, 184, 207, 231, 257, 285, 315, 347, 18 164, 184, 207, 231, 257, 285, 315, 347,
19 382, 419, 458, 500, 544, 591, 641, 694, 19 382, 419, 458, 500, 544, 591, 641, 694,
20 750, 810, 872, 937, 1007, 1079, 1155, 1235, 20 750, 810, 872, 937, 1007, 1079, 1155, 1235,
45 32766,32766,32766,32766,32767,32767,32767,32767, 45 32766,32766,32766,32766,32767,32767,32767,32767,
46 32767,32767,32767,32767,32767,32767,32767,32767, 46 32767,32767,32767,32767,32767,32767,32767,32767,
47 32767,32767,32767,32767,32767,32767,32767,32767, 47 32767,32767,32767,32767,32767,32767,32767,32767,
48 }; 48 };
49 49
50 static UINT8 masktab[253]; 50 static uint8_t masktab[253];
51 51
52 static const UINT8 latab[260]= { 52 static const uint8_t latab[260]= {
53 0x0040,0x003f,0x003e,0x003d,0x003c,0x003b,0x003a,0x0039,0x0038,0x0037, 53 0x0040,0x003f,0x003e,0x003d,0x003c,0x003b,0x003a,0x0039,0x0038,0x0037,
54 0x0036,0x0035,0x0034,0x0034,0x0033,0x0032,0x0031,0x0030,0x002f,0x002f, 54 0x0036,0x0035,0x0034,0x0034,0x0033,0x0032,0x0031,0x0030,0x002f,0x002f,
55 0x002e,0x002d,0x002c,0x002c,0x002b,0x002a,0x0029,0x0029,0x0028,0x0027, 55 0x002e,0x002d,0x002c,0x002c,0x002b,0x002a,0x0029,0x0029,0x0028,0x0027,
56 0x0026,0x0026,0x0025,0x0024,0x0024,0x0023,0x0023,0x0022,0x0021,0x0021, 56 0x0026,0x0026,0x0025,0x0024,0x0024,0x0023,0x0023,0x0022,0x0021,0x0021,
57 0x0020,0x0020,0x001f,0x001e,0x001e,0x001d,0x001d,0x001c,0x001c,0x001b, 57 0x0020,0x0020,0x001f,0x001e,0x001e,0x001d,0x001d,0x001c,0x001c,0x001b,
76 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 76 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
77 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 77 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
78 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000, 78 0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
79 }; 79 };
80 80
81 static const UINT16 hth[50][3]= { 81 static const uint16_t hth[50][3]= {
82 { 0x04d0,0x04f0,0x0580 }, 82 { 0x04d0,0x04f0,0x0580 },
83 { 0x04d0,0x04f0,0x0580 }, 83 { 0x04d0,0x04f0,0x0580 },
84 { 0x0440,0x0460,0x04b0 }, 84 { 0x0440,0x0460,0x04b0 },
85 { 0x0400,0x0410,0x0450 }, 85 { 0x0400,0x0410,0x0450 },
86 { 0x03e0,0x03e0,0x0420 }, 86 { 0x03e0,0x03e0,0x0420 },
129 { 0x0800,0x0630,0x0440 }, 129 { 0x0800,0x0630,0x0440 },
130 { 0x0840,0x0840,0x0450 }, 130 { 0x0840,0x0840,0x0450 },
131 { 0x0840,0x0840,0x04e0 }, 131 { 0x0840,0x0840,0x04e0 },
132 }; 132 };
133 133
134 static const UINT8 baptab[64]= { 134 static const uint8_t baptab[64]= {
135 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 135 0, 1, 1, 1, 1, 1, 2, 2, 3, 3,
136 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 136 3, 4, 4, 5, 5, 6, 6, 6, 6, 7,
137 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 137 7, 7, 7, 8, 8, 8, 8, 9, 9, 9,
138 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 138 9, 10, 10, 10, 10, 11, 11, 11, 11, 12,
139 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 139 12, 12, 12, 13, 13, 13, 13, 14, 14, 14,
140 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 140 14, 14, 14, 14, 14, 15, 15, 15, 15, 15,
141 15, 15, 15, 15, 141 15, 15, 15, 15,
142 }; 142 };
143 143
144 const UINT8 sdecaytab[4]={ 144 const uint8_t sdecaytab[4]={
145 0x0f, 0x11, 0x13, 0x15, 145 0x0f, 0x11, 0x13, 0x15,
146 }; 146 };
147 147
148 const UINT8 fdecaytab[4]={ 148 const uint8_t fdecaytab[4]={
149 0x3f, 0x53, 0x67, 0x7b, 149 0x3f, 0x53, 0x67, 0x7b,
150 }; 150 };
151 151
152 const UINT16 sgaintab[4]= { 152 const uint16_t sgaintab[4]= {
153 0x540, 0x4d8, 0x478, 0x410, 153 0x540, 0x4d8, 0x478, 0x410,
154 }; 154 };
155 155
156 const UINT16 dbkneetab[4]= { 156 const uint16_t dbkneetab[4]= {
157 0x000, 0x700, 0x900, 0xb00, 157 0x000, 0x700, 0x900, 0xb00,
158 }; 158 };
159 159
160 const UINT16 floortab[8]= { 160 const uint16_t floortab[8]= {
161 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800, 161 0x2f0, 0x2b0, 0x270, 0x230, 0x1f0, 0x170, 0x0f0, 0xf800,
162 }; 162 };
163 163
164 const UINT16 fgaintab[8]= { 164 const uint16_t fgaintab[8]= {
165 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400, 165 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380, 0x400,
166 }; 166 };
167 167
168 static const UINT8 bndsz[50]={ 168 static const uint8_t bndsz[50]={
169 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 169 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
170 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 170 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
171 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24 171 3, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 24, 24, 24, 24, 24
172 }; 172 };
173 173
174 static UINT8 bndtab[51]; 174 static uint8_t bndtab[51];
175 175
176 /* fft & mdct sin cos tables */ 176 /* fft & mdct sin cos tables */
177 static INT16 costab[64]; 177 static int16_t costab[64];
178 static INT16 sintab[64]; 178 static int16_t sintab[64];
179 static INT16 fft_rev[512]; 179 static int16_t fft_rev[512];
180 static INT16 xcos1[128]; 180 static int16_t xcos1[128];
181 static INT16 xsin1[128]; 181 static int16_t xsin1[128];
182 182
183 static UINT16 crc_table[256]; 183 static uint16_t crc_table[256];