Video encoding/decoding method and apparatus, and recording medium in which bit stream is stored
An image encoding/decoding method and apparatus are provided. An image decoding method performed by an image decoding apparatus according to the present invention may comprise deriving an intra-prediction mode of a current block, and performing intra-prediction for the current block based on the intra-prediction mode. The deriving of the intra-prediction mode may comprise decoding a predetermined mode sameness indicator.
1. An image decoding method comprising:
decoding a predetermined mode sameness indicator indicating whether or not an intra prediction mode of a current block is a predetermined mode;
in case the predetermined mode sameness indicator indicating that the intra prediction mode of the current block is the predetermined mode, determining the intra prediction mode of the current block to be the predetermined mode;
in case the predetermined mode sameness indicator indicating that the intra prediction mode of the current block is not the predetermined mode, determining the intra prediction mode of the current block from among a plurality of intra prediction modes that do not contain the predetermined mode;
deriving a reference sample of intra prediction of the current block;
generating a prediction block of the current block by performing intra prediction of the current block based on the intra prediction mode and the reference sample; and
reconstructing the current block based on the prediction block.
2. The method of claim 1 ,
wherein the predetermined mode is a planar mode.
3. The method of claim 1 ,
wherein, in case the predetermined mode sameness indicator indicating that the intra prediction mode of the current block is not the predetermined mode, the intra prediction mode of the current block is derived based on an MPM list for the current block and an index indicating one mode inside the MPM list.
4. The method of claim 3 ,
wherein the MPM list does not include the predetermined mode.
5. The method of claim 1 ,
wherein the deriving the reference sample for the intra prediction of the current block comprises selecting one reconstructed sample line from a plurality of reconstructed sample lines.
6. The method of claim 5 ,
wherein the selecting one reconstructed sample line from the plurality of reconstructed samples lines is performed differently according to a position of the current block inside a coding tree block.
7. The method of claim 1 ,
wherein, in case the intra prediction mode of the current block is a DC mode, the deriving the reference sample for the intra prediction of the current block is performed differently according to a shape of the current block.
8. The method of claim 7 ,
wherein, in case the intra prediction mode of the current block is a DC mode, a range of the reference sample used for the intra prediction of the current block is determined differently according to the shape of the current block.
9. An image encoding method comprising:
determining an intra prediction mode of a current block;
encoding a predetermined mode sameness indicator indicating whether or not the intra prediction mode of the current block is a predetermined mode based on the intra prediction mode of the current block;
deriving a reference sample for intra prediction of the current block;
generating a prediction block of the current block by performing intra prediction of the current block based on the intra prediction mode and the reference sample; and
encoding the current block based on the prediction block,
wherein in case the intra prediction mode of the current block is the predetermined mode, the predetermined mode sameness indicator is configured to indicate that the intra prediction mode of the current block is the predetermined mode,
in case the intra prediction mode of the current block is not the predetermined mode, the predetermined mode sameness indicator is configured to indicate that the intra prediction mode of the current block is determined from among a plurality of intra prediction modes that do not contain the predetermined mode.
10. The method of claim 9 ,
wherein the predetermined mode is a planar mode.
11. The method of claim 9 ,
wherein, in case the intra prediction mode of the current block is not the predetermined mode, the predetermined mode sameness indicator is configured to indicate that the intra prediction mode of the current block is encoded using an MPM list for the current block and an index indicating one mode inside the MPM list.
12. The method of claim 11 ,
wherein the MPM list does not include the predetermined mode.
13. The method of claim 9 ,
wherein the deriving the reference sample for the intra prediction of the current block comprises selecting one reconstructed sample line from a plurality of reconstructed sample lines.
14. The method of claim 13 ,
wherein the selecting one reconstructed sample line from a plurality of reconstructed samples lines is performed differently according to a position of the current block inside a coding tree block.
15. The method of claim 9 ,
wherein, in case the intra prediction mode of the current block is a DC mode, a range of the reference sample used for the intra prediction of the current block is determined differently according to the shape of the current block.
16. A non-transitory computer readable recording medium storing a bitstream which is received, decoded and used to reconstruct an image by an image decoding apparatus,
wherein the bitstream comprises a predetermined mode sameness indicator of a current block indicating whether or not an intra prediction mode of the current block is a predetermined mode,
in case the predetermined mode sameness indicator indicating that the intra prediction mode of the current block is the predetermined mode, the intra prediction mode of the current block is determined to be the predetermined mode,
in case the predetermined mode sameness indicator indicating that the intra prediction mode of the current block is not the predetermined mode, the intra prediction mode of the current block is determined from among a plurality of intra prediction modes that do not contain the predetermined mode,
the intra prediction mode is used with a reference sample of the intra prediction to generate a prediction block of the current block by performing intra prediction of the current block, and
the prediction block is used to reconstruct the current block.