Image Processing Reference
Frame A is in fact the only completely described frame in the sequence, and to view
any of the other frames it is necessary to traverse a series of changes, taking in all the inter-
mediate frames between A and the target frame.
Random access to any frame in the movie is quite difficult. If 2-hour movies were
coded like this, it would take a long time to accumulate all the changes to reach a frame
somewhere in the middle. The reconstruction can run faster than 24 fps and a powerful
computer will reconstruct frames more quickly. But it might still take 5 minutes, which is
far too long.
Periodically placing a key frame into the sequence and allowing only a limited num-
ber of difference frames to be used before another key frame is called for provides more
entry points for the encoder. This is fundamental to operating streaming systems effi-
ciently as well.
Bi-Directional Playback Support (B-Frames)
A bi-directional frame ( B-frame ) is coded using the differences from the preceding I-frame
or a following P-frame, whichever leads to the most compact coding.
Earlier implementations of video compression schemes only supported difference
frames moving in the forward playback direction. To go back a frame required the video
to be traversed from the most recent key frame, stopping one frame earlier each time.
Playback in reverse was therefore somewhat time consuming and difficult to accomplish
in real time.
Going back to our model of Frames A, B, C, and D, the description of Frame C is a
list of differences that must be applied to Frame B, and the differences that are applied to
Frame C to create Frame D will not create Frame C if they are applied to Frame B.
Some difference frames are designed to be applied in reverse. This facilitates reverse
playback. Before that is possible, however, another kind of reference frame is necessary.
This is a predicted frame that is some distance forward in time from the key frame. The
difference between the key frame and the predicted frame is computed so that the
sequence can be reconstructed from either end. The bi-directional difference frames are
manufactured from the key frame at the start and the predicted frame at the end. This
facilitates trick-play features in the player. Figure 9-3 illustrates how the relationships
between frames are beginning to get complex.
Key frames are called I-frames; the predicted frames are called P-frames; and the dif-
ference or delta frames are called B-frames. Next we will see how those individual frames
What we've seen in this chapter can be applied to all the compression systems because it
deals with the changes that happen from one frame to the next.
In order to dig deeper into the compression systems and how they work, we must
look at individual codec designs. Over the next few chapters we will work through the
MPEG family of standards because there is an evolutionary narrative to them. The earliest