> 
> Hello,
> 
> I believe Robert said that mp3 frames overlap 50%, then would it be
> sufficient to init some values using _only_ the previous frame in
> order to play the next ok?
> 
> So: I want good playback, starting with frame N, would it suffice to
> load up frame N-1, and then start playing @ frame N? (or do I need
> more frames (N-2, ...))
> 
> (I'm wondering to which frame to refer in the albumheader)
> 
> thanks
> 
> -- 
> Best regards,
>  Roel                            mailto:[EMAIL PROTECTED]
> 

Do you want absolutely perfect reconstruction of frame N?

To fully decode frame N, you need to:

uncompress frames frame N-1,N and N+1
sum data (with a 50% overlap) to get 1152 samples from frame N

But to uncompress frame N-1, 99.9% of the time, the data for this
frame will be partially stored in frame N-2.

So say you start with frame N-1:

1.  Most of the time, Frame N-1 will not be uncompressed since it needs data
    from frame N-2.  

2.  Frame N will be properly uncompressed.  But when you sum
    it with the output of frame N-1 (because of the 50% overlap)
    some of the data will be corrupted since frame N-1 was not
    properly decoded.  (the first
    288 samples will be corrupted depending on what the decoder
    uses from frame N-1.)

3.  Frame N+1 will be properly uncompressed and fully decoded.



And what about the other .1% of the time?  In some cases, 
(if bitreservoir=0) frame N-1 will be uncompressed, and then
frame N-1 will be output (with some corrupted data) and
frame N will be okay.

But you can also have the situation where the bitreservoir
is quite large - I think these are the worst case situations:

MPEG1:  data for frame N can be in frame N-8    
MPEG2:  data for frame N can be in frame N-256!

But you can only get these extreme numbers by encoding 
pure digital silence at the lowest possible bitrate. 

Mark

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

Reply via email to