Transform-based image coding method and device for same
An image decoding method according to the present disclosure comprises the steps of: deriving residual samples with respect to a target block on the basis of an inverse primary transform with respect to modified transform coefficients; and on the basis of the residual samples, generating a reconstructed picture, wherein a step of deriving the modified transform coefficients may include the steps of: parsing an LFNST index on the basis of the tree-type of a current block not being a dual-tree chroma and a MIP mode not being applicable to the current block; and deriving the modified transform coefficients on the basis of the LFNST index and an LFNST matrix.
1 . An image decoding method performed by a decoding apparatus, the method comprising:
obtaining intra prediction mode information and an LFNST index from a bitstream;
deriving an intra prediction mode for a chroma block as a cross-component linear model (CCLM) mode based on the intra prediction mode information;
deriving prediction samples for the chroma block based on the intra prediction mode;
updating the intra prediction mode for the chroma block based on an intra prediction mode for a luma block corresponding to the chroma block;
determining an LFNST set comprising LFNST matrices based on the updated intra prediction mode;
deriving transform coefficients for the chroma block based on an LFNST matrix derived from the LFNST index and the LFNST set;
deriving residual samples for the chroma block based on the transform coefficients; and
generating a reconstructed picture based on the prediction samples and the residual samples for the chroma block,
wherein the updated intra prediction mode is derived as an intra prediction mode corresponding to a specific position in the luma block,
wherein the specific position is set based on a color format of the chroma block,
wherein the color format is 4:2:2,
wherein the specific position is set to ((xTbY+nTbW), (yTbY+nTbH/2)),
wherein xTb Y and yTb Y denote top-left coordinates of the luma block, and
wherein nTbW and nTbH denote a width and a height of the chroma block.
2 . The image decoding method of claim 1 , wherein the specific position is a center position of the luma block.
3 . The image decoding method of claim 1 , wherein the color format is 4:2:0;
wherein the specific position is set to ((xTbY+nTbW), (yTbY+nTbH)).
4 . The image decoding method of claim 1 , wherein the luma block is not coded based on a Matrix-based Intra Prediction (MIP) mode, an Intra Block Copy (IBC) mode or a Palette (PLT) mode.
5 . An image encoding method performed by an encoding apparatus, the method comprising:
deriving an intra prediction mode for a chroma block as a cross-component linear model (CCLM) mode;
deriving prediction samples for the chroma block based on the CCLM mode;
deriving residual samples for the chroma block based on the prediction samples;
updating the intra prediction mode for the chroma block based on an intra prediction mode for a luma block corresponding to the chroma block;
determining an LFNST set comprising LFNST matrices based on the updated intra prediction mode;
deriving modified transform coefficients for the chroma block; and
generating a bitstream including intra prediction mode information related to the intra prediction mode for the chroma block and residual information related to the modified transform coefficients for the chroma block,
wherein the updated intra prediction mode is derived as an intra prediction mode corresponding to a specific position in the luma block,
wherein the specific position is set based on a color format of the chroma block,
wherein the color format is 4:2:2;
wherein the specific position is set to ((xTbY+nTbW), (yTbY+nTbH/2)),
wherein xTbY and yTbY denote top-left coordinates of the luma block, and
wherein nTbW and nTbH denote a width and a height of the chroma block.
6 . The image encoding method of claim 5 , wherein the specific position is a center position of the luma block.
7 . The image encoding method of claim 5 , wherein the color format is 4:2:0;
wherein the specific position is set to ((xTbY+nTbW), (yTbY+nTbH)).
8 . A non-transitory computer-readable digital storage medium that stores the bitstream generated by the image encoding method of claim 5 .
9 . The image encoding method of claim 5 , wherein the luma block is not coded based on a Matrix-based Intra Prediction (MIP) mode, an Intra Block Copy (IBC) mode or a Palette (PLT) mode.
10 . A transmitting method of data for an image, the method comprising:
obtaining a bitstream for the image, wherein the bitstream is generated based on deriving an intra prediction mode for a chroma block as a cross-component linear model (CCLM) mode; deriving prediction samples for the chroma block based on the CCLM mode; deriving residual samples for the chroma block based on the prediction samples; updating the intra prediction mode for the chroma block based on an intra prediction mode for a luma block corresponding to the chroma block; determining an LFNST set comprising LFNST matrices based on the updated intra prediction mode; deriving modified transform coefficients for the chroma block; and encoding intra prediction mode information related to the intra prediction mode for the chroma block and residual information related to the modified transform coefficients to generate the bitstream;
transmitting the data comprising the bitstream,
wherein the updated intra prediction mode is derived as an intra prediction mode corresponding to a specific position in the luma block,
wherein the specific position is set based on a color format of the chroma block,
wherein the color format is 4:2:2;
wherein the specific position is set to ((xTbY+nTbW), (yTbY+nTbH/2)),
wherein xTbY and yTbY denote top-left coordinates of the luma block, and
wherein nTbW and nTbH denote a width and a height of the chroma block.