[XviD-devel] Quantization

Marco Al marco at simplex.nl
Sun Jul 20 18:30:50 CEST 2003


From: "Edouard Gomez" <ed.gomez at free.fr>

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

I know.

> 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];

Why spend time doing this for the C version? (Ignoring for a moment that
talking about it might have already consumed more time :) On what platform
would it make sense?

The MMX version quantizes 8 coefficients in a loopbody consisting of 20
lines of code! On architectures with SIMD you arent going to speed
quantization up with an unparallelizable LUT method, on architectures
without SIMD you arent likely to be able to have that much memory to waste
anyway.

BTW why does the C version even need to use the approximation of division by
fixed point multipication by reciprocal? If it just used normal division it
would make the intention of the code clearer.

Marco



More information about the XviD-devel mailing list