MPEG-2 frame encoding structure

Source: Internet
Author: User
Tags repetition

From: http://www.360doc.com/content/10/0127/10/709344_14486874.shtml

In order to obtain high compression ratio and high-quality images with random access under the condition of efficient compression encoding, MPEG definesI, P, BThree image formats: intra picture and predicted
Picture) and bidirec tional picture, that is, I, P, and B, used to represent the frame sequence of the 1/30 s interval. To meet random access requirements, only image I information can be used for intra-frame encoding. To meet the requirements of high compression ratio and high-quality images, the intra-frame encoding of graph I alone is not enough. We need to add the inter-frame encoding involved in Graph P and graph B, as well as block matching motion compensation prediction, the former image is used to predict the cause and effect of the current image, and the latter image is used to predict the interpolation of the current image. This requires the balance between intra-frame encoding and inter-frame encoding, and the balance between causal prediction and interpolation prediction. The balanced result is the high compression ratio of random access and the unification of high-quality images. Figure 12 shows the frame encoding structure of the MPEG-2, where:

1) Intra-frame encoding (ICP)

An I image is an image generated without the reference image encoding. It is called an intra-frame encoding image (ICP-intra coded pictures ). Features: maximum data volume, moderate compression within a frame, no motion prediction, auto-correlation, that is, the brightness and color signals of adjacent pixels and adjacent lines in the frame are gradient spatial correlation, which can be used for Static Image Processing and unconditional transmission. images can be randomly entered into the compressed image data sequence for encoding.

2) prediction coding diagram (PCP)

The P chart is an image produced by motion compensation prediction based on the last I or P chart. It is called the prediction encoding diagram (PCP-predictive coded pictures ). A p chart is characterized by a FP-Forward prediction result of a pre-I or P chart. It is also a reference image that generates the next P chart. high coding efficiency, compared with the I chart, it can provide a greater compression ratio. The previous P chart is the benchmark for the compensation PREDICTION OF THE NEXT P chart. If the former hasError Code, The latter will encode the errorAccumulate and spread.

3) bidirectional prediction coding diagram (bpcp)

At present, there are two kinds of convergence understandings on Graph B: first, B is an image produced by motion compensation prediction based on both the I Diagram or p Diagram and the p Diagram or I diagram below, bpcp-bidirectional predictive coded picture ). The previous graph I or P represents "past information", and the subsequent Graph P or I represents "future information ", because both "past" and "future" information are used, it is called bidirectional prediction. Second, because the moving part of the adjacent frames in the frame sequence has a continuous to temporal correlation, the current image can be viewed as the displacement of the image at a certain time point of the previous image, of course, the displacement direction and amplitude may not be the same everywhere in the frame. As long as I or P in the previous time and the displacement information representing the motion, the current image can be predicted.Forward prediction(FP ). Based on the image at a certain time point and the motion vector that reflects the displacement information, the image before a certain time point is predicted to predict the information that is not displayed in the previous frame but appears now.Backward prediction(BP-Backword
Prediction ). Figure B shows the Forward prediction (FP) and backward prediction (BP)Use and take its average value at the same timeThe resulting image is called a bidirectional prediction chart or an average value prediction chart.

As shown in figure 12, a GOP consists of a string of IBP frames starting with I. The length of the GOP is the interval between the first I frame and the second B frame before the next I frame, for example, in i1b2b3p4b5b6p7b8b9i10, the length from I1 to B9 is the length of GOP. The longer the GOP, the more effective the MPEG-2 encoding, and the more difficult it is to edit and group the data stream. Generally, it consists of up to 12 frames. The output bit rate varies depending on the repeat frequency of the reference frame. The GOP structure varies with the bit rate. For example, when the bit rate is greater than 40 Mbps, the frame repetition mode is only I frame, and the GOP is the shortest, which has the advantage of high efficiency. When the bit rate is 15-40 Mbps, the frame repetition mode is IB, the GOP is short, and the bit rate is less than 15
In Mbps, the frame repetition mode is IBP or ibbp. the GOP is long and has a delay, which affects the access speed. In short, the image quality increases with the increase of the bit rate of 10-50 Mbps, And the GOP increases with the I-IB-IBBP of frame repetition mode. Although the frame duplication method can be IP, IB, IBP, ibbp, or even only I frame, there are different GOP structures for different applications and bit rates: News compilation, the bitrate is 18 Mbps and adopts the GOP structure of IB frames. The program is allocated and the bitrate is 20 Mbps. the GOP structure of ibbp frames is used. The Archive bitrate is 30 Mbps and the GOP structure of IB frames is used: post-production: the bit rate is 50 Mbps and adopts the I frame GOP structure. Figure 13 shows the relationship between GOP and image quality and its application. The encoding rules in the figure are as follows: I frame
@ Ml mpeg: 40-50 mbps; ibibib: 25-30 Mbps; long gopibp: 12-18 Mbps.

The system does not encode, transmit, or use B-frame pixels as the prediction benchmark.It is established only by bidirectional prediction interpolation during decoding.For example, B2 and B3 frames between I1 and P4 are established by I1 and P4 Weighted Interpolation. In B frame pixel block data, onlyCarries the "Motion Vector" set for each pixel block."

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.