## VC-1 Forward transform

Some notes on forward transform.

For 4×4 transform matrix is:
``` 17 17 17 17 22 10 -10 -22 17 - 17 - 17 17 10 -22 22 -10 ```
And suggested norm is (8/289 ; 8/292; 8/289; 8/292)
The forward transform for (A B C D ) will be:
``` A1 = (17 * A + 17 * B + 17 * C + 17 * D) * 8 / 289; B1 = (22* A + 10 * B - 10 * C - 22 * D) * 8 / 292; C1 = (17 * A - 17 * B - 17 * C + 17 * D) * 8 / 289; D1 = (10 * A - 22 * B + 22 * C - 10 * D) * 8 / 292; ```
Of course, don’t forget to round result.
I tested it on Octave and it proved to be correct.

Optimization is also straightforward: compute (A+D) , (B+C), (B-C) and use their sums/differencies.

### One Response to “VC-1 Forward transform”

1. Strongling says:

Hi,

Just trying an experiment with the VC-1 transform and need some technical advice:

I wrote a small program to Forward Transform and then Inverse Transform an enitre frame in 8×8 mode. I didn’t do the Quantization-Inverse Quantization step in the middle. The entire thing was done using 32-bit signed integers.

My question is: should’nt I get an exact image after the forward-inverse transform cycle?

I ask this because I am wondering whether the VC-1 transform is truly lossless if the forward-inverse transform cycle is done using only integer arithmetic.