MP3 库距离引用它的帧最远是多少?

What is the furthest an MP3 reservoir can be from a frame referencing it?

MP3 帧的压缩数据可以小于帧中可用的 space。发生这种情况时,我们将 space 称为可用水库。

当未来的框架太大并且无法容纳在一个框架中可用的 space 时,它可以使用一个水库来弥补它的盈余。这允许恒定的比特率和可变的压缩长度,包括对于 普通帧 .

来说太大的长度

我想知道的是水库可以从当前帧回溯多远?

比如下面我展示了8帧。当前帧 (CF) 及其之前的 7 帧。

+----+----+----+----+----+----+----+----+
| -7 | -6 | -5 | -4 | -3 | -2 | -1 | CF |
+----+----+----+----+----+----+----+----+

假设 CF 是第 100,000 帧,它可以使用第 0 帧中仍然可用的水库吗?

或者有没有限制比如回退255帧?

据我所知,没有具体的帧数限制,但有一个4088位(511字节)的参考限制。因此,确切的比特库帧限制取决于比特率。

我在 LAME Technical FAQ 上找到了这个信息:

The MP3 data for frame N is not stored in frame N, but can be spread over several frames. In a typical case, the data for frame N will have 20% of it stored in frame N-1 and 80% stored in frame N. If the encoder builds up a large bit reservoir, the data for frame N can actually be stored 4088 bits back in the bitstream. Then if a very hard-to-encode passage comes up, then the encoder is free to use the normal bits for this frame plus up to 4088 more. The resulting data will then take up several frames. The starting negative offset in the bitstream for the data associated with a given frame in bytes is given by main_data_begin.