View Single Post
Old 21st December 2010, 19:04   #6  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by manono View Post
You use a matrix that produces an average quant within the values you want.
This is not exactly true, or at least it's somewhat misleading.

If you halve all the values in a quantization matrix, it is mathematically EXACTLY THE SAME as if you halved the average quantizer. That is, a video with a quant matrix of all "8" at quantizer 4 will look identical to a video with a quant matrix of "16" at quantizer 8.

But in real encoding, there is a difference -- MPEG-2, by default uses a linear quantizer scale. Therefore, if your average quantizer is "2", the encoder is picking between 1, 2, and 3 (roughly) for its quantizers. This gives it very little precision to work in, because 1 is twice as precise as 2: there's nothing in between 1 and 2 for it to pick. By comparison, in H.264, there would be 5 values in between 1 and 2, and if it used the MPEG-2 exponential quantizer scale, there would be 7.

This is doubly important when using a good MPEG-2 encoder with adaptive quantization support, like HCEnc.

If all MPEG-2 encoders used the exponential scale, we wouldn't need CQMs for any purpose, except perhaps lowpassing the video to make bad DVDs.
Dark Shikari is offline   Reply With Quote