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 quantized transform coefficients for a current block based on residual information received from a bistream;
deriving dequantized transform coefficients for the current block based on the quantized transform coefficient;
deriving residual samples for the current block based on the dequantized 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 only transform coefficient 0,
wherein 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,
wherein the last significant coefficient prefix information includes a column position prefix information and a row position prefix information,
wherein the position of the last non-zero transform coefficient is determined based on prefix codewords related to the last significant coefficient prefix information,
wherein the prefix codewords include a codeword for the column position prefix information and a codeword for the row position prefix information, and
wherein a maximum value of the last significant coefficient prefix information and a maximum length of the prefix codewords are 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.
3. The image decoding method of claim 2 , wherein a maximum length of the codeword which indicates the column position prefix information and a maximum length of the codeword which indicates the row position 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 are determined to be 9 based on the width of the low frequency transform coefficient region being 32, and
the maximum length of the codeword are 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 column position 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 row position 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 column position prefix information is determined based on cMaxx, wherein cMaxx being calculated based on the following equation:
c Maxx=(log 2(Min( W 1, W 2))<<1)−1
where cMaxx is equal to the maximum length of the codeword for the column position prefix information; the W1 is a width of the current block; and the W2 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 column position prefix information is determined based on cMaxx, wherein cMaxx being calculated based on the following equation:
c Maxx=(Min(log 2 W 1,5))<<1)−1
where cMaxx is equal to the maximum length of the codeword for the column position prefix information, and the W1 is a width of the current block.
8. The image decoding method of claim 3 , wherein a maximum length of the codeword for the row position prefix information is determined based on cMaxy, wherein cMaxy being calculated based on the following equation:
c Maxy=(log 2(Min( H 1, H 2))<<1)−1
where cMaxy is equal to the maximum length of the codeword for the row position prefix information; the H1 is a height of the current block; and the H2 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 row position prefix information is determined based on cMaxy, wherein cMaxx being calculated based on the following equation:
c Maxy=(Min(log 2 H 1,5))<<1)−1
where cMaxy is equal to the maximum length of the codeword for the row position prefix information, and the H1 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 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.
13. 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;
deriving quantized transform coefficients based on the transform coefficients for the current block; and
encoding residual information related with the quantized 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 only transform coefficient 0,
wherein 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,
wherein the last significant coefficient prefix information includes a column position prefix information and a row position prefix information,
wherein the position of the last non-zero transform coefficient is determined based on prefix codewords related to the last significant coefficient prefix information,
wherein the prefix codewords include a codeword for the column position prefix information and a codeword for the row position prefix information, and
wherein a maximum value of the last significant coefficient prefix information and a maximum length of the prefix codewords are determined based on a size of the low frequency transform coefficient region.
14. A non-transitory computer readable storage medium storing a bistream generated by a method, the method comprising;
deriving residual samples for a current block;
deriving transform coefficients for the current block based on the residual samples;
deriving quantized transform coefficients based on the transform coefficients for the current block; and
encoding residual information related with the quantized transform coefficients to generate the bistream,
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 only transform coefficient 0,
wherein 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,
wherein the last significant coefficient prefix information includes a column position prefix information and a row position prefix information,
wherein the position of the last non-zero transform coefficient is determined based on prefix codewords related to the last significant coefficient prefix information,
wherein the prefix codewords include a codeword for the column position prefix information and a codeword for the row position prefix information, and
wherein a maximum value of the last significant coefficient prefix information and a maximum length of the prefix codewords are determined based on a size of the low frequency transform coefficient region.