Information Technology Reference
In-Depth Information
Figure 5.19: A motion-compensated compression system. The coder calculates motion vectors which are
transmitted as well as being used locally to create a predicted picture. The difference between the predicted picture
and the actual picture is transmitted as a prediction error.
The concept of sending a prediction error is a useful approach because it allows both the motion estimation and
compensation to be imperfect. An ideal motion compensation system will send just the right amount of vector data.
With insufficient vector data, the prediction error will be large, but transmission of excess vector data will also cause
the the bit rate to rise. There will be an optimum balance which minimizes the sum of the prediction error data and
the vector data.
In MPEG-1 and MPEG-2 the balance is obtained by dividing the screen into areas called macroblocks which are 16
luminance pixels square. Each macroblock is associated with a vector. The vector has horizontal and vertical
components so that, used in combination, these can shift pixel data in any direction. The location of the boundaries
of a macroblock are fixed with respect to the display screen and so clearly the vector cannot move the macroblock.
Instead the vector tells the decoder where to look in another picture to find pixel data which will be fetched to the
macroblock. Figure 5.20(a) shows this concept. The shifting process is generally done by modifying the read
address of a RAM using the vector. This can shift by one-pixel steps. MPEG-2 vectors have half-pixel resolution so
it is necessary to interpolate between pixels from RAM to obtain half-pixel shifted values. Chapter 3 showed how
interpolations of this kind can be performed.
Figure 5.20: (a) In motion compensation, pixel data are brought to a fixed macroblock in the target picture from a
variety of places in another picture. (b) Where only part of a macroblock is moving, motion compensation is non-
ideal. The motion can be coded (c), causing a prediction error in the background, or the background can be coded
(d) causing a prediction error in the moving object.
Search WWH ::




Custom Search