关于I帧、P帧和B帧(转一篇维基百科上关于视频压缩的帧类型的说明)

来源:互联网 发布:软件外包的优缺点 编辑:程序博客网 时间:2024/05/07 08:22
转一篇维基百科上关于视频压缩的帧类型的说明,暂时是英文的,以后我会翻译出来和大家共享。
he three major picture types found in typical video compression designs are Intra coded frames, Predicted pictures, and Bi-directional predictive pictures. They are also commonly referred to as I frames, P frames, and B frames.

In video compression formats, such as in ITU-T VCEG or ISO/IEC MPEGvideo standards, often only the differences between pictures will beencoded. For example, in a scene in which a person walks past astationary background, only the moving region will need to berepresented (either using motion compensationor as image data or as a combination of the two, depending on whichrepresentation requires fewer bits to adequately represent thepicture). The parts of the scene that are not changing need not be sentrepeatedly.

Contents

  • 1 Introduction to frame types
  • 2 Intra coded frames (or slices or I-frames or Key frames)
  • 3 Predicted frames (or slices)
  • 4 Bi-directional predicted frames (or slices)
  • 5 See also
  • 6 External links

Introduction to frame types

Strictly speaking, the term picture is a more general term than frame,as a picture can be either a frame or a field, where a frame isessentially an image captured at some instant in time and a field isthe set of every-other line that would form an image at some instant intime. When sending video in interlaced-scanformat, the coding of pictures as individual fields is often usedrather than the coding of complete frames. Informally, the term "frame"is often used when the actual intent is the more general term "picture".

Typically, pictures are segmented into macroblocks,and individual prediction types can be selected on a macroblock basisrather than being the same for the entire picture, as follows:

  • I pictures can contain only intra macroblocks
  • P pictures can contain either intra macroblocks or predicted macroblocks
  • B pictures can contain intra, predicted, or bi-predicted macroblocks

Furthermore, in the most recent video codec standard H.264, the picture can be segmented into smaller regions called slicesand instead of using I, B and P picture type selections, the encodercan choose the prediction style distinctly on each individual slice.Also in H.264 suggested:

  • SI-frames/slices (Switching I); Facilitates switching between codedstreams; contains SI macroblocks (a special type of intra codedmacroblock).
  • SP-frames/slices (Switching P); Facilitates switching between coded streams; contains P and/or I macroblocks
  • multi-frame motion estimation (up to 16 reference frames, or 32 reference fields)

Multi-frame motion estimation will allow increases in the quality ofthe video while allowing the same compression ratio. SI- SP-frames(defined for Extended profile) will allow for increases in the errorresistance. When such frames are used along with a smart decoder, it ispossible to recover the broadcast streams of damaged DVDs.

Intra coded frames (or slices or I-frames or Key frames)

  • Are pictures coded without reference to any pictures except themselves.
  • May be generated by an encoder to create a random access point (toallow a decoder to start decoding properly from scratch at that picturelocation).
  • May also be generated when differentiating image details prohibit generation of effective P or B frames.
  • Typically require more bits to encode than other picture types.

Often, I-frame are used for random access and are used as referencesfor the decoding of other pictures. Intra refresh periods of ahalf-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.

Predicted frames (or slices)

  • Require the prior decoding of some other picture(s) in order to be decoded.
  • May contain both image data and motion vector displacements and combinations of the two.
  • Can reference previous pictures in decoding order.
  • In older standard designs (such as MPEG-2),use only one previously-decoded picture as a reference during decoding,and require that picture to also precede the P picture in display order.
  • In H.264, can use multiple previously-decoded pictures asreferences during decoding, and can have any arbitrary display-orderrelationship relative to the picture(s) used for its prediction.
  • Typically require fewer bits for encoding than I pictures do.

Bi-directional predicted frames (or slices)

  • Require the prior decoding of some other picture(s) in order to be decoded.
  • May contain both image data and motion vector displacements and combinations of the two.
  • Include some prediction modes that form a prediction of a motionregion (e.g., a macroblock or a smaller area) by averaging thepredictions obtained using two different previously-decoded referenceregions.
  • In older standard designs (such as MPEG-2), B pictures are neverused as references for the prediction of other pictures. As a result, alower quality encoding (resulting in the use of fewer bits than wouldotherwise be the case) can be used for such B pictures because the lossof detail will not harm the prediction quality for subsequent pictures.
  • In H.264, may or may not be used as references for the decoding of other pictures (at the discretion of the encoder).
  • In older standard designs (such as MPEG-2), use exactly twopreviously-decoded pictures as references during decoding, and requireone of those pictures to precede the B picture in display order and theother one to follow it.
  • In H.264, can use one, two, or more than two previously-decodedpictures as references during decoding, and can have any arbitrarydisplay-order relationship relative to the picture(s) used for itsprediction.
  • Typically require fewer bits for encoding than either I or P pictures do.

原创粉丝点击