In block motion compensation (BMC), the frames are partitioned in blocks of pixels (e.g. macroblocks of 16×16 pixels in MPEG). Each block is predicted from a block of equal size in the reference frame. The blocks are not transformed in any way apart from being shifted to the position of the predicted block. This shift is represented by a motion vector.
To exploit the redundancy between neighboring block vectors, (e.g. for a single moving object covered by multiple blocks) it is common to encode only the difference between the current and previous motion vector in the bit-stream. The result of this differencing process is mathematically equivalent to a global motion compensation capable of panning. Further down the encoding pipeline, an entropy coder will take advantage of the resulting statistical distribution of the motion vectors around the zero vector to reduce the output size.
It is possible to shift a block by a non-integer number of pixels, which is called sub-pixel precision. The in-between pixels are generated by interpolating neighboring pixels. Commonly, half-pixel or quarter pixel precision (Qpel, used by H.264 and MPEG-4/ASP) is used. The computational expense of sub-pixel precision is much higher due to the extra processing required for interpolation and on the encoder side, a much greater number of potential source blocks to be evaluated.
The main disadvantage of block motion compensation is that it introduces discontinuities at the block borders (blocking artifacts). These artifacts appear in the form of sharp horizontal and vertical edges which are easily spotted by the human eye and produce ringing effects (large coefficients in high frequency sub-bands) in the Fourier-related transform used for transform coding of the residual frames.
Block motion compensation divides up the current frame into non-overlapping blocks, and the motion compensation vector tells where those blocks come from (a common misconception is that the previous frame is divided up into non-overlapping blocks, and the motion compensation vectors tell where those blocks move to). The source blocks typically overlap in the source frame. Some video compression algorithms assemble the current frame out of pieces of several different previously-transmitted frames.
Frames can also be predicted from future frames. The future frames then need to be encoded before the predicted frames and thus, the encoding order does not necessarily match the real frame order. Such frames are usually predicted from two directions, i.e. from the I- or P-frames that immediately precede or follow the predicted frame. These bidirectionally predicted frames are called B-frames. A coding scheme could, for instance, be IBBPBBPBBPBB.
Read more about this topic: Motion Compensation
Famous quotes containing the words block, motion and/or compensation:
“When the landscape buckles and jerks around, when a dust column of debris rises from the collapse of a block of buildings on bodies that could have been your own, when the staves of history fall awry and the barrel of time bursts apart, some turn to prayer, some to poetry: words in the memory, a stained book carried close to the body, the notebook scribbled by handa center of gravity.”
—Adrienne Rich (b. 1929)
“in the mind of man,
A motion and a spirit, that impels
All thinking things, all objects of all thought,
And rolls through all things.”
—William Wordsworth (17701850)
“I do not want to be covetous, but I think I speak the minds of many a wife and mother when I say I would willingly work as hard as possible all day and all night, if I might be sure of a small profit, but have worked hard for twenty-five years and have never known what it was to receive a financial compensation and to have what was really my own.”
—Emma Watrous, U.S. inventor. As quoted in Feminine Ingenuity, ch. 8, by Anne L. MacDonald (1992)