View Single Post
Old 23rd March 2008, 01:11   #55  |  Link
plugh
A hollow voice says
 
Join Date: Sep 2006
Posts: 269
Quote:
Originally Posted by Dark Shikari View Post
Xvid has really really nasty restrictions on quantizers. From what I recall:

1. A "DQuant" block is a block that has a different quantizer from the previous block. In the case of VAQ, this would be an edge block, for example.

2. DQuant blocks cannot have a difference of more than +/- QP from the frame QP (I think).

3. DQuant blocks cannot use 4mv. (WTF? Why?)

4. DQuant blocks cannot use GMC. (WTF? Why?)
Over in the HVS plugin thread, similar comments were made about AQ
Quote:
Disadvantages

needs bitrate (2 bits per block)

limits modes for motion estimation

the quantizers of neighbouring blocks may only differ by two

works not woth B-frames
Is there a definitive reference on the above?

Point three in particular, since 4MV is on by default for basically all the profiles. Which takes precedence? Is a block coded with MODE_INTER4V precluded from dquant? Or does dquant force interv4 off?

I scanned through the code looking for both elements 'together', and find stuff like:
encoder.c/MBSetDquant
Code:
			if (next->mode != MODE_INTER4V && next->mode != MODE_NOT_CODED)
				/* mode allows dquant change in the future */
				if (abs(next->quant - prev->quant) <= 2) {
					/* quant change is not out of range */
estimation_pvop.c/ModeDecision_SAD and SearchP
estimation_rd_based.c/xvid_me_ModeDecision_RD
Code:
	int inter4v = (VopFlags & XVID_VOP_INTER4V) && (pMB->dquant == 0);
It sort of looks like AQ inhibits 4MV - on sort of a block by block basis? (excluding b-frames of course, which AQ doesn't apply to?)
plugh is offline   Reply With Quote