Image decoding method and device thereof
An image decoding method performed by a decoding device according to the present document comprises the steps of: acquiring a block-based delta pulse code modulation (BDPCM) flag for a current block; on the basis of the BDPCM flag indicating that BDPCM is applied to the current block, acquiring a BDPCM direction flag for the current block; and storing, as an intra-prediction mode of the current block, an intra-prediction mode of a prediction direction derived on the basis of the BDPCM direction flag.
1 . An image decoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
obtain a Block-based Delta Pulse Code Modulation (BDPCM) flag for a current block;
obtain a BDPCM direction flag for the current block based on the BDPCM flag representing that BDPCM is applied to the current block;
derive a prediction sample of a target sample of the current block based on a prediction direction derived based on the BDPCM direction flag; and
reconstruct the current block based on the prediction sample,
wherein an intra prediction mode of the prediction direction is derived based on the BDPCM direction flag as an intra prediction mode of the current block,
wherein the BDPCM direction flag represents a horizontal direction or a vertical direction as the prediction direction,
wherein based on the BDPCM being applied to the current block and the prediction direction for the current block being the vertical direction, residual information includes syntax elements for the target sample of the current block, and
wherein the syntax elements for the target sample represent a difference between a residual coefficient value of the target sample and a top residual coefficient value of the target sample.
2 . The image decoding apparatus of claim 1 , wherein based on the prediction direction being the horizontal direction, the prediction sample of the target sample is derived based on a left neighboring sample of the current block.
3 . The image decoding apparatus of claim 1 , wherein based on the prediction direction being the vertical direction, the prediction sample of the target sample is derived based on a top neighboring sample of the current block.
4 . The image decoding apparatus of claim 1 , wherein based on the prediction direction being the horizontal direction, a horizontal intra prediction mode is derived as the intra prediction mode of the current block, and
wherein based on the prediction direction being the vertical direction, a vertical intra prediction mode is derived as the intra prediction mode of the current block.
5 . The image decoding apparatus of claim 1 , wherein based on a value of the BDPCM direction flag being 0, the BDPCM direction flag represents the horizontal direction as the prediction direction,
wherein based on the value of the BDPCM direction flag being 1, the BDPCM direction flag represents the vertical direction as the prediction direction.
6 . The image decoding apparatus of claim 1 , wherein based on a value of the BDPCM flag being 1, the BDPCM direction flag represents that the BDPCM is applied to the current block and the BDPCM direction flag is present.
7 . The image decoding apparatus of claim 1 , wherein the derived intra prediction mode is used for prediction of a neighboring block of the current block.
8 . An image encoding apparatus comprising:
a memory; and
at least one processor connected to the memory, the at least one processor configured to:
derive a prediction direction for a current block based on Block-based Delta Pulse Code Modulation (BDPCM);
derive a prediction sample of a target sample of the current block based on the derived prediction direction;
encode residual information of the current block based on the prediction sample; and
encode a BDPCM flag representing that the BDPCM is applied to the current block and a BDPCM direction flag representing the prediction direction for the current block,
wherein an intra prediction mode of the prediction direction as an intra prediction mode of the current block is derived based on the BDPCM,
wherein the BDPCM direction flag represents a horizontal direction or a vertical direction as the prediction direction,
wherein based on the prediction direction for the current block being the vertical direction, the residual information includes syntax elements for the target sample of the current block, and
wherein the syntax elements for the target sample represent a difference between a residual coefficient value of the target sample and a top residual coefficient value of the target sample.
9 . The image encoding apparatus of claim 8 , wherein based on a value of the BDPCM flag being 1, the BDPCM flag represents that the BDPCM is applied to the current block and the BDPCM direction flag is present.
10 . The image encoding apparatus of claim 8 , wherein based on the prediction direction for the current block being the horizontal direction, the residual information includes syntax elements for the target sample of the current block, and
wherein the syntax elements for the target sample represent a difference between the residual coefficient value of the target sample and a left residual coefficient value of the target sample.
11 . An apparatus for transmitting a bitstream for an image, the apparatus comprising:
at least one processor configured to obtain the bitstream generated by an encoding apparatus; and
a transmitter configured to transmit the bitstream,
the bitstream is generated by:
deriving a prediction direction for a current block based on Block-based Delta Pulse Code Modulation (BDPCM);
deriving a prediction sample of a target sample of the current block based on the derived prediction direction;
encoding residual information of the current block based on the prediction sample; and
encoding a BDPCM flag representing that the BDPCM is applied to the current block and a BDPCM direction flag representing the prediction direction for the current block,
wherein an intra prediction mode of the prediction direction as an intra prediction mode of the current block is derived based on the BDPCM,
wherein the BDPCM direction flag represents a horizontal direction or a vertical direction as the prediction direction,
wherein based on the prediction direction for the current block being the vertical direction, the residual information includes syntax elements for the target sample of the current block, and
wherein the syntax elements for the target sample represent a difference between a residual coefficient value of the target sample and a top residual coefficient value of the target sample.