http://www.VcdsNow.8m.com (click the link at the top)
I made this site to compare encoding a VCD without the modification of the Quantizer Matrices Settings,AND encoding a VCD WIT the modification of the Quantizer Matrices.I saw a question regarding this,and even though I still dont know what exactly/how they work,this seemed to help me alot.Ok that's it.I hope it helps.
+ Reply to Thread
Results 1 to 3 of 3
-
-
<TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font size=-1>Quote:</font><HR size=1 color=black></TD></TR><TR><TD><FONT SIZE=-1><BLOCKQUOTE>
On 2001-12-22 16:29:10, VCDsMakeMoney wrote:
even though I still dont know what exactly/how they work,</BLOCKQUOTE></FONT></TD></TR><TR><TD><HR size=1 color=black></TD></TR></TABLE>
7 TRANSFORMATION AND QUANTIZATION
While mode selection and local motion compensation are based on the macroblock structure, the transformation and quantization is based on 8*8 blocks.
Blocks are transformed with a 2-dimensional DCT as explained in Appendix A. Each block of 8*8 pixels thus results in a block of 8*8 transform coefficients. The DCT coefficients are quantized as described in sections 7.1 and 7.2.
7.1 Quantization of Intra Macroblocks
Intra frame DCT coefficients are quantized with selected quantizers without a dead-zone.
7.1.1 DC Coefficients
The quantizer step-size for the DC coefficient of the luminance and chrominance components is 8, 4, 2 and 1. Thus, the quantized DC value, QDC, is calculated as:
QDC = dc // 8
QDC(9bit) = dc // 4
QDC(10bit) = dc // 2
where "dc" is the 11-bit unquantized value from the DCT.
7.1.2 AC Coefficients
AC coefficients ac(i,j) are first quantised by individual quantisation factors,
ac~(i,j) = (16 * ac(i,j)) //wI(i,j)
where wI(i,j) is the (i,j)th element of the Intra quantizer matrix given in figure 7.1. ac~(i,j) is limited to the range [-2048, 2047].
8 16 19 22 26 27 29 34
16 16 22 24 27 29 34 37
19 22 26 27 29 34 34 38
22 22 26 27 29 34 37 40
22 26 27 29 32 35 40 48
26 27 29 32 35 40 48 58
26 27 29 34 38 46 56 69
27 29 35 38 46 56 69 83
Figure 7.1 - Intra quantizer matrix
The step-size for quantizing the scaled DCT coefficients, ac~(i,j), is derived from the quantization parameter, quantizer_scale. A quantizer_scale is calculated for each macroblock by the algorithm defined in Test Model Section 10 and is stored in the bitstream in the slice header and, optionally, in any macroblock.
The quantized level QAC(i,j) is given by:
QAC(i,j) = [ac~(i,j) + sign(ac~(i,j))*((p * quantizer_scale) // q)] / (2*quantizer_scale)
If the tcoef_escape_format flag is set to 0, QAC (i,j) is limited to the range [-255..255].
If the tcoef_escape_format flag is set to 1, QAC (i,j) is limited to the range [-2047 .. 2047].
For this TM p=3, and q = 4.
7.2 Quantization Non Intra Macroblocks
Non-intra macroblocks in Predicted and Interpolated pictures are quantized with a uniform quantizer that has a dead-zone about zero. A non-intra quantizer matrix, given in figure 7.2, is used.
16 17 18 19 20 21 22 23
17 18 19 20 21 22 23 24
18 19 20 21 22 23 24 25
19 20 21 22 23 24 26 27
20 21 22 23 25 26 27 28
21 22 23 24 26 27 28 30
22 23 24 26 27 28 30 31
23 24 25 27 28 30 31 33
Figure 7.2 - Non-intra quantizer matrix
The step-size for quantizing both the scaled DC and AC coefficients is derived from the quantization parameter, quantizer_scale. quantizer_scale is calculated for each macroblock by the algorithm defined in Section 10. The following formulae describe the quantization process. Note that INTRA type macroblocks in predicted and interpolated pictures are quantized in exactly the same manner as macroblocks in Intra-pictures (section 7.1) and not as described in this section.
ac~(i,j) = (16 * ac(i,j)) // wN(i,j)
where:
wN(i,j) is the non-intra quantizer matrix given in figure 7.2
QAC(i,j) = ac~(i,j) / (2*quantizer_scale)
If MPEG1 syntax applies, QAC (i,j) is limited to the range [-255..255].
If MPEG2 syntax applies, no clipping is necessary.
7.3 Dequantization
An encoder is free to perform quantization in any way it wants (i.e. "guess", use a mirror of the decoder, or use a fuzzy quantum neural net quadratic maximum a posteri prediction estimator with entropy constrained trellis coded feedback). However, the decoder is deterministic and the rules in IS 13818-2 section 7.4 must be followed.
--------------------------------------------------------------------------------
-
You never posted the GOP Structure results? i was interested to see them. Currently i use 1,10,1. It gives the smallest file size.
Similar Threads
-
AVStoDVD - Quantizer..?
By VenusAndMars in forum Authoring (DVD)Replies: 16Last Post: 15th Jun 2012, 07:59 -
Custom Matrices
By ChrissyBoy in forum SVCD2DVD & VOB2MPGReplies: 23Last Post: 30th Aug 2008, 16:08 -
MPEG matrices for dummies?
By ecc in forum Video ConversionReplies: 2Last Post: 12th Aug 2008, 08:50 -
Xvid Quantizer Codecs
By theninger in forum Video ConversionReplies: 3Last Post: 25th Jul 2008, 10:54 -
Quantizer in Alltoavi
By drstew in forum Portable VideoReplies: 1Last Post: 30th Mar 2008, 14:34