Log in

View Full Version : Quantization Matrix in XviD


ZikO
18th June 2012, 20:43
Hi,

I have just read an old thread that explains what is Quantization Matrix but I still cannot follow some technical details. I tried to follow the conversation there but I am afraid I could not understand as I was not that advanced yet. I would have a few questions if you don't mind asking.

1. Is the DCT (Discrete Cosinus Transform) something similar to Fourier Transform with regard to audio where we essentially need coefficients to provide a simulation/approximation of a real wave by summing series of sin/cos functions?
2. I believe Quantization Matrix is a set of 64 thresholds in a 8x8 block with highest frequencies at right-hand side and bottom of such block. XviD allows making and applying custom or standard QM with 8x8 numbers. Why are there Intra and Inter QM to use?
3. Am I right to say that the same QM is applied to the each 8x8 block in a frame and to all frames in a video?
4. Can someone explains what are I-, P-, and B-frame.

Also I did not understand why less detailed videos are shorter than let's say videos with high motion and a lot of fine detais in it. From what I read, the same amount of 8x8 blocks is applied. Therefore, the video length should be the same regardless of high or low motion, high or low details in video. What am I missing here?

I will be grateful for any help.

Regards :)

Blue_MiSfit
20th June 2012, 03:02
This does not belong in the H.264 forum. Moved to the MPEG-4 ASP forum.

ZikO
20th June 2012, 19:06
XviD is the codec where we actually have possibility to interfere with QM. I am asking this question with respect to XviD codec. Can it be then moved to XviD forum please?

Asmodian
20th June 2012, 21:37
Xvid is one of the MPEG-4 ASP codecs. (this is the Xvid forum)

1) Yes

2) Intra are for I frames, Inter are for P and B frames.

3) If I remember correctly there are several modes for this, I believe there were some modes that allowed changing the matrix on a per-frame basis, maybe even per block. I do not think this is well supported (maybe not allowed in the spec?) so many decoders have issues with it.

4) An I frame does not use data from any other frames, think JPEG image compression.

A P frame uses motion compensated 8x8 blocks from previous frames.

A B frame uses motion compensated 8x8 blocks from both previous and future frames. In Xvid these are not used as references for other frames.

ZikO
21st June 2012, 01:33
Hi Asmodian,
Many thanks for this answer. it's clarified a lot regarding XviD