A method and a device for encoding/decoding an image are disclosed. The method for decoding an image comprises the steps of: decoding information on a quantization matrix; and restoring the quantization matrix on the basis of the information on the quantization matrix, wherein the information on the quantization matrix includes information indicating a DC value of the quantization matrix and/or information indicating differential values of quantization matrix coefficients.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A video decoding method, comprising: decoding information on a quantization matrix; reconstructing the quantization matrix based on the information on the quantization matrix; generating a residual block for a current block based on the reconstructed quantization matrix; generating a prediction block for the current block; and reconstructing the current block based on the generated residual block and the generated prediction block, wherein the residual block is generated by performing inverse-quantization on a quantized coefficient of the current block with the reconstructed quantization matrix, and wherein the information on the quantization matrix includes at least one of information indicating a prediction method of the quantization matrix, information indicating a reference quantization matrix identifier of the quantization matrix, information representing a DC value of the quantization matrix, and information representing a difference value between quantization matrix coefficients, wherein the reconstructing of the quantization matrix includes, deriving a quantization matrix coefficient by using the information representing a difference value between the quantization matrix coefficients; reconstructing a quantization matrix for a square block by arranging the quantization matrix coefficients in the quantization matrix for the square block; and deriving a quantization matrix for a non-square block by sub-sampling the quantization matrix for the square block, when the current block is the non-square block, wherein the quantization matrix coefficients in the quantization matrix for the square block are arranged by up-right diagonally scanning the quantization matrix coefficients.
2. The video decoding method of claim 1 , wherein when a size of a transform coefficient block in which the quantization matrix is implemented is one of a 16×16 size and a 32×32 size, the quantization matrix is reconstructed by using the information representing the DC value of the quantization matrix.
3. The video decoding method of claim 1 , wherein the information representing the DC value of the quantization matrix is decoded as a value of −7 to 247.
4. The video decoding method of claim 1 , wherein the information representing the difference value between the quantization matrix coefficients is a difference value between a current quantization matrix coefficient and a previous quantization matrix coefficient decoded before the current quantization matrix coefficient, and the quantization matrix coefficient is derived by adding the previous quantization matrix coefficient to the difference value between the quantization matrix coefficients for the current quantization matrix coefficient.
5. The video decoding method of claim 1 , wherein when the quantization matrix is implemented in a transform coefficient block of a 4×4 size, an up-right diagonal scan of 4×4 size is performed on the quantization matrix coefficients, and when the quantization matrix is implemented in a transform coefficient block having one of a 8×8 size, a 16×16 size, and a 32×32 size, an up-right diagonal scan of 8×8 size is performed on the quantization matrix coefficients.
6. The video decoding method of claim 1 , wherein the quantization matrix for the non-square block, a height of which is larger than a width of which, is derived by sub-sampling the quantization matrix for the square block in a horizontal direction, and wherein the quantization matrix for the non-square block, a width of which is larger than a height of which, is derived by sub-sampling the quantization matrix for the square block in a vertical direction.
7. A video encoding method, comprising: generating a prediction block for a current block; generating a residual block for the current block based on the prediction block; determining a quantization matrix of the residual block for the current block; encoding the residual block based on the determined quantization matrix; and encoding information on the quantization matrix, wherein the residual block is encoded by performing quantization on a coefficient of the current block with the determined quantization matrix, wherein the determining a quantization matrix of the residual block for the current block includes, determining a quantization matrix for a square block; deriving a quantization matrix for a non-square block by sub-sampling the quantization matrix for the square block, when the current block is the non-square block, wherein the information on the quantization matrix includes at least one of information indicating a prediction method of the quantization matrix, information indicating a reference quantization matrix identifier of the quantization matrix, information representing a direct current (DC) value of the quantization matrix, and information representing a difference value between quantization matrix coefficients, wherein the encoding the information on the quantization matrix includes, deriving an array of arranged quantization matrix coefficients by up-right diagonally scanning the quantization matrix coefficients in the quantization matrix; and generating information representing a difference value between the arranged quantization matrix coefficients.
8. A computer-readable non-transitory recording medium in which encoded data used in a video decoding method is stored, wherein the encoded data contains information on a quantization matrix; and in the video decoding method, the information on the quantization matrix is used to reconstruct a quantization matrix for a residual block for a current block, the reconstructed quantization matrix is used to generate the residual block for the current block, and the residual block and a prediction block for the current block is used to reconstruct the current block, wherein the residual block is generated by performing inverse-quantization on a quantized coefficient of the current block with the reconstructed quantization matrix, wherein the quantization matrix of the residual block for the current block is reconstructed by: reconstructing a quantization matrix for a square block; and deriving a quantization matrix for a non-square block by sub-sampling the quantization matrix for the square block, when the current block is the non-square block, wherein the information on the quantization matrix includes at least one of information indicating a prediction method of the quantization matrix, information on a reference quantization matrix identifier of the quantization matrix, information representing a DC value of the quantization matrix, and information representing a difference value between quantization matrix coefficients, wherein the reconstructing of the quantization matrix includes, deriving a quantization matrix coefficient by using the information representing a difference value between the quantization matrix coefficients, and arranging the quantization matrix coefficients in the quantization matrix by up-right diagonally scanning the quantization matrix coefficients.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
October 1, 2019
February 16, 2021
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.