| CPC H04N 19/11 (2014.11) [H04N 19/105 (2014.11); H04N 19/119 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11)] | 12 Claims |

|
1. A decoding method, comprising:
deriving a prediction mode of a target block;
generating a prediction block for the target block by performing prediction for the target block that uses the prediction mode; and
generating a reconstructed block for the target block using the prediction block,
wherein:
the prediction is performed based on a first difference and a second difference,
the first difference is determined based on a value of a first pixel and a value of a second pixel,
the second difference is determined based on a value of a third pixel and a value of a fourth pixel,
the first pixel is adjacent to an upper side of a fifth pixel,
the second pixel is adjacent to a lower side of the fifth pixel,
the third pixel is adjacent to a left side of the fifth pixel, and
the fourth pixel is adjacent to a right side of the fifth pixel.
|