Image encoding/decoding method and device, and recording medium in which bitstream is stored
Disclosed herein is an image decoding method. The method of decoding an image comprises obtaining prediction information and residual signal information for a current block from a bitstream and reconstructing, based on the obtained prediction information and the residual signal information, the current block, wherein the prediction information is obtained through entropy decoding, and wherein a context model used for the entropy decoding of the prediction information is determined based on a prediction mode of a neighboring block of the current block.
1. A method of decoding an image, the method comprising:
obtaining prediction information and residual signal information for a current block from a bitstream; and
reconstructing, based on the obtained prediction information and the residual signal information, the current block,
wherein the prediction information is obtained through entropy decoding,
wherein a context model used for the entropy decoding of the prediction information is determined based on whether a prediction mode of a neighboring block of the current block is an intra prediction mode, and
wherein the obtaining of the residual signal information comprises obtaining the residual signal information of the current block when a horizontal size or a vertical size of the current block is larger than a pre-determined size which is determined based on a maximum transform block size information that is obtained from the bitstream.
2. The method of claim 1 ,
wherein the prediction information includes merge mode indicating information indicating whether or not at least one detailed merge mode is used, and
wherein detailed merge mode information obtained based on the merge mode indicating information comprises at least one of a regular merge mode information, an MMVD (Merge mode with Motion Vector Difference) mode information, a partition mode information, a CIIP (Combined Inter and Intra Prediction) mode information, an IBC (Intra Block Copy) mode information or a subblock merge mode information.
3. The method of claim 2 ,
wherein the MMVD mode information is decoded based on the regular merge mode information.
4. The method of claim 2 ,
wherein the MMVD mode information is decoded based on the IBC mode information.
5. The method of claim 2 ,
wherein the partition mode information is decoded based on the regular merge mode information, the CIIP mode information and the subblock merge mode information.
6. The method of claim 1 ,
wherein the neighboring block is at least one among blocks located to the left or top of the current block.
7. A method of encoding an image, the method comprising:
generating prediction information and residual signal information for a current block;
reconstructing, based on the prediction information and the residual signal information, the current block;
encoding the residual signal information; and
entropy-encoding the prediction information,
wherein a context model used for the entropy-encoding of the prediction information is determined based on whether a prediction mode of a neighboring block of the current block is an intra prediction mode, and
wherein the generating of the residual signal information is performed when a horizontal size or a vertical size of the current block is larger than a maximum transform block size.
8. A non-transitory computer-readable recording medium storing a bitstream encoded by:
generating prediction information and residual signal information for a current block;
reconstructing, based on the prediction information and the residual signal information, the current block;
encoding the residual signal information; and
entropy-encoding the prediction information,
wherein a context model used for the entropy-encoding of the prediction information is determined based on whether a prediction mode of a neighboring block of the current block is an intra prediction mode, and
wherein the generating of the residual signal information is performed when a horizontal size or a vertical size of the current block is larger than a maximum transform block size.
9. The method of claim 7 ,
wherein the prediction information includes merge mode indicating information indicating whether or not at least one detailed merge mode is used, and
wherein detailed merge mode information generated based on the merge mode indicating information comprises at least one of regular merge mode information, an MMVD (Merge mode with Motion Vector Difference) mode information, a partition mode information, a CIIP (Combined Inter and Intra Prediction) mode information, an IBC (Intra Block Copy) mode information or a subblock merge mode information.
10. The method of claim 9 ,
wherein the MMVD mode information is encoded based on the regular merge mode information.
11. The method of claim 9 ,
wherein the MMVD mode information is encoded based on the IBC mode information.
12. The method of claim 9 ,
wherein the partition mode information is encoded based on the regular merge mode information, the CIIP mode information and the subblock merge mode information.