Method and apparatus for encoding/decoding intra 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 encoding method performed by an image encoding apparatus, the method comprising:
encoding decision information for representing whether an intra prediction mode of a current block is one of candidate modes of plural candidate mode sets;
encoding, in case that the intra prediction mode of the current block is one of the candidate modes of the plural candidate mode sets, first indication information for representing whether the intra prediction mode of the current block is a candidate mode of a first candidate mode set among the plural candidate mode sets; and
encoding, in case that the intra prediction mode of the current block is not the candidate mode of the first candidate mode set, second indication information for representing the intra prediction mode of the current block from a second candidate mode set,
wherein the second candidate mode set includes a candidate mode derived based on an index value of an intra prediction mode of a left block adjacent to the current block and an index value of an intra prediction mode of an upper block adjacent to the current block,
wherein based on 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 second candidate mode set includes a mode for an index value corresponding to an index value 50 of a vertical mode plus 4 and a mode for an index value corresponding to an index value 50 of the vertical mode minus 4,
wherein the second candidate mode set for a case that (iii) the intra prediction mode of the left block is not equal to the intra prediction mode of the upper block and (iv) one of the intra prediction mode of the left block and the intra prediction mode of the upper block is the planar mode and the other is the DC mode, is equal to the second candidate mode set for 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 the planar mode or the DC mode, and
wherein the second candidate mode set for a case that (iii) the intra prediction mode of the left block is not equal to the intra prediction mode of the upper block and (v) one of the intra prediction mode of the left block and the intra prediction mode of the upper block is the planar mode and the other is a directional mode, is not equal to the second candidate mode set for 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 the planar mode or the DC mode.
2. The image encoding method of claim 1 , wherein based on that the intra prediction mode of the current block is included in the second candidate mode set, the decision information, the first indication information and the second indication information is expressed in up to 6 bits.
3. The image encoding method of claim 1 , wherein the second candidate mode set comprises a mode corresponding to the maximum value and a mode corresponding to the minimum value.
4. An image decoding method performed by an image decoding apparatus, the method comprising:
decoding decision information for representing whether an intra prediction mode of a current block is one of candidate modes of plural candidate mode sets;
decoding, in case that the intra prediction mode of the current block is one of the candidate modes of the plural candidate mode sets, first indication information for representing whether the intra prediction mode of the current block is a candidate mode of a first candidate mode set among the plural candidate mode sets;
decoding, in case that the intra prediction mode of the current block is not the candidate mode of the first candidate mode set, second indication information for representing the intra prediction mode of the current block from a second candidate mode set, and deriving the intra prediction mode of the current block based on the second indication information,
wherein the second candidate mode set includes a candidate mode derived based on an index value of an intra prediction mode of a left block adjacent to the current block and an index value of an intra prediction mode of an upper block adjacent to the current block,
wherein based on 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 second candidate mode set includes a mode for an index value corresponding to an index value 50 of a vertical mode plus 4 and a mode for an index value corresponding to an index value 50 of the vertical mode minus 4,
wherein the second candidate mode set for a case that (iii) the intra prediction mode of the left block is not equal to the intra prediction mode of the upper block and (iv) one of the intra prediction mode of the left block and the intra prediction mode of the upper block is the planar mode and the other is the DC mode, is equal to the second candidate mode set for 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 the planar mode or the DC mode, and
wherein the second candidate mode set for a case that (iii) the intra prediction mode of the left block is not equal to the intra prediction mode of the upper block and (v) one of the intra prediction mode of the left block and the intra prediction mode of the upper block is the planar mode and the other is a directional mode, is not equal to the second candidate mode set for 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 the planar mode or the DC mode.
5. The image decoding method of claim 4 ,
wherein based on that the intra prediction mode of the current block is included in the second candidate mode set, the decision information, the first indication information and the second indication information is expressed in up to 6 bits.
6. The image decoding method of claim 4 ,
wherein the second candidate mode set comprises a mode corresponding to the maximum value and a mode corresponding to the minimum value.
7. A non-transitory computer-readable recording-medium storing a bitstream which is generated by an image encoding method, the method comprising:
encoding decision information for representing whether an intra prediction mode of a current block is one of candidate modes of plural candidate mode sets;
encoding, in case that the intra prediction mode of the current block is one of the candidate modes of the plural candidate mode sets, first indication information for representing whether the intra prediction mode of the current block is a candidate mode of a first candidate mode set among the plural candidate mode sets; and
encoding, in case that the intra prediction mode of the current block is not the candidate mode of the first candidate mode set, second indication information for representing the intra prediction mode of the current block from a second candidate mode set,
wherein the second candidate mode set includes a candidate mode derived based on an index value of an intra prediction mode of a left block adjacent to the current block and an index value of an intra prediction mode of an upper block adjacent to the current block,
wherein based on 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 second candidate mode set includes a mode for an index value corresponding to an index value 50 of a vertical mode plus 4 and a mode for an index value corresponding to an index value 50 of the vertical mode minus 4,
wherein the second candidate mode set for a case that (iii) the intra prediction mode of the left block is not equal to the intra prediction mode of the upper block and (iv) one of the intra prediction mode of the left block and the intra prediction mode of the upper block is the planar mode and the other is the DC mode, is equal to the second candidate mode set for 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 the planar mode or the DC mode, and
wherein the second candidate mode set for a case that (iii) the intra prediction mode of the left block is not equal to the intra prediction mode of the upper block and (v) one of the intra prediction mode of the left block and the intra prediction mode of the upper block is the planar mode and the other is a directional mode, is not equal to the second candidate mode set for 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 the planar mode or the DC mode.