Method and apparatus for encoding/decoding in-screen prediction mode
Provided are method and apparatus methods and apparatuses for encoding an intra-prediction mode based on a secondary IPM. The present invention may comprises a first decision step of determining whether an intra-prediction mode of a current block is included in a first candidate mode set including M candidate modes (M is an integer equal to or greater than 1); a second decision step of determining whether the intra-prediction mode of the current block is included in a second candidate mode set including N candidate modes (N is an integer equal to or greater than 1) based on a first determination result representing a determination result of the first decision step; and an intra prediction mode encoding step of encoding the intra-prediction mode of the current block based on the first determination result or a second determination result representing a determination result of the second decision step.
1 . An image decoding method performed by an image decoding apparatus, the method comprising:
decoding flag information indicating that an intra prediction mode of a current block is in a candidate mode set;
decoding index information indicating the intra prediction mode of the current block from among candidate modes in the candidate mode set;
deriving the intra prediction mode of the current block based on the index information; and
generating a predicted block of the current block based on the intra prediction mode of the current block,
wherein the candidate mode set includes a candidate mode derived based on an intra prediction mode of a left block adjacent to the current block and an intra prediction mode of an upper block adjacent to the current block,
wherein based on a case that (i) the intra prediction mode of the left block is equal to the intra prediction mode of the upper block and (ii) the intra prediction mode of the left block is a planar mode or a DC mode, the candidate mode set includes a candidate mode for a mode number corresponding to a mode number 50 of a vertical mode plus 4 and a candidate mode for a mode number corresponding to a mode number 50 of the vertical mode minus 4.
2 . The method of claim 1 , wherein the index information is configured by up to 4 bits.
3 . An image encoding method performed by an image encoding apparatus, the method comprising:
determining an intra prediction mode of a current block;
encoding flag information indicating that the intra prediction mode of the current block is in a candidate mode set; and
encoding index information indicating the intra prediction mode of the current block from among candidate modes in the candidate mode set;
wherein the candidate mode set includes a candidate mode derived based on an intra prediction mode of a left block adjacent to the current block and an intra prediction mode of an upper block adjacent to the current block,
wherein based on a case that (i) the intra prediction mode of the left block is equal to the intra prediction mode of the upper block and (ii) the intra prediction mode of the left block is a planar mode or a DC mode, the candidate mode set includes a candidate mode for a mode number corresponding to a mode number 50 of a vertical mode plus 4 and a candidate mode for a mode number corresponding to a mode number 50 of the vertical mode minus 4.
4 . The method of claim 3 , wherein the index information is configured by up to 4 bits.
5 . A transmission method for image data, the method comprising:
obtaining a bitstream generated by an image encoding method, wherein the image encoding method comprises determining an intra prediction mode of a current block, encoding flag information indicating that the intra prediction mode of the current block is in a candidate mode set, and encoding index information indicating the intra prediction mode of the current block from among candidate modes in the candidate mode set; and
transmitting the image data comprising the bitstream,
wherein the candidate mode set includes a candidate mode derived based on an intra prediction mode of a left block adjacent to the current block and an intra prediction mode of an upper block adjacent to the current block,
wherein based on a case that (i) the intra prediction mode of the left block is equal to the intra prediction mode of the upper block and (ii) the intra prediction mode of the left block is a planar mode or a DC mode, the candidate mode set includes a candidate mode for a mode number corresponding to a mode number 50 of a vertical mode plus 4 and a candidate mode for a mode number corresponding to a mode number 50 of the vertical mode minus 4.
6 . The method of claim 5 , wherein the index information is configured by up to 4 bits.