Mercurial > libavcodec.hg
comparison vc9data.h @ 2482:5d28ea40fd98 libavcodec
Documentation patch by anonymous
author | michael |
---|---|
date | Tue, 01 Feb 2005 09:51:49 +0000 |
parents | 38dbec9a148d |
children | 69adfbbdcdeb |
comparison
equal
deleted
inserted
replaced
2481:0803adcb3ec3 | 2482:5d28ea40fd98 |
---|---|
5 | 5 |
6 #ifndef VC9DATA_H | 6 #ifndef VC9DATA_H |
7 #define VC9DATA_H | 7 #define VC9DATA_H |
8 | 8 |
9 /* Set a method for reading VLC in NORM6 bitplane decoding */ | 9 /* Set a method for reading VLC in NORM6 bitplane decoding */ |
10 #define TILE_VLC_METHOD 1 | 10 #define VLC_NORM6_METH0D 1 |
11 | 11 |
12 /* bfraction is fractional, we scale to the GCD 3*5*7*8 = 840 */ | 12 /* bfraction is fractional, we scale to the GCD 3*5*7*8 = 840 */ |
13 const int16_t vc9_bfraction_lut[23] = { | 13 const int16_t vc9_bfraction_lut[23] = { |
14 420 /*1/2*/, 280 /*1/3*/, 560 /*2/3*/, 210 /*1/4*/, | 14 420 /*1/2*/, 280 /*1/3*/, 560 /*2/3*/, 210 /*1/4*/, |
15 630 /*3/4*/, 168 /*1/5*/, 336 /*2/5*/, | 15 630 /*3/4*/, 168 /*1/5*/, 336 /*2/5*/, |
72 }; | 72 }; |
73 static const uint8_t vc9_norm2_bits[4] = { | 73 static const uint8_t vc9_norm2_bits[4] = { |
74 1, 3, 3, 2 | 74 1, 3, 3, 2 |
75 }; | 75 }; |
76 | 76 |
77 #if TILE_VLC_METHOD == 1 | 77 #if VLC_NORM6_METH0D == 1 |
78 static const uint16_t vc9_norm6_codes[64] = { | 78 static const uint16_t vc9_norm6_codes[64] = { |
79 0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E, | 79 0x001, 0x002, 0x003, 0x000, 0x004, 0x001, 0x002, 0x047, 0x005, 0x003, 0x004, 0x04B, 0x005, 0x04D, 0x04E, 0x30E, |
80 0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037, | 80 0x006, 0x006, 0x007, 0x053, 0x008, 0x055, 0x056, 0x30D, 0x009, 0x059, 0x05A, 0x30C, 0x05C, 0x30B, 0x30A, 0x037, |
81 0x007, 0x00A, 0x00B, 0x043, 0x00C, 0x045, 0x046, 0x309, 0x00D, 0x049, 0x04A, 0x308, 0x04C, 0x307, 0x306, 0x036, | 81 0x007, 0x00A, 0x00B, 0x043, 0x00C, 0x045, 0x046, 0x309, 0x00D, 0x049, 0x04A, 0x308, 0x04C, 0x307, 0x306, 0x036, |
82 0x00E, 0x051, 0x052, 0x305, 0x054, 0x304, 0x303, 0x035, 0x058, 0x302, 0x301, 0x034, 0x300, 0x033, 0x032, 0x007, | 82 0x00E, 0x051, 0x052, 0x305, 0x054, 0x304, 0x303, 0x035, 0x058, 0x302, 0x301, 0x034, 0x300, 0x033, 0x032, 0x007, |
155 {62, 3, 5, 2, 4 }, | 155 {62, 3, 5, 2, 4 }, |
156 {63, 3, 5, 1, 1 }, | 156 {63, 3, 5, 1, 1 }, |
157 }; | 157 }; |
158 #endif | 158 #endif |
159 | 159 |
160 #if TILE_VLC_METHOD == 2 //Hyper-stupid way to handle sparse tables | 160 //Mechanical way, handling sparse/incomplete tables |
161 static const uint8_t vc9_norm6_first[2][64] = { | 161 #if VLC_NORM6_METH0D == 2 |
162 //(2,5) is VLC+FLC, (3,5) double VLC | |
163 static const uint8_t vc9_norm6_first[24][2] = { | |
162 { 1, 1}, { 2, 4}, { 3, 4}, { 0, 8}, | 164 { 1, 1}, { 2, 4}, { 3, 4}, { 0, 8}, |
163 { 4, 4}, { 5, 1}, { 2, 8}, { 2, 5}, | 165 { 4, 4}, { 1, 8}, { 2, 8}, { 5, 4}, |
164 { 5, 4}, { 3, 8}, { 4, 8}, { 2, 5}, | 166 { 3, 8}, { 4, 8}, { 5, 8}, { 6, 4}, |
165 { 5, 8}, { 2, 5}, { 2, 5}, { 3, 5}, | 167 { 6, 8}, { 7, 8}, { 8, 8}, { 9, 8}, |
166 { 6, 4}, { 6, 8}, { 7, 8}, { 2, 5}, | 168 { 7, 4}, { 10, 8}, { 11, 8}, { 12, 8}, |
167 { 8, 8}, { 2, 5}, { 2, 5}, { 3, 5}, | 169 { 13, 8}, { 14, 8}, { 2, 5}, { 3, 5} |
168 { 9, 8}, { 2, 5}, { 2, 5}, { 3, 5}, | 170 }; |
169 { 2, 5}, { 3, 5}, { 3, 5}, { 3, 5}, | 171 |
170 { 7, 4}, { 10, 8}, { 11, 8}, { 2, 5}, | 172 static const uint8_t vc9_norm6_second[22][2] = { |
171 { 12, 8}, { 2, 5}, { 2, 5}, { 3, 5}, | |
172 { 13, 8}, { 2, 5}, { 2, 5}, { 3, 5}, | |
173 { 2, 5}, { 3, 5}, { 3, 5}, { 3, 5}, | |
174 { 14, 8}, { 2, 5}, { 2, 5}, { 3, 5}, | |
175 { 2, 5}, { 3, 5}, { 3, 5}, { 3, 5}, | |
176 { 2, 5}, { 3, 5}, { 3, 5}, { 3, 5}, | |
177 { 3, 5}, { 3, 5}, { 3, 5}, { 3, 5} | |
178 }; | |
179 | |
180 /* 0=>simple VLC, 1=>VLCFLC, 2=>double VLC */ | |
181 static const int vc9_norm6_mode[64] = { | |
182 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 2, | |
183 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 2, | |
184 0, 0, 0, 1, 0, 1, 1, 2, 0, 1, 1, 2, 1, 2, 2, 2, | |
185 0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2 | |
186 }; | |
187 static const uint8_t vc9_norm6_second[22] = { | |
188 { 14, 8}, { 13, 8}, { 12, 8}, { 11, 8}, | 173 { 14, 8}, { 13, 8}, { 12, 8}, { 11, 8}, |
189 { 10, 8}, { 7, 4}, { 9, 8}, { 8, 8}, | 174 { 10, 8}, { 7, 4}, { 9, 8}, { 8, 8}, |
190 { 7, 8}, { 6, 8}, { 6, 4}, { 5, 8}, | 175 { 7, 8}, { 6, 8}, { 6, 4}, { 5, 8}, |
191 { 4, 8}, { 3, 8}, { 5, 4}, { 2, 8}, | 176 { 4, 8}, { 3, 8}, { 5, 4}, { 2, 8}, |
192 { 1, 8}, { 4, 4}, { 0, 8}, { 3, 4}, | 177 { 1, 8}, { 4, 4}, { 0, 8}, { 3, 4}, |