Chủ Nhật, 3 tháng 11, 2013

[Encoding] Video compression picture types

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 IP and B. They are different in the following characteristics:
  • I‑frames are the least compressible but don't require other video frames to decode.
  • P‑frames can use data from previous frames to decompress and are more compressible than I‑frames.
  • B‑frames can use both previous and forward frames for data reference to get the highest amount of data compression.

Summary[edit]


A sequence of video frames, consisting of two keyframes (I), one forward-predicted frame (P) and one bi-directionally predicted frame (B).
There are three types of pictures (or frames) used in video compression: I‑frames, P‑frames and B‑frames.
An I‑frame is an 'Intra-coded picture', in effect a fully specified picture, like a conventional static image file. P‑frames and B‑frames hold only part of the image information, so they need less space to store than an I‑frame and thus improve video compression rates.
P‑frame ('Predicted picture') holds only the changes in the image from the previous frame. For example, in a scene where a car moves across a stationary background, only the car's movements need to be encoded. The encoder does not need to store the unchanging background pixels in the P‑frame, thus saving space. P‑frames are also known as delta‑frames.
B‑frame ('Bi-predictive picture') saves even more space by using differences between the current frame and both the preceding and following frames to specify its content.

Pictures/Frames[edit]

While the terms "frame" and "picture" are often used interchangeably, strictly speaking, the term picture is a more general notion, as a picture can be either a frame or a field. A frame is a complete image captured during a known time interval, and a field is the set of odd-numbered or even-numbered scanning lines composing a partial image. When video is sent in interlaced-scan format, each frame is sent as the field of odd-numbered lines followed by the field of even-numbered lines.
Frames that are used as a reference for predicting other frames are referred to as reference frames.
In such designs, the frames that are coded without prediction from other frames are called the I-frames, frames that use prediction from a single reference frame (or a single frame for prediction of each region) are called P-frames, and frames that use a prediction signal that is formed as a (possibly weighted) average of two reference frames are called B-frames.

Slices[edit]

In the latest international standard, known as H.264/MPEG-4 AVC, the granularity of the establishment of prediction types is brought down to a lower level called the slice level of the representation. A slice is a spatially distinct region of a frame that is encoded separately from any other region in the same frame. In that standard, instead of I-frames, P-frames, and B-frames, there are I-slices, P-slices, and B-slices.

Macroblocks[edit]

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:
  • I-frames can contain only intra macroblocks
  • P-frames can contain either intra macroblocks or predicted macroblocks
  • B-frames can contain intra, predicted, or bi-predicted macroblocks
Furthermore, in the video codec H.264, 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:
  • SI‑frames/slices (Switching I); Facilitates switching between coded streams; contains SI-macroblocks (a special type of intra coded macroblock).
  • 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 of the video while allowing the same compression ratio. SI- SP‑frames (defined for Extended Profile) will allow for increases in the error resistance. When such frames are used along with a smart decoder, it is possible to recover the broadcast streams of damaged DVDs.

Intra coded frames/slices (I‑frames/slices or Key frames)[edit]

  • I-frames are coded without reference to any frame except themselves.
  • May be generated by an encoder to create a random access point (to allow a decoder to start decoding properly from scratch at that picture location).
  • May also be generated when differentiating image details prohibit generation of effective P or B-frames.
  • Typically require more bits to encode than other frame types.
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, invideoconferencing systems it is common to send I-frames very infrequently.

Predicted frames/slices (P-frames/slices)[edit]

  • 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.
  • 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 as references during decoding, and can have any arbitrary display-order relationship relative to the picture(s) used for its prediction.
  • Typically require fewer bits for encoding than I pictures do.

Bi-directional predicted frames/slices (B-frames/slices)[edit]

  • Require the prior decoding of other frame(s) to be decoded.
  • May contain both image data and motion vector displacements or combinations of the two.
  • Include some prediction modes that form a prediction of a motion region (e.g., a macroblock or a smaller area) by averaging the predictions obtained using two different previously decoded reference regions.
    • In other words, some standards allow two motion compensation vectors per macroblock (biprediction).
  • In older standard designs (such as MPEG-2), B-frames are never used as references for the prediction of other pictures. As a result, a lower quality encoding (resulting in the use of fewer bits than would otherwise be the case) can be used for such B-frames because the loss of 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 two previously decoded pictures as references during decoding, and require one of those pictures to precede the B-frame in display order and the other one to follow it.
  • In H.264, can use one, two, or more than two previously decoded pictures as references during decoding, and can have any arbitrary display-order relationship relative to the picture(s) used for its prediction.
  • Typically require fewer bits for encoding than either I or P-frames.

See also[edit]

References[edit]

External links[edit]

http://en.wikipedia.org/wiki/Video_compression_picture_types

Socializer Widget By Blogger Yard
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 nhận xét:

Đăng nhận xét

Labels

[Android] [Anti Virus] [Audio] [Design] [Encoding] [Excel] [Guitar Pro] [HD phim] [Hooking] [iOS] [mySQL] [PHP] [Pic] [Programming] [Repair Disk] [Security] [Subtitle] [Sync Sub] [System Info] [Using soft] [Using Tools] [Video] [Word] ẢNH ẢNH BẠN BÈ ẢNH CHỤP Ảnh Của Tôi ảnh đẹp Ảnh động Ảnh động đẹp ẢNH GH.ĐỘNG SONCA ẢNH GH.NG ẢNH GH.NG VÀ CẢNH ẢNH GIA ĐÌNH Ảnh hoa đẹp Ảnh trang trí 3 Ảnh trang trí 4 Bài hát yêu thích BẠN ĐỒNG MÔN Cách cắm hoa Chăm sóc hoa CODE ĐÀN NGỰA CHẠY DƯỚI CHÂN TRANG-CHUỘT CHẠY BLOGSPOT ĐỊA CHỈ TRANG GHÉP ẢNH GH.NG GHÉP ẢNH SC -BẠN BÈ-GIA ĐÌNH 13 (TRANG http://www.loonapix.com) Happy New Year Hạt giống hoa Hoa anh đào Hoa anh thảo Hoa Baby Hoa Bằng lăng Hoa bất tử Hoa Bleeding heart Hoa Bồ Công Anh Hoa cải Hoa Cát Tường Hoa Cẩm Chướng Hoa cẩm tú Hoa cây roi Hoa cúc Hoa cưới Hoa dạ yến thảo Hoa dâm bụt Hoa đào Hoa đỗ quyên Hoa đồng tiền Hoa gạo Hoa giấy Hoa hải đường Hoa hồng Hoa hướng dương Hoa kim châm Hoa kim cương Hoa Lan Hoa lê Hoa lily hoa loa kèn Hoa lưu ly Hoa mai Hoa mẫu đơn Hoa mười giờ Hoa ngọc lan Hoa ngũ sắc Hoa oải hương Hoa phượng Hoa Sen Hoa sen trắng Hoa sim Hoa sứ Hoa sử dương tử Hoa sữa Hoa Thạch Thảo Hoa thiết mộc lan Hoa thủy tiên Hoa thược dược Hoa tulip Hoa Violet Hoa xương rồng LINK TRANG GHÉP ẢNH TRỰC TUYẾN VÀ CODE CHỈNH HÌNH MÙA HẠ Nhạc Không Lời nhật kí Quốc hoa Thông tin riêng blog Thơ của tôi. Thơ hay thơ hay 2 THƠ LỤC BÁT THƠ THẤT NGÔN BÁT CÚ THỦ THUÂT BLOG THỦ THUẬT BLOG Tổng Hợp TRÁNG TẠO VIDEO TRỰC TUYẾN MIỄN PHÍ XE ĐẠP ĐIỆN Ý nghĩa các loài hoa