Log in

View Full Version : XviD data structure


redfordxx
2nd November 2005, 11:49
Hi,
is somewhere described (probably yes) how are data stored in XviD data stream. Especially how are the DCT coefficients for one 8x8 block stored. Can someone recommend me?
tnx, R.

sysKin
2nd November 2005, 13:20
Hi,
is somewhere described (probably yes) how are data stored in XviD data stream. Especially how are the DCT coefficients for one 8x8 block stored. Can someone recommend me?
tnx, R.

There's a three-dimensional array of variable length codes. At one dimension, there's a magnitude of coefficient ("level"). At another, there's a "run" ie number of zeroes before that coefficient. The third dimension is "last" and it's true if it's the last coefficient of the block, false otherwise.

The VLCs are in the mpeg-4p2 standard, it's a large array of data. Larger levels are coded with escape codes to keep the array reasonably small - but they are rare so there's no efficiency penalty.

Does that help?