METHOD AND APPARATUS FOR DEQUANTIZATION OF TRANSFORMED COEFFICIENTS
A method and apparatus for de-quantizing a transform coefficient from a quantization level are disclosed. Embodiments according to the present invention avoid overflow of the de-quantized transform coefficient by clipping the quantization level adaptively before reconstructing the transform coefficient. In one embodiment, the method comprises receiving a decoded quantization level for the transform coefficient of a transform unit, wherein the decoded quantization level is decoded by an entropy decoder or is being processed by the entropy decoder. The clipping range is determined and then the decoded quantization level is clipped to the clipping range to generate a clipping-processed quantization level. A de-quantized transform coefficient can be generated using the clipping-processed quantization level. In another embodiment, the decoded quantization level is always clipped to [−N, M], where M and N are positive integers.
1 . A method of de-quantizing a transform coefficient from a quantization level, the method comprising:
receiving a decoded quantization level for the transform coefficient of a transform unit, wherein the decoded quantization level is decoded by an entropy decoder or is being processed by the entropy decoder;
determining clipping range for the decoded quantization level;
clipping the decoded quantization level to the clipping range to generate a clipping-processed quantization level; and
generating a de-quantized transform coefficient using the clipping-processed quantization level.
2 . The method of claim 1 , further comprising determining clipping condition for the decoded quantization level, wherein said clipping the decoded quantization level is performed according to the clipping condition, and wherein the clipping condition is related to quantization matrix, quantization parameter, de-quantization step, video source bit-depth, transform size of the transform unit, a value of the decoded quantization level, predefined values or any combination thereof.
3 . The method of claim 2 , wherein the decoded quantization level is clipped to a first range for a first clipping condition and the decoded quantization level is clipped to a second range for a second clipping condition.
4 . The method of claim 3 , wherein the first range corresponds to a fixed range related to quantization-level bit-depth.
5 . The method of claim 3 , wherein the second range is related to dynamic range of the decoded quantization level.
6 . The method of claim 2 , wherein the clipping condition is determined by comparing a first weighted value with a threshold, wherein the first weighted value corresponds to a first linear function of quantization matrix, quantization parameter, de-quantization step, video source bit-depth, transform size of the transform unit, or any combination thereof.
7 . The method of claim 6 , wherein the threshold corresponds to a fixed value or a second weighted value, wherein the second weighted value corresponds to a second linear function of quantization matrix, quantization parameter, de-quantization step, video source bit-depth, and transform size of the transform unit, or any combination thereof.
8 . The method of claim 2 , wherein the clipping condition comprises comparing (20+M+DB−QP/6) with a threshold, wherein the threshold is 16, M represents transform size of the transform unit, DB is equal to B−8 and B is video source bit-depth, QP is quantization parameter, dynamic range of de-quantization step is 7 bits, the de-quantized transform coefficient is represented in 32 bits and the decoded quantization level is represented in 16 bits.
9 . The method of claim 2 , wherein the clipping condition comprises comparing (12+M+B−QP/6) with a threshold, wherein the threshold is 16, M represents transform size of the transform unit, B is video source bit-depth, QP is quantization parameter, dynamic range of de-quantization step is 7 bits, the de-quantized transform coefficient is represented in 32 bits and the decoded quantization level is represented in 16 bits.
10 . The method of claim 2 , wherein the clipping condition comprises comparing QP with a threshold, wherein the threshold is 36, transform size of the transform unit is 4×4, video source bit-depth is 8 bits, QP is quantization parameter, dynamic range of de-quantization step is 7 bits, the de-quantized transform coefficient is represented in 32 bits and the decoded quantization level is represented in 16 bits.
11 . The method of claim 1 , wherein the clipping range is related to quantization matrix, quantization parameter, de-quantization step, video source bit-depth, transform size of the transform unit, a value of the decoded quantization level, predefined values or any combination thereof.
12 . The method of claim 1 , wherein the decoded quantization level is clipped to M if the decoded quantization level is larger than M, where M is a first positive integer.
13 . The method of claim 12 , wherein the decoded quantization level is clipped to −N if the decoded quantization level is smaller than −N, where N is a second positive integer.
14 . The method of claim 13 , wherein M and N correspond to 32767 and 32768 respectively.
15 . The method of claim 1 , wherein a comparator is used for clipping the decoded quantization level.
16 . The method of claim 1 , wherein said clipping the decoded quantization level corresponds to unconditional fixed-range clipping if video source bit-depth is 10 bits or more, dynamic range of quantization matrix is 8 bits, dynamic range of de-quantization step is 7 bits, transform size of the transform unit is 4×4, dynamic range of quantization parameter is 8 bits, the de-quantized transform coefficient is represented in 32 bits and the decoded quantization level is represented in 16 bits.
17 . The method of claim 1 , wherein said generating the de-quantized transform coefficient comprises multiplying the clipping-processed quantization level by quantization matrix and de-quantization step.
18 . The method of claim 1 , wherein said clipping the decoded quantization level corresponds to unconditional fixed-range clipping, the clipped quantization level is represented in n bits.
19 . The method of claim 18 , wherein n correspond to 8, 16, or 32.
20 . An apparatus of de-quantizing a transform coefficient from a quantization level, the apparatus comprising:
means for receiving a decoded quantization level for the transform coefficient of a transform unit, wherein the decoded quantization level is decoded by an entropy decoder or is being processed by the entropy decoder;
means for determining clipping range for the decoded quantization level;
means for clipping the decoded quantization level to the clipping range to generate a clipping-processed quantization level; and
means for generating a de-quantized transform coefficient using the clipping-processed quantization level.
21 . The apparatus of claim 20 , further comprising means for determining clipping condition for the decoded quantization level, wherein said means for clipping the decoded quantization level is performed according to the clipping condition, and wherein the clipping condition is related to quantization matrix, quantization parameter, de-quantization step, video source bit-depth, transform size of the transform unit, a value of the decoded quantization level, predefined values or any combination thereof.
22 . The apparatus of claim 20 , wherein the clipping range is related to quantization matrix, quantization parameter, de-quantization step, video source bit-depth, transform size of the transform unit, a value of the decoded quantization level, predefined values or any combination thereof.
23 . The apparatus of claim 20 , wherein a comparator is used for clipping the decoded quantization level.
24 . The apparatus of claim 20 , wherein the decoded quantization level is clipped to a first range for a first clipping condition and the decoded quantization level is clipped to a second range for a second clipping condition.
25 . The apparatus of claim 20 , further comprising means for determining clipping condition for the decoded quantization level, wherein said means for clipping the decoded quantization level is performed according to the clipping condition, and wherein the clipping condition is determined by comparing a first weighted value with a threshold, wherein the first weighted value corresponds to a first linear function of quantization matrix, quantization parameter, de-quantization step, video source bit-depth, transform size of the transform unit, or any combination thereof.