Image Processing Reference
16 x 16 pixels
Divided into macroblocks
Figure 10-8 Macroblocks.
Figure 10-8 illustrates simplified macroblock arrangements for one frame.
The image array containing the pixels for the frame being compressed becomes a col-
lection of smaller rectangles that are then operated on individually. For some images there
is a good chance that there will be some areas of the picture that are similar to those
already transmitted in an earlier I-frame or P-frame.
The techniques for creation of macroblocks depend on the kind of frame being cre-
ated. I-frames must not refer outside the frame being worked on. P-frames refer to another
frame, but only to the most recent I-frame or P-frame. The ordering of these must preserve
the time sequencing of the frames. B-frame macroblocks may refer forward or backward
in time to a P-frame or back to an I-frame, but in fact will only refer to a P-frame or I-frame
that has already been processed.
Macroblocks are collected into slices. The slice is a standardized component and the
decoder knows that if it loses synchronization at the macroblock level, it can recon-
struct the picture starting at the next slice boundary. This helps the decoder in the
receiver respond elegantly to dropouts in the signal and only a portion of the frame is
then lost. Error recovery replaces the missing area of the screen with corresponding
macroblocks from a previous frame in the playback sequence. Slices are a container
for macroblocks (see Figure 10-9).
The slicing structure assists with the compression process. It is used to break up the
image according to the average color of a macroblock. References between macroblocks
are realistic only within the same slice. Slicing might also be used to balance the loading
of the transmission channel.
Decisions on slicing depend on the content; the image in Figure 10-10 shows how the
content helps the encoder make slicing decisions.