A method of intra predicting a video, the method comprising: determining availability of a predetermined number of adjacent pixels used for intra prediction of a current block having a size of nTxnT, where nT is integer, from among blocks obtained by splitting a picture forming the video according to a hierarchical structure; when all the predetermined number of adjacent pixels are unavailable, replacing pixel values of all the predetermined number of adjacent pixels with a predetermined value determined based on a pixel bit depth; when there exists one or more available adjacent pixel among the predetermined number of adjacent pixels and a first adjacent pixel among the predetermined number of adjacent pixels is unavailable, where the first adjacent pixel is located on a bottom-most among 2nT adjacent pixels including nT adjacent pixels adjacent to a left side of the current block and nT adjacent pixels located below the nT adjacent pixels adjacent to the left side of the current block, searching for a second adjacent pixel that is available and closest to the first adjacent pixel by searching the predetermined number of adjacent pixels in predetermined one direction from an adjacent pixel adjacent to the first adjacent pixel, the predetermined one direction indicating a search direction from bottom to top along a left side of the current block and from left to right along an upper side of the current block; when an available second adjacent pixel is found, replacing a pixel value of the first adjacent pixel with a pixel value of the available second adjacent pixel; when there exists at least one unavailable adjacent pixel located on the left side of the current block except the first adjacent pixel, replacing a pixel value of the at least one unavailable adjacent pixel located on left side of the current block sequentially from bottom to top along the left side of the current block with a pixel value of a lower adjacent pixel located directly below the at least one unavailable adjacent pixel; when there exists an unavailable adjacent pixel located on the upper side of the current block, replacing a pixel value of the unavailable adjacent pixel located on upper side of the current block sequentially from left to right along the upper side of the current block with a pixel value of a left adjacent pixel located on directly left-side of the unavailable adjacent pixel; and performing intra prediction on the current block by using the predetermined number of adjacent pixels comprising the replaced adjacent pixel, wherein the determining the availability comprises determining adjacent pixels which belongs to a different slice from a slice to which the current block belongs or belongs to an inter-predicted adjacent block, to be unavailable. determining availability of a predetermined number of adjacent pixels used for intra prediction of a current block having a size of nTxnT, where nT is integer, from among blocks obtained by splitting a picture forming the video according to a hierarchical structure; when all the predetermined number of adjacent pixels are unavailable, replacing pixel values of all the predetermined number of adjacent pixels with a predetermined value determined based on a pixel bit depth; when there exists one or more available adjacent pixel among the predetermined number of adjacent pixels and a first adjacent pixel among the predetermined number of adjacent pixels is unavailable, where the first adjacent pixel is located on a bottom-most among 2nT adjacent pixels including nT adjacent pixels adjacent to a left side of the current block and nT adjacent pixels located below the nT adjacent pixels adjacent to the left side of the current block, searching for a second adjacent pixel that is available and closest to the first adjacent pixel by searching the predetermined number of adjacent pixels in predetermined one direction from an adjacent pixel adjacent to the first adjacent pixel, the predetermined one direction indicating a search direction from bottom to top along a left side of the current block and from left to right along an upper side of the current block; when an available second adjacent pixel is found, replacing a pixel value of the first adjacent pixel with a pixel value of the available second adjacent pixel; when there exists at least one unavailable adjacent pixel located on the left side of the current block except the first adjacent pixel, replacing a pixel value of the at least one unavailable adjacent pixel located on left side of the current block sequentially from bottom to top along the left side of the current block with a pixel value of a lower adjacent pixel located directly below the at least one unavailable adjacent pixel; when there exists an unavailable adjacent pixel located on the upper side of the current block, replacing a pixel value of the unavailable adjacent pixel located on upper side of the current block sequentially from left to right along the upper side of the current block with a pixel value of a left adjacent pixel located on directly left-side of the unavailable adjacent pixel; and performing intra prediction on the current block by using the predetermined number of adjacent pixels comprising the replaced adjacent pixel, wherein the determining the availability comprises determining adjacent pixels which belongs to a different slice from a slice to which the current block belongs or belongs to an inter-predicted adjacent block, to be unavailable.