Image encoding and decoding apparatus and method

The present invention provides an image encoding and decoding apparatus and method. According to one embodiment of the present invention, the image encoding and decoding apparatus comprises: an image encoder which reduces horizontal and vertical sizes of a variable macro block into the set size or ratio so that the variable macro block may be reset in a smaller size than the current size, if the variable macro block of the current encoding target is not positioned inside an input image, and performs a prediction encoding process on the basis of the reset variable macro block; and an image decoder which performs a decoding process by reducing the size of a variable macro block of the current decoding target into the set size or ratio so that the variable macro block may be reset in a smaller size than the current size, if the variable macro block of the current decoding target is not positioned inside an input image.