Method of coding transform coefficient based on high frequency zeroing and apparatus thereof
An image decoding method performed by a decoding apparatus according to the present disclosure includes receiving a bitstream including residual information; deriving quantized transform coefficients for a current block based on the residual information included in the bitstream; deriving residual samples for the current block based on the quantized transform coefficients; and generating a reconstructed picture based on the residual samples for the current block.
1. An image decoding method, by a decoding apparatus, comprising:
deriving transform coefficients for the current block based on residual information received from a bistream;
deriving residual samples for the current block based on the derived transform coefficients; and
generating a reconstructed picture based on the residual samples for the current block,
wherein the current block includes a low frequency transform coefficient region including at least one significant transform coefficient and a region except the low frequency transform coefficient region including transform coefficient 0,
the residual information includes last significant coefficient prefix information on position of last non-zero transform coefficient among the transform coefficients for the current block,
the position of the last non-zero transform coefficient is determined based on a prefix codeword related to the last significant coefficient prefix information, and
a maximum value of the last significant coefficient prefix information is determined based on a size of the low frequency transform coefficient region.
2. The image decoding method of claim 1 , wherein the size of the low frequency transform coefficient region is determined based on a width and height of the low frequency transform coefficient region, and
the last significant coefficient prefix information includes x-axis prefix information and y-axis prefix information, and the prefix codeword is a codeword for the x-axis prefix information or a codeword for the y-axis prefix information.
3. The image decoding method of claim 2 , wherein a maximum length of the prefix codeword which indicates the x-axis prefix information and a maximum length of the codeword, which indicates the y-axis prefix information are determined based on the maximum value of the last significant coefficient prefix information,
wherein the prefix codeword is derived based on the truncated unary binarization.
4. The image decoding method of claim 3 , wherein the maximum length of the codeword is determined to be 9 based on the width of the low frequency transform coefficient region being 32, and
the maximum length of the codeword is determined to be 9 based on the height of the low frequency transform coefficient region being 32.
5. The image decoding method of claim 3 , wherein a maximum binarized value of the codeword for the x-axis prefix information is determined to be 111111111 based on a width of the current block being greater than 32, and that the width of the low frequency transform coefficient region is 32, and
a maximum binarized value of the codeword for the y-axis prefix information is determined to be 111111111 based on a height of the current block being greater than 32, and that the height of the low frequency transform coefficient region is 32.
6. The image decoding method of claim 3 , wherein a maximum length of the codeword for the x-axis prefix information is determined based on cMax x , wherein cMax x being calculated based on the following equation:
c Max x =(log 2 (Min( W 1 ,W 2 ))<<1)−1
where cMax x is equal to the maximum length of the codeword for the x-axis prefix information; the W 1 is a width of the current block; and the W 2 is a width of the low frequency transform coefficient region.
7. The image decoding method of claim 6 , wherein a width of the low frequency transform coefficient region is 32, and
a maximum length of the codeword for the x-axis prefix information is determined based on cMax x , wherein cMax x being calculated based on the following equation:
c Max x =(Min(log 2 W 1 ,5))<<1)−1
where cMax x is equal to the maximum length of the codeword for the x-axis prefix information, and the W 1 is a width of the current block.
8. The image decoding method of claim 3 , wherein a maximum length of the codeword for the y-axis prefix information is determined based on cMax y , wherein cMax y being calculated based on the following equation:
c Max y =(log 2 (Min( H 1 ,H 2 ))<<1)−1
where cMax y is equal to the maximum length of the codeword for the y-axis prefix information; the H 1 is a height of the current block; and the H 2 is a height of the low frequency transform coefficient region.
9. The image decoding method of claim 8 , wherein the height of the low frequency transform coefficient is 32, and
the maximum length of the codeword for the y-axis prefix information is determined based on cMax y , wherein cMax x being calculated based on the following equation:
c Max y =(Min(log 2 H 1 ,5))<<1)−1
where cMax y is equal to the maximum length of the codeword for the y-axis prefix information, and the H 1 is a height of the current block.
10. The image decoding method of claim 1 , wherein the current block is a square block or a non-square block,
a width of the low frequency transform coefficient region is determined to be 32 based on a width of the current block being 64, and
a height of the low frequency transform coefficient region is determined to be 32 based on a height of the current block being 64.
11. The image decoding method of claim 1 , wherein the size of the low frequency transform coefficient region is determined based on a size of the current block.
12. The image decoding method of claim 1 , wherein the residual information includes information on the size of the low frequency transform coefficient region.
13. The image decoding method of claim 1 , wherein a size of the current block is 64×64, the size of the low frequency transform coefficient region is 32×32, and a maximum length of the prefix codeword is 9.
14. An image encoding method, by an encoding apparatus, comprising:
deriving residual samples for a current block;
deriving transform coefficients for the current block based on the residual samples for the current block; and
encoding residual information related with the transform coefficients,
wherein the current block includes a low frequency transform coefficient region including at least one significant transform coefficient and a region except the low frequency transform coefficient region including transform coefficient 0,
the residual information includes last significant coefficient prefix information on position of a last non-zero transform coefficient among the transform coefficients for the current block,
the position of the last non-zero transform coefficient is based on a prefix codeword related to the last significant coefficient prefix information, and
a maximum value of the last significant coefficient prefix information is determined based on a size of the low frequency transform coefficient region.
15. A non-transitory computer readable storage medium storing a bistream causing a decoding apparatus to perform an image decoding method, the method comprising;
deriving transform coefficients for the current block based on residual information received from a bistream;
deriving residual samples for the current block based on the derived transform coefficients; and
generating a reconstructed picture based on the residual samples for the current block,
wherein the current block includes a low frequency transform coefficient region including at least one significant transform coefficient and a region except the low frequency transform coefficient region including transform coefficient 0,
the residual information includes last significant coefficient prefix information on position of last non-zero transform coefficient among the transform coefficients for the current block,
the position of the last non-zero transform coefficient is determined based on a prefix codeword related to the last significant coefficient prefix information, and
a maximum value of the last significant coefficient prefix information is determined based on a size of the low frequency transform coefficient region.