Bit rate, frame rate and IBP frame

I have never been exposed to video before, so I don't know much about video. Now let's take a look at the bitrate and framerate issues.
      The code rate is the number of bits of data transmitted per unit of time during data transmission. Generally, the unit we use is kbps, that is, kilobits per second. The popular understanding is the sampling rate. The larger the sampling rate per unit time, the higher the accuracy, and the processed file is closer to the original file, but the file size is proportional to the sampling rate, so almost all encoding formats pay attention to it. It is all about how to use the lowest code rate to achieve the least distortion. The cbr (fixed code rate) and vbr (variable code rate) derived from this core are all articles made in this regard, but things are not absolute, In terms of audio, the higher the bit rate, the smaller the compressed ratio, the smaller the loss of sound quality, and the closer it is to the sound quality of the audio source. "Code rate" is the degree of distortion. The higher the code rate, the clearer the image. Otherwise, the picture will be rough and more mosaic. The information in the computer is represented by binary 0 and 1, and each 0 or 1 is called a bit, which is represented by lowercase b, that is, bit (bit); uppercase B represents byte, that is, byte, a byte = Eight bits, that is, 1B=8b; the capital K in the front means thousand, that is, thousand bits (Kb) or kilobytes (KB). Indicates the size of the file, generally using bytes (KB) to indicate the size of the file.
    Kbps: The first thing to understand is that ps refers to /s, which is every second. Kbps refers to the network speed, that is, how many thousand bits of information are transmitted per second (K means thousand bits, Kb means how many thousand bits). It is expressed in kb (kilobit), and in the case of KBps, it means how many kilobytes are transferred per second. 1KBps=8Kbps. The Internet speed of ADSL is 512Kbps. If it is converted into bytes, it is 512/8=64KBps (that is, 64 kilobytes per second).

      Simply put, the number of frames is the number of frames of pictures transmitted in 1 second. It can also be understood that the graphics processor can refresh several times per second, usually expressed in fps (Frames Per Second). Each frame is a still image, and displaying frames in rapid succession creates the illusion of motion. Higher frame rates result in smoother, more realistic animations. The more frames per second (fps), the smoother the motion displayed. Generally 30fps is acceptable, so the minimum fps to avoid stuttering motion is 30. In addition to 30fps, some computer video formats, such as AVI, only provide 15 frames per second. The reason why we can use the camera to see continuous images is because the image sensor continuously captures images and transmits them to the screen. When the transmission speed reaches a certain level, the human eye cannot distinguish the time gap between the images, so everyone You can see a continuous dynamic picture.
        Frames per second (fps) or frame rate means how many times per second the GPU scene can be updated. Higher frame rates result in smoother, more realistic animations. Generally speaking, 30fps is acceptable, but increasing the performance to 60fps can significantly improve the sense of interaction and realism, but generally speaking, it is not easy to notice a significant improvement in fluency beyond 75fps. If the frame rate exceeds the screen refresh rate it just wastes the power of the graphics processing, because the monitor can't update so fast, so the frame rate exceeding the refresh rate is wasted.
       This indicator is generally represented by "FPS (frame per second, the number of screen updates per second)". When enjoying TV and movie pictures, as long as the refresh rate of the picture reaches 24 frames per second, people's needs can be met. Similarly, when playing ordinary games, if the refresh rate reaches 24 frames/second, but in some high-speed games (such as shooting games), if the refresh rate of the screen is still only 24 frames/second, then you will feel The picture is relatively slow and not smooth enough.

  Although in theory, the faster the refresh rate of the picture, the better, but an excessively high refresh rate has no practical significance - when the FPS of the picture reaches 60 frames per second, it can already meet the needs of most applications. Under normal circumstances, if you can ensure that the average FPS of the game screen can reach 30 frames/second, then the picture is basically smooth; if it can reach 50 frames/second, you can basically experience the feeling of flowing water. It's hard for the average person to tell the difference between 60 fps and 100 fps.

  (2) What affects FPS

  Since the faster the refresh rate, the better, why stress that there is no need to pursue too high a refresh rate? The reason is that when the display resolution remains unchanged, the higher the FPS, the higher the requirements for the processing power of the graphics card.

  The pictures displayed in the computer are all output by the graphics card, so the filling of each pixel on the screen must be calculated and output by the graphics card. When the resolution of the screen is 1024×768, the refresh rate of the screen must reach 24 frames per second, then the amount of pixels that the graphics card needs to process in one second reaches “1024×768×24=18874368”. If the refresh rate of the screen is required to reach 50 frames per second, the amount of data is suddenly increased to “1024×768×50=39321600”.

  The relationship between FPS, resolution, and graphics card processing power is as follows: Processing power = resolution × refresh rate. This is why when playing games, the higher the resolution is set, the less smooth the picture will be.

The basic idea of ​​MPEG-1 compression: intra-frame compression and inter-frame compression. 
Secondly, the statistical analysis of the time correlation: the statistical results show that in the images with an interval of 1~2 frames, each pixel has only 10% or less points, and the change of the luminance difference exceeds 2%, while the change of the chromaticity difference is only 1% or less. 

Compression method used: Grouping: Group several frames of images into a group (GOP), in order to prevent movement changes, the number of frames should not be taken too much. 
1. Define frame: define each frame image in each group into three types, namely I frame, B frame and P frame; 
2. Predicted frame: take the I frame as the basic frame, use the I frame to predict the P frame, and then use the I frame as the base frame to predict the P frame. The I frame and the P frame predict the B frame; 
3. Data transmission: Finally, the I frame data and the predicted difference information are stored and transmitted. 

I-frame: Intra-frame coded frame 
I-frame features: 
1. It is a full-frame compression coded frame. It performs JPEG compression encoding and transmission on the full-frame image information; 
2. The complete image can be reconstructed with only the data of the I-frame during decoding  ; 3. The I-
frame describes the details of the image background and moving subjects; 
4. The I-frame does not require Generated with reference to other pictures; 
5.I frame is the reference frame of P frame and B frame (its quality directly affects the quality of subsequent frames in the same group); 
6.I frame is the basic frame of the frame group GOP (the first frame ), there is only one I frame in a group; 
7.I frame does not need to consider motion vector; 
8.I frame occupies a relatively large amount of data. 

P-frame: Forward predictive coded frame. 
Prediction and reconstruction of P frame: P frame takes the I frame as the reference frame, finds the predicted value and motion vector of the P frame "a certain point" in the I frame, and transmits the predicted difference value and the motion vector together. According to the motion vector, the receiver finds the predicted value of "a certain point" of the P frame from the I frame and adds the difference value to obtain the "a certain point" sample value of the P frame, so that the complete P frame can be obtained. 
P-frame features: 
1. The P frame is an encoded frame separated by 1~2 frames after the I frame; 
2. The P frame adopts the motion compensation method to transmit the difference between it and the previous I or P frame and the motion vector (prediction error); 
3. When decoding The prediction value in the I frame and the prediction error must be summed to reconstruct the complete P frame image; 
4. The P frame belongs to the inter-frame coding of forward prediction. It only refers to the I frame or P frame closest to it; 
5. The P frame can be the reference frame of the P frame behind it, or the reference frame of the B frame before and after it; 
6. Since the P frame is a reference frame, it It may cause the spread of decoding errors; 
7. Because of differential transmission, the compression of P frames is relatively high. 

B frame: Bidirectional predictive interpolation coded frame. 
Prediction and reconstruction of 
B frame B frame takes the previous I or P frame and the following P frame as reference frames, "finds out" the predicted value and two motion vectors of "a certain point" of the B frame, and takes the predicted difference and sum Motion vector delivery. According to the motion vector, the receiver "finds (calculates)" the predicted value in the two reference frames and sums it with the difference to obtain the "point" sample value of the B frame, so that the complete B frame can be obtained. 
B frame characteristics 
1. B frame is predicted by the previous I or P frame and the following P frame; 
2. The B frame transmits the prediction error between it and the previous I or P frame and the following P frame 3. The
B frame is a bidirectional predictive coding frame;  4. 
The B frame has the highest compression ratio, because it only reflects the change of the moving subject between the C reference frames, and the prediction is more accurate; 
5. The B frame is not a reference frame, it will not Causes a proliferation of decoding errors. 

Note: I, B, and P frames are artificially defined according to the needs of the compression algorithm. They are all real physical frames. As for which frame in the image is an I frame, it is random, once it is determined I frame, and subsequent frames are arranged in strict accordance with the specified order.

 

http://blog.chinaunix.net/uid-20770519-id-2982181.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326354316&siteId=291194637