Image decoding method and apparatus
An image decoding method performed by a decoding apparatus, according to the present document, comprises the steps of: acquiring image information including a block-based delta pulse code modulation (BDPCM) constraint flag indicating whether or not BDPCM is constrained with respect to an image; acquiring BDPCM-associated information regarding a current block on the basis of the BDPCM constraint flag; and generating reconstructed samples for the current block on the basis of the BDPCM-associated information.
1. An image decoding method performed by a decoding apparatus, comprising:
obtaining image information including a Block-based Delta Pulse Code Modulation (BDPCM) constraint flag representing whether BDPCM is constrained for an image;
obtaining BDPCM related information for a current block, the BDPCM related information including at least one of a BDPCM flag representing whether the BDPCM is applied to the current block or a BDPCM direction flag representing a prediction direction for the current block; and
generating reconstructed samples for the current block based on the BDPCM related information,
wherein the BDPCM constraint flag equal to 1 represents that a constraint that a BDPCM enabled flag shall be equal to 0 is imposed, and the BDPCM constraint flag equal to 0 represents that the constraint is not imposed,
wherein the BDPCM enabled flag equal to 1 represents that the BDPCM is enabled and the BDPCM enabled flag equal to 0 represents that the BDPCM is not enabled,
wherein the BDPCM flag equal to 1 represents that the BDPCM is applied to the current block and the BDPCM flag equal to 0 represents that the BDPCM is not applied to the current block,
wherein the BDPCM direction flag is signaled based on the BDPCM flag being equal to 1,
wherein when the BDPCM constraint flag is equal to 1, the BDPCM enabled flag is equal to 0, and
wherein when the BDPCM enabled flag is equal to 0, the BDPCM flag is inferred to be equal to 0.
2. The method of claim 1 , wherein the BDPCM related information for the current block is not signaled when the BDPCM constraint flag is equal to 1.
3. The method of claim 1 , wherein generating the reconstructed samples for the current block based on the BDPCM related information comprises:
deriving prediction samples of the current block based on an intra prediction mode derived based on the BDPCM direction flag; and
deriving the reconstructed samples based on the prediction samples.
4. The method of claim 3 , wherein the BDPCM direction flag equal to 0 represents that the prediction direction for the current block is a horizontal direction, and
wherein the BDPCM direction flag equal to 1 represents that the prediction direction for the current block is a vertical direction.
5. The method of claim 3 , wherein the intra prediction mode of the current block is derived as a horizontal intra prediction mode based on the BDPCM direction flag being equal to 0, and
wherein the intra prediction mode of the current block is derived as a vertical intra prediction mode based on the BDPCM direction flag being equal to 1.
6. The method of claim 4 , wherein generating the reconstructed samples based on the prediction samples comprises:
deriving a target residual sample of the current block based on residual information on the current block; and
deriving a reconstructed sample by adding a prediction sample for the target residual sample and the target residual sample.
7. The method of claim 6 , wherein when the BDPCM is applied to the current block and the prediction direction for the current block is the vertical direction, the residual information includes syntax elements for the target residual sample, and
wherein the syntax elements of the target residual sample represent a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a top neighboring residual sample of the target residual sample.
8. The method of claim 7 , wherein the difference is derived based on the syntax elements for the target residual sample, and
wherein the residual coefficient value of the target residual sample is derived by the sum of the residual coefficient value of the top neighboring residual sample and the difference.
9. The method of claim 6 , wherein when the BDPCM is applied to the current block and the prediction direction for the current block is the horizontal direction, residual information includes syntax elements for a target residual sample of the current block, and
wherein the syntax elements for the target residual sample represent a difference between a residual coefficient value of the target residual sample and a residual coefficient value of a left neighboring residual sample of the target residual sample.
10. An image encoding method performed by an encoding apparatus, comprising:
generating a Block-based Delta Pulse Code Modulation (BDPCM) constraint flag representing whether BDPCM is constrained for an image; and
encoding BDPCM related information for a current block based on the BDPCM constraint flag, the BDPCM related information including at least one of a BDPCM flag representing whether the BDPCM is applied to a current block or a BDPCM direction flag representing a prediction direction for the current block,
wherein the BDPCM constraint flag equal to 1 represents that a constraint that a BDPCM enabled flag shall be equal to 0 is imposed, and the BDPCM constraint flag equal to 0 represents that the constraint is not imposed,
wherein the BDPCM enabled flag equal to 1 represents that the BDPCM is enabled and the BDPCM enabled flag equal to 0 represents that the BDPCM is not enabled,
wherein the BDPCM flag equal to 1 represents that the BDPCM is applied to the current block and the BDPCM flag equal to 0 represents that the BDPCM is not applied to the current block,
wherein the BDPCM direction flag is encoded based on the BDPCM flag being equal to 1,
wherein when the BDPCM constraint flag is equal to 1, the BDPCM enabled flag is equal to 0, and
wherein when the BDPCM enabled flag is equal to 0, the BDPCM flag is inferred to be equal to 0.
11. A method for transmitting data for image information, comprising:
generating a bitstream of the image information by generating a Block-based Delta Pulse Code Modulation (BDPCM) constraint flag representing whether BDPCM is constrained for an image and encoding BDPCM related information for a current block based on the BDPCM constraint flag, the BDPCM related information including at least one of a BDPCM flag representing whether the BDPCM is applied to a current block or a BDPCM direction flag representing a prediction direction for the current block; and
transmitting the bitstream of the image information,
wherein the BDPCM constraint flag equal to 1 represents that a constraint that a BDPCM enabled flag shall be equal to 0 is imposed, and the BDPCM constraint flag equal to 0 represents that the constraint is not imposed,
wherein the BDPCM enabled flag equal to 1 represents that the BDPCM is enabled and the BDPCM enabled flag equal to 0 represents that the BDPCM is not enabled,
wherein the BDPCM flag equal to 1 represents that the BDPCM is applied to the current block and the BDPCM flag equal to 0 represents that the BDPCM is not applied to the current block,
wherein the BDPCM direction flag is encoded based on the BDPCM flag being equal to 1,
wherein when the BDPCM constraint flag is equal to 1, the BDPCM enabled flag is equal to 0, and
wherein when the BDPCM enabled flag is equal to 0, the BDPCM flag is inferred to be equal to 0.