Log in

View Full Version : Different quantizers inside the same frame


infoeater
28th November 2011, 14:54
In H.264, as far as I understand each block in the same frame can be encoded with different quantizer. Whole frame however have the quantizer too. So what does quantizer of the whole frame mean?

Also XVID's AQ is working in constant quantizer mode too. How is it possible? Is constant quantizer in XVID in fact varying through the frame? Is it varying in constant quantizer mode without AQ too?

EDIT:
Thank you for your words of knowledge, Lord.

LoRd_MuldeR
28th November 2011, 15:05
In H.264, as far as I understand each block in the same frame can be encoded with different quantizer. Whole frame however have the quantizer too. So what does quantizer of the whole frame mean?

AFAIK the quantizers of individual blocks are coded as offsets to the frame's "base" quantizer.

Apart from that, there is no relation per se, I think. It completely depends on which algorithm is used to decide the quantizer value of each block.

That's also the reason why "frame" quantizers don't mean anything, as soon as AQ is used.

In general, the frame quantizer is not equal to the average or median block quantizer, although a specific AQ algorithm might be tailored that way.

(In theory, even if the frame quantizer is 10, the quantizers of all blocks in that frame could be forced to 30, by applying the proper offsets)

Also XVID's AQ is working in constant quantizer mode too. How is it possible? Is constant quantizer in XVID in fact varying through the frame? Is it varying in constant quantizer mode without AQ too?

In x264, CQ mode means real "constant quantizer", i.e. each block in each frame has the same quantizer (i.e. VAQ and MB-Tree is disabled).

Xvid has nothing like a CRF mode, only a CQ mode. That's probably why they (optionally?) apply AQ in CQ mode.

It means that first Xvid's rate controls sets the same quantizer for each frame and then the AQ algorithm is applied to modify the quantizers of individual blocks.

Note that here the relation between the "frame" quantizer and the "block" quantizers is an implementation detail of how the AQ is applied.