What are CBR, VBV and CPB?

转自:https://codesequoia.wordpress.com/2010/04/19/what-are-cbr-vbv-and-cpb/

It’s common mistake to to consider CBR (Constant Bit Rate) as “every frame is allocated the same number of bits”. If it were the case, then what would be the purpose of P or B frames? The whole purpose of P/B frame is to reduce the number of bits by referencing another frame. Of course, there are a lot of CBR streams with P or B frames. You can easily see every frame have very different number of bits even in a CBR stream.

So, what is CBR? In MPEG-2 and H.264, CBR means the number of bits fed to the decoder is constant over time. In other words, the data transfer rate to the decoder is constant. It’s nothing to do with the number of bits of individual frames.

Confused? How is it possible to allocate different number of bits to frames while keeping the incoming data rate constant?

Answer: you need a buffer. To understand the logic, consider a water outlet, a water tank, and a series of “picture decode guys” lined up in front of the tank.

The water (coded MPEG-2 or H.264 stream) is constantly flowing into the tank. The guys are lined up in front of the tank and remove the water for each frame to be decoded. The removal happens at the fixed time interval in most cases.

Even though Mr.I, P, and B are removing different amount of water (=each frame needs different number of bits), the water outlet speed is constant thanks to the tank (buffer).

In MPEG-2, the buffer is called VBV buffer (Video Buffer Verifier Buffer). In H.264, the buffer is called CPB (Coded Picture Buffer).

The water level of the tank at certain time instance is called buffer fullness and described in number of bits. The size of the tank is called VBV buffer size in MPEG-2 and CPB buffer size in H.264.

The coded stream must be constructed so that the tank (=buffer) never overflow or underflow. There are commercial/non-commercial software called “buffer verifier” to check the errors.

When the buffer size is set to large value (it’s an encoded stream parameter), the encoder can use large variance of bits for each frame which generally results in better video quality. However, the decoder needs to have the large buffer, which means more expensive hardware.

时间: 04-14

What are CBR, VBV and CPB?的相关文章

如何解酷派CPB包

对酷派手机感兴趣(尤其刷机)的朋友可能会知道,酷派官方推出的升级包大部分是cpb压缩包.酷派的CPB格式文件包括BootLoader.NK.安装包几个部分,当然还可能包括一个叫GSMRaw的部分. 当我们想对这个包进行裁剪时,是需要先进行解包的.要对cpb包进行解包,一般需要用到专门的解包工具YGDP.但是YGDP对于一些新机型来说,却没办法解包,因为YGDP上没有对应的机型,这是一个很大的困扰. 这里对上述几部分做个简单介绍 1.手机CE系统的组成: BootLoader-----主要功能是开

H264三种码率控制方法(CBR, VBR, CVBR)

CBR(Constant Bit Rate)是以恒定比特率方式进行编码,有Motion发生时,由于码率恒定,只能通过增大QP来减少码字大小,图像质量变差,当场景静止时,图像质量又变好,因此图像质量不稳定.这种算法优先考虑码率(带宽). 这个算法也算是码率控制最难的算法了,因为无法确定何时有motion发生,假设在码率统计窗口的最后一帧发生motion,就会导致该帧size变大,从而导致统计的码率大于预设的码率,也就是说每秒统计一次码率是不合理的,应该是统计一段时间内的平均码率,这样会更合理一些.

音频转化mp3 ,到底选vbr还是cbr

毫无疑问,aac格式是最好的. 其次,应该是 vbr. 参考下面文章 http://tieba.baidu.com/p/1966991568 总结: 1.正版iTunes Plus 256K AAC格式与Flac无损格式音质无明显差异,但体积前者是后者的1/42.正版iTunes Plus 256K AAC格式转制最高320K CBR Mp3格式,与Flac无损转制无明显差异3.VBR V0 mp3pro解码Mp3格式,在普通Mp3格式中音质最好,且体积最小4.CBR 320K Mp3格式,在普

HRD Emulator in HTML5

Posted on March 21, 2012 by Moto Just like MPEG-2 video uses VBV (Video Buffer Verifier), H.264 standard uses HRD (Hypothetical Reference Decoder) to define correctness of streams. One of the verification provided by HRD is CPB buffer fullness. The i

ffmpeg文档17-视频编码器

17 视频编码器 介绍一些当前有效的视频编码器 libtheora libtheora的封装 编译需要头和库文件,还需要利用--enable-libtheora在配置中允许 更多信息参考http://www.theora.org/ libtheora选项 下面是映射给libtheora的全局选项,它们对品质和码率产生影响. b 对CBR(固定码率编码)设置码率,单位bit/s,在VBR(动态码率编码)模式下本选项被忽略. flags 设置是否允许qscale标志(恒定质量模式——VBR模式下)在

FFmpeg与libx264接口源代码简单分析

===================================================== H.264源代码分析文章列表: [编码 - x264] x264源代码简单分析:概述 x264源代码简单分析:x264命令行工具(x264.exe) x264源代码简单分析:编码器主干部分-1 x264源代码简单分析:编码器主干部分-2 x264源代码简单分析:x264_slice_write() x264源代码简单分析:滤波(Filter)部分 x264源代码简单分析:宏块分析(Anal

ffmpeg视频压缩配置方法(转)

出处:http://blog.4wer.com/ffmpeg-config qscale的取值可以是0.01-255但实际使用超过50就很糟糕了 ffmpeg的cbr模式可以把码率控制的不错,但是vbr无法限制最高码率(虽然有max的设置,但是程序没有实现) x264标准的封装是x264+aac in flv或者x264+aac in MP4 接下来说明下ffmpeg命令行的语法规则(本块内容来自2009-03-02官方文档): 语法规则结构: ffmpeg [[infile options][

ffmpeg最全的命令参数

Hyper fast Audio and Video encoderusage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Getting help: -h -- print basic options -h long -- print more options -h full -- print all options (including all format and code

X264码率控制总结2

X264码率控制方法定性概述 x264/doc/ratecontrol.txt A qualitative overview of x264's ratecontrol methods By Loren Merritt 历史笔记: 本文件是过时的,但相当一部分叙述仍然是准确的,以下是一些重要的码率控制算法更新: 1. 默认情况下,MB-tree代替了qcomp用以计算各帧的复杂度,MB-tree是qcomp在宏块级的有效推广.MB-tree还替代了B帧QP固定偏移. 2. 现在自适应量化(Ada