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 data volume 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.

MPEG-1压缩的基本思想:帧内压缩和帧间压缩。 
其次,时间相关性的统计分析:统计的结果表明,在间隔1~2帧的图像中,各像素只有10%以下的点,其亮度差值变化超过2%,而色度差值的变化只有1%以下。 

采用的压缩方法: 分组:把几帧图像分为一组(GOP),为防止运动变化,帧数不宜取多。 
1.定义帧:将每组内各帧图像定义为三种类型,即I帧、B帧和P帧; 
2.预测帧:以I帧做为基础帧,以I帧预测P帧,再由I帧和P帧预测B帧; 
3.数据传输:最后将I帧数据与预测的差值信息进行存储和传输。 

I帧:帧内编码帧 
I帧特点: 
1.它是一个全帧压缩编码帧。它将全帧图像信息进行JPEG压缩编码及传输; 
2.解码时仅用I帧的数据就可重构完整图像; 
3.I帧描述了图像背景和运动主体的详情; 
4.I帧不需要参考其他画面而生成; 
5.I帧是P帧和B帧的参考帧(其质量直接影响到同组中以后各帧的质量); 
6.I帧是帧组GOP的基础帧(第一帧),在一组中只有一个I帧; 
7.I帧不需要考虑运动矢量; 
8.I帧所占数据的信息量比较大。 

P帧:前向预测编码帧。 
P帧的预测与重构:P帧是以I帧为参考帧,在I帧中找出P帧“某点”的预测值和运动矢量,取预测差值和运动矢量一起传送。在接收端根据运动矢量从I帧中找出P帧“某点”的预测值并与差值相加以得到P帧“某点”样值,从而可得到完整的P帧。 
P帧特点: 
1.P帧是I帧后面相隔1~2帧的编码帧; 
2.P帧采用运动补偿的方法传送它与前面的I或P帧的差值及运动矢量(预测误差); 
3.解码时必须将I帧中的预测值与预测误差求和后才能重构完整的P帧图像; 
4.P帧属于前向预测的帧间编码。它只参考前面最靠近它的I帧或P帧; 
5.P帧可以是其后面P帧的参考帧,也可以是其前后的B帧的参考帧; 
6.由于P帧是参考帧,它可能造成解码错误的扩散; 
7.由于是差值传送,P帧的压缩比较高。 

B帧:双向预测内插编码帧。 
B帧的预测与重构 
B帧以前面的I或P帧和后面的P帧为参考帧,“找出”B帧“某点”的预测值和两个运动矢量,并取预测差值和运动矢量传送。接收端根据运动矢量在两个参考帧中“找出(算出)”预测值并与差值求和,得到B帧“某点”样值,从而可得到完整的B帧。 
B帧特点 
1.B帧是由前面的I或P帧和后面的P帧来进行预测的; 
2.B帧传送的是它与前面的I或P帧和后面的P帧之间的预测误差及运动矢量; 
3.B帧是双向预测编码帧; 
4.B帧压缩比最高,因为它只反映丙参考帧间运动主体的变化情况,预测比较准确; 
5.B帧不是参考帧,不会造成解码错误的扩散。 

注:I、B、P各帧是根据压缩算法的需要,是人为定义的,它们都是实实在在的物理帧,至于图像中的哪一帧是I帧,是随机的,一但确定了I帧,以后的各帧就严格按规定顺序排列。

 

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

Guess you like

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