Can someone explain Bit reservoir for me?
Reply #13 – 2013-04-29 12:36:48
The audio data creation process is exactly the same no matter whether bitreservoir is turned on or off with one important exception which is relevant in situations when the Lame VBR method finds a very compley spot in the music which needs a lot of bits. With bitreservoir turned off Lame can use only the amount of data available in a 320 kbps frame (<320 kbps because of frame overhead). With bitreservoir turned on Lame can also use unused data space from within preceding frames. Bitrate can locally go up to ~580 kbps this way. That's why it's foolish to turn bitreservoir off. With bitreservoir turned off there's always a certain amount of unused bits in every frame. That's why average bitrate is higher, but not for any good reason. The higher amount of bits are bits in the mp3 file which are not used. Another reason why turning off bitreservoir isn't useful. At the upper levels the mp3 encoding process isn't very difficult to understand: The track to be encoded is subdivded into blocks (called frames) of 1152 wave samples each. Each of these blocks is encoded seperately, and for each block the encoder decides which audio data bitrate to use depending on the complexitiy of the music. Let's assume the encoder thinks that the current block needs 257 kbps. The audio data of each block are packaged into a corresponding container. When using mp3 these containers can't be of arbitrary size. They can only have a size wich corresponds to a bitrate of 320, 256, 224, 192, 160, 128, ... kbps. Now that the encoder needs 257 kbps, it must take a container of 320 kbps size, because the next smaller one doesn't allow for 257 kbps. Sure the 320 kbps container is too big. All the bits which belong to a bitrate beyond 257 kbps remain unused!!!! And if the encoder had demands for more than 320 kbps there is no chance that he will get the data space needed !!!! This is the situation with bitreservoir turned off. With bitreservoir turned on in contrary the encoder keeps in mind that we have a lot of unused data space in our 320 kbps container because only 257 kbps are used. This way the currently unused data can be used when it comes to encode the next block of 1152 wave samples. So when it comes to this the encoder can use more bits than available from a 320 kbps container alone which is very welcome when encoding a complex passage. At any rate the encoder will fill up the otherwise unused data in our current container with audio data from the next block. That's why the bitresevoir is so useful.