# VC-1 Tables

(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
```

## 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}

## 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
```