Residual coefficient encoding/decoding method and device
An encoding/decoding device according to the present invention derives the residual coefficient of a residual block, calculates a quantization parameter with respect to the residual block, performs inverse quantization for the residual coefficient by means of the quantization parameter, and can restore a residual sample of the residual block by performing inverse transformation for the inverse quantized residual coefficient.
1. A method of decoding a video, comprising:
deriving a residual coefficient of a residual block from a bitstream;
calculating a quantization parameter for the residual block;
performing an inverse quantization on the residual coefficient using the calculated quantization parameter; and
reconstructing a residual sample of the residual block by performing an inverse-transform on the inverse-quantized residual coefficient,
wherein a quantization parameter for a chroma component block of the residual block is derived based on a quantization parameter prediction value for the chroma component block and a predetermined quantization parameter offset,
wherein the quantization parameter prediction value for the chroma component block is derived based on a quantization parameter for a luma component block of the residual block, and
wherein when the chroma component block has a division structure independent of the luma component block, the quantization parameter prediction value for the chroma component block is derived based on a quantization parameter for one of a plurality of luma component blocks corresponding to the chroma component block.
2. The method of claim 1 , wherein a residual sample of a partial region in the residual block is set equal to a default value predefined at a decoding apparatus, and
wherein the partial region is representative of a region excluding at least one of N columns from a left side of the residual block or M rows from a top of the residual block.
3. The method of claim 2 , wherein the N and the M are derived based on information which is encoded to specify a size or a position of the partial region.
4. The method of claim 1 , wherein the residual block is representative of a block resulting from dividing based on at least one of a quad tree, a binary tree, or a triple tree.
5. The method of claim 1 , wherein the quantization parameter for the one of the plurality of luma component blocks is representative of a quantization parameter of a luma component block corresponding to a position of a center sample.
6. A method of encoding a video, comprising:
performing a transform on a residual sample of a residual block to obtain a transform coefficient of the residual block;
performing a quantization on the transform coefficient of the residual block based on a quantization parameter to obtain a quantized transform coefficient of the residual block; and
generating a bitstream by encoding the quantized transform coefficient,
wherein a quantization parameter for a chroma component block of the residual block is derived based on a quantization parameter prediction value for the chroma component block and a predetermined quantization parameter offset,
wherein the quantization parameter prediction value for the chroma component block is derived based on a quantization parameter for a luma component block of the residual block, and
wherein when the chroma component block has a division structure independent of the luma component block, the quantization parameter prediction value for the chroma component block is derived based on a quantization parameter for one of a plurality of luma component blocks corresponding to the chroma component block.
7. A non-transitory computer-readable medium for storing data associated with a video signal, comprising:
a data stream stored in the non-transitory computer-readable medium, the data stream comprising a residual coefficient of a residual block,
wherein a quantization parameter for the residual block is calculated,
wherein an inverse-quantization is performed on the residual coefficient using the calculated quantization parameter,
wherein a residual sample of the residual block is reconstructed by performing an inverse-transform on the inverse-quantized residual coefficient,
wherein a quantization parameter for a chroma component block of the residual block is derived based on a quantization parameter prediction value for the chroma component block and a predetermined quantization parameter offset,
wherein the quantization parameter prediction value for the chroma component block is derived based on a quantization parameter for a luma component block of the residual block, and
wherein when the chroma component block has a division structure independent of the luma component block, the quantization parameter prediction value for the chroma component block is derived based on a quantization parameter for one of a plurality of luma component blocks corresponding to the chroma component block.