Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: LAME Bit Reservoir (Read 5366 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

LAME Bit Reservoir

Can someone help me understand the bit reservoir system that LAME uses?  As I understand it, if the samples in a frame can be encoded with the same accuracy using fewer bits than is required by the bitrate, then this is done, and the extra bits are counted and can be used in future frames where a sample may gain more accuracy from more bits to encode with.

I'm looking for something along the lines of an algorithmic explanation of this process.  If anyone can explain, or provide a pointer to some resources, I would much appreciate it.

Thank you!

LAME Bit Reservoir

Reply #1
The MPEG data contains a "data start offset".  This can be a negative value which means that the data starts in the middle of the previous frame

LAME Bit Reservoir

Reply #2
The following picture shows an example of an mp3 stream. You can see a frame is divided in three sections: header, side info and main data. the "bit reservoir" is simply unused "main data space" of previous frames.


Here's an older thread with more detailed explanations.

Cheers
SG

 

LAME Bit Reservoir

Reply #3
Thanks for the info!  This is much clearer to me now.