[XviD-devel] Quantization

Edouard Gomez ed.gomez at free.fr
Sun Jul 20 17:31:58 CEST 2003


Marco Al (marco at simplex.nl) wrote:
> From: "Edouard Gomez" <ed.gomez at free.fr>
> 
> > At  least the  LUT idea  seems to  be good  for h263  (the LUT  would be
> > something like 2*32*2048*2=256kB
> 
> Didnt you say the fixed point multiply by reciprocal approximation was
> always correct for DC scaling? If that is true it should almost certainly
> also be true for h263 quantization in general, though maybe not for MPEG-4
> where the dividers are larger. Why use a bigger LUT to avoid one extra
> multiplication?

I'm not talking about a LUT for DC but the whole quantization process.

Instead of doing:
quant_(intra|intra)(coeffs, data, quant(, dcscaler));

We'd do something like:
/* right for h263, not for mpeg */
for (i=0; i<64; i++)
    coeffs[i] = quant_h263_lut[quant-1][data[i]+2047];

This  is  easy  for  h263,  but  not  so  easy  for  mpeg4  because  the
quantization matrix makes it harder to  use a LUT (the result depends on
the coeef position).   And my first question was: "what  am i missing as
this seems so simple ?"

-- 
Edouard Gomez


More information about the XviD-devel mailing list