A method of decoding an image, the method comprising: extracting information that indicates an intra prediction mode applied to a current block to be decoded, from a bitstream; determining one of neighboring pixels adjacent to the current block or filtered neighboring pixels filtered from the neighboring pixels as reference pixels, based on the intra prediction mode of the current block; performing intra prediction on the current block using the extracted information and the determined reference pixels, wherein the image is split into a plurality of square-shaped maximum coding units, according to an information about a maximum size of a coding unit extracted from the bitstream, wherein a maximum coding unit among the plurality of square-shaped maximum coding units is hierarchically split into one or more coding units of coded depths according to a split information extracted from the bitstream, the one or more coding units of coded depths have square-shape, wherein a coding unit of a current coded depth, k+1, where k is integer, is one of square-shaped data units split from a coding unit of an smaller coded depth k, wherein, when the split information indicates that the coding unit of the current coded depth, k+1 splits, the coding unit of the current coded depth, k+1, is split into coding units of a deeper coded depth, k+2, wherein, when the split information indicates that the coding unit of the current coded depth, k+1, is no longer split, one or more prediction units for prediction decoding are obtained from the coding unit of the current coded depth, k+1, and one or more transform units for inverse-transformation are obtained from the coding unit of the current coded depth, k+1, wherein the one or more prediction units are obtained by equally splitting one of a height or a width of the coding unit of the current coded depth, k+1, by 2, or by equally splitting both the height and the width of the coding unit of the current coded depth, k+1, by 2, or by determining the coding unit of the current coded depth, k+1 as the one prediction unit according to a partition type extracted from the bitstream, wherein the one or more transform units are square, the transform units split from the coding unit of the current coded depth have equal size and the one or more transform units are obtained according to an information about the size of the transform unit extracted from the bitstream, wherein the method for decoding supports that a size and a shape of the prediction unit are the same as a size and a shape of the transform unit or the size and the shape of the prediction unit are different from the size and the shape of the transform unit, and the current block is one of the one or more prediction units obtained from the coding unit of the current coded depth, k+1. extracting information that indicates an intra prediction mode applied to a current block to be decoded, from a bitstream; determining one of neighboring pixels adjacent to the current block or filtered neighboring pixels filtered from the neighboring pixels as reference pixels, based on the intra prediction mode of the current block; performing intra prediction on the current block using the extracted information and the determined reference pixels, wherein the image is split into a plurality of square-shaped maximum coding units, according to an information about a maximum size of a coding unit extracted from the bitstream, wherein a maximum coding unit among the plurality of square-shaped maximum coding units is hierarchically split into one or more coding units of coded depths according to a split information extracted from the bitstream, the one or more coding units of coded depths have square-shape, wherein a coding unit of a current coded depth, k+1, where k is integer, is one of square-shaped data units split from a coding unit of an smaller coded depth k, wherein, when the split information indicates that the coding unit of the current coded depth, k+1 splits, the coding unit of the current coded depth, k+1, is split into coding units of a deeper coded depth, k+2, wherein, when the split information indicates that the coding unit of the current coded depth, k+1, is no longer split, one or more prediction units for prediction decoding are obtained from the coding unit of the current coded depth, k+1, and one or more transform units for inverse-transformation are obtained from the coding unit of the current coded depth, k+1, wherein the one or more prediction units are obtained by equally splitting one of a height or a width of the coding unit of the current coded depth, k+1, by 2, or by equally splitting both the height and the width of the coding unit of the current coded depth, k+1, by 2, or by determining the coding unit of the current coded depth, k+1 as the one prediction unit according to a partition type extracted from the bitstream, wherein the one or more transform units are square, the transform units split from the coding unit of the current coded depth have equal size and the one or more transform units are obtained according to an information about the size of the transform unit extracted from the bitstream, wherein the method for decoding supports that a size and a shape of the prediction unit are the same as a size and a shape of the transform unit or the size and the shape of the prediction unit are different from the size and the shape of the transform unit, and the current block is one of the one or more prediction units obtained from the coding unit of the current coded depth, k+1.