~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Open Mash Cross Reference
mash/codec/p64/tables.h

Component: ~ [ mash ] ~ [ apps ] ~ [ gsm ] ~ [ lib ] ~ [ otcl ] ~ [ srm ] ~ [ tcl8.3 ] ~ [ tclcl ] ~ [ tk8.3 ] ~ [ tutorials ] ~

  1 /*
  2  * tables.h --
  3  *
  4  *      These are the Huffman tables used in the p64 coder.  This is converted
  5  *      by htable into ctables.h which is used by the Huffman coder.
  6  */
  7 
  8 /*************************************************************
  9 Copyright (C) 1990, 1991, 1993 Andy C. Hung, all rights reserved.
 10 PUBLIC DOMAIN LICENSE: Stanford University Portable Video Research
 11 Group. If you use this software, you agree to the following: This
 12 program package is purely experimental, and is licensed "as is".
 13 Permission is granted to use, modify, and distribute this program
 14 without charge for any purpose, provided this license/ disclaimer
 15 notice appears in the copies.  No warranty or maintenance is given,
 16 either expressed or implied.  In no event shall the author(s) be
 17 liable to you or a third party for any special, incidental,
 18 consequential, or other damages, arising out of the use or inability
 19 to use the program for any purpose (or the loss of data), even if we
 20 have been advised of such possibilities.  Any public reference or
 21 advertisement of this source code should refer to it as the Portable
 22 Video Research Group (PVRG) code, and not by any author(s) (or
 23 Stanford University) name.
 24 *************************************************************/
 25 
 26 int MTypeCoeff[] = {
 27 0,0b0001,
 28 1,0b0000001,
 29 2,0b1,
 30 3,0b00001,
 31 4,0b000000001,
 32 5,0b00000001,
 33 6,0b0000000001,
 34 7,0b001,
 35 8,0b01,
 36 9,0b000001,
 37 -1,-1};
 38 
 39 int MBACoeff[] = {
 40 1,0b1,
 41 2,0b011,
 42 3,0b010,
 43 4,0b0011,
 44 5,0b0010,
 45 6,0b00011,
 46 7,0b00010,
 47 8,0b0000111,
 48 9,0b0000110,
 49 10,0b00001011,
 50 11,0b00001010,
 51 12,0b00001001,
 52 13,0b00001000,
 53 14,0b00000111,
 54 15,0b00000110,
 55 16,0b0000010111,
 56 17,0b0000010110,
 57 18,0b0000010101,
 58 19,0b0000010100,
 59 20,0b0000010011,
 60 21,0b0000010010,
 61 22,0b00000100011,
 62 23,0b00000100010,
 63 24,0b00000100001,
 64 25,0b00000100000,
 65 26,0b00000011111,
 66 27,0b00000011110,
 67 28,0b00000011101,
 68 29,0b00000011100,
 69 30,0b00000011011,
 70 31,0b00000011010,
 71 32,0b00000011001,
 72 33,0b00000011000,
 73 34,0b00000001111, /* Stuffing */
 74 35,0b0000000000000001, /* Start */
 75 -1,-1};
 76 
 77 int MVDCoeff[] = {
 78 16,0b00000011001,
 79 17,0b00000011011,
 80 18,0b00000011101,
 81 19,0b00000011111,
 82 20,0b00000100001,
 83 21,0b00000100011,
 84 22,0b0000010011,
 85 23,0b0000010101,
 86 24,0b0000010111,
 87 25,0b00000111,
 88 26,0b00001001,
 89 27,0b00001011,
 90 28,0b0000111,
 91 29,0b00011,
 92 30,0b0011,
 93 31,0b011,
 94 0,0b1,
 95 1,0b010,
 96 2,0b0010,
 97 3,0b00010,
 98 4,0b0000110,
 99 5,0b00001010,
100 6,0b00001000,
101 7,0b00000110,
102 8,0b0000010110,
103 9,0b0000010100,
104 10,0b0000010010,
105 11,0b00000100010,
106 12,0b00000100000,
107 13,0b00000011110,
108 14,0b00000011100,
109 15,0b00000011010,
110 -1,-1};
111 
112 int CBPCoeff[] = {
113 60,0b111,
114 4,0b1101,
115 8,0b1100,
116 16,0b1011,
117 32,0b1010,
118 12,0b10011,
119 48,0b10010,
120 20,0b10001,
121 40,0b10000,
122 28,0b01111,
123 44,0b01110,
124 52,0b01101,
125 56,0b01100,
126 1,0b01011,
127 61,0b01010,
128 2,0b01001,
129 62,0b01000,
130 24,0b001111,
131 36,0b001110,
132 3,0b001101,
133 63,0b001100,
134 5,0b0010111,
135 9,0b0010110,
136 17,0b0010101,
137 33,0b0010100,
138 6,0b0010011,
139 10,0b0010010,
140 18,0b0010001,
141 34,0b0010000,
142 7,0b00011111,
143 11,0b00011110,
144 19,0b00011101,
145 35,0b00011100,
146 13,0b00011011,
147 49,0b00011010,
148 21,0b00011001,
149 41,0b00011000,
150 14,0b00010111,
151 50,0b00010110,
152 22,0b00010101,
153 42,0b00010100,
154 15,0b00010011,
155 51,0b00010010,
156 23,0b00010001,
157 43,0b00010000,
158 25,0b00001111,
159 37,0b00001110,
160 26,0b00001101,
161 38,0b00001100,
162 29,0b00001011,
163 45,0b00001010,
164 53,0b00001001,
165 57,0b00001000,
166 30,0b00000111,
167 46,0b00000110,
168 54,0b00000101,
169 58,0b00000100,
170 31,0b000000111,
171 47,0b000000110,
172 55,0b000000101,
173 59,0b000000100,
174 27,0b000000011,
175 39,0b000000010,
176 -1,-1};
177 
178 int TCoeff1[] = {
179 0x0000,0b10, /* EOF */
180 0x0001,0b11, /* Not First Coef */
181 0x0002,0b0100,
182 0x0003,0b00101,
183 0x0004,0b0000110,
184 0x0005,0b00100110,
185 0x0006,0b00100001,
186 0x0007,0b0000001010,
187 0x0008,0b000000011101,
188 0x0009,0b000000011000,
189 0x000a,0b000000010011,
190 0x000b,0b000000010000,
191 0x000c,0b0000000011010,
192 0x000d,0b0000000011001,
193 0x000e,0b0000000011000,
194 0x000f,0b0000000010111,
195 0x0101,0b011,
196 0x0102,0b000110,
197 0x0103,0b00100101,
198 0x0104,0b0000001100,
199 0x0105,0b000000011011,
200 0x0106,0b0000000010110,
201 0x0107,0b0000000010101,
202 0x0201,0b0101,
203 0x0202,0b0000100,
204 0x0203,0b0000001011,
205 0x0204,0b000000010100,
206 0x0205,0b0000000010100,
207 0x0301,0b00111,
208 0x0302,0b00100100,
209 0x0303,0b000000011100,
210 0x0304,0b0000000010011,
211 0x0401,0b00110,
212 0x0402,0b0000001111,
213 0x0403,0b000000010010,
214 0x0501,0b000111,
215 0x0502,0b0000001001,
216 0x0503,0b0000000010010,
217 0x0601,0b000101,
218 0x0602,0b000000011110,
219 0x0701,0b000100,
220 0x0702,0b000000010101,
221 0x0801,0b0000111,
222 0x0802,0b000000010001,
223 0x0901,0b0000101,
224 0x0902,0b0000000010001,
225 0x0a01,0b00100111,
226 0x0a02,0b0000000010000,
227 0x0b01,0b00100011,
228 0x0c01,0b00100010,
229 0x0d01,0b00100000,
230 0x0e01,0b0000001110,
231 0x0f01,0b0000001101,
232 0x1001,0b0000001000,
233 0x1101,0b000000011111,
234 0x1201,0b000000011010,
235 0x1301,0b000000011001,
236 0x1401,0b000000010111,
237 0x1501,0b000000010110,
238 0x1601,0b0000000011111,
239 0x1701,0b0000000011110,
240 0x1801,0b0000000011101,
241 0x1901,0b0000000011100,
242 0x1a01,0b0000000011011,
243 0x1b01,0b000001, /* Escape */
244 -1,-1
245 };
246 
247 /* Excludes EOB */
248 
249 int TCoeff2[] = {
250 0x0001,0b1, /* First Coef */
251 0x0002,0b0100,
252 0x0003,0b00101,
253 0x0004,0b0000110,
254 0x0005,0b00100110,
255 0x0006,0b00100001,
256 0x0007,0b0000001010,
257 0x0008,0b000000011101,
258 0x0009,0b000000011000,
259 0x000a,0b000000010011,
260 0x000b,0b000000010000,
261 0x000c,0b0000000011010,
262 0x000d,0b0000000011001,
263 0x000e,0b0000000011000,
264 0x000f,0b0000000010111,
265 0x0101,0b011,
266 0x0102,0b000110,
267 0x0103,0b00100101,
268 0x0104,0b0000001100,
269 0x0105,0b000000011011,
270 0x0106,0b0000000010110,
271 0x0107,0b0000000010101,
272 0x0201,0b0101,
273 0x0202,0b0000100,
274 0x0203,0b0000001011,
275 0x0204,0b000000010100,
276 0x0205,0b0000000010100,
277 0x0301,0b00111,
278 0x0302,0b00100100,
279 0x0303,0b000000011100,
280 0x0304,0b0000000010011,
281 0x0401,0b00110,
282 0x0402,0b0000001111,
283 0x0403,0b000000010010,
284 0x0501,0b000111,
285 0x0502,0b0000001001,
286 0x0503,0b0000000010010,
287 0x0601,0b000101,
288 0x0602,0b000000011110,
289 0x0701,0b000100,
290 0x0702,0b000000010101,
291 0x0801,0b0000111,
292 0x0802,0b000000010001,
293 0x0901,0b0000101,
294 0x0902,0b0000000010001,
295 0x0a01,0b00100111,
296 0x0a02,0b0000000010000,
297 0x0b01,0b00100011,
298 0x0c01,0b00100010,
299 0x0d01,0b00100000,
300 0x0e01,0b0000001110,
301 0x0f01,0b0000001101,
302 0x1001,0b0000001000,
303 0x1101,0b000000011111,
304 0x1201,0b000000011010,
305 0x1301,0b000000011001,
306 0x1401,0b000000010111,
307 0x1501,0b000000010110,
308 0x1601,0b0000000011111,
309 0x1701,0b0000000011110,
310 0x1801,0b0000000011101,
311 0x1901,0b0000000011100,
312 0x1a01,0b0000000011011,
313 0x1b01,0b000001, /* Escape */
314 -1,-1
315 };
316 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.