<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VIDWAV.com &#187; 研究</title>
	<atom:link href="http://www.vidwav.com/category/research/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vidwav.com</link>
	<description>关注于视频技术领域的相关资讯，研发和产品</description>
	<lastBuildDate>Thu, 20 May 2010 13:51:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JM KTA Tutorial: Quantization Techniques &#8211; Part 4</title>
		<link>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-4.htm</link>
		<comments>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-4.htm#comments</comments>
		<pubDate>Fri, 12 Jun 2009 08:14:45 +0000</pubDate>
		<dc:creator>Yu Liu</dc:creator>
				<category><![CDATA[研究]]></category>
		<category><![CDATA[H.264/AVC]]></category>
		<category><![CDATA[KTA]]></category>
		<category><![CDATA[Quantization]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.vidwav.com/?p=233</guid>
		<description><![CDATA[<strong>4. </strong><strong>Rate-Distortion Optimized Quantization</strong>
Previously, adaptive rounding was proposed to improve quantization, which captures the statistics of the incoming residual signal and adjusts the rounding offsets accordingly. However, the adaptive rounding quantization is still based on the criterion which [......]<p class='read-more'><a href='http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-4.htm'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>4. </strong><strong>Rate-Distortion Optimized Quantization</strong></p>
<p style="text-align: justify;">Previously, adaptive rounding was proposed to improve quantization, which captures the statistics of the incoming residual signal and adjusts the rounding offsets accordingly. However, the adaptive rounding quantization is still based on the criterion which minimizes the mean-squared quantization error between the original signal and the quantization reconstructed signal. From the sense of rate-distortion optimization, the cost from the rate should also be considered.</p>
<p style="text-align: justify;">The basic idea underlying the rate-distortion optimized quantization is to minimize a cost function <em>D+ λR</em> such that both the rate R and the distortion D are considered in coding decisions. For quantization case, the RD optimal coding is to solve a minimization problem of</p>
<p style="text-align: center;"><img class="alignnone" title="eq7" src="http://ftp.vidwav.com/image/quant/eq7.gif" alt="" width="259" height="33" /> (7)</p>
<p style="text-align: justify;">where <em>S</em> is the original signal, and <em>T<sup>-1</sup></em> denotes the inverse transform operation. Consider that the DCT is a unitary transform, which maintains the Euclidean distance. We use the Euclidean distance for D(.) to avoid the inverse DCT computation. Thus, the above equation becomes</p>
<p style="text-align: center;"><img class="alignnone" title="eq8" src="http://ftp.vidwav.com/image/quant/eq8.gif" alt="" width="231" height="36" /> (8)</p>
<p style="text-align: justify;">where <em>W=T(S)</em>, and <em>T</em> is the forward transform operation.</p>
<p style="text-align: justify;">A simplified rate-distortion optimized quantization scheme is proposed and implemented in KTA software. In the RDO-Q, assuming the transform coefficients before quantization are <em>W<sub>i</sub></em>, (<em>i=0,…,M-1), </em> then the quantized coefficients/levels <em>Z<sub>i</sub></em> (<em>i=0,…,M-1) </em>are calculated as follows:</p>
<ol style="text-align: justify;">
<li>For a given coefficient position <em>k, k=M-1,…,0, </em>assume that coefficient <em>W<sub>k</sub></em> is the last significant coefficient in the block:
<ul>
<li>For each coefficient<em> W<sub>i</sub></em>, <em>i=k-1,…,0,</em> calculate its Lagrangian cost when the quantized value <em>Z<sub>i</sub></em> is equal to <em>0</em>, <em>Z<sub>floor</sub></em> and <em>Z<sub>ceil</sub></em>, as shown in Figure 7. The Lagrangian cost <em>J<sub>k,i</sub>(</em><em>λ</em><em>,Z<sub>i</sub>)</em> when coefficient <em>W<sub>i</sub></em> is quantized to <em>Z<sub>i</sub></em> is calculated as:<br />
<img class="alignnone" title="eq9" src="http://ftp.vidwav.com/image/quant/eq9.gif" alt="" width="236" height="25" /> (9)<br />
where <em>err</em>(<em>W<sub>i</sub></em> ,<em> Z<sub>i</sub></em>) is the quantization error if the coefficient <em>W<sub>i</sub></em> is quantized to value <em>Z<sub>i</sub></em>, measured by  Euclidean distance; And <em>bits</em>(<em>Z<sub>i</sub></em>) is the number of bits needed to code <em>Z<sub>i</sub></em>. The value of <em>Z<sub>floor</sub></em> and <em>Z<sub>ceil </sub></em>are defined as:<br />
<img class="alignnone" title="eq10" src="http://ftp.vidwav.com/image/quant/eq10.gif" alt="" width="271" height="27" /> (10)<br />
<img class="alignnone" title="eq11" src="http://ftp.vidwav.com/image/quant/eq11.gif" alt="" width="107" height="25" /> (11)</li>
</ul>
</li>
<li>Let the final quantized level <em>Z<sub>i,opt</sub>=argmin J<sub>k,i</sub>(</em><em>λ</em><em>,Z<sub>i</sub>)</em> and update Lagrangian cost <em>J<sub>k</sub>(</em><em>λ</em><em>)</em> using <em>J<sub>k,i</sub>(</em><em>λ</em><em>,Z<sub>opt</sub>)</em>.</li>
<li>The final quantized vector of quantized coefficients <em>Z<sub>opt</sub>=argmin J<sub>k</sub>(</em><em>λ</em><em>)</em>.</li>
</ol>
<p style="text-align: center;"><img class="alignnone" title="fig7" src="http://ftp.vidwav.com/image/quant/fig7.gif" alt="" width="455" height="72" /></p>
<p style="text-align: center;">Figure 7. Possible quantized values in RDO-Q</p>
<p style="text-align: justify;">
<p style="text-align: justify;">To speed up the algorithm the following simplifications are made:</p>
<ol style="text-align: justify;">
<li>If coefficient <em>W<sub>k</sub></em> is closer (measured as absolute difference between the coefficient and its reconstructed value) to <em>Z<sub>floor</sub></em> than to <em>Z<sub>ceil</sub></em> only value <em>Z<sub>floor</sub></em> is considered.</li>
<li>If coefficient <em>W<sub>k</sub></em> is closer to <em>Z<sub>floor</sub></em> than to <em>Z<sub>ceil</sub></em>, and <em>Z<sub>floor</sub></em> is equal to zero, coefficient <em>W<sub>k</sub></em> can not be the last nonzero coefficient. Hence the calculation of Lagrangian cost <em>J<sub>k</sub>(</em><em>λ</em><em>)</em> is skipped for this value of <em>k</em>.</li>
<li>The calculation of <em>J<sub>k</sub>(</em><em>λ</em><em>)</em> is stopped when <em>J<sub>k</sub>(</em><em>λ</em><em>)</em> starts to increase with decreasing <em>k.</em></li>
</ol>
<p style="text-align: justify;">
<p style="text-align: justify;">Here, we only discuss the entropy coding by using CABAC, and for the CAVLC a similar estimation method for the number of bits can be applied. To estimate the number of bits required to code a coefficients, we use the tabularized values of entropy of the probabilities corresponding to states in CABAC arithmetic coding engine. But, the CABAC algorithm uses the context modeling. That is, the coding of current coefficient in a block is related to the state of previous coded coefficients.</p>
<p style="text-align: justify;">In general, CABAC consists of three steps, i.e.,</p>
<ol style="text-align: justify;">
<li>Binarization. The so-called UEG0 algorithm is used to convert non-zero transform coefficients into a binary representation so that the binary arithmetic coding engine can be used to code them.</li>
<li>Context modeling. CABAC defines a probability model for each binary bit.</li>
<li>Binary arithmetic coding. The binary representation is encoded bit by bit using corresponding models.</li>
</ol>
<p style="text-align: justify;">The RDO-Q is closely related to the context modeling for residual coding. Residual coding by CABAC includes two parts, i.e., coding a so-called significance map and coding non-zero coefficients. Given a zigzag ordered sequence of transform coefficients, its significance map is a binary sequence which indicates the occurrence and location of the non-zero coefficients. The context modeling for coding the significance map is associated with the zig-zag order, and is easy to be included in RDO-Q. The context modeling for coding non-zero coefficients, however, is complicated. For a given sequence, there are in total 10 contexts for coding non-zero coefficients, with 5 of them for coding the first bit of a binary representation and the other 5 dedicated to coding the second to 14th bits. Briefly, contexts are selected as follows,</p>
<ol style="text-align: justify;">
<li>Scan the sequence in the inverse order to initiate two parameters as <em>NumLg1</em> and <em>NumEq1</em>. <em>NumLg1</em> is the number of coefficients that are greater than 1 while <em>NumEq1</em> accords to those equal to one.</li>
<li>The context for the first bit is determined by<br />
<img class="alignnone" title="eq12" src="http://ftp.vidwav.com/image/quant/eq12.gif" alt="" width="293" height="48" /> (12)</li>
<li>The context for the 2-14th bits is selected by<br />
<img class="alignnone" title="eq13" src="http://ftp.vidwav.com/image/quant/eq13.gif" alt="" width="179" height="25" /> (13)</li>
</ol>
<p style="text-align: justify;">There is also a bypass mode with a fixed distribution. Other bits in the binary representation use the bypass mode.</p>
<p style="text-align: center;"><img class="alignnone" title="fig8" src="http://ftp.vidwav.com/image/quant/fig8.gif" alt="" width="576" height="245" /></p>
<p style="text-align: center;">Figure 8. The graph structure for RDO quantization based on CABAC in H.264/AVC</p>
<p style="text-align: justify;">
<p style="text-align: justify;">In order to solve the minimization problem, a graph-based algorithm is used to address the computation of the rate function R(.) of CABAC. As shown in Figure 8, the graph is constructed based on coding features of CABAC. Basically, states are defined based on the context model selection. Thus, states are named by values of <em>NumEq1</em> and <em>NumLg1</em>, as of <em>NumEq1_NumLg1</em> , e.g., 2_0 accords to <em>NumEq1 = 2</em> and <em>NumLg1 = 0</em>. When <em>NumLg1</em> &gt; 0, the context is irrelevant to <em>NumEq1</em>. Thus, there are three states as <em>X_1, X_2, </em>and<em> X_3</em>. The context is fixed for all <em>NumLg1 </em><em>≥</em><em>4</em>. Accordingly, one state <em>X_X</em> is defined. For a 4&#215;4 luma block, there are 16 columns, each of them corresponding to one coefficient. In each column there are up to 8 states. Transitions are established between states according to the increase of <em>NumEq1</em> and <em>NumLg1</em> , e.g., the state <em>1_0</em> is connected to <em>1_0</em>, <em>2_0</em> and <em>X_1</em> according to a quantization output of 0, 1, or greater than 1, respectively. In case that the quantization output is greater than 1, parallel transitions are established so that each accords to a unique value. In practice, because the distortion is a quadratic function with respect to the quantization output, it is sufficient to investigate only a few parallel transitions. Thus the complexity is greatly reduced without sacrificing the optimality. Finally, a graph structure as shown in Figure 8 is obtained.</p>
<p style="text-align: justify;">The optimal RDO quantization design now becomes a problem to search for a path in the graph for the minimal RD cost. It is not hard to see that the above graph design allows an element-wise additive computation of the RD cost. The Viterbi algorithm is then used to do the search, which leads to the solution of the minimization problem.</p>
<p style="text-align: justify;">
<p style="text-align: justify;"><strong>References:</strong></p>
<p style="text-align: justify;">
<p style="text-align: justify;">[1].    Gary J. Sullivan, &#8220;Adaptive quantization encoding technique using an equal expected-value rule&#8221;, Hong Kong JVT meeting contribution JVT-N011, January 2005.</p>
<p style="text-align: justify;">[2].    E.-h. Yang and X. Yang, “Rate distortion optimization of H.264 with main profile compatibility,” pp282 – 286, ISIT, July 2006</p>
<p style="text-align: justify;">[3].    M. Karczewicz, Y. Ye and I. Chong, Rate distortion optimized quantization, VCEG-AH21, Qualcomm,Jan. 2008</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-4.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JM KTA Tutorial: Quantization Techniques &#8211; Part 3</title>
		<link>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-3.htm</link>
		<comments>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-3.htm#comments</comments>
		<pubDate>Fri, 12 Jun 2009 08:14:28 +0000</pubDate>
		<dc:creator>Yu Liu</dc:creator>
				<category><![CDATA[研究]]></category>
		<category><![CDATA[H.264/AVC]]></category>
		<category><![CDATA[KTA]]></category>
		<category><![CDATA[Quantization]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.vidwav.com/?p=221</guid>
		<description><![CDATA[<strong>3. </strong><strong>Adaptive Rounding Encoding Technique using an Equal Expected-Value Rule</strong>
As discussed above, if the input p.d.f. is Laplacian distributed and if we can estimate <em>λ</em>, then the optimal <em>f</em> can be found analytically. But, usually the estimate of input p.d.f. is not available, then, how to select the roun[......]<p class='read-more'><a href='http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-3.htm'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>3. </strong><strong>Adaptive Rounding Encoding Technique using an Equal Expected-Value Rule</strong></p>
<p style="text-align: justify;">As discussed above, if the input p.d.f. is Laplacian distributed and if we can estimate <em>λ</em>, then the optimal <em>f</em> can be found analytically. But, usually the estimate of input p.d.f. is not available, then, how to select the rounding offset <em>f</em>? </p>
<p style="text-align: justify;">In order to select rounding offset <em>f</em> adaptively, an adaptive quantization encoding technique using an equal expected-value rule is proposed by Gary Sullivan from Microsoft. The adaptive adjustment of the rounding offset <em>f</em> occurs only in the <em>encoding</em> quantization process, which tries to select <em>f</em> without using any priori model knowledge on the input <em>W</em>. The aim is to make that the mean of the absolute value of the input, |<em>W</em>|,  is equal to its expected reconstruction value |<em>W’</em>|, i.e.,</p>
<p style="text-align: center;">  <img class="alignnone" title="eq5" src="http://ftp.vidwav.com/image/quant/eq5.gif" alt="" width="117" height="21" />   (5)</p>
<p style="text-align: justify;">Any values in an interval would be reconstructed to some <em>W’</em>, so the distribution of <em>W’</em> is a probability mass function (p.m.f.), with the probability mass equal to integral of the input probability distribution function (p.d.f.) over the interval: <em>the change of f leads to the shift of quantization intervals, and thus results in the change of p.m.f. of W’.</em></p>
<p style="text-align: justify;"> </p>
<p style="text-align: center;"> <img class="aligncenter" title="fig6" src="http://ftp.vidwav.com/image/quant/fig6.gif" alt="" width="488" height="366" /></p>
<p style="text-align: justify;">Figure 6. Adaptive rounding using an equal expected-value rule</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">The rounding offset parameter <em>f</em> is updated during encoding as follow:</p>
<p style="text-align: center;"><img class="alignnone" title="eq6" src="http://ftp.vidwav.com/image/quant/eq6.gif" alt="" width="248" height="24" />     (6)</p>
<p style="text-align: justify;">where the positive constant <em>k</em> is determined empirically. This equation means that If <em>|W<sub>i</sub>| &lt; |W’<sub>i</sub>|</em>, then try to decrease <em>f</em>. By decrease <em>f</em>, we increase the dead-zone and the probability mass of zero, and thus the expected value of |<em>W’</em>| would be shifted towards zero. Otherwise, the expected value of |W’| would be shifted away from zero. Here we summarize the algorithm of adaptive rounding:</p>
<ul style="text-align: justify;">
<li>Initially set <em>f<sub>0</sub>=</em><em>Δ</em><em>/3</em> (for intra) or <em>f<sub>0</sub>=</em><em> Δ</em><em>/6</em> (for inter)</li>
<li>Quantize incoming transform coefficient <em>W<sub>0</sub></em>, obtain <em>W’<sub>0</sub></em></li>
<li>Obtain <em>f<sub>1</sub></em> ; Use it to quantize <em>W<sub>1</sub></em></li>
<li>If |<em>W<sub>i</sub></em>|=|<em>W’<sub>i</sub></em>|, no need to update <em>f</em></li>
<li><em>I(.)</em> is the indicator function, which is equal to 1 when its argument is true, and 0 when its argument is false</li>
<li>Discard samples that fall into the dead-zone, since dead-zone reconstruction value of 0 is in general optimal (input p.d.f. is symmetric)</li>
<li>Use different <em>f</em> for each of these frequency components, and update separately, since they have different statistics<br />
–        16 frequency components for luma 4&#215;4 block of Inter 4&#215;4 modes<br />
–        16 frequency components for luma 4&#215;4 block in Intra 4&#215;4 modes<br />
–        …</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">The adaptive quantization encoding technique using an equal expected-value rule is only performed at the <em>encoding</em> quantization process, and is compatible with the standards, and only need modification only at the encoder. Experiential results show that up to 1dB improvement at high PSNR is observed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-3.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JM KTA Tutorial: Quantization Techniques &#8211; Part 2</title>
		<link>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-2.htm</link>
		<comments>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-2.htm#comments</comments>
		<pubDate>Fri, 12 Jun 2009 08:14:08 +0000</pubDate>
		<dc:creator>Yu Liu</dc:creator>
				<category><![CDATA[研究]]></category>
		<category><![CDATA[H.264/AVC]]></category>
		<category><![CDATA[KTA]]></category>
		<category><![CDATA[Quantization]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.vidwav.com/?p=215</guid>
		<description><![CDATA[<strong>2. </strong><strong>Principle of H.264/AVC </strong><strong>Normal</strong><strong> Quantization Scheme</strong>
<strong>2.1. Scalar d</strong><strong>ead-zone quantization</strong>
In this section the principle of H.264/AVC normal quantization scheme is described in a generalized form.
A scalar quantizer for input signal <em>W</em> can be decomposed into a function <em>Z=C[W]</em> called a classification rul[......]<p class='read-more'><a href='http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-2.htm'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>2. </strong><strong>Principle of H.264/AVC </strong><strong>Normal</strong><strong> Quantization Scheme</strong></p>
<p style="text-align: justify;"><strong>2.1. Scalar d</strong><strong>ead-zone quantization</strong></p>
<p style="text-align: justify;">In this section the principle of H.264/AVC normal quantization scheme is described in a generalized form.</p>
<p style="text-align: justify;">A scalar quantizer for input signal <em>W</em> can be decomposed into a function <em>Z=C[W]</em> called a classification rule that selects an integer-valued class identifier called the quantization index at the encoder, and a reconstruction rule that produces a real-valued output <em>W’=R[Z]</em> at the decoder. Video encoder applies entropy coding to the quantization indices and communicates to the decoder. Although H.264/AVC JM reference software implements some classification functions, only reconstruction function is standardized.</p>
<p style="text-align: justify;">In the quantization step of the encoder, the transform coefficients of the prediction error are quantized. This quantization is used to reduce the precision of the coefficients. Furthermore, the quantizer is designed to map insignificant coefficient values to zero whilst retaining a reduced number of significant, non-zero coefficients. The output of a quantizer is typically a ‘sparse’ array of quantized coefficients, mainly containing zeros.</p>
<p style="text-align: justify;">This uniform quantization can be expressed with equation (1), which describes the quantization step and with equation (2), which describes the inverse quantization step.</p>
<p style="text-align: center;"><img class="alignnone" title="eq1" src="http://ftp.vidwav.com/image/quant/eq1.gif" alt="" width="185" height="51" /> (1)</p>
<p style="text-align: justify;">In this equation, the input signal <em>W</em> is mapped to a so called quantization level <em>Z</em>. Therefore, the quantization step-size <em>∆</em> and the rounding control parameter <em>f</em> is used. The function floor()<em> </em>rounds to the nearest integer towards minus infinity and sign() returns the sign of the input signal. Figure 1 shows the dead-zone plus uniform threshold quantization, where <em>∆</em> is the interval size except dead-zone, <em>2(∆-f)</em> is the interval size of dead-zone, and <em>f</em> is the rounding offset.</p>
<p style="text-align: center;"><img class="aligncenter" title="fig1.gif" src="http://ftp.vidwav.com/image/quant/fig1.gif" alt="" width="524" height="161" /></p>
<p style="text-align: center;">Figure 1. Dead-zone with uniform threshold quantization</p>
<p style="text-align: justify;">The mapping of the quantization level <em>Z</em> to the signal <em>W’</em> is described in the inverse quantization step that is given by</p>
<p style="text-align: center;"><img class="alignnone" title="eq2" src="http://ftp.vidwav.com/image/quant/eq2.gif" alt="" width="59" height="17" /> (2)</p>
<p style="text-align: justify;">Note that in (2), the parameter <em>f</em> is not considered. In the following the influence of the rounding control parameter <em>f</em> is analysed.</p>
<p style="text-align: justify;"><strong>2.1 </strong><strong>Influence of rounding control parameter <em>f</em></strong></p>
<p style="text-align: justify;">By modifying <em>f</em>, the rounding behaviour can be controlled.  For example, in Figure 2, a rounding control of <em>f=<em>∆</em></em><em>/2</em>, leads to values <em>W’</em> of the inverse quantized (reconstructed) signal that are located in the centre of a quantization interval, and the range <em>∆</em><em>/2&lt;W&lt;=3<em>∆</em></em><em>/2</em> is quantized to <em>W’=<em>∆</em></em> .</p>
<p style="text-align: center;"><img class="alignnone" title="fig2" src="http://ftp.vidwav.com/image/quant/fig2.gif" alt="" width="548" height="54" /></p>
<p style="text-align: center;">Figure 2. Dead-zone quantization with <em>f=</em><em>D</em><em>/2</em></p>
<p style="text-align: justify;">If f is changed, the reconstructed values <em>W’ </em>are no longer located in the centre of the corresponding quantization interval. For example, in Figure 3, a quantizer for a rounding control parameter <em>f=<em>∆</em></em><em>/4</em> is chosen.</p>
<p style="text-align: center;"><img class="aligncenter" title="fig3" src="http://ftp.vidwav.com/image/quant/fig3.gif" alt="" width="548" height="54" /></p>
<p style="text-align: center;">Figure 3. Dead-zone quantization with <em>f=∆</em><em>/4</em></p>
<p style="text-align: justify;">The parameter <em>f=<em>∆</em></em><em>/4</em> has two effects:</p>
<ol style="text-align: justify;">
<li>Compared to <em>f=<em>∆</em></em><em>/2</em>, the quantization interval around zero is increased, and the range -3/4<em>∆</em><em>&lt;W&lt;3/4<em>∆</em></em> is quantized to <em>W’=0</em>.</li>
<li>The values of the quantized signal for <em>W’</em><em>!=</em><em>0</em> are no longer located in the center of a quantization interval. The range 3/4<em>∆</em><em>&lt;W&lt;=7/4<em>∆</em></em> is quantized to <em>W’=<em>∆</em></em>, etc.</li>
</ol>
<p style="text-align: justify;">Observed from the above examples, we can find that rounding offset <em>f</em> controls two aspects:</p>
<ol style="text-align: justify;">
<li>Size of dead-zone, <em>2(∆-f)<br />
- </em>Decrease <em>f</em>, dead-zone increases</li>
<li>Location of the reconstruction point relative to the quantization interval:<br />
- Decrease <em>f</em>, all the intervals would be shifted away from zero</li>
</ol>
<p style="text-align: justify;"><strong>2.2 </strong><strong>How to calculate the rounding offset <em>f</em>?</strong><strong> </strong></p>
<p style="text-align: justify;">To minimize mean-squared quantization error, <em>W’</em> should be the centroid (conditional mean) in the interval with respect to the probability distribution function (p.d.f.) of <em>W</em>, i.e., <em>W’ = m = E[ W | a ≤ W ≤ a + Δ]</em>, or</p>
<p style="text-align: center;"><img class="alignnone" title="eq3" src="http://ftp.vidwav.com/image/quant/eq3.gif" alt="" width="276" height="35" /> (3)</p>
<p style="text-align: justify;">where <em>a</em> is one value of the set [<em>∆</em><em>-f, 2<em>∆</em></em><em>-f, 3<em>∆</em></em><em>-f,…</em>]<em>, </em>and<em> P(W) </em>is the p.d.f of<em> W.</em></p>
<p style="text-align: justify;">For general distribution, the conditional means <em>m</em> could be at different distance from the lower threshold, for each interval, as conditional p.d.f. is different for different interval. Fortunately, for Laplacian distribution, the conditional means are at the same distance from the lower thresholds, for all intervals. Since DCT coefficients can be modeled by Laplacian distribution, this justifies using the same <em>f</em> for all intervals in H.264/AVC.</p>
<p style="text-align: justify;">The non-uniform probability distribution inside a quantization interval can be approximated by a Laplacian distribution, which is shown in Figure 4.</p>
<p style="text-align: center;"><img class="alignnone" title="fig4" src="http://ftp.vidwav.com/image/quant/fig4.gif" alt="" width="146" height="122" /></p>
<p style="text-align: center;">Figure 4: Probability distribution of transform coefficients <em>W</em> inside a quantization interval.</p>
<p style="text-align: justify;">Suppose that a Laplacian p.d.f. has standard derivation λ, or <em>P(w)=</em><em> </em><em>(</em><em>λ</em><em>/2)exp(-</em><em>λ</em><em>|w|)</em>, the optimal <em>f</em> which minimize the distortion can be determined analytically for Laplacian distribution, which decreases with increasing λ (i.e., decreasing standard derivation),</p>
<p style="text-align: center;"><img class="alignnone" title="eq4" src="http://ftp.vidwav.com/image/quant/eq4.gif" alt="" width="151" height="41" /> (4)</p>
<p style="text-align: justify;">Due to this distribution, the mean value of <em>W</em> inside a quantization interval is not located in the centre of corresponding interval. In order to reduce the quantization error, this effect is considered by using a rounding control parameter of <em>f&lt;<em>∆</em></em><em>/2</em>. Such a rounding control parameter leads to smaller values of the quantized signal <em>W’</em>, which are not located in the centre of a quantization interval.</p>
<p style="text-align: justify;">Figure 5 shows the monotonic property between optimal f and Laplacian standard derivation λ.</p>
<p style="text-align: center;"><img class="alignnone" title="fig5" src="http://ftp.vidwav.com/image/quant/fig5.gif" alt="" width="560" height="420" /></p>
<p style="text-align: center;">Figure 5. The monotonic property between optimal <em>f</em> and Laplacian standard derivation <em>λ</em></p>
<p style="text-align: justify;">
<p style="text-align: justify;">In the reference model of H.264/AVC, the probability distribution varies between Intra and Inter mode, thus different rounding control parameters are used. The rounding control parameter for Intra is <em>f=<em>∆</em></em><em>/3 </em>and for Inter it is <em>f=<em>∆</em></em><em>/6.</em> Therefore, the values of the quantized signal <em>W’</em> tend to be smaller than the value of the centre of the corresponding quantization interval. This behaviour is utilized to have a quantization that better fits to a non-uniform probability distribution of the input signal inside a quantization interval.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-2.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JM KTA Tutorial: Quantization Techniques &#8211; Part 1</title>
		<link>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-1.htm</link>
		<comments>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-1.htm#comments</comments>
		<pubDate>Fri, 12 Jun 2009 06:58:27 +0000</pubDate>
		<dc:creator>Yu Liu</dc:creator>
				<category><![CDATA[研究]]></category>
		<category><![CDATA[H.264/AVC]]></category>
		<category><![CDATA[KTA]]></category>
		<category><![CDATA[Quantization]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.vidwav.com/?p=207</guid>
		<description><![CDATA[<strong>1. Overview</strong>
Currently most image and video coding systems and standards such as MPEG-1/2 and H264/AVC use transform-based techniques followed by quantization and entropy coding for performing compression. The key idea is that transforms de-correlate the signal and compact the energy of a block into [......]<p class='read-more'><a href='http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-1.htm'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>1. Overview</strong></p>
<p style="text-align: justify;">Currently most image and video coding systems and standards such as MPEG-1/2 and H264/AVC use transform-based techniques followed by quantization and entropy coding for performing compression. The key idea is that transforms de-correlate the signal and compact the energy of a block into few low pass coefficients, which after quantization and de-quantization could still represent the signal rather accurately. Nevertheless, this quantization/de-quantization process needs to be carefully designed in order to have the best possible subjective and objective quality.</p>
<p style="text-align: justify;">In the encoder of H.264/AVC reference software, the scalar dead-zone quantization is adopted. In order to improve further the performance, other two adaptive quantization techniques are also introduced, which are both based on how to adjust the size of dead-zone and control the rounding behavior. In this tutorial, we will first introduce the principle of H.264/AVC normal quantization scheme, then discuss the adaptive rounding method which select adaptively rounding offset using an equal expected-value property. Finally, a more complex rate-distortion optimized quantization will be discussed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vidwav.com/2009/06/jm-kta-tutorial-quantization-techniques-part-1.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
