主权项 |
1. An apparatus for decoding a video, the apparatus comprising:
an availability determiner configured to determine availability of a predetermined number of adjacent pixels used for intra prediction of a current block; a replacer configured to, when a first adjacent pixel among the predetermined number of adjacent pixels is unavailable, obtain a second adjacent pixel that is available by searching for the predetermined number of adjacent pixels in a predetermined direction based on the first adjacent pixel, and to replace a pixel value of the first adjacent pixel with a pixel value of the second adjacent pixel; and an intra predictor configured to perform intra prediction on the current block by using the predetermined number of adjacent pixels including the replaced first adjacent pixel, wherein the replacer determines an available adjacent pixel initially found to be the second adjacent pixel by searching for the predetermined number of adjacent pixels in the predetermined direction based on the first adjacent pixel, searches for the second adjacent pixel by searching left and lower left adjacent pixels of the current block from bottom to top based on the first adjacent pixel, and when the second adjacent pixel is not found in the left and lower left adjacent pixels of the current block, searches top and upper right adjacent pixels of the current block from left to right, and the first adjacent pixel is a lowermost left adjacent pixel from among left and lower left adjacent pixels of the current block. |