Databases Reference
In-Depth Information
F I GU R E 19 . 11
Effect of block size on motion compensation.
One way is to increase the size of the block. Increasing the size of the block means more
computations per comparison. However, it also means that we will have fewer blocks per
frame, so the number of times we have to perform the motion compensation will decrease.
However, different objects in a frame may be moving in different directions. The drawback to
increasing the size of the block is that the probability that a block will contain objects moving
in different directions increases with size. Consider the two images in Figure 19.11 .Ifweuse
blocks that are made up of 2
×
2 squares, we can find a block that exactly matches the 2
×
2
block that contains the circle. However, if we increase the size of the block to 4
4 squares,
the block that contains the circle also contains the upper part of the octagon. We cannot find
a similar 4
×
×
4 block in the previous frame. Thus, there is a trade-off involved. Larger blocks
reduce the amount of computation; however, they can also result in poor prediction, which in
turn can lead to poor compression performance.
Another way we can reduce the number of computations is by reducing the search space.
If we reduce the size of the region in which we search for a match, the number of computations
will be reduced. However, reducing the search region also increases the probability of missing
a match. Again, we have a trade-off between computation and the amount of compression.
The H.261 standard has balanced the trade-offs in the following manner. The 8
8
blocks of luminance and chrominance pixels are organized into macroblocks , which consist
of four luminance blocks, and one each of the two types of chrominance blocks. The motion-
compensated prediction (or motion compensation) operation is performed on the macroblock
level. For each macroblock, we search the previous reconstructed frame for the macroblock
that most closely matches the macroblock being encoded. In order to further reduce the
amount of computations, only the luminance blocks are considered in this matching operation.
The motion vector for the prediction of the chrominance blocks is obtained by halving the
component values of the motion vector for the luminance macroblock. Therefore, if the motion
vector for the luminance blocks is
×
(
3
,
10
)
, then the motion vector for the chrominance blocks
would be
.
The search area is restricted to
(
1
,
5
)
15 pixels of themacroblock being encoded in the horizontal
and vertical directions. That is, if the upper-left corner pixel of the block being encoded is
±
 
Search WWH ::




Custom Search