| CPC H04N 19/159 (2014.11) [H04N 19/122 (2014.11); H04N 19/124 (2014.11); H04N 19/176 (2014.11)] | 7 Claims |

|
1. A method of decoding a video, the method comprising:
determining an intra prediction mode of a current block;
deriving reference samples of the current block; and
obtaining prediction samples of the current block based on the intra prediction mode and the reference samples,
wherein the intra prediction mode is determined as either a conventional intra prediction mode or an extended intra prediction mode which an angle is different from the conventional intra prediction mode,
wherein, based on a shape of the current block, it is determined which one of the conventional intra prediction mode and the extended intra prediction mode is determined as the intra prediction mode,
wherein when the intra prediction mode of the current block is a directional intra prediction mode, the prediction samples of the current block are derived based on first reference samples, each of the first reference samples being located at a forward direction of the directional intra prediction mode from a sample to be predicted,
wherein the method further comprises determining whether to extend the intra prediction mode of the current block bi-directionally,
wherein when it is determined to extend the intra prediction mode of the current block bi-directionally, prediction samples included in a first region of the current block is modified, and the others of the prediction samples included in a second region of the current block are not modified, a prediction sample in the first region being modified by using a second reference sample located at an opposite direction of the directional intra prediction mode,
wherein whether to extend the intra prediction mode of the current block bi-directionally is determined based on whether the intra prediction mode of the current block is included in a range pre-defined in a device for decoding the video, and
wherein when at least one of a width and a height of the current block is less than a threshold value, the intra prediction mode of the current block is not extended bi-directionally regardless of whether the intra prediction mode of the current block is included in the range or not.
|