Transferred from: https://codesequoia.wordpress.com/2010/04/19/what-are-cbr-vbv-and-cpb/
It's common mistake to consider CBR (Constant Bit rate) as "every frame is allocated the same number of bits". If it were the case and then what would is 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 is a lot of CBR streams with P or B frames. You can easily see every frame has very different number of bits even in a CBR stream.
So, what is CBR? In MPEG-2 and H, CBR means the number of bits fed to the decoder are constant over time. In and words, the data transfer rate to the decoder is constant. It's nothing and does with the number of bits of individual frames.
Confused? How are 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. Stream) is constantly flowing into the tank. The guys is lined up with 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 was constant thanks to the tank (buffer).
In MPEG-2, the buffer is called VBV buffer (Video buffer Verifier buffer). In h #, the buffer is called CPB (Coded picture buffer).
The water level of the tank at certain time instance was 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.
The coded stream must is constructed so, the tank (=buffer) never overflow or underflow. There is commercial/non-commercial software called "Buffer verifier" to check the errors.
When the buffer size was 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 has the large buffer, which means more expensive hardware.
What is CBR, VBV and CPB?