QUOTE(smack @ Mar 3 2005, 03:09 AM)
QUOTE(Omion @ Mar 3 2005, 09:37 AM)
Plus, the bit reservoir is completely useless for CBR 320 files, as the maximum amount of data must not be more than can fit in a 320kbps frame.
Is it, really?

Do you have a link to the specs for this?
I always thought that the maximum size of a single frame's audio data is the maximum frame size (320kbps setting) PLUS the maximum bit reservoir capacity (511 bytes). This is the way I implemented the parser in my own MPEG player, anyway.
No specs, but that's what I've heard from various people.
Here's Gabriel pointing it out (post #9). I've just seen it come up here and there, usually involved in a "why doesn't API use the reservoir?" question.
QUOTE
Do you know if LAME already optimizes the Huffman coding? If not, this would be another option to slightly reduce the size of MP3 data in a lossless way.
(this idea is similar to a Vorbis tool called "rehuff", IIRC. the difference is that in MP3 there is only a fixed set of Huffman tables to be used - the optimization would be simply to pick the table that yields the fewest encoded bits.)
I remember toying with rehuff when it came out. I probably won't implement it, for a couple of reasons:
* I don't know any "real" programming languages. Perl's the only thing I can code in, and I don't think programming a Huffman (re)coder in Perl will be very fast, or very fun.
* I have no idea what the actual MP3 specs are. A lot of pages say what the header bits do, but I had to look at the LAME source code and some Chinese PDF to figure out how the side-info works. (Do you know where I can get them? Do you have to buy them, or what?)
* From what I remember, "rehuff" was fairly buggy, and didn't really reduce size much. I don't think an MP3 version will be much better.
QUOTE
Have you already thought of the option to "inflate" an MP3 stream to a higher bitrate by adding auxiliary data? This could be useful to embed any data inside the stream (text, images) WITHOUT the need to use tags...
It might be nice, but it wouldn't be supported at all, and tags would probably be better anyway. I'll probably add a "minimum bitrate" option to limit the size of frames. I remember something about certain portables not supporting lower bitrates, although maybe I just made that up...
HOWEVER, I was thinking of making a "magic" MP3 enhancer based on this. It would go something like this:
1. Make a program which will take any MP3, and pad it so it's CBR 320
2. Go onto various fora (the ones which still teach things like "joint stereo is evil" and "smearing goo on your CDs make them sound better")
3. Post there saying I found this great program that utilizes the latest in "spectral enhancement Markov chains" and "non-deterministic B-spline generators", etc. to increase the quality of your MP3s
4. See how many people believe me. I'm sure there will be responses like "It sounds warmer, yet clearer and deeper, without the harsh boominess of the original. Plus, I found $5 under my sofa."