VC-1 Zigzag Tables

From MultimediaWiki
Jump to navigation Jump to search

Part of Understanding VC-1

ZigZag Tables

These tables are used in AC Coefficient Decode. They are selected based on the following factors:

  • Progressive vs Interlaced
  • Intra vs Inter
  • Ac Prediction Parameters
    • Prediction Direction
    • ACPRED syntax element
  • Profile
  • Transform Type
unsigned char vc1_Inv_Intra_Normal_Scan [64] = /* Table 226 */
{
      0,     8,     1,     2,     9,    16,    24,    17,
     10,     3,     4,    11,    18,    25,    32,    40,
     33,    48,    26,    19,    12,     5,     6,    13,
     20,    27,    34,    41,    56,    49,    57,    42,
     35,    28,    21,    14,     7,    15,    22,    29,
     36,    43,    50,    58,    51,    59,    44,    37,
     30,    23,    31,    38,    45,    52,    60,    53,
     61,    46,    39,    47,    54,    62,    55,    63
};
unsigned char vc1_Inv_Intra_Horizontal_Scan [64] = /* Table 227 */
{
      0,     1,     8,     2,     3,     9,    16,    24,
     17,    10,     4,     5,    11,    18,    25,    32,
     40,    48,    33,    26,    19,    12,     6,     7,
     13,    20,    27,    34,    41,    56,    49,    57,
     42,    35,    28,    21,    14,    15,    22,    29,
     36,    43,    50,    58,    51,    44,    37,    30,
     23,    31,    38,    45,    52,    59,    60,    53,
     46,    39,    47,    54,    61,    62,    55,    63
};
unsigned char vc1_Inv_Intra_Vertical_Scan [64] = /* Table 228 */
{
      0,     8,    16,     1,    24,    32,    40,     9,
      2,     3,    10,    17,    25,    48,    56,    41,
     33,    26,    18,    11,     4,     5,    12,    19,
     27,    34,    49,    57,    50,    42,    35,    28,
     20,    13,     6,     7,    14,    21,    29,    36,
     43,    51,    58,    59,    52,    44,    37,    30,
     22,    15,    23,    31,    38,    45,    60,    53,
     46,    39,    47,    54,    61,    62,    55,    63
};
unsigned char vc1_Inv_Inter_8x8_Scan_Simple_Main_Profiles_Progressive_Advanced_Profile [64] = /* Table 229 */
{
      0,     8,     1,     2,     9,    16,    24,    17,
     10,     3,     4,    11,    18,    25,    32,    40,
     48,    56,    41,    33,    26,    19,    12,     5,
      6,    13,    20,    27,    34,    49,    57,    58,
     50,    42,    35,    28,    21,    14,     7,    15,
     22,    29,    36,    43,    51,    59,    60,    52,
     44,    37,    30,    23,    31,    38,    45,    53,
     61,    62,    54,    46,    39,    47,    55,    63
};
unsigned char vc1_Inv_Inter_8x4_Scan_Simple_Main_Profiles [32] = /* Table 230 */
{
      0,     1,     2,     8,     3,     9,    10,    16,
      4,    11,    17,    24,    18,    12,     5,    19,
     25,    13,    20,    26,    27,     6,    21,    28,
     14,    22,    29,     7,    30,    15,    23,    31
};
unsigned char vc1_Inv_Inter_4x8_Scan_Simple_Main_Profiles [32] = /* Table 231 */
{
      0,     8,     1,    16,
      9,    24,    17,     2,
     32,    10,    25,    40,
     18,    48,    33,    26,
     56,    41,    34,     3,
     49,    57,    11,    42,
     19,    50,    27,    58,
     35,    43,    51,    59
};
unsigned char vc1_Inv_Inter_4x4_Scan_Simple_Main_Profiles_Progressive_Advanced_Profile [16] = /* Table 232 */
{
      0,     8,    16,     1,
      9,    24,    17,     2,
     10,    18,    25,     3,
     11,    26,    19,    27
};
unsigned char vc1_Inv_Progressive_Inter_8x4_Scan_Advanced_Profile [32] = /* Table 233 */
{
      0,     8,     1,    16,     2,     9,    10,     3,
     24,    17,     4,    11,    18,    12,     5,    19,
     25,    13,    20,    26,    27,     6,    21,    28,
     14,    22,    29,     7,    30,    15,    23,    31
};
unsigned char vc1_Inv_Progressive_Inter_4x8_Scan_Advanced_Profile [32] = /* Table 234 */
{
      0,     1,     8,     2,
      9,    16,    17,    24,
     10,    32,    25,    18,
     40,     3,    33,    26,
     48,    11,    56,    41,
     34,    49,    57,    42,
     19,    50,    27,    58,
     35,    43,    51,    59
};
unsigned char vc1_Inv_Interlace_Inter_8x8_Scan_Advanced_Profile [64] = /* Table 235 */
{
      0,     8,     1,    16,    24,     9,     2,    32,
     40,    48,    56,    17,    10,     3,    25,    18,
     11,     4,    33,    41,    49,    57,    26,    34,
     42,    50,    58,    19,    12,     5,    27,    20,
     13,     6,    35,    28,    21,    14,     7,    15,
     22,    29,    36,    43,    51,    59,    60,    52,
     44,    37,    30,    23,    31,    38,    45,    53,
     61,    62,    54,    46,    39,    47,    55,    63
};
unsigned char vc1_Inv_Interlace_Inter_8x4_Scan_Advanced_Profile [32] = /* Table 236 */
{
      0,     8,    16,    24,     1,     9,     2,    17,
     25,    10,     3,    18,    26,     4,    11,    19,
     12,     5,    13,    20,    27,     6,    21,    28,
     14,    22,    29,     7,    30,    15,    23,    31
};
unsigned char vc1_Inv_Interlace_Inter_4x8_Scan_Advanced_Profile [32] = /* Table 237 */
{
      0,     1,     2,     8,
     16,     9,    24,    17,
     10,     3,    32,    40,
     48,    56,    25,    18,
     33,    26,    41,    34,
     49,    57,    11,    42,
     19,    50,    27,    58,
     35,    43,    51,    59
};
unsigned char vc1_Inv_Interlace_Inter_4x4_Scan_Advanced_Profile [16] = /* Table 238 */
{
      0,     8,    16,    24,
      1,     9,    17,     2,
     25,    10,    18,     3,
     26,    11,    19,    27
};