Mercurial > libavcodec.hg
annotate vc1data.h @ 3652:d170a32e985c libavcodec
install opt.h
author | nicodvb |
---|---|
date | Tue, 29 Aug 2006 21:23:27 +0000 |
parents | 20938be7b67b |
children | 6d9e8253da2a |
rev | line source |
---|---|
3359 | 1 /** |
2 * @file vc1data.h | |
3360
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
3 * VC-1 tables. |
3359 | 4 */ |
5 | |
6 #ifndef VC1DATA_H | |
7 #define VC1DATA_H | |
8 | |
3515
20938be7b67b
Some B-frames support (parsing and decoding only, no motion compesation is done)
kostya
parents:
3360
diff
changeset
|
9 /* Denominator used for vc1_bfraction_lut */ |
20938be7b67b
Some B-frames support (parsing and decoding only, no motion compesation is done)
kostya
parents:
3360
diff
changeset
|
10 #define B_FRACTION_DEN 840 |
20938be7b67b
Some B-frames support (parsing and decoding only, no motion compesation is done)
kostya
parents:
3360
diff
changeset
|
11 |
3359 | 12 /* bfraction is fractional, we scale to the GCD 3*5*7*8 = 840 */ |
13 const int16_t vc1_bfraction_lut[23] = { | |
14 420 /*1/2*/, 280 /*1/3*/, 560 /*2/3*/, 210 /*1/4*/, | |
15 630 /*3/4*/, 168 /*1/5*/, 336 /*2/5*/, | |
16 504 /*3/5*/, 672 /*4/5*/, 140 /*1/6*/, 700 /*5/6*/, | |
17 120 /*1/7*/, 240 /*2/7*/, 360 /*3/7*/, 480 /*4/7*/, | |
18 600 /*5/7*/, 720 /*6/7*/, 105 /*1/8*/, 315 /*3/8*/, | |
19 525 /*5/8*/, 735 /*7/8*/, | |
20 -1 /*inv.*/, 0 /*BI fm*/ | |
21 }; | |
22 const uint8_t vc1_bfraction_bits[23] = { | |
23 3, 3, 3, 3, | |
24 3, 3, 3, | |
25 7, 7, 7, 7, | |
26 7, 7, 7, 7, | |
27 7, 7, 7, 7, | |
28 7, 7, | |
29 7, 7 | |
30 }; | |
31 const uint8_t vc1_bfraction_codes[23] = { | |
32 0, 1, 2, 3, | |
33 4, 5, 6, | |
34 112, 113, 114, 115, | |
35 116, 117, 118, 119, | |
36 120, 121, 122, 123, | |
37 124, 125, | |
38 126, 127 | |
39 }; | |
40 | |
41 //Same as H.264 | |
42 static const AVRational vc1_pixel_aspect[16]={ | |
43 {0, 1}, | |
44 {1, 1}, | |
45 {12, 11}, | |
46 {10, 11}, | |
47 {16, 11}, | |
48 {40, 33}, | |
49 {24, 11}, | |
50 {20, 11}, | |
51 {32, 11}, | |
52 {80, 33}, | |
53 {18, 11}, | |
54 {15, 11}, | |
55 {64, 33}, | |
56 {160, 99}, | |
57 {0, 1}, | |
58 {0, 1} | |
59 }; | |
60 | |
61 /* BitPlane IMODE - such a small table... */ | |
62 static const uint8_t vc1_imode_codes[7] = { | |
63 0, 2, 1, 3, 1, 2, 3 | |
64 }; | |
65 static const uint8_t vc1_imode_bits[7] = { | |
66 4, 2, 3, 2, 4, 3, 3 | |
67 }; | |
68 | |
69 /* Normal-2 imode */ | |
70 static const uint8_t vc1_norm2_codes[4] = { | |
71 0, 4, 5, 3 | |
72 }; | |
73 static const uint8_t vc1_norm2_bits[4] = { | |
74 1, 3, 3, 2 | |
75 }; | |
76 | |
77 static const uint16_t vc1_norm6_codes[64] = { | |
78 0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E, | |
79 0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037, | |
80 0x007, 0x00A, 0x00B, 0x043, 0x00C, 0x045, 0x046, 0x309, 0x00D, 0x049, 0x04A, 0x308, 0x04C, 0x307, 0x306, 0x036, | |
81 0x00E, 0x051, 0x052, 0x305, 0x054, 0x304, 0x303, 0x035, 0x058, 0x302, 0x301, 0x034, 0x300, 0x033, 0x032, 0x007, | |
82 }; | |
83 | |
84 static const uint8_t vc1_norm6_bits[64] = { | |
85 1, 4, 4, 8, 4, 8, 8, 10, 4, 8, 8, 10, 8, 10, 10, 13, | |
86 4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9, | |
87 4, 8, 8, 10, 8, 10, 10, 13, 8, 10, 10, 13, 10, 13, 13, 9, | |
88 8, 10, 10, 13, 10, 13, 13, 9, 10, 13, 13, 9, 13, 9, 9, 6, | |
89 }; | |
90 /* Normal-6 imode */ | |
91 static const uint8_t vc1_norm6_spec[64][5] = { | |
92 { 0, 1, 1 }, | |
93 { 1, 2, 4 }, | |
94 { 2, 3, 4 }, | |
95 { 3, 0, 8 }, | |
96 { 4, 4, 4 }, | |
97 { 5, 1, 8 }, | |
98 { 6, 2, 8 }, | |
99 { 7, 2, 5, 7, 5 }, | |
100 { 8, 5, 4 }, | |
101 { 9, 3, 8 }, | |
102 {10, 4, 8 }, | |
103 {11, 2, 5, 11, 5 }, | |
104 {12, 5, 8 }, | |
105 {13, 2, 5, 13, 5 }, | |
106 {14, 2, 5, 14, 5 }, | |
107 {15, 3, 5, 14, 8 }, | |
108 {16, 6, 4 }, | |
109 {17, 6, 8 }, | |
110 {18, 7, 8 }, | |
111 {19, 2, 5, 19, 5 }, | |
112 {20, 8, 8 }, | |
113 {21, 2, 5, 21, 5 }, | |
114 {22, 2, 5, 22, 5 }, | |
115 {23, 3, 5, 13, 8 }, | |
116 {24, 9, 8 }, | |
117 {25, 2, 5, 25, 5 }, | |
118 {26, 2, 5, 26, 5 }, | |
119 {27, 3, 5, 12, 8 }, | |
120 {28, 2, 5, 28, 5 }, | |
121 {29, 3, 5, 11, 8 }, | |
122 {30, 3, 5, 10, 8 }, | |
123 {31, 3, 5, 7, 4 }, | |
124 {32, 7, 4 }, | |
125 {33, 10, 8 }, | |
126 {34, 11, 8 }, | |
127 {35, 2, 5, 3, 5 }, | |
128 {36, 12, 8 }, | |
129 {37, 2, 5, 5, 5 }, | |
130 {38, 2, 5, 6, 5 }, | |
131 {39, 3, 5, 9, 8 }, | |
132 {40, 13, 8 }, | |
133 {41, 2, 5, 9, 5 }, | |
134 {42, 2, 5, 10, 5 }, | |
135 {43, 3, 5, 8, 8 }, | |
136 {44, 2, 5, 12, 5 }, | |
137 {45, 3, 5, 7, 8 }, | |
138 {46, 3, 5, 6, 8 }, | |
139 {47, 3, 5, 6, 4 }, | |
140 {48, 14, 8 }, | |
141 {49, 2, 5, 17, 5 }, | |
142 {50, 2, 5, 18, 5 }, | |
143 {51, 3, 5, 5, 8 }, | |
144 {52, 2, 5, 20, 5 }, | |
145 {53, 3, 5, 4, 8 }, | |
146 {54, 3, 5, 3, 8 }, | |
147 {55, 3, 5, 5, 4 }, | |
148 {56, 2, 5, 24, 5 }, | |
149 {57, 3, 5, 2, 8 }, | |
150 {58, 3, 5, 1, 8 }, | |
151 {59, 3, 5, 4, 4 }, | |
152 {60, 3, 5, 0, 8 }, | |
153 {61, 3, 5, 3, 4 }, | |
154 {62, 3, 5, 2, 4 }, | |
155 {63, 3, 5, 1, 1 }, | |
156 }; | |
157 | |
158 /* 4MV Block pattern VLC tables */ | |
159 static const uint8_t vc1_4mv_block_pattern_codes[4][16] = { | |
160 { 14, 58, 59, 25, 12, 26, 15, 15, 13, 24, 27, 0, 28, 1, 2, 2}, | |
161 { 8, 18, 19, 4, 20, 5, 30, 11, 21, 31, 6, 12, 7, 13, 14, 0}, | |
162 { 15, 6, 7, 2, 8, 3, 28, 9, 10, 29, 4, 11, 5, 12, 13, 0}, | |
163 { 0, 11, 12, 4, 13, 5, 30, 16, 14, 31, 6, 17, 7, 18, 19, 19} | |
164 }; | |
165 static const uint8_t vc1_4mv_block_pattern_bits[4][16] = { | |
166 { 5, 6, 6, 5, 5, 5, 5, 4, 5, 5, 5, 3, 5, 3, 3, 2}, | |
167 { 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4, 4, 4, 4, 4, 2}, | |
168 { 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 4, 4, 4, 4, 4, 3}, | |
169 { 2, 4, 4, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 4} | |
170 }; | |
171 | |
172 const uint8_t wmv3_dc_scale_table[32]={ | |
3360
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
173 0, 2, 4, 8, 8, 8, 9, 9,10,10,11,11,12,12,13,13,14,14,15,15,16,16,17,17,18,18,19,19,20,20,21,21 |
3359 | 174 }; |
175 | |
176 /* P-Picture CBPCY VLC tables */ | |
3360
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
177 #if 1 // Looks like original tables are not conforming to standard at all. Are they used for old WMV? |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
178 static const uint16_t vc1_cbpcy_p_codes[4][64] = { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
179 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
180 0, 6, 15, 13, 13, 11, 3, 13, 5, 8, 49, 10, 12, 114, 102, 119, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
181 1, 54, 96, 8, 10, 111, 5, 15, 12, 10, 2, 12, 13, 115, 53, 63, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
182 1, 7, 1, 7, 14, 12, 4, 14, 1, 9, 97, 11, 7, 58, 52, 62, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
183 4, 103, 1, 9, 11, 56, 101, 118, 4, 110, 100, 30, 2, 5, 4, 3 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
184 }, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
185 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
186 0, 9, 1, 18, 5, 14, 237, 26, 3, 121, 3, 22, 13, 16, 6, 30, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
187 2, 10, 1, 20, 12, 241, 5, 28, 16, 12, 3, 24, 28, 124, 239, 247, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
188 1, 240, 1, 19, 18, 15, 4, 27, 1, 122, 2, 23, 1, 17, 7, 31, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
189 1, 11, 2, 21, 19, 246, 238, 29, 17, 13, 236, 25, 58, 63, 8, 125 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
190 }, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
191 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
192 0, 201, 25, 231, 5, 221, 1, 3, 2, 414, 2, 241, 16, 225, 195, 492, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
193 2, 412, 1, 240, 7, 224, 98, 245, 1, 220, 96, 5, 9, 230, 101, 247, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
194 1, 102, 1, 415, 24, 3, 2, 244, 3, 54, 3, 484, 17, 114, 200, 493, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
195 3, 413, 1, 4, 13, 113, 99, 485, 4, 111, 194, 243, 5, 29, 26, 31 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
196 }, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
197 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
198 0, 28, 12, 44, 3, 36, 20, 52, 2, 32, 16, 48, 8, 40, 24, 28, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
199 1, 30, 14, 46, 6, 38, 22, 54, 3, 34, 18, 50, 10, 42, 26, 30, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
200 1, 29, 13, 45, 5, 37, 21, 53, 2, 33, 17, 49, 9, 41, 25, 29, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
201 1, 31, 15, 47, 7, 39, 23, 55, 4, 35, 19, 51, 11, 43, 27, 31 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
202 } |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
203 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
204 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
205 static const uint8_t vc1_cbpcy_p_bits[4][64] = { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
206 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
207 13, 13, 7, 13, 7, 13, 13, 12, 6, 13, 7, 12, 6, 8, 8, 8, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
208 5, 7, 8, 12, 6, 8, 13, 12, 7, 13, 13, 12, 6, 8, 7, 7, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
209 6, 13, 8, 12, 7, 13, 13, 12, 7, 13, 8, 12, 5, 7, 7, 7, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
210 6, 8, 13, 12, 6, 7, 8, 8, 5, 8, 8, 6, 3, 3, 3, 2 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
211 }, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
212 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
213 14, 13, 8, 13, 3, 13, 8, 13, 3, 7, 8, 13, 4, 13, 13, 13, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
214 3, 13, 13, 13, 4, 8, 13, 13, 5, 13, 13, 13, 5, 7, 8, 8, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
215 3, 8, 14, 13, 5, 13, 13, 13, 4, 7, 13, 13, 6, 13, 13, 13, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
216 5, 13, 8, 13, 5, 8, 8, 13, 5, 13, 8, 13, 6, 6, 13, 7 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
217 }, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
218 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
219 13, 8, 6, 8, 4, 8, 13, 12, 4, 9, 8, 8, 5, 8, 8, 9, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
220 5, 9, 10, 8, 4, 8, 7, 8, 6, 8, 7, 13, 4, 8, 7, 8, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
221 5, 7, 8, 9, 6, 13, 13, 8, 4, 6, 8, 9, 5, 7, 8, 9, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
222 5, 9, 9, 13, 5, 7, 7, 9, 4, 7, 8, 8, 3, 5, 5, 5 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
223 }, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
224 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
225 9, 9, 9, 9, 2, 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 8, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
226 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
227 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
228 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
229 } |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
230 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
231 #else |
3359 | 232 static const uint16_t vc1_cbpcy_p_codes[4][64] = { |
233 { | |
234 0, 1, 1, 4, 5, 1, 12, 4, 13, 14, 10, 11, 12, 7, 13, 2, | |
235 15, 1, 96, 1, 49, 97, 2, 100, 3, 4, 5, 101, 102, 52, 53, 4, | |
236 6, 7, 54, 103, 8, 9, 10, 110, 11, 12, 111, 56, 114, 58, 115, 5, | |
237 13, 7, 8, 9, 10, 11, 12, 30, 13, 14, 15, 118, 119, 62, 63, 3 | |
238 }, | |
239 { | |
240 0, 1, 2, 1, 3, 1, 16, 17, 5, 18, 12, 19, 13, 1, 28, 58, | |
241 1, 1, 1, 2, 3, 2, 3, 236, 237, 4, 5, 238, 6, 7, 239, 8, | |
242 9, 240, 10, 11, 121, 122, 12, 13, 14, 15, 241, 246, 16, 17, 124, 63, | |
243 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 247, 125 | |
244 }, | |
245 { | |
246 0, 1, 2, 3, 2, 3, 1, 4, 5, 24, 7, 13, 16, 17, 9, 5, | |
247 25, 1, 1, 1, 2, 3, 96, 194, 1, 2, 98, 99, 195, 200, 101, 26, | |
248 201, 102, 412, 413, 414, 54, 220, 111, 221, 3, 224, 113, 225, 114, 230, 29, | |
249 231, 415, 240, 4, 241, 484, 5, 243, 3, 244, 245, 485, 492, 493, 247, 31 | |
250 }, | |
251 { | |
252 0, 1, 1, 1, 2, 2, 3, 4, 3, 5, 6, 7, 8, 9, 10, 11, | |
253 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, | |
254 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, | |
255 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 28, 29, 30, 31 | |
256 } | |
257 }; | |
258 static const uint8_t vc1_cbpcy_p_bits[4][64] = { | |
259 { | |
260 13, 6, 5, 6, 6, 7, 7, 5, 7, 7, 6, 6, 6, 5, 6, 3, | |
261 7, 8, 8, 13, 7, 8, 13, 8, 13, 13, 13, 8, 8, 7, 7, 3, | |
262 13, 13, 7, 8, 13, 13, 13, 8, 13, 13, 8, 7, 8, 7, 8, 3, | |
263 13, 12, 12, 12, 12, 12, 12, 6, 12, 12, 12, 8, 8, 7, 7, 2 | |
264 }, | |
265 { | |
266 14, 3, 3, 5, 3, 4, 5, 5, 3, 5, 4, 5, 4, 6, 5, 6, | |
267 8, 14, 13, 8, 8, 13, 13, 8, 8, 13, 13, 8, 13, 13, 8, 13, | |
268 13, 8, 13, 13, 7, 7, 13, 13, 13, 13, 8, 8, 13, 13, 7, 6, | |
269 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 8, 7 | |
270 }, | |
271 { | |
272 13, 5, 5, 5, 4, 4, 6, 4, 4, 6, 4, 5, 5, 5, 4, 3, | |
273 6, 8, 10, 9, 8, 8, 7, 8, 13, 13, 7, 7, 8, 8, 7, 5, | |
274 8, 7, 9, 9, 9, 6, 8, 7, 8, 13, 8, 7, 8, 7, 8, 5, | |
275 8, 9, 8, 13, 8, 9, 13, 8, 12, 8, 8, 9, 9, 9, 8, 5 | |
276 }, | |
277 { | |
278 9, 2, 3, 9, 2, 9, 9, 9, 2, 9, 9, 9, 9, 9, 9, 9, | |
279 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, | |
280 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, | |
281 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8 | |
282 } | |
283 }; | |
3360
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
284 #endif |
3359 | 285 |
286 /* MacroBlock Transform Type: 7.1.3.11, p89 | |
287 * 8x8:B | |
288 * 8x4:B:btm 8x4:B:top 8x4:B:both, | |
289 * 4x8:B:right 4x8:B:left 4x8:B:both | |
290 * 4x4:B 8x8:MB | |
291 * 8x4:MB:btm 8x4:MB:top 8x4,MB,both | |
292 * 4x8,MB,right 4x8,MB,left | |
293 * 4x4,MB */ | |
294 static const uint16_t vc1_ttmb_codes[3][16] = { | |
295 { | |
296 0x0003, | |
297 0x002E, 0x005F, 0x0000, | |
298 0x0016, 0x0015, 0x0001, | |
299 0x0004, 0x0014, | |
300 0x02F1, 0x0179, 0x017B, | |
301 0x0BC0, 0x0BC1, 0x05E1, | |
302 0x017A | |
303 }, | |
304 { | |
305 0x0006, | |
306 0x0006, 0x0003, 0x0007, | |
307 0x000F, 0x000E, 0x0000, | |
308 0x0002, 0x0002, | |
309 0x0014, 0x0011, 0x000B, | |
310 0x0009, 0x0021, 0x0015, | |
311 0x0020 | |
312 }, | |
313 { | |
314 0x0006, | |
315 0x0000, 0x000E, 0x0005, | |
316 0x0002, 0x0003, 0x0003, | |
317 0x000F, 0x0002, | |
318 0x0081, 0x0021, 0x0009, | |
319 0x0101, 0x0041, 0x0011, | |
320 0x0100 | |
321 } | |
322 }; | |
323 | |
324 static const uint8_t vc1_ttmb_bits[3][16] = { | |
325 { | |
326 2, | |
327 6, 7, 2, | |
328 5, 5, 2, | |
329 3, 5, | |
330 10, 9, 9, | |
331 12, 12, 11, | |
332 9 | |
333 }, | |
334 { | |
335 3, | |
336 4, 4, 4, | |
337 4, 4, 3, | |
338 3, 2, | |
339 7, 7, 6, | |
340 6, 8, 7, | |
341 8 | |
342 }, | |
343 { | |
344 3, | |
345 3, 4, 5, | |
346 3, 3, 4, | |
347 4, 2, | |
348 10, 8, 6, | |
349 11, 9, 7, | |
350 11 | |
351 } | |
352 }; | |
353 | |
354 /* TTBLK (Transform Type per Block) tables */ | |
355 static const uint8_t vc1_ttblk_codes[3][8] = { | |
356 { 0, 1, 3, 5, 16, 17, 18, 19}, | |
357 { 3, 0, 1, 2, 3, 5, 8, 9}, | |
358 { 1, 0, 1, 4, 6, 7, 10, 11} | |
359 }; | |
360 static const uint8_t vc1_ttblk_bits[3][8] = { | |
361 { 2, 2, 2, 3, 5, 5, 5, 5}, | |
362 { 2, 3, 3, 3, 3, 3, 4, 4}, | |
363 { 2, 3, 3, 3, 3, 3, 4, 4} | |
364 }; | |
365 | |
366 /* SUBBLKPAT tables, p93-94, reordered */ | |
367 static const uint8_t vc1_subblkpat_codes[3][15] = { | |
368 { 14, 12, 7, 11, 9, 26, 2, 10, 27, 8, 0, 6, 1, 15, 1}, | |
369 { 14, 0, 8, 15, 10, 4, 23, 13, 5, 9, 25, 3, 24, 22, 1}, | |
370 { 5, 6, 2, 2, 8, 0, 28, 3, 1, 3, 29, 1, 19, 18, 15} | |
371 }; | |
372 static const uint8_t vc1_subblkpat_bits[3][15] = { | |
373 { 5, 5, 5, 5, 5, 6, 4, 5, 6, 5, 4, 5, 4, 5, 1}, | |
374 { 4, 3, 4, 4, 4, 5, 5, 4, 5, 4, 5, 4, 5, 5, 2}, | |
375 { 3, 3, 4, 3, 4, 5, 5, 3, 5, 4, 5, 4, 5, 5, 4} | |
376 }; | |
377 | |
378 /* MV differential tables, p265 */ | |
379 static const uint16_t vc1_mv_diff_codes[4][73] = { | |
380 { | |
381 0, 2, 3, 8, 576, 3, 2, 6, | |
382 5, 577, 578, 7, 8, 9, 40, 19, | |
383 37, 82, 21, 22, 23, 579, 580, 166, | |
384 96, 167, 49, 194, 195, 581, 582, 583, | |
385 292, 293, 294, 13, 2, 7, 24, 50, | |
386 102, 295, 13, 7, 8, 18, 50, 103, | |
387 38, 20, 21, 22, 39, 204, 103, 23, | |
388 24, 25, 104, 410, 105, 106, 107, 108, | |
389 109, 220, 411, 442, 222, 443, 446, 447, | |
390 7 /* 73 elements */ | |
391 }, | |
392 { | |
393 0, 4, 5, 3, 4, 3, 4, 5, | |
394 20, 6, 21, 44, 45, 46, 3008, 95, | |
395 112, 113, 57, 3009, 3010, 116, 117, 3011, | |
396 118, 3012, 3013, 3014, 3015, 3016, 3017, 3018, | |
397 3019, 3020, 3021, 3022, 1, 4, 15, 160, | |
398 161, 41, 6, 11, 42, 162, 43, 119, | |
399 56, 57, 58, 163, 236, 237, 3023, 119, | |
400 120, 242, 122, 486, 1512, 487, 246, 494, | |
401 1513, 495, 1514, 1515, 1516, 1517, 1518, 1519, | |
402 31 /* 73 elements */ | |
403 }, | |
404 { | |
405 0, 512, 513, 514, 515, 2, 3, 258, | |
406 259, 260, 261, 262, 263, 264, 265, 266, | |
407 267, 268, 269, 270, 271, 272, 273, 274, | |
408 275, 276, 277, 278, 279, 280, 281, 282, | |
409 283, 284, 285, 286, 1, 5, 287, 288, | |
410 289, 290, 6, 7, 291, 292, 293, 294, | |
411 295, 296, 297, 298, 299, 300, 301, 302, | |
412 303, 304, 305, 306, 307, 308, 309, 310, | |
413 311, 312, 313, 314, 315, 316, 317, 318, | |
414 319 /* 73 elements */ | |
415 }, | |
416 { | |
417 0, 1, 1, 2, 3, 4, 1, 5, | |
418 4, 3, 5, 8, 6, 9, 10, 11, | |
419 12, 7, 104, 14, 105, 4, 10, 15, | |
420 11, 6, 14, 8, 106, 107, 108, 15, | |
421 109, 9, 55, 10, 1, 2, 1, 2, | |
422 3, 12, 6, 2, 6, 7, 28, 7, | |
423 15, 8, 5, 18, 29, 152, 77, 24, | |
424 25, 26, 39, 108, 13, 109, 55, 56, | |
425 57, 116, 11, 153, 234, 235, 118, 119, | |
426 15 /* 73 elements */ | |
427 } | |
428 }; | |
429 static const uint8_t vc1_mv_diff_bits[4][73] = { | |
430 { | |
431 6, 7, 7, 8, 14, 6, 5, 6, 7, 14, 14, 6, 6, 6, 8, 9, | |
432 10, 9, 7, 7, 7, 14, 14, 10, 9, 10, 8, 10, 10, 14, 14, 14, | |
433 13, 13, 13, 6, 3, 5, 6, 8, 9, 13, 5, 4, 4, 5, 7, 9, | |
434 6, 5, 5, 5, 6, 9, 8, 5, 5, 5, 7, 10, 7, 7, 7, 7, | |
435 7, 8, 10, 9, 8, 9, 9, 9, 3 /* 73 elements */ | |
436 }, | |
437 { | |
438 5, 7, 7, 6, 6, 5, 5, 6, 7, 5, 7, 8, 8, 8, 14, 9, | |
439 9, 9, 8, 14, 14, 9, 9, 14, 9, 14, 14, 14, 14, 14, 14, 14, | |
440 14, 14, 14, 14, 2, 3, 6, 8, 8, 6, 3, 4, 6, 8, 6, 9, | |
441 6, 6, 6, 8, 8, 8, 14, 7, 7, 8, 7, 9, 13, 9, 8, 9, | |
442 13, 9, 13, 13, 13, 13, 13, 13, 5 /* 73 elements */ | |
443 | |
444 }, | |
445 { | |
446 3, 12, 12, 12, 12, 3, 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, | |
447 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, | |
448 11, 11, 11, 11, 1, 5, 11, 11, 11, 11, 4, 4, 11, 11, 11, 11, | |
449 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, | |
450 11, 11, 11, 11, 11, 11, 11, 11, 11 /* 73 elements */ | |
451 }, | |
452 { | |
453 15, 11, 15, 15, 15, 15, 12, 15, 12, 11, 12, 12, 15, 12, 12, 12, | |
454 12, 15, 15, 12, 15, 10, 11, 12, 11, 10, 11, 10, 15, 15, 15, 11, | |
455 15, 10, 14, 10, 4, 4, 5, 7, 8, 9, 5, 3, 4, 5, 6, 8, | |
456 5, 4, 3, 5, 6, 8, 7, 5, 5, 5, 6, 7, 9, 7, 6, 6, | |
457 6, 7, 10, 8, 8, 8, 7, 7, 4 /* 73 elements */ | |
458 } | |
459 }; | |
460 | |
461 /* DC differentials low+hi-mo, p217 are the same as in msmpeg4data .h */ | |
462 | |
463 /* Scantables/ZZ scan are at 11.9 (p262) and 8.1.1.12 (p10) */ | |
3360
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
464 static const int8_t vc1_normal_zz[64] = { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
465 0, 8, 1, 2, 9, 16, 24, 17, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
466 10, 3, 4, 11, 18, 25, 32, 40, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
467 33, 48, 26, 19, 12, 5, 6, 13, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
468 20, 27, 34, 41, 56, 49, 57, 42, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
469 35, 28, 21, 14, 7, 15, 22, 29, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
470 36, 43, 50, 58, 51, 59, 44, 37, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
471 30, 23, 31, 38, 45, 52, 60, 53, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
472 61, 46, 39, 47, 54, 62, 55, 63 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
473 }; |
3359 | 474 |
3360
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
475 static const int8_t vc1_horizontal_zz [64] = /* Table 227 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
476 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
477 0, 1, 8, 2, 3, 9, 16, 24, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
478 17, 10, 4, 5, 11, 18, 25, 32, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
479 40, 48, 33, 26, 19, 12, 6, 7, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
480 13, 20, 27, 34, 41, 56, 49, 57, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
481 42, 35, 28, 21, 14, 15, 22, 29, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
482 36, 43, 50, 58, 51, 44, 37, 30, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
483 23, 31, 38, 45, 52, 59, 60, 53, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
484 46, 39, 47, 54, 61, 62, 55, 63 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
485 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
486 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
487 static const int8_t vc1_vertical_zz [64] = /* Table 228 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
488 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
489 0, 8, 16, 1, 24, 32, 40, 9, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
490 2, 3, 10, 17, 25, 48, 56, 41, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
491 33, 26, 18, 11, 4, 5, 12, 19, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
492 27, 34, 49, 57, 50, 42, 35, 28, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
493 20, 13, 6, 7, 14, 21, 29, 36, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
494 43, 51, 58, 59, 52, 44, 37, 30, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
495 22, 15, 23, 31, 38, 45, 60, 53, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
496 46, 39, 47, 54, 61, 62, 55, 63 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
497 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
498 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
499 static const int8_t vc1_simple_progressive_8x8_zz [64] = |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
500 /* Table 229 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
501 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
502 0, 8, 1, 2, 9, 16, 24, 17, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
503 10, 3, 4, 11, 18, 25, 32, 40, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
504 48, 56, 41, 33, 26, 19, 12, 5, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
505 6, 13, 20, 27, 34, 49, 57, 58, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
506 50, 42, 35, 28, 21, 14, 7, 15, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
507 22, 29, 36, 43, 51, 59, 60, 52, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
508 44, 37, 30, 23, 31, 38, 45, 53, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
509 61, 62, 54, 46, 39, 47, 55, 63 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
510 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
511 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
512 static const int8_t vc1_simple_progressive_8x4_zz [32] = /* Table 230 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
513 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
514 0, 1, 2, 8, 3, 9, 10, 16, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
515 4, 11, 17, 24, 18, 12, 5, 19, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
516 25, 13, 20, 26, 27, 6, 21, 28, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
517 14, 22, 29, 7, 30, 15, 23, 31 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
518 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
519 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
520 static const int8_t vc1_simple_progressive_4x8_zz [32] = /* Table 231 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
521 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
522 0, 8, 1, 16, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
523 9, 24, 17, 2, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
524 32, 10, 25, 40, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
525 18, 48, 33, 26, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
526 56, 41, 34, 3, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
527 49, 57, 11, 42, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
528 19, 50, 27, 58, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
529 35, 43, 51, 59 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
530 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
531 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
532 /* Table 232 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
533 static const int8_t vc1_simple_progressive_4x4_zz [16] = |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
534 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
535 0, 8, 16, 1, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
536 9, 24, 17, 2, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
537 10, 18, 25, 3, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
538 11, 26, 19, 27 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
539 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
540 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
541 static const int8_t vc1_adv_progressive_8x4_zz [32] = /* Table 233 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
542 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
543 0, 8, 1, 16, 2, 9, 10, 3, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
544 24, 17, 4, 11, 18, 12, 5, 19, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
545 25, 13, 20, 26, 27, 6, 21, 28, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
546 14, 22, 29, 7, 30, 15, 23, 31 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
547 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
548 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
549 static const int8_t vc1_adv_progressive_4x8_zz [32] = /* Table 234 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
550 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
551 0, 1, 8, 2, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
552 9, 16, 17, 24, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
553 10, 32, 25, 18, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
554 40, 3, 33, 26, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
555 48, 11, 56, 41, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
556 34, 49, 57, 42, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
557 19, 50, 27, 58, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
558 35, 43, 51, 59 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
559 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
560 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
561 static const int8_t vc1_adv_interlaced_8x8_zz [64] = /* Table 235 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
562 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
563 0, 8, 1, 16, 24, 9, 2, 32, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
564 40, 48, 56, 17, 10, 3, 25, 18, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
565 11, 4, 33, 41, 49, 57, 26, 34, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
566 42, 50, 58, 19, 12, 5, 27, 20, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
567 13, 6, 35, 28, 21, 14, 7, 15, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
568 22, 29, 36, 43, 51, 59, 60, 52, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
569 44, 37, 30, 23, 31, 38, 45, 53, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
570 61, 62, 54, 46, 39, 47, 55, 63 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
571 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
572 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
573 static const int8_t vc1_adv_interlaced_8x4_zz [32] = /* Table 236 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
574 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
575 0, 8, 16, 24, 1, 9, 2, 17, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
576 25, 10, 3, 18, 26, 4, 11, 19, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
577 12, 5, 13, 20, 27, 6, 21, 28, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
578 14, 22, 29, 7, 30, 15, 23, 31 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
579 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
580 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
581 static const int8_t vc1_adv_interlaced_4x8_zz [32] = /* Table 237 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
582 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
583 0, 1, 2, 8, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
584 16, 9, 24, 17, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
585 10, 3, 32, 40, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
586 48, 56, 25, 18, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
587 33, 26, 41, 34, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
588 49, 57, 11, 42, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
589 19, 50, 27, 58, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
590 35, 43, 51, 59 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
591 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
592 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
593 static const int8_t vc1_adv_interlaced_4x4_zz [16] = /* Table 238 */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
594 { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
595 0, 8, 16, 24, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
596 1, 9, 17, 2, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
597 25, 10, 18, 3, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
598 26, 11, 19, 27 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
599 }; |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
600 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
601 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
602 /* DQScale as specified in 8.1.3.9 - almost identical to 0x40000/i */ |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
603 static const int32_t vc1_dqscale[63] = { |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
604 0x40000, 0x20000, 0x15555, 0x10000, 0xCCCD, 0xAAAB, 0x9249, 0x8000, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
605 0x71C7, 0x6666, 0x5D17, 0x5555, 0x4EC5, 0x4925, 0x4444, 0x4000, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
606 0x3C3C, 0x38E4, 0x35E5, 0x3333, 0x30C3, 0x2E8C, 0x2C86, 0x2AAB, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
607 0x28F6, 0x2762, 0x25ED, 0x2492, 0x234F, 0x2222, 0x2108, 0x2000, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
608 0x1F08, 0x1E1E, 0x1D42, 0x1C72, 0x1BAD, 0x1AF3, 0x1A42, 0x199A, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
609 0x18FA, 0x1862, 0x17D0, 0x1746, 0x16C1, 0x1643, 0x15CA, 0x1555, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
610 0x14E6, 0x147B, 0x1414, 0x13B1, 0x1352, 0x12F7, 0x129E, 0x1249, |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
611 0x11F7, 0x11A8, 0x115B, 0x1111, 0x10C9, 0x1084, 0x1000 |
2c4ddf5b9217
VC-1 decoder with I-frames support and partial P-frames decoding
kostya
parents:
3359
diff
changeset
|
612 }; |
3359 | 613 #endif /* VC1DATA_H */ |