annotate vc1data.h @ 3695:6795c9e5f983 libavcodec

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