[XviD-devel] MPEG dequant

ShenCao shencao at chinadigipro.com
Mon Mar 10 18:33:03 CET 2003


Hello everyone on the XVID!

In the function dequant4_intra_c() of quant_mpeg4.c 
on the release version xvidcore0.9.1
.........
	for (i = 1; i < 64; i++) {
		if (coeff[i] == 0) {
			data[i] = 0;
		} else if (coeff[i] < 0) {
			uint32_t level = -coeff[i];
=============================================================
			level = (level * intra_matrix[i] * quant) >> 3;
=============================================================
.......
My question is:
why it use >>3 instead of >>4?
Because maybe it is derived from this formula:
( (2*QP+k) *W*quantiser_scale )/32
from page 63 of <<MPEG-4 video verification Model Version 10.0>>
San Jose, February 1998.

For the same reason,
In the function dequant4_inter_c() of quant_mpeg4.c 
			level = ((2 * level + 1) * inter_matrix[i] * quant) >> 4;
should be modified into:
			level = ((2 * level + 1) * inter_matrix[i] * quant) >> 5;

I wonder whether the standard is correct,
because it seems to be old.
BTW, how I can get the latest MPEG-4 standard or 
where could i buy it from?

Thanks!

      ShenCao




More information about the XviD-devel mailing list