comparison vc9data.h @ 2462:5fd4de95731f libavcodec

Fixes: - i/p/b_decode_mbs functions now checks the proper values (from bitplane). I didn't find it very clear, but it seems "raw" = "to read at the MB layer". I used a structure, but we could spare that indirection and add a flag in the VC9Context for each array. - Properly decode (or so I think) the CBPCY (as it is predicted) - many more things patch by anonymous
author michael
date Mon, 24 Jan 2005 23:01:18 +0000
parents 42077bb89a53
children 5565203c95ee
comparison
equal deleted inserted replaced
2461:1d818bf32736 2462:5fd4de95731f
238 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 238 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
239 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8 239 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8
240 } 240 }
241 }; 241 };
242 242
243 /* MacroBlock Transform Type 243 /* MacroBlock Transform Type: 7.1.3.11, p89
244 * 8x8:B 244 * 8x8:B
245 * 8x4:B:btm 8x4:B:top 8x4:B:both, 245 * 8x4:B:btm 8x4:B:top 8x4:B:both,
246 * 4x8:B:right 4x8:B:left 4x8:B:both 246 * 4x8:B:right 4x8:B:left 4x8:B:both
247 * 4x4:B 8x8:MB 247 * 4x4:B 8x8:MB
248 * 8x4:MB:btm 8x4:MB:top 8x4,MB,both 248 * 8x4:MB:btm 8x4:MB:top 8x4,MB,both
270 { 270 {
271 0x0006, 271 0x0006,
272 0x0000, 0x000E, 0x0005, 272 0x0000, 0x000E, 0x0005,
273 0x0002, 0x0003, 0x0003, 273 0x0002, 0x0003, 0x0003,
274 0x000F, 0x0002, 274 0x000F, 0x0002,
275 0x0081, 0x0011, 0x0009, 275 0x0081, 0x0021, 0x0009,
276 0x0101, 0x0041, 0x0011, 276 0x0101, 0x0041, 0x0011,
277 0x0100 277 0x0100
278 } 278 }
279 }; 279 };
280 280
300 { 300 {
301 3, 301 3,
302 3, 4, 5, 302 3, 4, 5,
303 3, 3, 4, 303 3, 3, 4,
304 4, 2, 304 4, 2,
305 9, 7, 6, 305 10, 8, 6,
306 10, 9, 7, 306 11, 9, 7,
307 11 307 11
308 } 308 }
309 }; 309 };
310 310
311 311
390 5, 4, 3, 5, 6, 8, 7, 5, 5, 5, 6, 7, 9, 7, 6, 6, 390 5, 4, 3, 5, 6, 8, 7, 5, 5, 5, 6, 7, 9, 7, 6, 6,
391 6, 7, 10, 8, 8, 8, 7, 7, 4 /* 73 elements */ 391 6, 7, 10, 8, 8, 8, 7, 7, 4 /* 73 elements */
392 } 392 }
393 }; 393 };
394 394
395 /* DC luma differentials low+hi-mo, p217 */ 395 /* DC differentials low+hi-mo, p217 */
396 //same as msmpeg4 table0/1_dc_lum 396 //same as msmpeg4 table0/1_dc_lum
397 static const uint32_t vc9_luma_dc_codes[2][120] = { 397 static const uint32_t vc9_luma_dc_codes[2][120] = {
398 { 398 {
399 1, 1, 1, 1, 5, 7, 8, 12, 399 1, 1, 1, 1, 5, 7, 8, 12,
400 0, 2, 18, 26, 3, 7, 39, 55, 400 0, 2, 18, 26, 3, 7, 39, 55,
440 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 440 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
441 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 441 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24,
442 24, 24, 24, 24, 24, 24, 24, 24 /* lowmo, 120 values */ 442 24, 24, 24, 24, 24, 24, 24, 24 /* lowmo, 120 values */
443 }, 443 },
444 { 444 {
445
445 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 446 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7,
446 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 447 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10,
447 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 448 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14,
448 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 17, 17, 17, 17, 18, 18, 449 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 17, 17, 17, 17, 18, 18,
449 19, 19, 19, 20, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 450 19, 19, 19, 20, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
451 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 452 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
452 26, 26, 26, 26, 26, 26, 26, 26 /* himo, 120 values */ 453 26, 26, 26, 26, 26, 26, 26, 26 /* himo, 120 values */
453 } 454 }
454 }; 455 };
455 456
456 /* DC chroma differentials low+hi-mo */ 457 static const uint32_t vc9_chroma_dc_codes[2][120] = {
458 {
459 0, 1, 5, 9, 13, 17, 29, 31,
460 33, 49, 56, 51, 57, 61, 97, 121,
461 128, 200, 202, 240, 129, 192, 201, 263,
462 262, 406, 387, 483, 482, 522, 523, 1545,
463 1042, 1043, 1547, 1041, 1546, 1631, 1040, 1629,
464 1630, 3256, 3088, 3257, 6179, 12357, 24713, 49424,
465 3163208, 3163209, 3163210, 3163211, 3163212, 3163213, 3163214, 3163215,
466 3163216, 3163217, 3163218, 3163219, 3163220, 3163221, 3163222, 3163223,
467 3163224, 3163225, 3163226, 3163227, 3163228, 3163229, 3163230, 3163231,
468 3163232, 3163233, 3163234, 3163235, 3163236, 3163237, 3163238, 3163239,
469 3163240, 3163241, 3163242, 3163243, 3163244, 3163245, 3163248, 3163231,
470 3163248, 3163249, 3163250, 3163251, 3163252, 3163253, 3163254, 3163255,
471 3163256, 3163257, 3163258, 3163259, 3163260, 3163261, 3163262, 3163263,
472 6326400, 6326401, 6326402, 6326403, 6326404, 6326405, 6326406, 6326407,
473 6326408, 6326409, 6326410, 6326411, 6326412, 6326413, 6326414, 6326415
474 },
475 {
476 0, 1, 4, 7, 11, 13, 21, 40,
477 48, 50, 82, 98, 102, 166, 198, 207,
478 335, 398, 412, 669, 826, 1336, 1596, 1598,
479 1599, 1654, 2675, 3194, 3311, 5349, 6621, 10696,
480 10697, 25565, 13240, 13241, 51126, 25560, 25567, 51123,
481 51124, 51125, 25566, 51127, 51128, 51129, 102245, 204488,
482 13087304,13087305,13087306,13087307,13087308,13087309,13087310,13087311,
483 13087312,13087313,13087314,13087315,13087316,13087317,13087318,13087319,
484 13087320,13087321,13087322,13087323,13087324,13087325,13087326,13087327,
485 13087328,13087329,13087330,13087331,13087332,13087333,13087334,13087335,
486 13087336,13087337,13087338,13087339,13087340,13087341,13087342,13087343,
487 13087344,13087345,13087346,13087347,13087348,13087349,13087350,13087351,
488 13087352,13087353,13087354,13087355,13087356,13087357,13087358,13087359,
489 26174592,26174593,26174594,26174595,26174596,26174597,26174598,26174599,
490 26174600,26174601,26174602,26174603,26174604,26174605,26174606,26174607
491 }
492 };
493 static const uint8_t vc9_chroma_dc_bits[2][120] = {
494 {
495 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7,
496 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11,
497 11, 11, 11, 11, 12, 12, 12, 13, 14, 15, 16, 22, 22, 22, 22, 22,
498 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
499 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
500 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
501 23, 23, 23, 23, 23, 23, 23, 23 /* lowmo, 120 values */
502 },
503 {
504 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8,
505 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14,
506 14, 15, 14, 14, 16, 15, 15, 16, 16, 16, 15, 16, 16, 16, 17, 18,
507 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
508 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
509 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25,
510 25, 25, 25, 25, 25, 25, 25, 25 /* himo, 120 values */
511 },
512 };
513
514 /* Scantables/ZZ scan are at 11.9 (p262) and 8.1.1.12 (p10) */
457 515
458 #endif /* VC9DATA_H */ 516 #endif /* VC9DATA_H */