comparison h264data.h @ 2967:ef2149182f1c libavcodec

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents 71ca5ed04789
children 0b546eab515d
comparison
equal deleted inserted replaced
2966:564788471dd4 2967:ef2149182f1c
18 * 18 *
19 */ 19 */
20 20
21 /** 21 /**
22 * @file h264data.h 22 * @file h264data.h
23 * @brief 23 * @brief
24 * H264 / AVC / MPEG4 part10 codec data table 24 * H264 / AVC / MPEG4 part10 codec data table
25 * @author Michael Niedermayer <michaelni@gmx.at> 25 * @author Michael Niedermayer <michaelni@gmx.at>
26 */ 26 */
27 27
28 #define VERT_PRED 0 28 #define VERT_PRED 0
85 static const uint8_t golomb_to_intra4x4_cbp[48]={ 85 static const uint8_t golomb_to_intra4x4_cbp[48]={
86 47, 31, 15, 0, 23, 27, 29, 30, 7, 11, 13, 14, 39, 43, 45, 46, 86 47, 31, 15, 0, 23, 27, 29, 30, 7, 11, 13, 14, 39, 43, 45, 46,
87 16, 3, 5, 10, 12, 19, 21, 26, 28, 35, 37, 42, 44, 1, 2, 4, 87 16, 3, 5, 10, 12, 19, 21, 26, 28, 35, 37, 42, 44, 1, 2, 4,
88 8, 17, 18, 20, 24, 6, 9, 22, 25, 32, 33, 34, 36, 40, 38, 41 88 8, 17, 18, 20, 24, 6, 9, 22, 25, 32, 33, 34, 36, 40, 38, 41
89 }; 89 };
90 90
91 static const uint8_t golomb_to_inter_cbp[48]={ 91 static const uint8_t golomb_to_inter_cbp[48]={
92 0, 16, 1, 2, 4, 8, 32, 3, 5, 10, 12, 15, 47, 7, 11, 13, 92 0, 16, 1, 2, 4, 8, 32, 3, 5, 10, 12, 15, 47, 7, 11, 13,
93 14, 6, 9, 31, 35, 37, 42, 44, 33, 34, 36, 40, 39, 43, 45, 46, 93 14, 6, 9, 31, 35, 37, 42, 44, 33, 34, 36, 40, 39, 43, 45, 46,
94 17, 18, 20, 24, 19, 21, 26, 28, 23, 27, 29, 30, 22, 25, 38, 41 94 17, 18, 20, 24, 19, 21, 26, 28, 23, 27, 29, 30, 22, 25, 38, 41
95 }; 95 };
97 static const uint8_t intra4x4_cbp_to_golomb[48]={ 97 static const uint8_t intra4x4_cbp_to_golomb[48]={
98 3, 29, 30, 17, 31, 18, 37, 8, 32, 38, 19, 9, 20, 10, 11, 2, 98 3, 29, 30, 17, 31, 18, 37, 8, 32, 38, 19, 9, 20, 10, 11, 2,
99 16, 33, 34, 21, 35, 22, 39, 4, 36, 40, 23, 5, 24, 6, 7, 1, 99 16, 33, 34, 21, 35, 22, 39, 4, 36, 40, 23, 5, 24, 6, 7, 1,
100 41, 42, 43, 25, 44, 26, 46, 12, 45, 47, 27, 13, 28, 14, 15, 0 100 41, 42, 43, 25, 44, 26, 46, 12, 45, 47, 27, 13, 28, 14, 15, 0
101 }; 101 };
102 102
103 static const uint8_t inter_cbp_to_golomb[48]={ 103 static const uint8_t inter_cbp_to_golomb[48]={
104 0, 2, 3, 7, 4, 8, 17, 13, 5, 18, 9, 14, 10, 15, 16, 11, 104 0, 2, 3, 7, 4, 8, 17, 13, 5, 18, 9, 14, 10, 15, 16, 11,
105 1, 32, 33, 36, 34, 37, 44, 40, 35, 45, 38, 41, 39, 42, 43, 19, 105 1, 32, 33, 36, 34, 37, 44, 40, 35, 45, 38, 41, 39, 42, 43, 19,
106 6, 24, 25, 20, 26, 21, 46, 28, 27, 47, 22, 29, 23, 30, 31, 12 106 6, 24, 25, 20, 26, 21, 46, 28, 27, 47, 22, 29, 23, 30, 31, 12
107 }; 107 };
183 48,49,50,51, 52,53,54,55, 56,57,58,59, 60,61,62,63, 183 48,49,50,51, 52,53,54,55, 56,57,58,59, 60,61,62,63,
184 } 184 }
185 }; 185 };
186 186
187 static const uint8_t total_zeros_len[16][16]= { 187 static const uint8_t total_zeros_len[16][16]= {
188 {1,3,3,4,4,5,5,6,6,7,7,8,8,9,9,9}, 188 {1,3,3,4,4,5,5,6,6,7,7,8,8,9,9,9},
189 {3,3,3,3,3,4,4,4,4,5,5,6,6,6,6}, 189 {3,3,3,3,3,4,4,4,4,5,5,6,6,6,6},
190 {4,3,3,3,4,4,3,3,4,5,5,6,5,6}, 190 {4,3,3,3,4,4,3,3,4,5,5,6,5,6},
191 {5,3,4,4,3,3,3,4,3,4,5,5,5}, 191 {5,3,4,4,3,3,3,4,3,4,5,5,5},
192 {4,4,4,3,3,3,3,3,4,5,4,5}, 192 {4,4,4,3,3,3,3,3,4,5,4,5},
193 {6,5,3,3,3,3,3,3,4,3,6}, 193 {6,5,3,3,3,3,3,3,4,3,6},
194 {6,5,3,3,3,2,3,4,3,6}, 194 {6,5,3,3,3,2,3,4,3,6},
195 {6,4,5,3,2,2,3,3,6}, 195 {6,4,5,3,2,2,3,3,6},
196 {6,6,4,2,2,3,2,5}, 196 {6,6,4,2,2,3,2,5},
197 {5,5,3,2,2,2,4}, 197 {5,5,3,2,2,2,4},
198 {4,4,3,3,1,3}, 198 {4,4,3,3,1,3},
199 {4,4,2,1,3}, 199 {4,4,2,1,3},
200 {3,3,1,2}, 200 {3,3,1,2},
201 {2,2,1}, 201 {2,2,1},
202 {1,1}, 202 {1,1},
203 }; 203 };
204 204
205 static const uint8_t total_zeros_bits[16][16]= { 205 static const uint8_t total_zeros_bits[16][16]= {
206 {1,3,2,3,2,3,2,3,2,3,2,3,2,3,2,1}, 206 {1,3,2,3,2,3,2,3,2,3,2,3,2,3,2,1},
207 {7,6,5,4,3,5,4,3,2,3,2,3,2,1,0}, 207 {7,6,5,4,3,5,4,3,2,3,2,3,2,1,0},
221 }; 221 };
222 222
223 static const uint8_t chroma_dc_total_zeros_len[3][4]= { 223 static const uint8_t chroma_dc_total_zeros_len[3][4]= {
224 { 1, 2, 3, 3,}, 224 { 1, 2, 3, 3,},
225 { 1, 2, 2, 0,}, 225 { 1, 2, 2, 0,},
226 { 1, 1, 0, 0,}, 226 { 1, 1, 0, 0,},
227 }; 227 };
228 228
229 static const uint8_t chroma_dc_total_zeros_bits[3][4]= { 229 static const uint8_t chroma_dc_total_zeros_bits[3][4]= {
230 { 1, 1, 1, 0,}, 230 { 1, 1, 1, 0,},
231 { 1, 1, 0, 0,}, 231 { 1, 1, 0, 0,},
272 1+4*8, 2+4*8, 272 1+4*8, 2+4*8,
273 1+5*8, 2+5*8, 273 1+5*8, 2+5*8,
274 }; 274 };
275 275
276 static const uint8_t zigzag_scan[16]={ 276 static const uint8_t zigzag_scan[16]={
277 0+0*4, 1+0*4, 0+1*4, 0+2*4, 277 0+0*4, 1+0*4, 0+1*4, 0+2*4,
278 1+1*4, 2+0*4, 3+0*4, 2+1*4, 278 1+1*4, 2+0*4, 3+0*4, 2+1*4,
279 1+2*4, 0+3*4, 1+3*4, 2+2*4, 279 1+2*4, 0+3*4, 1+3*4, 2+2*4,
280 3+1*4, 3+2*4, 2+3*4, 3+3*4, 280 3+1*4, 3+2*4, 2+3*4, 3+3*4,
281 }; 281 };
282 282
283 static const uint8_t field_scan[16]={ 283 static const uint8_t field_scan[16]={
284 0+0*4, 0+1*4, 1+0*4, 0+2*4, 284 0+0*4, 0+1*4, 1+0*4, 0+2*4,
285 0+3*4, 1+1*4, 1+2*4, 1+3*4, 285 0+3*4, 1+1*4, 1+2*4, 1+3*4,
286 2+0*4, 2+1*4, 2+2*4, 2+3*4, 286 2+0*4, 2+1*4, 2+2*4, 2+3*4,
287 3+0*4, 3+1*4, 3+2*4, 3+3*4, 287 3+0*4, 3+1*4, 3+2*4, 3+3*4,
288 }; 288 };
289 289
290 static const uint8_t luma_dc_zigzag_scan[16]={ 290 static const uint8_t luma_dc_zigzag_scan[16]={
291 0*16 + 0*64, 1*16 + 0*64, 2*16 + 0*64, 0*16 + 2*64, 291 0*16 + 0*64, 1*16 + 0*64, 2*16 + 0*64, 0*16 + 2*64,
293 1*16 + 2*64, 2*16 + 2*64, 3*16 + 2*64, 0*16 + 3*64, 293 1*16 + 2*64, 2*16 + 2*64, 3*16 + 2*64, 0*16 + 3*64,
294 3*16 + 1*64, 1*16 + 3*64, 2*16 + 3*64, 3*16 + 3*64, 294 3*16 + 1*64, 1*16 + 3*64, 2*16 + 3*64, 3*16 + 3*64,
295 }; 295 };
296 296
297 static const uint8_t luma_dc_field_scan[16]={ 297 static const uint8_t luma_dc_field_scan[16]={
298 0*16 + 0*64, 2*16 + 0*64, 1*16 + 0*64, 0*16 + 2*64, 298 0*16 + 0*64, 2*16 + 0*64, 1*16 + 0*64, 0*16 + 2*64,
299 2*16 + 2*64, 3*16 + 0*64, 1*16 + 2*64, 3*16 + 2*64, 299 2*16 + 2*64, 3*16 + 0*64, 1*16 + 2*64, 3*16 + 2*64,
300 0*16 + 1*64, 2*16 + 1*64, 0*16 + 3*64, 2*16 + 3*64, 300 0*16 + 1*64, 2*16 + 1*64, 0*16 + 3*64, 2*16 + 3*64,
301 1*16 + 1*64, 3*16 + 1*64, 1*16 + 3*64, 3*16 + 3*64, 301 1*16 + 1*64, 3*16 + 1*64, 1*16 + 3*64, 3*16 + 3*64,
302 }; 302 };
303 303
304 static const uint8_t chroma_dc_scan[4]={ 304 static const uint8_t chroma_dc_scan[4]={
305 (0+0*2)*16, (1+0*2)*16, 305 (0+0*2)*16, (1+0*2)*16,
306 (0+1*2)*16, (1+1*2)*16, //FIXME 306 (0+1*2)*16, (1+1*2)*16, //FIXME
307 }; 307 };
308 308
309 static const uint8_t zigzag_scan8x8[64]={ 309 static const uint8_t zigzag_scan8x8[64]={
310 0+0*8, 1+0*8, 0+1*8, 0+2*8, 310 0+0*8, 1+0*8, 0+1*8, 0+2*8,
448 {MB_TYPE_8x8 |MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_P1L0|MB_TYPE_P1L1, 4, }, 448 {MB_TYPE_8x8 |MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_P1L0|MB_TYPE_P1L1, 4, },
449 }; 449 };
450 450
451 451
452 static const uint8_t rem6[52]={ 452 static const uint8_t rem6[52]={
453 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 453 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
454 }; 454 };
455 455
456 static const uint8_t div6[52]={ 456 static const uint8_t div6[52]={
457 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 457 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
458 }; 458 };