- 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

Originally committed as revision 3882 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
anonymous 2005-01-24 23:01:18 +00:00 committed by Michael Niedermayer
parent b299f0d907
commit e5540b3fd3
2 changed files with 561 additions and 268 deletions

File diff suppressed because it is too large Load Diff

View File

@ -240,7 +240,7 @@ static const uint8_t vc9_cbpcy_p_bits[4][64] = {
}
};
/* MacroBlock Transform Type
/* MacroBlock Transform Type: 7.1.3.11, p89
* 8x8:B
* 8x4:B:btm 8x4:B:top 8x4:B:both,
* 4x8:B:right 4x8:B:left 4x8:B:both
@ -272,7 +272,7 @@ static const uint16_t vc9_ttmb_codes[3][16] = {
0x0000, 0x000E, 0x0005,
0x0002, 0x0003, 0x0003,
0x000F, 0x0002,
0x0081, 0x0011, 0x0009,
0x0081, 0x0021, 0x0009,
0x0101, 0x0041, 0x0011,
0x0100
}
@ -302,8 +302,8 @@ static const uint8_t vc9_ttmb_bits[3][16] = {
3, 4, 5,
3, 3, 4,
4, 2,
9, 7, 6,
10, 9, 7,
10, 8, 6,
11, 9, 7,
11
}
};
@ -392,7 +392,7 @@ static const uint8_t vc9_mv_diff_bits[4][73] = {
}
};
/* DC luma differentials low+hi-mo, p217 */
/* DC differentials low+hi-mo, p217 */
//same as msmpeg4 table0/1_dc_lum
static const uint32_t vc9_luma_dc_codes[2][120] = {
{
@ -442,6 +442,7 @@ static const uint8_t vc9_luma_dc_bits[2][120] = {
24, 24, 24, 24, 24, 24, 24, 24 /* lowmo, 120 values */
},
{
2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7,
7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10,
10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14,
@ -453,6 +454,63 @@ static const uint8_t vc9_luma_dc_bits[2][120] = {
}
};
/* DC chroma differentials low+hi-mo */
static const uint32_t vc9_chroma_dc_codes[2][120] = {
{
0, 1, 5, 9, 13, 17, 29, 31,
33, 49, 56, 51, 57, 61, 97, 121,
128, 200, 202, 240, 129, 192, 201, 263,
262, 406, 387, 483, 482, 522, 523, 1545,
1042, 1043, 1547, 1041, 1546, 1631, 1040, 1629,
1630, 3256, 3088, 3257, 6179, 12357, 24713, 49424,
3163208, 3163209, 3163210, 3163211, 3163212, 3163213, 3163214, 3163215,
3163216, 3163217, 3163218, 3163219, 3163220, 3163221, 3163222, 3163223,
3163224, 3163225, 3163226, 3163227, 3163228, 3163229, 3163230, 3163231,
3163232, 3163233, 3163234, 3163235, 3163236, 3163237, 3163238, 3163239,
3163240, 3163241, 3163242, 3163243, 3163244, 3163245, 3163248, 3163231,
3163248, 3163249, 3163250, 3163251, 3163252, 3163253, 3163254, 3163255,
3163256, 3163257, 3163258, 3163259, 3163260, 3163261, 3163262, 3163263,
6326400, 6326401, 6326402, 6326403, 6326404, 6326405, 6326406, 6326407,
6326408, 6326409, 6326410, 6326411, 6326412, 6326413, 6326414, 6326415
},
{
0, 1, 4, 7, 11, 13, 21, 40,
48, 50, 82, 98, 102, 166, 198, 207,
335, 398, 412, 669, 826, 1336, 1596, 1598,
1599, 1654, 2675, 3194, 3311, 5349, 6621, 10696,
10697, 25565, 13240, 13241, 51126, 25560, 25567, 51123,
51124, 51125, 25566, 51127, 51128, 51129, 102245, 204488,
13087304,13087305,13087306,13087307,13087308,13087309,13087310,13087311,
13087312,13087313,13087314,13087315,13087316,13087317,13087318,13087319,
13087320,13087321,13087322,13087323,13087324,13087325,13087326,13087327,
13087328,13087329,13087330,13087331,13087332,13087333,13087334,13087335,
13087336,13087337,13087338,13087339,13087340,13087341,13087342,13087343,
13087344,13087345,13087346,13087347,13087348,13087349,13087350,13087351,
13087352,13087353,13087354,13087355,13087356,13087357,13087358,13087359,
26174592,26174593,26174594,26174595,26174596,26174597,26174598,26174599,
26174600,26174601,26174602,26174603,26174604,26174605,26174606,26174607
}
};
static const uint8_t vc9_chroma_dc_bits[2][120] = {
{
2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7,
8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 11,
11, 11, 11, 11, 12, 12, 12, 13, 14, 15, 16, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23 /* lowmo, 120 values */
},
{
2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8,
9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14,
14, 15, 14, 14, 16, 15, 15, 16, 16, 16, 15, 16, 16, 16, 17, 18,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25,
25, 25, 25, 25, 25, 25, 25, 25 /* himo, 120 values */
},
};
/* Scantables/ZZ scan are at 11.9 (p262) and 8.1.1.12 (p10) */
#endif /* VC9DATA_H */