[XviD-devel] H263 quant
skal
xvid-devel@xvid.org
13 Sep 2002 11:15:06 +0200
Hi Pete,
On Fri, 2002-09-13 at 01:39, peter ross wrote:
> > Hi,
> >
> > there's something I find strange:
> > H263 dequantization is the same
> > for intra or non-intra coeffs:
> > ( C' = C*2q + (q&1?q:q-1) )
> > But there's a different bias
> > used during *quantization*.
> > For intra, it's 0, and for
> > inter, it's -q/2. I've checked
> > MoMuSys, and it's the same.
> > Does someone has an explanation/pointer?
> > Something to do with the AC-values
> > distribution function?
> >
>
> both h263 and mpeg *quantization* algorithms were implemented
> directly from the VM18 document. from memory (i dont have VM18
> with me atm), the reason for this is to reduce rounding error caused
> by // division. i guess we could try to impove the quantization algo,
> such that the coeffs are more acurately decoded.
hmm... that's what I first thought, but with a strictly linear
quantizer, and assuming uniform distribution, the errors during
division would be systematic, and cancel each others...
*But* we're not assuming uniform distribution of AC, do we? :)
An quantizers are not that linear either, due to the dead-zone
around zero. Oh well.. this bias looks to me like a very
fine-tuned thingy, if any. Nothing really obvious at first
sight, unless I've missed something...
> i guess we could try to impove the quantization algo,
> such that the coeffs are more acurately decoded.
exactly :) I'm conducting tests for an improved
TransQuantIntra/inter() module. Scratch notes
(ie: some are unchecked, or simply wrong)
are here:
http://skal.planet-d.net/coding/quantize.html
I far from having sorted out this biases
weirdness, for now...
bye,
Skal