X4

Table Of Contents
MPEG glossary 397
http://pro.magix.com
before and remained the same after the current frame. Both directions are
analyzed (indicates the "B" in the name, i.e. "bidirectional-predicted"). You can
read more under prediction (view page 397).
Prediction
Prediction is a method of data reduction used by the MPEG format. The image
elements already known from the previous or following frames are removed
from the data stream.
How does it work?
The encoder has a precisely defined GOP, for example IBBPBBPBB. This
sequence is transmitted together with the encoder, which always knows
exactly which kind of frame comes next. I, P, and B frames are differentiated.
Hint: When we talk about pictures, we mean frames of the video output, and I,
P an dB frames are the frames of the encoded video. Just as in movement
approximation, blocks (8x8 pixels) are united into macroblocks (16x16 pixels)
during prediction.
The first frame is always the I frame. It is completely encoded from the first
picture. Afterwards, the 4th picture is analyzed for the creation of the first P
frame. (As already said, the encoder, and later the decoder, will know that two
B frames belong between them.) This image will also be completely encoded,
and afterwards all macroblocks that haven't changed in comparison to the I
frame will be deleted. They will be replaced by corresponding references for
the decoder that tell it "you already know what should be shown here, and you
can get it from the last I frame".
Now, the 2nd will be completely encoded, and all macroblocks identical to the
first I frame and the following P frame will be removed. References to previous
frames are called backward predictions, and references to following frames
are called forward predictions. The third picture will be edited in exactly the
same fashion.
The fourth picture we have already explained, and now we need the next P
frame, or picture number 7. Pictures 5 and 6 are B frames again, which are
compared to P frames to both sides of them (picture 4 and 7); these are
followed by the last two B frames. These have a special place, since in closed
GOPs, they may contain only backward predictions, and no references to the
next I frame, because it belongs to the next GOP.