Quantizing image data in image compression.
Abstract
A video image encoder estimates a quantization noise curve which will result from quantizing a coefficient data block and uses the estimated quantization noise curve and a specified minimum noise value to select the quantization step size actually used to quantize the coefficient data block. The quantization step size is also selected as a function of transmission buffer occupancy so as to limit the amount of encoded data to a predetermined rate.

Term
Term ended
Projected expiry passed 30 March 2015, 11.5 years ago.
- Priority
- Filed
- Published
- Projected expiry
- Today
19 claims: 3 independent, 16 dependent
- 1A quantization control apparatus comprising:quantization noise curve estimating means for estimating a quantization noise curve relating quantization noise to quantization step size for a block of image data;and selecting means for selecting an actual quantization step size in accordance with the estimated quantization noise curve.
- 10A quantization control method comprising the steps of:estimating a quantization noise curve relating quantization noise to quantization step size for a block of image data;and selecting an actual quantization step size in accordance with the estimated quantization noise curve.
- 19An encoding apparatus comprising:quantization noise curve estimating means for estimating a quantization noise curve relating quantization noise to quantization step size for a block of image data;selecting means for selecting an actual quantization step size in accordance with the estimated quantization noise curve;and quantizing means for quantizing said block of image data using said actual quantization step size.
Independent claims3
92 paragraphs, as filed
0001The present invention relates to quantizing image data in image compression.
0002The Moving Picture Experts Group system (MPEG 1, MPEG 2) has been proposed as an international standard for high efficiency encoding and decoding of a moving picture. Three types of pictures are defined in the MPEG system, an I picture which is encoded in a standalone manner, a P picture which is encoded by forward prediction from one reference picture which may be an I picture or a P picture, and a B picture which is bidirectionally encoded by forward and backward prediction from two reference pictures. A typical sequence of encoded pictures, in temporal order, may be I B B P B B P B B I B B ...
0003A picture is divided into macro blocks. An I picture comprises intra-macro blocks. P and B pictures respectively comprise non-intra macro blocks.
0004Fig. 1 shows a conventional video encoder according to the MPEG system. Blocks of data representing an I picture are applied to input terminal 100 and thence to subtractor 107. Since an I picture is not predicted from a reference picture, subtractor 107 simply forwards the I picture data blocks to DCT circuit 101 which orthogonally transforms the picture data blocks to coefficient data blocks, and supplies the blocks of coefficient data to quantizer 102.
0005Quantizer 102 quantizes the I picture coefficient data using a quantization step size selected by quantization control circuit 102. The quantization step size may also be referred to as a quantization scale. The quantized coefficient data are variable length encoded by VLC circuit 103, such as with a two dimensional Huffman code, and supplied to buffer 110. Buffer occupancy detecting circuit 117 monitors the percentage of buffer capacity used by the encoded data and supplies buffer occupancy information to the quantization control circuit 108, which selects a quantization step size so that the amount of encoded data in the buffer 110 remains within its capacity, i.e., does not overflow. The encoded data is delivered to output terminal 114 for transmission or recording.
0006The quantized coefficient data are also supplied to inverse quantizing circuit 109, which dequantizes the quantized data to produce reconstructed coefficient data. Inverse DCT circuit 111 inverse orthogonally transforms the reconstructed coefficient data to produce reconstructed image data blocks and supplies the image data blocks to frame memory 105 for storage therein as a locally decoded reference picture.
0007Subsequently, blocks of data representing either a B picture or a P picture are applied to terminal 100 and thence to motion detecting circuit 104 which detects motion within the supplied data blocks and produces motion vectors between the input B or P picture blocks and the stored reference picture blocks. The motion vectors are supplied to motion compensating circuit 113. The reference picture stored in frame memory 105 is motion compensated, that is, modified using the motion vectors by the circuit 113, to produce predicted picture data which is applied to subtractor 107 and adder 112. Subtractor 107 subtracts the predicted picture data from the input picture data to produce difference data which is orthogonally transformed, quantized and variable length coded, as generally described above. The quantized input picture data are also supplied to inverse quantizing circuit 109 and inverse DCT circuit 111 to produce reconstructed difference data which are added to the image data of the motion compensated reference picture by adder 112. The result is stored in frame memory 105 as a new reference picture.
0008In the encoder of Fig. 1, in order to generate data from the buffer 110 at a predetermined rate, it is necessary to limit the amount of encoded data per predetermined period of time to a predetermined amount. The process of limiting operates so that when the amount of encoded data in the buffer 110 is large, the quantization step size is selected to be coarse, and when the amount of encoded data in the buffer 110 is small, the quantization step size is selected to be fine.
0009Increasing the quantization step size to be coarse decreases the amount of encoded data, and also degrades the quality of the reconstructed picture. For images having a lot of information, degradation in quality is a serious problem.
0010Decreasing the quantization step size to be fine increases the amount of encoded data, and also reduces degradation in the quality of the reconstructed picture. For images having little information, degradation in quality is not such a serious problem, and reduction in the amount of encoded data is desirable.
0011Thus, it is seen that to select the optimum quantization step size, it is necessary to consider picture quality as well as buffer occupancy.
0012Various aspects of the invention are defined in the appended claims.
0013In accordance with an embodiment of this invention, a method of and a system for quantization control estimates a quantization noise curve relating quantization noise to quantization step size for a block of image data, and selects an actual quantization step size in accordance with the estimated quantization noise curve.
0014According to a further embodiment of the invention, the step of and means for estimating includes predicting a saturation noise value, predicting a saturation quantization step size corresponding to the saturated noise value, and predicting the estimated quantization noise curve in accordance with the saturation noise value and the saturation quantization step size.
0015The invention will now be described by way of example with reference to the accompanying drawings, throughout which like parts are referred to by like references, and in which: <ul id="ul0001" list-style="none"><li>Fig. 1 is a block diagram of a conventional video image encoder;</li><li>Figs. 2 and 3 are block diagrams of video image encoders according to embodiments of the present invention;</li><li>Fig. 4 is a block diagram of a noise estimating circuit according to an embodiment of the present invention;</li><li>Fig. 5 is a block diagram of a quantization step size control circuit according to an embodiment of the present invention;</li><li>Figs. 6 and 7 are quantization tables used in quantizing intra-macro blocks and non-intra macro blocks, respectively;</li><li>Figs. 8A and 8B are graphs illustrating unsaturated quantization noise;</li><li>Figs. 9A and 9B are graphs illustrating saturated quantization noise;</li><li>Figs. 10A-10C are graphs to which reference is made in explaining prediction of a quantization noise curve for unsaturated quantization noise;</li><li>Figs. 11A-11C are graphs to which reference is made in explaining prediction of a quantization noise curve for saturated quantization noise; and</li><li>Figs. 12A-12D are graphs to which reference is made in explaining selection of a quantization step size with respect to the predicted quantization noise curve and a specified SNR.</li></ul>
0016In an encoder according to the present embodiment, a quantization noise curve which will result from quantizing a coefficient data block is estimated and used, along with a specified minimum noise value, to select the quantization step size actually used to quantize the coefficient data block. Consequently, since image quality is incorporated in the selection of the quantization step size, reconstructed pictures have better image quality.
0017Encoders according to the present embodiment and in accordance with the MPEG 2 system will now be described. It will be appreciated that encoders in accordance with other systems are also contemplated.
0018Referring now to the drawings, and in particular to Fig. 2, there is illustrated an encoder according to the present embodiment. The apparatus illustrated in Fig. 2 is similar to the apparatus illustrated in Fig. 1, but also includes noise estimating circuit 15. For brevity, descriptions of elements of Fig. 2 corresponding to elements of Fig. 1 are omitted.
0019The estimating circuit 15 of Fig. 2 is adapted to receive a block of coefficient data from DCT circuit 1, to estimate the noise at various quantization step sizes, as described below. and to supply a predicted noise curve to quantization control circuit 8. In other embodiments, instead of estimating quantization noise from coefficient data, a quantization noise estimate may be generated directly from the input image data.
0020The quantization control circuit 8 functions to select a quantization step size on the basis of the predicted noise curve and the occupancy of buffer 10. The buffer occupancy is fed back to the quantization control circuit 8 by buffer occupancy detecting circuit 17.
0021Fig. 3 illustrates another embodiment of an encoder. In the encoder of Fig. 3, instead of feeding back the actual buffer occupancy, buffer occupancy estimating circuit 17A functions to predict the buffer occupancy from the input image data, and to feed forward the predicted buffer occupancy to the quantization control circuit 8.
0022Fig. 4 shows a block diagram of the noise estimating circuit 15. Generally, a coefficient block is supplied to a saturation noise estimating circuit and to a saturation quantization step size estimating circuit. The function of these estimating circuits is discussed below. A noise characteristic estimating circuit uses the estimated saturation noise and estimated saturation quantization step size to produce a predicted noise curve. The actual noise detecting circuit may be realized in hardware or in software.
0023Figs. 6 and 7 show quantization matrices used in the MPEG encoder of Fig. 2 for intra-macro block and non-intra-macro block coefficients, respectively. The matrix of Fig. 6 is referred to as wI(i,j), and the matrix of Fig. 7 is referred to as wN(i,j).
Quantization noise
0024Noise introduced by quantization of coefficient blocks will now be discussed.
0025The following mathematical symbol conventions are used herein: <dl id="dl0001"><dt>/</dt><dd>Division of an integer and rounding (omission) of the fractional portion in the direction of 0.</dd><dt>//</dt><dd>Division of an integer and rounding of the fractional portion to the nearest integer. A fractional portion of 0.5 is rounded away from 0.</dd><dt>%</dt><dd>Value of the remainder of division of integers.</dd></dl> sign(ARG) If ARG is a positive number, sign(ARG) = 1. If ARG is zero, sign(ARC) = 0. If ARG is a negative number, sign(ARG) = -1.
0026Quantization of a coefficient comprises division by quantization step size and rounding of the result to an integer, and is described by the following equation:<maths id="math0001" num="(eq. 1)"><math display="block"><mrow><mtext>Q_COEF = COEF // QS</mtext></mrow></math><img file="EP0680221A2_D0001.tif" /></maths> where COEF is an unquantized coefficient, QS is a quantization step size and Q_COEF is a quantized coefficient.
0027Inverse quantization, or dequantization, comprises multiplying a quantized coefficient by a quantization step size, and is described by the following equation:<maths id="math0002" num="(eq. 2)"><math display="block"><mrow><mtext>COEF_RECON = Q_COEF x QS</mtext></mrow></math><img file="EP0680221A2_D0002.tif" /></maths> where COEF_RECON is a reconstructed coefficient.
0028The noise introduced by quantization is the difference between the unquantized coefficient COEF and the reconstructed coefficient COEF_RECON,<maths id="math0003"><math display="block"><mrow><mtext>Q_NOISE = |COEF_RECON - COEF|</mtext></mrow></math><img file="EP0680221A2_D0003.tif" /></maths>
0029When the unquantized coefficient COEF is greater than or equal to half of the quantization step size QS/2, COEF ≧ QS/2, the quantization noise Q_NOISE comprises equiprobable values in the range 0 to QS/2. The mean value of the quantization noise is, therefore, QS/4. Thus, for suitably large coefficients, the average noise is a function of the quantization step size QS.
0030When the unquantized coefficient COEF is less than half of the quantization step size QS/2, COEF < QS/2, the quantized coefficient Q_COEF is always zero. Therefore, the reconstructed coefficient COEF_RECON is also zero, and the quantization noise Q_NOISE is equal to the unquantized coefficient COEF, Q_NOISE = |0 - COEF| = COEF.
0031The quantization noise is referred to herein as "saturated" when the quantization step size satisfies COEF < QS/2.
0032Generally, the quantization noise increases with an increase in the quantization step size. However, when the unquantized coefficient is a multiple of the quantization step size, the quantization noise becomes zero for that quantization step size. For example, the following table shows an example of the quantization noise as a function of an increasing quantization step size. <tables id="tabl0001" num="0001"><table frame="all"><tgroup cols="5" colsep="1" rowsep="0"><colspec colnum="1" colname="col1" colwidth="31.50mm" /><colspec colnum="2" colname="col2" colwidth="31.50mm" /><colspec colnum="3" colname="col3" colwidth="31.50mm" /><colspec colnum="4" colname="col4" colwidth="31.50mm" /><colspec colnum="5" colname="col5" colwidth="31.50mm" /><thead valign="top"><row><entry namest="col1" nameend="col1" align="left">COEF</entry><entry namest="col2" nameend="col2" align="left">QS</entry><entry namest="col3" nameend="col3" align="center">Q_COEF</entry><entry namest="col4" nameend="col4" align="center">COEF_RECON</entry><entry namest="col5" nameend="col5" align="center">Q_NOISE</entry></row></thead><tbody valign="top"><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">2</entry><entry namest="col3" nameend="col3" align="left">5</entry><entry namest="col4" nameend="col4" align="left">10</entry><entry namest="col5" nameend="col5" align="left">0</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">3</entry><entry namest="col3" nameend="col3" align="left">3</entry><entry namest="col4" nameend="col4" align="left">9</entry><entry namest="col5" nameend="col5" align="left">1</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">4</entry><entry namest="col3" nameend="col3" align="left">3</entry><entry namest="col4" nameend="col4" align="left">12</entry><entry namest="col5" nameend="col5" align="left">2</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">5</entry><entry namest="col3" nameend="col3" align="left">2</entry><entry namest="col4" nameend="col4" align="left">10</entry><entry namest="col5" nameend="col5" align="left">0</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">6</entry><entry namest="col3" nameend="col3" align="left">2</entry><entry namest="col4" nameend="col4" align="left">12</entry><entry namest="col5" nameend="col5" align="left">2</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">7</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">7</entry><entry namest="col5" nameend="col5" align="left">3</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">8</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">8</entry><entry namest="col5" nameend="col5" align="left">2</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">9</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">9</entry><entry namest="col5" nameend="col5" align="left">1</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">10</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">10</entry><entry namest="col5" nameend="col5" align="left">0</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">11</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">11</entry><entry namest="col5" nameend="col5" align="left">1</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">12</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">12</entry><entry namest="col5" nameend="col5" align="left">2</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">13</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">13</entry><entry namest="col5" nameend="col5" align="left">3</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">14</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">14</entry><entry namest="col5" nameend="col5" align="left">4</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">15</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">15</entry><entry namest="col5" nameend="col5" align="left">5</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">16</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">16</entry><entry namest="col5" nameend="col5" align="left">6</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">17</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">17</entry><entry namest="col5" nameend="col5" align="left">7</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">18</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">18</entry><entry namest="col5" nameend="col5" align="left">8</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">19</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">19</entry><entry namest="col5" nameend="col5" align="left">19</entry></row><row><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">20</entry><entry namest="col3" nameend="col3" align="left">1</entry><entry namest="col4" nameend="col4" align="left">20</entry><entry namest="col5" nameend="col5" align="left">10</entry></row><row rowsep="1"><entry namest="col1" nameend="col1" align="left">10</entry><entry namest="col2" nameend="col2" align="left">21</entry><entry namest="col3" nameend="col3" align="left">0</entry><entry namest="col4" nameend="col4" align="left">0</entry><entry namest="col5" nameend="col5" align="left">10</entry></row></tbody></tgroup></table></tables>
0033The root mean square noise NRMS for a block of coefficients is fundamentally proportional to the quantization step size, until the quantization noise saturates at COEF < QS/2. When the quantization noise is saturated for all coefficients in a block, NRMS is set to a constant value.
0034Figs. 8A and 9A show relationships between the quantization step size QS (abscissa) and the root mean square noise for a coefficient block NRMS (ordinate). Assuming a maximum quantization step size QS_MAX, Fig. 8A shows the case where saturation of NRMS does not occur for a quantization step size up to the maximum quantization step size, QS ≦ QS_MAX. The possible range of NRMS is the shaded portion of Fig. 8A. However, almost all of the values of NRMS are located on the curve shown in Fig. 8B. Generally, Fig. 8B shows the case where when the quantization scale QS is increased, NRMS increases almost proportionally thereto. The quantization scale reaches its maximum value at or before saturation of NRMS.
0035Fig. 9A shows the case where saturation of NRMS occurs before the quantization step size QS reaches the maximum quantization step size QS_MAX. The possible range of NRMS is the shaded portion of Fig. 9A. However, almost all of the values of NRMS are located on the curve shown in Fig. 9B. Generally, Fig. 9B shows the case where as the quantization scale QS is increased, NRMS saturates before the quantization scale QS reaches its maximum value.
0036The minimum value of the quantization step size at which saturation of NRMS occurs is referred to herein as the saturation quantization step size.
0037In MPEG 2, the maximum value of the quantization step size QS_MAX is 31.
Quantization of coefficients in MPEG 2
0038Although MPEG 2 provides for a linear quantization scale and a nonlinear quantization scale, only the case of a linear quantization scale will be discussed.
0039In MPEG 2, the DC coefficient of an intra-macro block (I picture) is quantized with one of four step sizes (8, 4, 2, 1) in accordance with a required accuracy as follows:<maths id="math0004" num="(eq. 3)"><math display="block"><mrow><mtext>QDC = dc // Q_dc</mtext></mrow></math><img file="EP0680221A2_D0004.tif" /></maths> where dc is an unquantized intra-macro block DC coefficient, Q_dc is one of the four quantization step sizes discussed above and QDC is a quantized intra-macro block DC coefficient.
0040In MPEG 2, the AC coefficients of an intra-macro block are quantized with respective quantization step sizes shown in the quantization step size matrix wI(i,j) of Fig. 6 as follows:<maths id="math0005" num="(eq. 4)"><math display="block"><mrow><mtext>q_ac(i,j) = (16 x ac(i,j)) // wI(i,j)</mtext></mrow></math><img file="EP0680221A2_D0005.tif" /></maths> where ac(i,j) denotes the unquantized intra-macro block AC coefficients and q_ac(i,j) denotes intermediate quantized intra-macro block AC coefficients.
0041The intermediate intra-macro block AC coefficients q_ac(i,j) are limited to a value within a range from -2048 to 2047, and are further quantized by the quantization step size QS obtained for each macro block as follows:<maths id="math0006" num="(eq. 5)"><math display="block"><mrow><mtext>QAC(i,j) = ( q_ac(i,j) + sign(q_ac(i,j)) x ((3 x QS) // 4) ) / (2 x QS)</mtext></mrow></math><img file="EP0680221A2_D0006.tif" /></maths> where QAC(i,j) denotes the quantized intra-macro block AC coefficients. In accordance with the value of an MPEG 2 parameter, tcoef-escape-flag, the coefficients QAC(i,j) are limited to a value within a range from -255 to 255 when tcoef-escape-flag is equal to 0 and to a value within a range from -2047 to 2047 when tcoef-escape-flag is equal to 1.
0042In MPEG 2, the DC and AC coefficients of a non-intra-macro block (P or B picture) are quantized by the same method using the quantization matrix wN(i,j) of Fig. 7. The quantization result QAC(i,j) is calculated according to the following equations:<maths id="math0007" num="(eq. 6)"><math display="block"><mrow><mtext>q_ac(i,j) = (16 x ac(i,j)) // wN(i,j)</mtext></mrow></math><img file="EP0680221A2_D0007.tif" /></maths><maths id="math0008" num="(eq. 7)"><math display="block"><mrow><mtext>QAC(i,j) = q_ac(i,j) / (2 x QS)</mtext></mrow></math><img file="EP0680221A2_D0008.tif" /></maths>
0043In the intra-macro block, the inverse quantization of the DC coefficient is obtained as follows:<maths id="math0009" num="(eq. 8)"><math display="block"><mrow><mtext>dct_recon(0,0) = Q_dc x QDC</mtext></mrow></math><img file="EP0680221A2_D0009.tif" /></maths> where dct_recon(0,0) is the reconstructed DC coefficient, also referred to as the dequantized DC coefficient.
0044In the intra-macro block, the inverse quantization of the AC coefficient is obtained as follows:<maths id="math0010" num="(eq. 9)"><math display="block"><mrow><mtext>dct_recon(i,j) = (QS x 2 x QAC(i,j) x wI(i,j)) / 16</mtext></mrow></math><img file="EP0680221A2_D0010.tif" /></maths> where dct-recon(i,j) denotes the reconstructed AC coefficients. When the sum which is calculated by the following equation is equal to an even number, the least significant bit (LSB) in the sign-magnitude representation in dct_recon(7,7) is inverted:<maths id="math0011"><img file="EP0680221A2_D0011.tif" /></maths>
0045In the non-intra-macro block, the inverse quantization of the coefficients is obtained as follows: for QAC(i,j) > 0,<maths id="math0012" num="(eq. 11)"><math display="block"><mrow><mtext>dct_recon(i,j) = ((2 x QAC(i,j) + 1) x QS x wN(i,j)) / 16</mtext></mrow></math><img file="EP0680221A2_D0012.tif" /></maths> for QAC(i,j) = 0,<maths id="math0013" num="(eq. 12)"><math display="block"><mrow><mtext>dct_recon(i,j) = 0</mtext></mrow></math><img file="EP0680221A2_D0013.tif" /></maths> for QAC(i,j) < 0,<maths id="math0014" num="(eq. 13)"><math display="block"><mrow><mtext>dct_recon(i,j) = ((2 x QAC(i,j) - 1) x QS x wN(i,j)) / 16</mtext></mrow></math><img file="EP0680221A2_D0014.tif" /></maths> When the sum which is calculated by the following equation is equal to an even number, the least significant bit (LSB) in the sign-magnitude representation in dct_recon(7,7) is inverted:<maths id="math0015"><img file="EP0680221A2_D0015.tif" /></maths>
Quantization noise curve estimation in MPEG 2
0046Prediction of quantization noise using the MPEG 2 Test Model 5 will now be discussed.
0047Let (a) be the saturation NRMS, (b) be the saturation quantization step size, and the maximum quantization step size QS_MAX be 31.
0048Fig. 10A shows the case where NRMS not saturated until the quantization step size reaches its maximum, that is, (b) = QS_MAX = 31. Strictly speaking, even when the quantization step size reaches its maximum, saturation may not occur. However, for convenience, saturation is considered to occur at QS = QS_MAX. Fig. 10B shows the curve on which NRMS is generally located. For simplicity, the NRMS curve is approximated as a straight line curve, as shown in Fig. 10C, which passes through the origin (QS = 0, NRMS = 0) and the point (QS = 31, NRMS = (a)).
0049Fig. 11A shows the case where NRMS is completely saturated before the quantization step size reaches its maximum, that is, (b) < QS_MAX. For a quantization step size QS in the range (b) to QS_MAX, NRMS = (a). Fig. 11B shows the curve on which NRMS is generally located. For simplicity, the NRMS curve is approximated as a polygonal curve comprising a straight line curve which passes through the origin (QS = 0, NRMS = 0) and the point (QS = (b), NRMS = (a)), followed by a constant portion ((b) < QS <= 31, NRMS = (a)).
0050The approximations of Fig. 10C and 11C both include the point (QS = 31, NRMS = (a)).
0051The quantization noise curve is estimated as follows.
0052First, the saturation quantization step size (b) is predicted. If (b) > QS_MAX, then (b) is limited to QS_MAX = 31.
0053Next, the saturation NRMS (a) at QS = QS_MAX is predicted.
0054In the range where QS < (b), the quantization noise curve is approximated by a straight line connecting the origin (QS = 0, NRMS = 0) and the point (QS = (b), NRMS = (a)). If (b) = QS_MAX, there is no need to continue.
0055If (b) < QS_MAX, then in the range where QS > (b), the quantization noise curve is approximated by a constant (NRMS = (a)).
0056Thus, to approximate the quantization noise curve in MPEG 2, only the saturation NRMS (a) and the saturation quantization step size (b) are needed.
0057The signal to noise ratio (SNR) is defined as follows:<maths id="math0016" num="(eq. 15)"><math display="block"><mrow><mtext>SNR = 20 log (255/NRMS)</mtext></mrow></math><img file="EP0680221A2_D0016.tif" /></maths>
Predicting the saturation NRMS (a)
0058A procedure for estimating the saturation NRMS (a) at the maximum quantization step size QS_MAX will now be described. Generally, the procedure is to approximately calculate the portion of each coefficient in a block which will be lost (omitted) by quantization, to sum the lost portions in the block and to multiply the sum by a constant found from, for example, statistical observation of encoding sequences. The multiplied sum is the prediction of the saturation NRMS (a).
0059For an intra-macro block, quantization is approximated as follows, from equations (4) and (5):<maths id="math0017" num="(eq. 16)"><math display="block"><mrow><mtext>QAC(i,j) = (16 x ac(i,j)) / (wI(i,j) x 2 x 31)</mtext></mrow></math><img file="EP0680221A2_D0017.tif" /></maths> The portion of each coefficient in an intra-macro block which will be lost by quantization when QS = QS_MAX = 31 is approximated as follows:<maths id="math0018" num="(eq. 17)"><math display="block"><mrow><mtext>rmdI(i,j) = dc % 8, (i,j) = (0,0)</mtext></mrow></math><img file="EP0680221A2_D0018.tif" /></maths><maths id="math0019" num="(eq. 18)"><math display="block"><mrow><mtext>rmdI(i,j) = (16 x ac(i,j)) % (wI(i,j) x 2 x 31), (i,j) ≠ (0,0)</mtext></mrow></math><img file="EP0680221A2_D0019.tif" /></maths> where dc = ac(0,0) and it is assumed that Q_dc = 8. During encoding, it is possible to accommodate Q_dc selected from (4, 2, 1). The sum of the coefficient portions lost during quantization of an intra-macro block is defined as follows:<maths id="math0020"><img file="EP0680221A2_D0020.tif" /></maths> The multiplier constant should be obtained by statistics of the relationship between P1I and NRMS for a source image being encoded. For an MPEG test sequence, the intra-macro block constant is as follows:<maths id="math0021" num="(eq. 20)"><math display="block"><mrow><mtext>cI = 1/(903.297)</mtext></mrow></math><img file="EP0680221A2_D0021.tif" /></maths> For an intra-macro block, the saturation NRMS is predicted from (a) = cI x P1I.
0060For a non-intra-macro block, quantization is approximated as follows, from equations (6) and (7):<maths id="math0022" num="(eq. 21)"><math display="block"><mrow><mtext>QAC(i,j) = (16 x ac(i,j)) / (wN(i,j) x 2 x 31)</mtext></mrow></math><img file="EP0680221A2_D0022.tif" /></maths> The portion of each coefficient in a non-intra-macro block which will be lost by quantization when QS = QS_MAX = 31 is approximated as follows:<maths id="math0023" num="(eq. 22)"><math display="block"><mrow><mtext>rmdN(i,j) = (16 x ac(i,j)) % (wN(i,j) x 2 x 31)</mtext></mrow></math><img file="EP0680221A2_D0023.tif" /></maths> The sum of the coefficient portions lost during quantization of a non-intra-macro block is defined as follows:<maths id="math0024"><img file="EP0680221A2_D0024.tif" /></maths> The multiplier constant should be obtained by statistics of the relationship between P1N and NRMS for a source image being encoded. For an MPEG test sequence, the non-intra-macro block constant is as follows:<maths id="math0025" num="(eq. 24)"><math display="block"><mrow><mtext>cN = 1/(734.522)</mtext></mrow></math><img file="EP0680221A2_D0025.tif" /></maths> For a non-intra-macro block, the saturation NRMS is predicted from (a) = cN x P1N.
Predicting the saturation quantization step size (b)
0061A procedure for estimating the saturation quantization step size (b) will now be described. Generally, the procedure is to find the minimum quantization step size which results in the quantized AC coefficients for a block having values of zero, and to use this minimum quantization step size as the prediction of the saturation quantization step size.
0062For an intra-macro block AC coefficient ac(i,j), the minimum quantization step size MIN_QSI(i,j) which results in the quantized AC coefficient QAC(i,j) having a value of zero is found from the following, based on equations (4) and (5):<maths id="math0026" num="(eq. 25)"><math display="block"><mrow><mtext>QAC(i,j) = ( ((16 x ac(i,j))/wI(i,j)) + ((3 x QS)/4) ) / (2 x QS)</mtext></mrow></math><img file="EP0680221A2_D0026.tif" /></maths> The quantized coefficient QAC(i,j) will be zero when:<maths id="math0027" num="(eq. 26)"><math display="block"><mrow><mtext>1 > ( ((16 x ac(i,j))/wI(i,j)) + ((3 x QS)/4) ) / (2 x QS)</mtext></mrow></math><img file="EP0680221A2_D0027.tif" /></maths> Rearranging terms,<maths id="math0028" num="(eq. 27)"><math display="block"><mrow><mtext>QS > (64 x ac(i,j)) / (5 x wI(i,j))</mtext></mrow></math><img file="EP0680221A2_D0028.tif" /></maths> The minimum integer quantization step size which satisfies equation (27) is<maths id="math0029" num="(eq. 28)"><math display="block"><mrow><mtext>MIN+_QSI(i,j) = (64 x ac(i,j)) / (5 x wI(i,j)) + 1</mtext></mrow></math><img file="EP0680221A2_D0029.tif" /></maths> Similarly, the minimum integer quantization step size which satisfies equation (27) when ac(i,j) < 0 is<maths id="math0030" num="(eq. 29)"><math display="block"><mrow><mtext>MIN-_QSI(i,j) = -(64 x ac(i,j)) / (5 x wI(i,j)) + 1</mtext></mrow></math><img file="EP0680221A2_D0030.tif" /></maths> When ac(i,j) = 0, the quantization result is always equal to 0. However, since the possible quantization step size range is 1 to 31, the minimum integer quantization step size is 1, MINO_QSI(i,j) = 1. Summarizing, the minimum quantization step size MIN_QSI is found from<maths id="math0031" num="(eq. 30)"><math display="block"><mrow><mtext>MIN_QSI(i,j) = |(64 x ac(i,j)) / (5 x wI(i,j))| + 1</mtext></mrow></math><img file="EP0680221A2_D0031.tif" /></maths> For all of the AC coefficients in an intra-macro block, the minimum quantization step size P2I at which all quantized AC coefficients in the block have a value of zero is<maths id="math0032" num="(eq. 31)"><math display="block"><mrow><mtext>P2I = max(MIN_QSI(i,j)), (i,j) ≠ 0</mtext></mrow></math><img file="EP0680221A2_D0032.tif" /></maths> For an intra-macro block, the saturation quantization step size is predicted from (b) = P2I.
0063For a non-intra-macro block, in a manner similar to the intra-macro block, the above-described prediction procedure is applied to equations (6) and (7) to obtain the minimum quantization step size P2N at which all quantized coefficients in the block have a value of zero:<maths id="math0033" num="(eq. 32)"><math display="block"><mrow><mtext>P2N = max(|(8 x ac(i,j)) / wN(i,j)| + 1),</mtext><mspace linebreak="newline" /><mtext> 0 ≦ i ≦ 7, 0 ≦ j ≦ 7</mtext></mrow></math><img file="EP0680221A2_D0033.tif" /></maths> For a non-intra-macro block, the saturation quantization step size is predicted from (b) = P2N.
0064Operation of the noise estimating circuit 15 shown in Fig. 4 will now be described.
0065The noise estimating circuit 15 comprises input terminal 50, switch 54, saturation noise estimating circuits 51A, 51B, multipliers 52A, 52B, saturation quantization step size estimating circuits 53A, 53B, quantization noise curve predicting circuit 55 and output terminal 56.
0066Blocks of coefficient data are supplied from DCT circuit 1 of Fig. 2 to input terminal 50 of Fig. 4, which supplies the blocks to switch 54. Switch 54 is operative in accordance with a control signal (not shown) to supply intra-macro blocks to terminal 54A and to supply non-intra macro blocks to terminal 54B.
0067Saturation noise estimating circuit 51A and saturation quantization step size estimating circuit 53A are coupled to switch terminal 54A, and are adapted to receive intra-macro blocks therefrom. The circuits 51A, 53A are also adapted to receive the quantization matrix wI shown in Fig. 6.
0068The saturation noise estimating circuit 51A functions to calculate the value P1I as described above, and to supply the value P1I to multiplier 52A, which is adapted to multiply the value P1I by an intra-macro block constant cI, as described above, to produce a predicted saturation NRMS (a), and to supply the predicted value (a) to quantization noise curve predicting circuit 55.
0069The saturation quantization step size estimating circuit 53A functions to calculate the value P2I as described above, and to supply the value P2I as a predicted saturation quantization step size (b) to quantization noise curve predicting circuit 55.
0070Saturation noise estimating circuit 51B and saturation quantization step size estimating circuit 53B are coupled to switch terminal 54B, and are adapted to receive non-intra-macro blocks therefrom. The circuits 51B, 53B are also adapted to receive the quantization matrix wN shown in Fig. 7.
0071The saturation noise estimating circuit 51B functions to calculate the value P1N as described above, and to supply the value P1N to multiplier 52B, which is adapted to multiply the value P1N by an intra-macro block constant cN, as described above, to produce a predicted saturation NRMS (a), and to supply the predicted value (a) to quantization noise curve predicting circuit 55.
0072The saturation quantization step size estimating circuit 53B functions to calculate the value P2N as described above, and to supply the value P2N as a predicted saturation quantization step size (b) to quantization noise curve predicting circuit 55.
0073The quantization noise curve predicting circuit 55 functions to estimate a quantization noise curve in accordance with the procedure described above, and to supply the result to output terminal 56.
0074Operation of the quantization control circuit 8 shown in Fig. 5 will now be described.
0075The estimated quantization noise curve is supplied from the noise estimating circuit 15, shown in Figs. 2 and 4, to input terminal 60 of the quantization control circuit 8 shown in Fig. 5 which supplies the estimated curve to first quantization step size circuit 66. A minimum NRMS value (A) is supplied to input terminal 62 and thence to first quantization step size circuit 66. The value (A) is obtained from a desired SNR and equation (15).
0076The first quantization step size circuit 66 uses the predicted noise curve and the specified minimum NRMS value (A) to generate a first quantization step size QS_N and supplies the step size QS_N to comparator 70.
0077Generation of the step size QS_N will be explained with reference to Figs. 12A-12D. First, the circuit 66 determines whether the minimum NRMS value (A) is less than the saturation NRMS value (a). If not, that is, (A) ≧ (a), as shown in Figs. 12A and 12B, the step size QS_N is set to QS_MAX = 31. Actually, in the case of Fig. 12B, the step size QS_N may be selected anywhere in the range (b) to QS_MAX.
0078When (A) < (a), then QS_N is set to (A/a) x (b). If (b) = QS_MAX, as shown in Fig. 12C, then QS_N is set to (A/a) x QS_MAX. If (b) < QS_MAX, as shown in Fig. 12D, then QS_N is set to (A/a) x (b). In either of these cases, if rounding is required, QS_N is rounded up to the nearest integer.
0079A buffer occupancy value (B) is supplied from buffer occupancy detecting circuit 17 of Fig. 2 or from buffer occupancy estimating circuit 17A of Fig. 3 to input terminal 64 of the quantization control circuit 8 shown in Fig. 5. The buffer occupancy (B) may be, for example, simply the percent of buffer capacity occupied by encoded data awaiting transmission, that is, (B) = D/Y, where D is the amount of encoded data awaiting transmission and Y is the capacity of the buffer. The input terminal 64 supplies the buffer occupancy to second quantization step size circuit 68.
0080The second quantization step size circuit 68 uses the buffer occupancy (B) to generate a second quantization step size QS_B and supplies the step size QS_B to comparator 70. For example, the step size QS_B may be the product of the buffer occupancy and the maximum quantization step size, QS_B = (B) x (QS_MAX). Several methods are set forth in the MPEG Test Models for determining QS_B.
0081Comparator 70 is operative to receive the first and second quantization step sizes QS_N, QS_B, to select the larger for use in actual quantization of a coefficient data block, and to supply the selected step size to output terminal 72.
0082Thus, the quantization control circuit 8 maximizes the value of the SNR of the video image and prevents the buffer memory from overflowing. Since the selected quantization step size is always at least QS_B, an overflow never occurs.
0083When a coefficient block representing a lot of information is followed by a coefficient block representing little information, reconstructed image quality is improved by limiting a maximum value of the SNR of the block representing little information. Such limiting corresponds to allocating extra buffer space to the block representing a lot of information. That is, perceived image quality is thought to be improved more by reducing quantization noise in the block representing a lot of information than by reducing quantization noise in the block representing little information.
0084If encoding can be performed without considering the buffer occupancy, then QS_N becomes the selected quantization step size, and the SNR of the image becomes generally constant.
0085According to the present embodiment, since the quantization noise can be estimated, the quantization step size can be selected together with the buffer occupancy in accordance with the SNR. That is, for example, the quantization can be performed to make the SNR substantially constant. In case of using the same code rate as in the prior art, therefore, a reconstructed picture is stable and a higher quality is obtained.
0086With the quantization noise estimating method according to the present embodiment. since the quantization noise can be estimated before the quantization is actually performed, the noise estimating circuit can be easily constructed and the optimum quantization step size can be easily selected.
0087In summary, therefore, embodiments of the present invention provide an encoding apparatus and method which avoid the aforementioned disadvantages of the prior art, in which a quantization step size is set in consideration of picture quality; and/or a quantization step size control method and apparatus which selects a quantization step size in accordance with noise introduced by the quantization.
44 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21 Sheet 22 Sheet 23 Sheet 24 Sheet 25 Sheet 26 Sheet 27 Sheet 28 Sheet 29 Sheet 30 Sheet 31 Sheet 32 Sheet 33 Sheet 34 Sheet 35 Sheet 36 Sheet 37 Sheet 38 Sheet 39 Sheet 40 Sheet 41 Sheet 42 Sheet 43 Sheet 44
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| EP0808069A3 | Cited by | European Patent Office (EPO) | Search report |
| EP1091588A1 | Cited by | European Patent Office (EPO) | Search report |
| US7936938B2 | Cited by | United States of America | Applicant |
| WO9739584A1 | Cited by | World Intellectual Property Organization (WIPO) | International search |
| FR2875076A1 | Cited by | France | Search report |
| EP0808069A2 | Cited by | European Patent Office (EPO) | Search report |
| EP1091588A4 | Cited by | European Patent Office (EPO) | Search report |
| WO0065842A1 | Cited by | World Intellectual Property Organization (WIPO) | Applicant |
| DE19618117C1 | Cited by | Germany | Search report |
| EP0490539A2 | Cites | European Patent Office (EPO) | Search report |
| EP0493136A2 | Cites | European Patent Office (EPO) | Search report |
| EP0509576A2 | Cites | European Patent Office (EPO) | Search report |
| EP0675653A1 | Cites | European Patent Office (EPO) | Search report |
| US4774574A | Cites | United States of America | Search report |
| US4776030A | Cites | United States of America | Search report |
10 members in 6 offices; this record represents the family
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 8408894 | Japan | – | |
| 8408894 | Japan | A |
Members10
| Document | Office | Kind | |
|---|---|---|---|
| CA2145834A1 | Canada | A1 | |
| EP0680221A2This record | European Patent Office (EPO) | A2 | |
| JPH07321664A | Japan | A | |
| KR950035434A | Republic of Korea | A | |
| EP0680221A3 | European Patent Office (EPO) | A3 | |
| US5654760A | United States of America | A | |
| US5739863A | United States of America | A | |
| EP0680221B1 | European Patent Office (EPO) | B1 | |
| DE69521238D1 | Germany | D1 | |
| DE69521238T2 | Germany | T2 |
27 legal events, as 3 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Notification of lapseLapsedST | ST | FR | |
| Nl: lapsed or anulled due to non-payment of the annual feeLapsedNLV4 | NLV4 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Gb: european patent ceased through non-payment of renewal feeCeasedGBPC | GBPC | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| No opposition filedOpposition26N | 26N | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| European patent in force as of 2002-01-01IF02 | IF02 | GB | |
| Fr: translation filedET | ET | EP | |
| Corresponds to:REF | REF | EP | |
| Designated contracting statesAK | AK | EP | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOS IGRAGRAH | GRAH | EP | |
| Despatch of communication of intention to grantORIGINAL CODE: EPIDOS AGRAGRAG | GRAG | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOS IGRAGRAH | GRAH | EP | |
| Despatch of communication of intention to grantORIGINAL CODE: EPIDOS AGRAGRAG | GRAG | EP | |
| First examination report despatched17Q | 17Q | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting statesAK | AK | EP | |
| Search report despatchedORIGINAL CODE: 0009013PUAL | PUAL | EP | |
| Designated contracting statesAK | AK | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP |
Numbers
- Publication
- 0680221
- Application
- 953021532
Titles3
- German
- Bilddatenquantisierung in Bildkomprimierung
- English
- Quantizing image data in image compression
- French
- Quantification de données d'image dans une compression d'images
Classification
- CPC, 10
- H04N19/45
- H04N19/124
- H04N19/159
- H04N19/176
- H04N19/149
- H04N19/61
- H04N19/60
- H04N19/126
- H04N19/146
- H04N19/152
- IPC, 4
- G06T9 00
- H04N7 26
- H04N7 30
- H04N7 50
Designated states4
- Contracting states, 4
- Germany
- France
- United Kingdom
- Netherlands (Kingdom of the)