Wednesday, August 19, 2009

The ideal video codec ?

What would the idea video codec look like ? Here's a list of suggestions:

1. Just one video codec (instead of the ever-increasing number of competing video coding formats).

2. Delivers the best performance, i.e. a combination of:
a. maximum image quality and frame rate
b. minimum bit rate
c. minimum computational complexity or power consumption,
- the best combination of these factors for the platform (e.g. mobile, hardware, software...)

3. Easy upgrades (preferably completely transparent to the user) to take advantage of new ideas and techniques.

4. No license fees (or at least a license-free option).

5. No inter-operability problems.

6. Easy scalability (the same content on multiple platforms at multiple resolutions).

Impossible ? Maybe...

Comments very welcome !

- Iain.

Quantization - "flat" scaling factor.

JianFeng Zheng sent me a good question about H.264 inverse transform and quantization. In the H.264 standard, there is an extra division by 16 that occurs in section 8.5.8 (in the 2007 version of the document) that I don't mention in my tutorial on the inverse transform. It's not easy to see where this factor comes from.

H.264 includes the option to send a non-uniform quantization scaling matrix ("scaling list"), which makes it possible to quantize coefficients differently depending on their position in the block. The default scaling matrix, Flat_4x4_16 (or 8x8 equivalent) is a constant value for every coefficient position. The constant value is 16 (rather than 1 as might be expected). This is cancelled out by the division by 16 (implemented as a right-shift by 4 binary places) in section 8.5.8. So it all works out neatly.

Thanks to JianFeng for the question.

- Iain.