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:
receiving a bitstream including residual information;
deriving transform coefficients for the current block based on the residual information;
deriving residual samples for the current block by applying inverse transform to 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 and last significant coefficient suffix 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 and the last significant coefficient suffix information,
the prefix codeword is related to the last significant coefficient prefix information, and
a maximum length of the prefix codeword 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 codeword, which indicates the x-axis prefix information, is determined to be 9 based on the width of the low frequency transform coefficient region being 32, and
a maximum length of the codeword, which indicates the y-axis prefix information, is determined to be 9 based on the height of the low frequency transform coefficient region being 32.
4. 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.
5. The image decoding method of claim 2 , 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.
6. The image decoding method of claim 5 , 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.
7. The image decoding method of claim 2 , wherein a 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 =(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.
8. The image decoding method of claim 7 , 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.
9. 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.
10. The image decoding method of claim 1 , wherein the size of the low frequency transform coefficient region is one of 32×16, 16×32, 16×16 or 32×32.
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 and last significant coefficient suffix 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 and the last significant coefficient suffix information,
the prefix codeword is related to the last significant coefficient prefix information, and
a maximum length of the prefix codeword is determined based on a size of the low frequency transform coefficient region.
15. A non-transitory computer readable storage medium storing encoded information causing a decoding apparatus to perform an image decoding method, the method comprising;
receiving a bitstream including residual information;
deriving transform coefficients for the current block based on the residual information;
deriving residual samples for the current block by applying inverse transform to 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,
wherein the residual information includes last significant coefficient prefix information and last significant coefficient suffix information on position of last non-zero transform coefficient among the transform coefficients for the current block,
wherein the position of the last non-zero transform coefficient is determined based on a prefix codeword and the last significant coefficient suffix information,
wherein the prefix codeword is related to the last significant coefficient prefix information, and
wherein a maximum length of the prefix codeword is determined based on a size of the low frequency transform coefficient region.