A question for the mp3 decoder experts out there:

Do decoders strictly enforce the maximum buffer length of 7680 bits?

The standard says that a frame can be no more than 7680 bits.  That is
the average bits per frame at 320kbs 48kHz.  But a 320kbs 44.1kHz
frame actually has an average bits per frame of 8359.

To quote from the standard:
"At sampling frequencies lower than 48kHz the buffer should be
constrained such that the same physical buffer size is sufficient
as the one calculated for the 48 kHz case above (7680 bits)"

This seems to imply that at 320kbs 44.1kHz, we are supposed to
restrict ourselves to a 7680 bit frame size, which means
we have to throw away 679 bits every frame?

I dont normally encode at 320kbs, but this problem came up when I
added VBR to the LAME encoder.  It will now every so often produce
a 320kbs frame, and I use all the bits available to encode these
frames.  

You can even generate frames with larger than 8359 bits by encoding at
320kbs and having main_data_begin > 0.  This often happens if you are
building up the bit reservoir while encoding at 128kbs and then switch
to one frame of 320kbs.

mpg123/mpglib has no problems with these frames, but I was wondering
if some of the DSP decoders strictly enforce the 7680 buffer
size.  it is such a tiny amount of memory it seems crazy to do this,
but you never know!


Mark




--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to