Information Technology Reference
In-Depth Information
I
P
B
B
P
B
B
Decoding order
Figure 2.5
Decoding order of I, P, and B frames
IBBPBBPBBPBBIBBPBBPBBPBBIBBPBBPBBPBBI . . .
A group of pictures (GOP)
Figure 2.6 Intra-coded I frames are inserted into the compressed video stream to limit error propagation
as well as to support random access
Second, when streaming video data over an unreliable network, some packets may be lost in
transit. If the lost packets cannot be recovered, then the affected video frame will suffer from
quality degradation. Worse still, if the packet losses affect anchor frames (I and P frames), then
the predicted frames will be affected as well. For data loss in a P frame, the predicted B frames
and the subsequent P frames will all be affected. Data loss in an I frame is worse as practically
all subsequent predicted frames up to the next I frame are affected.
Thus, to limit this error propagation problem, a video encoder will periodically introduce I
frames to break the temporal dependencies. As an example, the frame sequence in Figure 2.6
reintroduces an I frame, for every 11 predicted frames. Thus, in the worst case of losing some
data in the I frame, only up to 12 frames (including the I frame) are affected. With a video
frame rate of 25 fps, this translates into slightly less than half a second of quality degradation.
An I frame together with the predicted frames is called a group of pictures (GOP). Depending
on the encoder, the GOP structure, such as the number of B frames between anchor frames and
the number of P frames, is usually configurable by the user during encoding. Moreover, the
GOP structure is not necessarily fixed across the whole video stream. More advanced encoders
will attempt to align the GOP boundary with scene changes in the video content (e.g., when
switching camera) to improve visual quality and/or to further reduce the encoded video bit-rate.
2.4 Bit-rate Variations
Another side effect of media compression is bit-rate variations. As illustrated in the previous
section, different types of video frames (I, P, B) generally consume different amount of bits
after encoding. Thus, if we compute the average video bit-rate on a frame-by-frame basis,
then the video bit-rate will vary quite substantially across different frames. Figure 2.7 plots
the frame size versus frame number for a video encoded in MPEG1.
Not surprisingly, the I frames are generally larger than the P and B frames, evident in
Figure 2.7. For a media server this bit-rate variation creates a problem. Specifically, if the
media server is to transmit the video data in the exact bit-rate on a frame-by-frame basis,
Search WWH ::




Custom Search