In the field of video compression, a video frame is compressed using different algorithms with different advantages and disadvantages, centered mainly around amount of data compression. These different algorithms for video frames are called picture types or frame types. The three major picture types used in the different video algorithms are I, P and B. They are different in the following characteristics:
Three types of pictures (or frames) are used in video compression: I, P, and B frames.
An IâÂÂframe (intra-coded picture) is a self-contained image, like a JPG or BMP image file.
A PâÂÂframe (predicted picture) allows each macroblock to be predicted from a region of any previously decoded frame that is in the decoded frame buffer. The encoder does not need to resend regions that have not changed at all relative to a previously decoded frame, thus saving space.
A BâÂÂframe (bidirectional predicted picture) saves even more space by generating more precise macroblock predictions. They do so by allowing each macroblock to be predicted by combining regions from each of two previously decoded frame that are in the decoded frame buffer, typically one frame that precedes it in display order and one that follows it.
P and B frames are also called inter frames. The order in which the I, P and B frames are arranged is called the group of pictures.
While the terms frame and picture are often used interchangeably, picture is a more general notion, as a picture can be either a frame or a field. A frame is a complete image, and a field is the set of odd-numbered or even-numbered scan lines composing a partial image. For example, an HD 1080 picture has 1080 lines (rows) of pixels. An odd field consists of pixel information for lines 1, 3, 5,..., 1079. An even field has pixel information for lines 2, 4, 6,..., 1080. When video is sent in interlaced-scan format, fields are sent in sequence, alternating between odd-line fields and even-line fields, with each carrying half as much information as a frame would but separated in time like sequential frames (that is, a given odd-line field represents a time between that of the preceding even-line field and the following even-line field).
A frame used as a reference for predicting other frames is called a reference frame.
A frame encoded as a complete still image without information from other frames is called an I-frame. A frame that uses prediction from a single preceding reference frame (or a single frame for prediction of each region) is a P-frame. A B-frame uses prediction from a (possibly weighted) average of two reference frames, one preceding and one succeeding.
In the H.264/MPEG-4 AVC standard, the granularity of prediction types is brought down to the "slice level." A slice is a spatially distinct region of a frame that is encoded separately from any other region in the same frame. I-slices, P-slices, and B-slices take the place of I-, P-, and B-frames.
Typically, pictures (frames) are segmented into macroblocks, and individual prediction types can be selected on a macroblock basis rather than being the same for the entire picture, as follows:
Furthermore, in the H.264 video coding standard, the frame can be segmented into sequences of macroblocks called slices, and instead of using I, B and P-frame type selections, the encoder can choose the prediction style distinctly on each individual slice. Also in H.264 are found several additional types of frames/slices:
MultiâÂÂframe motion estimation increases the quality of the video, while allowing the same compression ratio. SI and SP frames (defined for the Extended Profile) improve error correction. When such frames are used along with a smart decoder, it is possible to recover the broadcast streams of damaged DVDs.
Often, IâÂÂframes are used for random access and are used as references for the decoding of other pictures. Intra refresh periods of a half-second are common on such applications as digital television broadcast and DVD storage. Longer refresh periods may be used in some environments. For example, in videoconferencing systems it is common to send I-frames very infrequently.