1
|
1 /*
|
|
2 * vlc.h
|
36
|
3 * Copyright (C) 1999-2001 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
|
1
|
4 *
|
|
5 * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
|
|
6 *
|
|
7 * mpeg2dec is free software; you can redistribute it and/or modify
|
|
8 * it under the terms of the GNU General Public License as published by
|
|
9 * the Free Software Foundation; either version 2 of the License, or
|
|
10 * (at your option) any later version.
|
|
11 *
|
|
12 * mpeg2dec is distributed in the hope that it will be useful,
|
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 * GNU General Public License for more details.
|
|
16 *
|
|
17 * You should have received a copy of the GNU General Public License
|
|
18 * along with this program; if not, write to the Free Software
|
|
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
20 */
|
|
21
|
|
22 #define GETWORD(bit_buf,shift,bit_ptr) \
|
|
23 do { \
|
|
24 bit_buf |= ((bit_ptr[0] << 8) | bit_ptr[1]) << (shift); \
|
|
25 bit_ptr += 2; \
|
|
26 } while (0)
|
|
27
|
36
|
28 static inline void bitstream_init (picture_t * picture, uint8_t * start)
|
1
|
29 {
|
36
|
30 picture->bitstream_buf = 0; GETWORD (picture->bitstream_buf, 16, start);
|
|
31 picture->bitstream_ptr = start;
|
|
32 picture->bitstream_bits = 0;
|
1
|
33 }
|
|
34
|
36
|
35 /* make sure that there are at least 16 valid bits in bit_buf */
|
1
|
36 #define NEEDBITS(bit_buf,bits,bit_ptr) \
|
|
37 do { \
|
|
38 if (bits > 0) { \
|
|
39 GETWORD (bit_buf, bits, bit_ptr); \
|
|
40 bits -= 16; \
|
|
41 } \
|
|
42 } while (0)
|
|
43
|
36
|
44 /* remove num valid bits from bit_buf */
|
1
|
45 #define DUMPBITS(bit_buf,bits,num) \
|
|
46 do { \
|
|
47 bit_buf <<= (num); \
|
|
48 bits += (num); \
|
|
49 } while (0)
|
|
50
|
36
|
51 /* take num bits from the high part of bit_buf and zero extend them */
|
1
|
52 #define UBITS(bit_buf,num) (((uint32_t)(bit_buf)) >> (32 - (num)))
|
|
53
|
36
|
54 /* take num bits from the high part of bit_buf and sign extend them */
|
1
|
55 #define SBITS(bit_buf,num) (((int32_t)(bit_buf)) >> (32 - (num)))
|
|
56
|
|
57 typedef struct {
|
|
58 uint8_t modes;
|
|
59 uint8_t len;
|
|
60 } MBtab;
|
|
61
|
|
62 typedef struct {
|
|
63 uint8_t delta;
|
|
64 uint8_t len;
|
|
65 } MVtab;
|
|
66
|
|
67 typedef struct {
|
|
68 int8_t dmv;
|
|
69 uint8_t len;
|
|
70 } DMVtab;
|
|
71
|
|
72 typedef struct {
|
|
73 uint8_t cbp;
|
|
74 uint8_t len;
|
|
75 } CBPtab;
|
|
76
|
|
77 typedef struct {
|
|
78 uint8_t size;
|
|
79 uint8_t len;
|
|
80 } DCtab;
|
|
81
|
|
82 typedef struct {
|
|
83 uint8_t run;
|
|
84 uint8_t level;
|
|
85 uint8_t len;
|
|
86 } DCTtab;
|
|
87
|
|
88 typedef struct {
|
|
89 uint8_t mba;
|
|
90 uint8_t len;
|
|
91 } MBAtab;
|
|
92
|
|
93
|
|
94 #define INTRA MACROBLOCK_INTRA
|
|
95 #define QUANT MACROBLOCK_QUANT
|
|
96
|
|
97 static MBtab MB_I [] = {
|
|
98 {INTRA|QUANT, 2}, {INTRA, 1}
|
|
99 };
|
|
100
|
|
101 #define MC MACROBLOCK_MOTION_FORWARD
|
|
102 #define CODED MACROBLOCK_PATTERN
|
|
103
|
|
104 static MBtab MB_P [] = {
|
|
105 {INTRA|QUANT, 6}, {CODED|QUANT, 5}, {MC|CODED|QUANT, 5}, {INTRA, 5},
|
|
106 {MC, 3}, {MC, 3}, {MC, 3}, {MC, 3},
|
|
107 {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
|
|
108 {CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
|
|
109 {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1},
|
|
110 {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1},
|
|
111 {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1},
|
|
112 {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}, {MC|CODED, 1}
|
|
113 };
|
|
114
|
|
115 #define FWD MACROBLOCK_MOTION_FORWARD
|
|
116 #define BWD MACROBLOCK_MOTION_BACKWARD
|
|
117 #define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD
|
|
118
|
|
119 static MBtab MB_B [] = {
|
|
120 {0, 0}, {INTRA|QUANT, 6},
|
|
121 {BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6},
|
|
122 {INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
|
|
123 {INTRA, 5}, {INTRA, 5},
|
|
124 {FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4},
|
|
125 {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4},
|
|
126 {BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3},
|
|
127 {BWD, 3}, {BWD, 3}, {BWD, 3}, {BWD, 3},
|
|
128 {BWD|CODED, 3}, {BWD|CODED, 3}, {BWD|CODED, 3}, {BWD|CODED, 3},
|
|
129 {BWD|CODED, 3}, {BWD|CODED, 3}, {BWD|CODED, 3}, {BWD|CODED, 3},
|
|
130 {INTER, 2}, {INTER, 2}, {INTER, 2}, {INTER, 2},
|
|
131 {INTER, 2}, {INTER, 2}, {INTER, 2}, {INTER, 2},
|
|
132 {INTER, 2}, {INTER, 2}, {INTER, 2}, {INTER, 2},
|
|
133 {INTER, 2}, {INTER, 2}, {INTER, 2}, {INTER, 2},
|
|
134 {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2},
|
|
135 {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2},
|
|
136 {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2},
|
|
137 {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}, {INTER|CODED, 2}
|
|
138 };
|
|
139
|
|
140 #undef INTRA
|
|
141 #undef QUANT
|
|
142 #undef MC
|
|
143 #undef CODED
|
|
144 #undef FWD
|
|
145 #undef BWD
|
|
146 #undef INTER
|
|
147
|
|
148
|
|
149 static MVtab MV_4 [] = {
|
|
150 { 3, 6}, { 2, 4}, { 1, 3}, { 1, 3}, { 0, 2}, { 0, 2}, { 0, 2}, { 0, 2}
|
|
151 };
|
|
152
|
|
153 static MVtab MV_10 [] = {
|
|
154 { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10}, { 0,10},
|
|
155 { 0,10}, { 0,10}, { 0,10}, { 0,10}, {15,10}, {14,10}, {13,10}, {12,10},
|
|
156 {11,10}, {10,10}, { 9, 9}, { 9, 9}, { 8, 9}, { 8, 9}, { 7, 9}, { 7, 9},
|
|
157 { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7}, { 6, 7},
|
|
158 { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7}, { 5, 7},
|
|
159 { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}, { 4, 7}
|
|
160 };
|
|
161
|
|
162
|
|
163 static DMVtab DMV_2 [] = {
|
|
164 { 0, 1}, { 0, 1}, { 1, 2}, {-1, 2}
|
|
165 };
|
|
166
|
|
167
|
|
168 static CBPtab CBP_7 [] = {
|
|
169 {0x22, 7}, {0x12, 7}, {0x0a, 7}, {0x06, 7},
|
|
170 {0x21, 7}, {0x11, 7}, {0x09, 7}, {0x05, 7},
|
|
171 {0x3f, 6}, {0x3f, 6}, {0x03, 6}, {0x03, 6},
|
|
172 {0x24, 6}, {0x24, 6}, {0x18, 6}, {0x18, 6},
|
|
173 {0x3e, 5}, {0x3e, 5}, {0x3e, 5}, {0x3e, 5},
|
|
174 {0x02, 5}, {0x02, 5}, {0x02, 5}, {0x02, 5},
|
|
175 {0x3d, 5}, {0x3d, 5}, {0x3d, 5}, {0x3d, 5},
|
|
176 {0x01, 5}, {0x01, 5}, {0x01, 5}, {0x01, 5},
|
|
177 {0x38, 5}, {0x38, 5}, {0x38, 5}, {0x38, 5},
|
|
178 {0x34, 5}, {0x34, 5}, {0x34, 5}, {0x34, 5},
|
|
179 {0x2c, 5}, {0x2c, 5}, {0x2c, 5}, {0x2c, 5},
|
|
180 {0x1c, 5}, {0x1c, 5}, {0x1c, 5}, {0x1c, 5},
|
|
181 {0x28, 5}, {0x28, 5}, {0x28, 5}, {0x28, 5},
|
|
182 {0x14, 5}, {0x14, 5}, {0x14, 5}, {0x14, 5},
|
|
183 {0x30, 5}, {0x30, 5}, {0x30, 5}, {0x30, 5},
|
|
184 {0x0c, 5}, {0x0c, 5}, {0x0c, 5}, {0x0c, 5},
|
|
185 {0x20, 4}, {0x20, 4}, {0x20, 4}, {0x20, 4},
|
|
186 {0x20, 4}, {0x20, 4}, {0x20, 4}, {0x20, 4},
|
|
187 {0x10, 4}, {0x10, 4}, {0x10, 4}, {0x10, 4},
|
|
188 {0x10, 4}, {0x10, 4}, {0x10, 4}, {0x10, 4},
|
|
189 {0x08, 4}, {0x08, 4}, {0x08, 4}, {0x08, 4},
|
|
190 {0x08, 4}, {0x08, 4}, {0x08, 4}, {0x08, 4},
|
|
191 {0x04, 4}, {0x04, 4}, {0x04, 4}, {0x04, 4},
|
|
192 {0x04, 4}, {0x04, 4}, {0x04, 4}, {0x04, 4},
|
|
193 {0x3c, 3}, {0x3c, 3}, {0x3c, 3}, {0x3c, 3},
|
|
194 {0x3c, 3}, {0x3c, 3}, {0x3c, 3}, {0x3c, 3},
|
|
195 {0x3c, 3}, {0x3c, 3}, {0x3c, 3}, {0x3c, 3},
|
|
196 {0x3c, 3}, {0x3c, 3}, {0x3c, 3}, {0x3c, 3}
|
|
197 };
|
|
198
|
|
199 static CBPtab CBP_9 [] = {
|
|
200 {0, 0}, {0x00, 9}, {0x27, 9}, {0x1b, 9},
|
|
201 {0x3b, 9}, {0x37, 9}, {0x2f, 9}, {0x1f, 9},
|
|
202 {0x3a, 8}, {0x3a, 8}, {0x36, 8}, {0x36, 8},
|
|
203 {0x2e, 8}, {0x2e, 8}, {0x1e, 8}, {0x1e, 8},
|
|
204 {0x39, 8}, {0x39, 8}, {0x35, 8}, {0x35, 8},
|
|
205 {0x2d, 8}, {0x2d, 8}, {0x1d, 8}, {0x1d, 8},
|
|
206 {0x26, 8}, {0x26, 8}, {0x1a, 8}, {0x1a, 8},
|
|
207 {0x25, 8}, {0x25, 8}, {0x19, 8}, {0x19, 8},
|
|
208 {0x2b, 8}, {0x2b, 8}, {0x17, 8}, {0x17, 8},
|
|
209 {0x33, 8}, {0x33, 8}, {0x0f, 8}, {0x0f, 8},
|
|
210 {0x2a, 8}, {0x2a, 8}, {0x16, 8}, {0x16, 8},
|
|
211 {0x32, 8}, {0x32, 8}, {0x0e, 8}, {0x0e, 8},
|
|
212 {0x29, 8}, {0x29, 8}, {0x15, 8}, {0x15, 8},
|
|
213 {0x31, 8}, {0x31, 8}, {0x0d, 8}, {0x0d, 8},
|
|
214 {0x23, 8}, {0x23, 8}, {0x13, 8}, {0x13, 8},
|
|
215 {0x0b, 8}, {0x0b, 8}, {0x07, 8}, {0x07, 8}
|
|
216 };
|
|
217
|
|
218
|
|
219 static DCtab DC_lum_5 [] = {
|
|
220 {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
|
|
221 {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
|
|
222 {0, 3}, {0, 3}, {0, 3}, {0, 3}, {3, 3}, {3, 3}, {3, 3}, {3, 3},
|
|
223 {4, 3}, {4, 3}, {4, 3}, {4, 3}, {5, 4}, {5, 4}, {6, 5}
|
|
224 };
|
|
225
|
|
226 static DCtab DC_chrom_5 [] = {
|
|
227 {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2}, {0, 2},
|
|
228 {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2}, {1, 2},
|
|
229 {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2},
|
|
230 {3, 3}, {3, 3}, {3, 3}, {3, 3}, {4, 4}, {4, 4}, {5, 5}
|
|
231 };
|
|
232
|
|
233 static DCtab DC_long [] = {
|
|
234 {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, { 6, 5}, { 6, 5},
|
|
235 {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, {6, 5}, { 6, 5}, { 6, 5},
|
|
236 {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, {7, 6}, { 7, 6}, { 7, 6},
|
|
237 {8, 7}, {8, 7}, {8, 7}, {8, 7}, {9, 8}, {9, 8}, {10, 9}, {11, 9}
|
|
238 };
|
|
239
|
|
240
|
|
241 static DCTtab DCT_16 [] = {
|
|
242 {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
|
|
243 {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
|
|
244 {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
|
|
245 {129, 0, 0}, {129, 0, 0}, {129, 0, 0}, {129, 0, 0},
|
|
246 { 2,18, 0}, { 2,17, 0}, { 2,16, 0}, { 2,15, 0},
|
|
247 { 7, 3, 0}, { 17, 2, 0}, { 16, 2, 0}, { 15, 2, 0},
|
|
248 { 14, 2, 0}, { 13, 2, 0}, { 12, 2, 0}, { 32, 1, 0},
|
|
249 { 31, 1, 0}, { 30, 1, 0}, { 29, 1, 0}, { 28, 1, 0}
|
|
250 };
|
|
251
|
|
252 static DCTtab DCT_15 [] = {
|
|
253 { 1,40,15}, { 1,39,15}, { 1,38,15}, { 1,37,15},
|
|
254 { 1,36,15}, { 1,35,15}, { 1,34,15}, { 1,33,15},
|
|
255 { 1,32,15}, { 2,14,15}, { 2,13,15}, { 2,12,15},
|
|
256 { 2,11,15}, { 2,10,15}, { 2, 9,15}, { 2, 8,15},
|
|
257 { 1,31,14}, { 1,31,14}, { 1,30,14}, { 1,30,14},
|
|
258 { 1,29,14}, { 1,29,14}, { 1,28,14}, { 1,28,14},
|
|
259 { 1,27,14}, { 1,27,14}, { 1,26,14}, { 1,26,14},
|
|
260 { 1,25,14}, { 1,25,14}, { 1,24,14}, { 1,24,14},
|
|
261 { 1,23,14}, { 1,23,14}, { 1,22,14}, { 1,22,14},
|
|
262 { 1,21,14}, { 1,21,14}, { 1,20,14}, { 1,20,14},
|
|
263 { 1,19,14}, { 1,19,14}, { 1,18,14}, { 1,18,14},
|
|
264 { 1,17,14}, { 1,17,14}, { 1,16,14}, { 1,16,14}
|
|
265 };
|
|
266
|
|
267 static DCTtab DCT_13 [] = {
|
|
268 { 11, 2,13}, { 10, 2,13}, { 6, 3,13}, { 4, 4,13},
|
|
269 { 3, 5,13}, { 2, 7,13}, { 2, 6,13}, { 1,15,13},
|
|
270 { 1,14,13}, { 1,13,13}, { 1,12,13}, { 27, 1,13},
|
|
271 { 26, 1,13}, { 25, 1,13}, { 24, 1,13}, { 23, 1,13},
|
|
272 { 1,11,12}, { 1,11,12}, { 9, 2,12}, { 9, 2,12},
|
|
273 { 5, 3,12}, { 5, 3,12}, { 1,10,12}, { 1,10,12},
|
|
274 { 3, 4,12}, { 3, 4,12}, { 8, 2,12}, { 8, 2,12},
|
|
275 { 22, 1,12}, { 22, 1,12}, { 21, 1,12}, { 21, 1,12},
|
|
276 { 1, 9,12}, { 1, 9,12}, { 20, 1,12}, { 20, 1,12},
|
|
277 { 19, 1,12}, { 19, 1,12}, { 2, 5,12}, { 2, 5,12},
|
|
278 { 4, 3,12}, { 4, 3,12}, { 1, 8,12}, { 1, 8,12},
|
|
279 { 7, 2,12}, { 7, 2,12}, { 18, 1,12}, { 18, 1,12}
|
|
280 };
|
|
281
|
|
282 static DCTtab DCT_B14_10 [] = {
|
|
283 { 17, 1,10}, { 6, 2,10}, { 1, 7,10}, { 3, 3,10},
|
|
284 { 2, 4,10}, { 16, 1,10}, { 15, 1,10}, { 5, 2,10}
|
|
285 };
|
|
286
|
|
287 static DCTtab DCT_B14_8 [] = {
|
|
288 { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6},
|
|
289 { 3, 2, 7}, { 3, 2, 7}, { 10, 1, 7}, { 10, 1, 7},
|
|
290 { 1, 4, 7}, { 1, 4, 7}, { 9, 1, 7}, { 9, 1, 7},
|
|
291 { 8, 1, 6}, { 8, 1, 6}, { 8, 1, 6}, { 8, 1, 6},
|
|
292 { 7, 1, 6}, { 7, 1, 6}, { 7, 1, 6}, { 7, 1, 6},
|
|
293 { 2, 2, 6}, { 2, 2, 6}, { 2, 2, 6}, { 2, 2, 6},
|
|
294 { 6, 1, 6}, { 6, 1, 6}, { 6, 1, 6}, { 6, 1, 6},
|
|
295 { 14, 1, 8}, { 1, 6, 8}, { 13, 1, 8}, { 12, 1, 8},
|
|
296 { 4, 2, 8}, { 2, 3, 8}, { 1, 5, 8}, { 11, 1, 8}
|
|
297 };
|
|
298
|
|
299 static DCTtab DCT_B14AC_5 [] = {
|
|
300 { 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5},
|
|
301 { 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4},
|
|
302 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
303 {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2},
|
|
304 {129, 0, 2}, {129, 0, 2}, {129, 0, 2}, {129, 0, 2},
|
|
305 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
306 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}
|
|
307 };
|
|
308
|
|
309 static DCTtab DCT_B14DC_5 [] = {
|
|
310 { 1, 3, 5}, { 5, 1, 5}, { 4, 1, 5},
|
|
311 { 1, 2, 4}, { 1, 2, 4}, { 3, 1, 4}, { 3, 1, 4},
|
|
312 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
313 { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1},
|
|
314 { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1},
|
|
315 { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1},
|
|
316 { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}, { 1, 1, 1}
|
|
317 };
|
|
318
|
|
319 static DCTtab DCT_B15_10 [] = {
|
|
320 { 6, 2, 9}, { 6, 2, 9}, { 15, 1, 9}, { 15, 1, 9},
|
|
321 { 3, 4,10}, { 17, 1,10}, { 16, 1, 9}, { 16, 1, 9}
|
|
322 };
|
|
323
|
|
324 static DCTtab DCT_B15_8 [] = {
|
|
325 { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6}, { 65, 0, 6},
|
|
326 { 8, 1, 7}, { 8, 1, 7}, { 9, 1, 7}, { 9, 1, 7},
|
|
327 { 7, 1, 7}, { 7, 1, 7}, { 3, 2, 7}, { 3, 2, 7},
|
|
328 { 1, 7, 6}, { 1, 7, 6}, { 1, 7, 6}, { 1, 7, 6},
|
|
329 { 1, 6, 6}, { 1, 6, 6}, { 1, 6, 6}, { 1, 6, 6},
|
|
330 { 5, 1, 6}, { 5, 1, 6}, { 5, 1, 6}, { 5, 1, 6},
|
|
331 { 6, 1, 6}, { 6, 1, 6}, { 6, 1, 6}, { 6, 1, 6},
|
|
332 { 2, 5, 8}, { 12, 1, 8}, { 1,11, 8}, { 1,10, 8},
|
|
333 { 14, 1, 8}, { 13, 1, 8}, { 4, 2, 8}, { 2, 4, 8},
|
|
334 { 3, 1, 5}, { 3, 1, 5}, { 3, 1, 5}, { 3, 1, 5},
|
|
335 { 3, 1, 5}, { 3, 1, 5}, { 3, 1, 5}, { 3, 1, 5},
|
|
336 { 2, 2, 5}, { 2, 2, 5}, { 2, 2, 5}, { 2, 2, 5},
|
|
337 { 2, 2, 5}, { 2, 2, 5}, { 2, 2, 5}, { 2, 2, 5},
|
|
338 { 4, 1, 5}, { 4, 1, 5}, { 4, 1, 5}, { 4, 1, 5},
|
|
339 { 4, 1, 5}, { 4, 1, 5}, { 4, 1, 5}, { 4, 1, 5},
|
|
340 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
341 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
342 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
343 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
344 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
345 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
346 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
347 { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3}, { 2, 1, 3},
|
|
348 {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, {129, 0, 4},
|
|
349 {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, {129, 0, 4},
|
|
350 {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, {129, 0, 4},
|
|
351 {129, 0, 4}, {129, 0, 4}, {129, 0, 4}, {129, 0, 4},
|
|
352 { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4},
|
|
353 { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4},
|
|
354 { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4},
|
|
355 { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4}, { 1, 3, 4},
|
|
356 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
357 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
358 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
359 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
360 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
361 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
362 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
363 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
364 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
365 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
366 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
367 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
368 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
369 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
370 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
371 { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2}, { 1, 1, 2},
|
|
372 { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3},
|
|
373 { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3},
|
|
374 { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3},
|
|
375 { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3},
|
|
376 { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3},
|
|
377 { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3},
|
|
378 { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3},
|
|
379 { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3}, { 1, 2, 3},
|
|
380 { 1, 4, 5}, { 1, 4, 5}, { 1, 4, 5}, { 1, 4, 5},
|
|
381 { 1, 4, 5}, { 1, 4, 5}, { 1, 4, 5}, { 1, 4, 5},
|
|
382 { 1, 5, 5}, { 1, 5, 5}, { 1, 5, 5}, { 1, 5, 5},
|
|
383 { 1, 5, 5}, { 1, 5, 5}, { 1, 5, 5}, { 1, 5, 5},
|
|
384 { 10, 1, 7}, { 10, 1, 7}, { 2, 3, 7}, { 2, 3, 7},
|
|
385 { 11, 1, 7}, { 11, 1, 7}, { 1, 8, 7}, { 1, 8, 7},
|
|
386 { 1, 9, 7}, { 1, 9, 7}, { 1,12, 8}, { 1,13, 8},
|
|
387 { 3, 3, 8}, { 5, 2, 8}, { 1,14, 8}, { 1,15, 8}
|
|
388 };
|
|
389
|
|
390
|
|
391 static MBAtab MBA_5 [] = {
|
|
392 {6, 5}, {5, 5}, {4, 4}, {4, 4}, {3, 4}, {3, 4},
|
|
393 {2, 3}, {2, 3}, {2, 3}, {2, 3}, {1, 3}, {1, 3}, {1, 3}, {1, 3},
|
|
394 {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1},
|
|
395 {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}, {0, 1}
|
|
396 };
|
|
397
|
|
398 static MBAtab MBA_11 [] = {
|
|
399 {32, 11}, {31, 11}, {30, 11}, {29, 11},
|
|
400 {28, 11}, {27, 11}, {26, 11}, {25, 11},
|
|
401 {24, 11}, {23, 11}, {22, 11}, {21, 11},
|
|
402 {20, 10}, {20, 10}, {19, 10}, {19, 10},
|
|
403 {18, 10}, {18, 10}, {17, 10}, {17, 10},
|
|
404 {16, 10}, {16, 10}, {15, 10}, {15, 10},
|
|
405 {14, 8}, {14, 8}, {14, 8}, {14, 8},
|
|
406 {14, 8}, {14, 8}, {14, 8}, {14, 8},
|
|
407 {13, 8}, {13, 8}, {13, 8}, {13, 8},
|
|
408 {13, 8}, {13, 8}, {13, 8}, {13, 8},
|
|
409 {12, 8}, {12, 8}, {12, 8}, {12, 8},
|
|
410 {12, 8}, {12, 8}, {12, 8}, {12, 8},
|
|
411 {11, 8}, {11, 8}, {11, 8}, {11, 8},
|
|
412 {11, 8}, {11, 8}, {11, 8}, {11, 8},
|
|
413 {10, 8}, {10, 8}, {10, 8}, {10, 8},
|
|
414 {10, 8}, {10, 8}, {10, 8}, {10, 8},
|
|
415 { 9, 8}, { 9, 8}, { 9, 8}, { 9, 8},
|
|
416 { 9, 8}, { 9, 8}, { 9, 8}, { 9, 8},
|
|
417 { 8, 7}, { 8, 7}, { 8, 7}, { 8, 7},
|
|
418 { 8, 7}, { 8, 7}, { 8, 7}, { 8, 7},
|
|
419 { 8, 7}, { 8, 7}, { 8, 7}, { 8, 7},
|
|
420 { 8, 7}, { 8, 7}, { 8, 7}, { 8, 7},
|
|
421 { 7, 7}, { 7, 7}, { 7, 7}, { 7, 7},
|
|
422 { 7, 7}, { 7, 7}, { 7, 7}, { 7, 7},
|
|
423 { 7, 7}, { 7, 7}, { 7, 7}, { 7, 7},
|
|
424 { 7, 7}, { 7, 7}, { 7, 7}, { 7, 7}
|
|
425 };
|