[XviD-devel] adaptive quant improvement

Edouard Gomez xvid-devel@xvid.org
Wed, 29 Jan 2003 16:23:32 +0100 (CET)


En réponse à "Marco \"elcabesa\" Belli" <elcabesa@inwind.it>:
> [CODE SAMPLE]

I tested it on a 30x cactus file (not a serious test), btw your code
gives better PSNR at same bitrate. I'll do more tests this evening.

Anyway, my answer is more a good way to ask everyone here, why the luminance
masking is done in YUV while in DCT space the DC component of each block is
already the average of the block (vertical and horyzontal null frequencies == 
average). It's just scaled by a N/sqrt(2) or something very close to that.

Would not it be more logical to do luminance masking just after fDCT to avoid
a "let's do computations in plain C now and then do them again in optimized 
assembly" ?

This suggestion is at least right for your(marco) implementation and the one in
0.9.x tree. I did not have time to look at refdivx's implementation yet.

<quote from console - old luminqnce masking (as is in 0.9.0)>
Avg. Q6 br 0900 (0.43 bpp) size 3562 (712kbps) enc: 26.2 fps, dec: 183.2 fps 
PSNR P(89): 49.35 (40.65, 50.74) I(1): 40.41 (40.41, 40.41) 
</quote>

<quote from console - your luminance masking (as is in nowhere yet :-))>
Avg. Q6 br 0795 (0.38 bpp) size 3566 (713 kbps) enc: 24.0 fps, dec: 190.1 fps 
PSNR P(89): 49.62 (40.90 , 51.59) I(1): 40.74 (40.74 , 40.74)
</quote>

--
Edouard Gomez