VC-1 Tables: Difference between revisions
Jump to navigation
Jump to search
(→Interpolation: combine shift tables with filter coefficients) |
|||
(15 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
''(Part of [[Understanding VC-1]])'' | ''(Part of [[Understanding VC-1]])'' | ||
== Motion Vector Range VLC Table == | == Motion Vector Range VLC Table == | ||
Line 83: | Line 57: | ||
}; | }; | ||
=== Transform Matrix | === Transform Matrix 4x4 === | ||
int transform_matrix_4x4[4][4] = | int transform_matrix_4x4[4][4] = | ||
{ | { | ||
Line 102: | Line 76: | ||
* 1/2 pel coordinate: {-1, 9, 9, -1}, divisor = 16 = 2<sup>4</sup> | * 1/2 pel coordinate: {-1, 9, 9, -1}, divisor = 16 = 2<sup>4</sup> | ||
* 3/4 pel coordinate: {-3, 18, 53, -4}, divisor = 64 = 2<sup>6</sup> | * 3/4 pel coordinate: {-3, 18, 53, -4}, divisor = 64 = 2<sup>6</sup> | ||
== Bilinear Filter Coefficients == | |||
* array a: {4, 3, 2, 1} | |||
* array b: {0, 1, 2, 3} | |||
== DC Differential VLC Tables == | |||
=== Low Motion Luminance (Y) Table === | |||
=== High Motion Luminance (Y) Table === | |||
=== Low Motion Chrominance (C) Table === | |||
=== High Motion Chrominance (C) Table === | |||
== Transform Type VLC Tables == | |||
=== 1 <= PQuant <= 4 === | |||
=== 5 <= PQuant <= 12 === | |||
=== 13 <= PQuant <= 31 === | |||
== Macroblock Transform Type VLC Tables == | |||
=== 1 <= PQuant <= 4 === | |||
{0, 16, 12}, | |||
{0, 2, vc1_SBP8x4Both}, {3, 2, vc1_SBP8x8}, | |||
{1, 2, vc1_SBP4x8Both}, {4, 3, vc1_SBP4x4}, | |||
{22, 5, vc1_SBP4x8Right}, {21, 5, vc1_SBP4x8Left}, | |||
{20, 5, vc1_SBP8x8MB}, {46, 6, vc1_SBP8x4Bottom}, | |||
{95, 7, vc1_SBP8x4Top}, {377, 9, vc1_SBP8x4TopMB}, | |||
{379, 9, vc1_SBP8x4BothMB}, {378, 9, vc1_SBP4x4MB}, | |||
{753, 10, vc1_SBP8x4BottomMB}, {1505, 11, vc1_SBP4x8BothMB}, | |||
{3008, 12, vc1_SBP4x8RightMB}, {3009, 12, vc1_SBP4x8LeftMB}, | |||
=== 5 <= PQuant <= 12 === | |||
=== 13 <= PQuant <= 31 === | |||
== Inter-coded Sub-block Coding Pattern VLC Tables == | |||
=== 1 <= PQuant <= 4 === | |||
=== 5 <= PQuant <= 12 === | |||
=== 13 <= PQuant <= 31 === | |||
== Coded Block Pattern VLC Tables == | |||
=== Table 0 === | |||
=== Table 1 === | |||
=== Table 2 === | |||
=== Table 3 === | |||
== I-Frame Coded Block Pattern VLC Table == | |||
''SRD: vc1DEC_I_Picture_CBPCY_VLC'' | |||
== Implicit Non-Uniform Quantizers == | |||
''SRD: vc1IQUANT_NonUniformImplicit'' | |||
unsigned char non_uniform_implicit_quantizers[32] = | |||
{ | |||
0, 0, 0, 0, 0, 0, 0, 0, | |||
0, 6, 7, 8, 9, 10, 11, 12, | |||
13, 14, 15, 16, 17, 18, 19, 20, | |||
21, 22, 23, 24, 25, 27, 29, 31 | |||
}; | |||
== 3D Huffman Tables == | |||
This SRD refers to a system of 3D Huffman decoding. The 3-dimensional table is laid out as such: | |||
vc1DEC3DH_pACCodingSets | |||
+- 0: (inter) | |||
+- vc1DEC3DH_HighRateInter | |||
+- vc1DEC3DH_HighMotInter | |||
+- vc1DEC3DH_MidRateInter | |||
+- 1: (inter) | |||
+- vc1DEC3DH_LowMotInter | |||
+- vc1DEC3DH_HighMotInter | |||
+- vc1DEC3DH_MidRateInter | |||
+- 2: (intra) | |||
+- vc1DEC3DH_HighRateIntra | |||
+- vc1DEC3DH_HighMotIntra | |||
+- vc1DEC3DH_MidRateIntra | |||
+- 3: (intra) | |||
+- vc1DEC3DH_LowMotIntra | |||
+- vc1DEC3DH_HighMotIntra | |||
+- vc1DEC3DH_MidRateIntra | |||
Thus, there are 8 [[VC-1 Data Structures#AC Coding Set|AC coding sets]] used in 12 positions: | |||
=== Intraframe Coding Sets === | |||
==== vc1DEC3DH_LowMotIntra ==== | |||
* vc1DEC_Low_Mot_Intra_VLC | |||
* vc1DEC_Low_Mot_Intra_Run_Level | |||
* vc1_Low_Mot_Intra_Delta_Level_0 | |||
* vc1_Low_Mot_Intra_Delta_Run_0 | |||
* vc1_Low_Mot_Intra_Delta_Level_1 | |||
* vc1_Low_Mot_Intra_Delta_Run_1 | |||
==== vc1DEC3DH_MidRateIntra ==== | |||
* vc1DEC_Mid_Rate_Intra_VLC | |||
* vc1DEC_Mid_Rate_Intra_Run_Level | |||
* vc1_Mid_Rate_Intra_Delta_Level_0 | |||
* vc1_Mid_Rate_Intra_Delta_Run_0 | |||
* vc1_Mid_Rate_Intra_Delta_Level_1 | |||
* vc1_Mid_Rate_Intra_Delta_Run_1 | |||
==== vc1DEC3DH_HighMotIntra ==== | |||
* vc1DEC_High_Mot_Intra_VLC | |||
* vc1DEC_High_Mot_Intra_Run_Level | |||
* vc1_High_Mot_Intra_Delta_Level_0 | |||
* vc1_High_Mot_Intra_Delta_Run_0 | |||
* vc1_High_Mot_Intra_Delta_Level_1 | |||
* vc1_High_Mot_Intra_Delta_Run_1 | |||
==== vc1DEC3DH_HighRateIntra ==== | |||
* vc1DEC_High_Rate_Intra_VLC | |||
* vc1DEC_High_Rate_Intra_Run_Level | |||
* vc1_High_Rate_Intra_Delta_Level_0 | |||
* vc1_High_Rate_Intra_Delta_Run_0 | |||
* vc1_High_Rate_Intra_Delta_Level_1 | |||
* vc1_High_Rate_Intra_Delta_Run_1 | |||
=== Interframe Coding Sets === | |||
==== vc1DEC3DH_LowMotInter ==== | |||
* vc1DEC_Low_Mot_Inter_VLC | |||
* vc1DEC_Low_Mot_Inter_Run_Level | |||
* vc1_Low_Mot_Inter_Delta_Level_0 | |||
* vc1_Low_Mot_Inter_Delta_Run_0 | |||
* vc1_Low_Mot_Inter_Delta_Level_1 | |||
* vc1_Low_Mot_Inter_Delta_Run_1 | |||
==== vc1DEC3DH_MidRateInter ==== | |||
* vc1DEC_Mid_Rate_Inter_VLC | |||
* vc1DEC_Mid_Rate_Inter_Run_Level | |||
* vc1_Mid_Rate_Inter_Delta_Level_0 | |||
* vc1_Mid_Rate_Inter_Delta_Run_0 | |||
* vc1_Mid_Rate_Inter_Delta_Level_1 | |||
* vc1_Mid_Rate_Inter_Delta_Run_1 | |||
==== vc1DEC3DH_HighMotInter ==== | |||
* vc1DEC_High_Mot_Inter_VLC | |||
* vc1DEC_High_Mot_Inter_Run_Level | |||
* vc1_High_Mot_Inter_Delta_Level_0 | |||
* vc1_High_Mot_Inter_Delta_Run_0 | |||
* vc1_High_Mot_Inter_Delta_Level_1 | |||
* vc1_High_Mot_Inter_Delta_Run_1 | |||
==== vc1DEC3DH_HighRateInter ==== | |||
* vc1DEC_High_Rate_Inter_VLC | |||
* vc1DEC_High_Rate_Inter_Run_Level | |||
* vc1_High_Rate_Inter_Delta_Level_0 | |||
* vc1_High_Rate_Inter_Delta_Run_0 | |||
* vc1_High_Rate_Inter_Delta_Level_1 | |||
* vc1_High_Rate_Inter_Delta_Run_1 | |||
== Block Escape Mode VLC Tables == | |||
=== 1 <= PQuant <= 7 === | |||
{0, 11, 5}, | |||
{1, 3, 1}, | |||
{2, 3, 2}, | |||
{3, 3, 3}, | |||
{4, 3, 4}, | |||
{5, 3, 5}, | |||
{6, 3, 6}, | |||
{7, 3, 7}, | |||
{0, 5, 8}, | |||
{1, 5, 9}, | |||
{2, 5, 10}, | |||
{3, 5, 11} | |||
=== 8 <= PQuant <= 31 === | |||
{0, 7, 6}, | |||
{1, 1, 2}, | |||
{1, 2, 3}, | |||
{1, 3, 4}, | |||
{1, 4, 5}, | |||
{1, 5, 6}, | |||
{1, 6, 7}, | |||
{0, 6, 8} | |||
== Level Limits == | |||
This table defines the level limits at all various profile/level combinations. The types of parameters limited in this table are defined in the [[VC-1 Data Structures#Level Limits|level limits]] data structure. |
Latest revision as of 04:41, 9 December 2006
(Part of Understanding VC-1)
Motion Vector Range VLC Table
code length VLC range # 1 0 0 2 2 1 3 6 2 3 7 3
B Fraction VLC Table
P-Frame Low Rate Motion Vector Mode Table
P-Frame High Rate Motion Vector Mode Table
Motion Vector Diff VLC Tables
Table 0
Table 1
Table 2
Table 3
Coded Block Pattern VLC Tables
Table 0
Table 1
Table 2
Table 3
Bitplane I-mode VLC Table
Norm-2 VLC Table
Norm-6 VLC Table
Transform Tables
These tables pertain to vc1ITRANS_InverseTransform_AnnexA1.
Transform Matrix 8x8
int transform_matrix_8x8[8][8] = { { 12, 12, 12, 12, 12, 12, 12, 12 }, { 16, 15, 9, 4, -4, -9, -15, -16 }, { 16, 6, -6, -16, -16, -6, 6, 16 }, { 15, -4, -16, -9, 9, 16, 4, -15 }, { 12, -12, -12, 12, 12, -12, -12, 12 }, { 9, -16, 4, 15, -15, -4, 16, -9 }, { 6, -16, 16, -6, -6, 16, -16, 6 }, { 4, -9, 15, -16, 16, -15, 9, -4 } };
Transform Matrix 4x4
int transform_matrix_4x4[4][4] = { { 17, 17, 17, 17 }, { 22, 10, -10, -22 }, { 17, -17, -17, 17 }, { 10, -22, 22, -10 } };
Constants 8
int constants_8 = { 0, 0, 0, 0, 1, 1, 1, 1 };
Constants 4
int constants_4 = { 0, 0, 0, 0 };
Bicubic Filter Coefficients
- 1/4 pel coordinate: {-4, 53, 18, -3}, divisor = 64 = 26
- 1/2 pel coordinate: {-1, 9, 9, -1}, divisor = 16 = 24
- 3/4 pel coordinate: {-3, 18, 53, -4}, divisor = 64 = 26
Bilinear Filter Coefficients
- array a: {4, 3, 2, 1}
- array b: {0, 1, 2, 3}
DC Differential VLC Tables
Low Motion Luminance (Y) Table
High Motion Luminance (Y) Table
Low Motion Chrominance (C) Table
High Motion Chrominance (C) Table
Transform Type VLC Tables
1 <= PQuant <= 4
5 <= PQuant <= 12
13 <= PQuant <= 31
Macroblock Transform Type VLC Tables
1 <= PQuant <= 4
{0, 16, 12},
{0, 2, vc1_SBP8x4Both}, {3, 2, vc1_SBP8x8}, {1, 2, vc1_SBP4x8Both}, {4, 3, vc1_SBP4x4}, {22, 5, vc1_SBP4x8Right}, {21, 5, vc1_SBP4x8Left}, {20, 5, vc1_SBP8x8MB}, {46, 6, vc1_SBP8x4Bottom}, {95, 7, vc1_SBP8x4Top}, {377, 9, vc1_SBP8x4TopMB}, {379, 9, vc1_SBP8x4BothMB}, {378, 9, vc1_SBP4x4MB}, {753, 10, vc1_SBP8x4BottomMB}, {1505, 11, vc1_SBP4x8BothMB}, {3008, 12, vc1_SBP4x8RightMB}, {3009, 12, vc1_SBP4x8LeftMB},
5 <= PQuant <= 12
13 <= PQuant <= 31
Inter-coded Sub-block Coding Pattern VLC Tables
1 <= PQuant <= 4
5 <= PQuant <= 12
13 <= PQuant <= 31
Coded Block Pattern VLC Tables
Table 0
Table 1
Table 2
Table 3
I-Frame Coded Block Pattern VLC Table
SRD: vc1DEC_I_Picture_CBPCY_VLC
Implicit Non-Uniform Quantizers
SRD: vc1IQUANT_NonUniformImplicit
unsigned char non_uniform_implicit_quantizers[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 31 };
3D Huffman Tables
This SRD refers to a system of 3D Huffman decoding. The 3-dimensional table is laid out as such:
vc1DEC3DH_pACCodingSets +- 0: (inter) +- vc1DEC3DH_HighRateInter +- vc1DEC3DH_HighMotInter +- vc1DEC3DH_MidRateInter +- 1: (inter) +- vc1DEC3DH_LowMotInter +- vc1DEC3DH_HighMotInter +- vc1DEC3DH_MidRateInter +- 2: (intra) +- vc1DEC3DH_HighRateIntra +- vc1DEC3DH_HighMotIntra +- vc1DEC3DH_MidRateIntra +- 3: (intra) +- vc1DEC3DH_LowMotIntra +- vc1DEC3DH_HighMotIntra +- vc1DEC3DH_MidRateIntra
Thus, there are 8 AC coding sets used in 12 positions:
Intraframe Coding Sets
vc1DEC3DH_LowMotIntra
- vc1DEC_Low_Mot_Intra_VLC
- vc1DEC_Low_Mot_Intra_Run_Level
- vc1_Low_Mot_Intra_Delta_Level_0
- vc1_Low_Mot_Intra_Delta_Run_0
- vc1_Low_Mot_Intra_Delta_Level_1
- vc1_Low_Mot_Intra_Delta_Run_1
vc1DEC3DH_MidRateIntra
- vc1DEC_Mid_Rate_Intra_VLC
- vc1DEC_Mid_Rate_Intra_Run_Level
- vc1_Mid_Rate_Intra_Delta_Level_0
- vc1_Mid_Rate_Intra_Delta_Run_0
- vc1_Mid_Rate_Intra_Delta_Level_1
- vc1_Mid_Rate_Intra_Delta_Run_1
vc1DEC3DH_HighMotIntra
- vc1DEC_High_Mot_Intra_VLC
- vc1DEC_High_Mot_Intra_Run_Level
- vc1_High_Mot_Intra_Delta_Level_0
- vc1_High_Mot_Intra_Delta_Run_0
- vc1_High_Mot_Intra_Delta_Level_1
- vc1_High_Mot_Intra_Delta_Run_1
vc1DEC3DH_HighRateIntra
- vc1DEC_High_Rate_Intra_VLC
- vc1DEC_High_Rate_Intra_Run_Level
- vc1_High_Rate_Intra_Delta_Level_0
- vc1_High_Rate_Intra_Delta_Run_0
- vc1_High_Rate_Intra_Delta_Level_1
- vc1_High_Rate_Intra_Delta_Run_1
Interframe Coding Sets
vc1DEC3DH_LowMotInter
- vc1DEC_Low_Mot_Inter_VLC
- vc1DEC_Low_Mot_Inter_Run_Level
- vc1_Low_Mot_Inter_Delta_Level_0
- vc1_Low_Mot_Inter_Delta_Run_0
- vc1_Low_Mot_Inter_Delta_Level_1
- vc1_Low_Mot_Inter_Delta_Run_1
vc1DEC3DH_MidRateInter
- vc1DEC_Mid_Rate_Inter_VLC
- vc1DEC_Mid_Rate_Inter_Run_Level
- vc1_Mid_Rate_Inter_Delta_Level_0
- vc1_Mid_Rate_Inter_Delta_Run_0
- vc1_Mid_Rate_Inter_Delta_Level_1
- vc1_Mid_Rate_Inter_Delta_Run_1
vc1DEC3DH_HighMotInter
- vc1DEC_High_Mot_Inter_VLC
- vc1DEC_High_Mot_Inter_Run_Level
- vc1_High_Mot_Inter_Delta_Level_0
- vc1_High_Mot_Inter_Delta_Run_0
- vc1_High_Mot_Inter_Delta_Level_1
- vc1_High_Mot_Inter_Delta_Run_1
vc1DEC3DH_HighRateInter
- vc1DEC_High_Rate_Inter_VLC
- vc1DEC_High_Rate_Inter_Run_Level
- vc1_High_Rate_Inter_Delta_Level_0
- vc1_High_Rate_Inter_Delta_Run_0
- vc1_High_Rate_Inter_Delta_Level_1
- vc1_High_Rate_Inter_Delta_Run_1
Block Escape Mode VLC Tables
1 <= PQuant <= 7
{0, 11, 5}, {1, 3, 1}, {2, 3, 2}, {3, 3, 3}, {4, 3, 4}, {5, 3, 5}, {6, 3, 6}, {7, 3, 7}, {0, 5, 8}, {1, 5, 9}, {2, 5, 10}, {3, 5, 11}
8 <= PQuant <= 31
{0, 7, 6}, {1, 1, 2}, {1, 2, 3}, {1, 3, 4}, {1, 4, 5}, {1, 5, 6}, {1, 6, 7}, {0, 6, 8}
Level Limits
This table defines the level limits at all various profile/level combinations. The types of parameters limited in this table are defined in the level limits data structure.