A method of intra prediction decoding an image, the method comprising: dividing a current picture of the image into at least one block having a predetermined size; extracting intra prediction mode of a current block from a bitstream, the intra prediction mode indicating a particular direction among a plurality of directions, the particular direction being indicated by using one of a dx number in a horizontal direction and a fixed number in a vertical direction, or a dy number in the vertical direction and the fixed number in the horizontal direction; and performing intra prediction on the current block according to the intra prediction mode, wherein the performing intra prediction comprising: determining location of one or two neighboring pixels of a neighboring block previously reconstructed before the current block using shift operation based on a position of a current pixel and one of the dx number and the dy number indicating the particular direction, wherein the one or two neighboring pixels are located on a left side of the current block or an upper side of the current block; obtaining a prediction value of the current pixel using the one or two neighboring pixels, and the location of the one or two neighboring pixels; wherein, when the one neighboring pixel is used, the prediction value of the current pixel is obtained based on the one neighboring pixel; and when the two neighboring pixels are used, the prediction value of the current pixel is obtained based on a weighted average of the two neighboring pixels, characterised in that the location of the neighboring pixels located on the upper side of the current block is determined based on i * dx » 5, where i is a position of the current pixel in the vertical direction, and dx is the dx number in the horizontal direction and » is the bitwise shift operation, and the location of the neighboring pixels located on the left side of the current block is determined based on j * dy » 5, where j is a position of the current pixel in the horizontal direction, and dy is the dy number in the vertical direction, wherein i) the fixed number in the horizontal direction has a fixed value of 2^5 and the dy number is determined from among {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, -32}, or ii) the fixed number in the vertical direction has a fixed value of 2^5 and the dx number is determined from among {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, -32} according to the intra prediction mode of the current block. dividing a current picture of the image into at least one block having a predetermined size; extracting intra prediction mode of a current block from a bitstream, the intra prediction mode indicating a particular direction among a plurality of directions, the particular direction being indicated by using one of a dx number in a horizontal direction and a fixed number in a vertical direction, or a dy number in the vertical direction and the fixed number in the horizontal direction; and performing intra prediction on the current block according to the intra prediction mode, wherein the performing intra prediction comprising: determining location of one or two neighboring pixels of a neighboring block previously reconstructed before the current block using shift operation based on a position of a current pixel and one of the dx number and the dy number indicating the particular direction, wherein the one or two neighboring pixels are located on a left side of the current block or an upper side of the current block; obtaining a prediction value of the current pixel using the one or two neighboring pixels, and the location of the one or two neighboring pixels; wherein, when the one neighboring pixel is used, the prediction value of the current pixel is obtained based on the one neighboring pixel; and when the two neighboring pixels are used, the prediction value of the current pixel is obtained based on a weighted average of the two neighboring pixels, characterised in that the location of the neighboring pixels located on the upper side of the current block is determined based on i * dx » 5, where i is a position of the current pixel in the vertical direction, and dx is the dx number in the horizontal direction and » is the bitwise shift operation, and the location of the neighboring pixels located on the left side of the current block is determined based on j * dy » 5, where j is a position of the current pixel in the horizontal direction, and dy is the dy number in the vertical direction, wherein i) the fixed number in the horizontal direction has a fixed value of 2^5 and the dy number is determined from among {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, -32}, or ii) the fixed number in the vertical direction has a fixed value of 2^5 and the dx number is determined from among {32, 26, 21, 17, 13, 9, 5, 2, 0, -2, -5, -9, -13, -17, -21, -26, -32} according to the intra prediction mode of the current block.