Some blocks of pixels need to be coded more accurately than others. To deal with this inequality between blocks, the MPEG algorithm allows the amount of quantization to be modified for each macroblock of pixels. This mechanism can also be used to provide smooth adaptation to particular bit rate. Since most of changes between target and reference image can be approximated as translation of small image regions. Therefore a key technique call motion compensation prediction is used.
Motion compensation based prediction exploits the temporal redundancy.
The process of prediction helps in the reduction of bits by a huge amont. In P-Pictures, each 16x16 sized macroblock is predicted from a macroblock of a previously encoded I picture. Sinces, frames are snapshots in time of a moving object, the macroblocks in the two frames may not be cosited, i.e. correspond to the same spatial location. Hence, a search is conducted in the I frame to find the macroblock which closely matches the macroblock under consideration in the P frame. The difference between the two macroblock is the prediction error.