Offset times

n6mod n6mod at m...
Wed, 20 Mar 2002 17:59:35 -0000


Edmond,

I think you're on to something here. To answer your question, AFAIK 
the correct frame ordering in your example is IPBB. In other words, 
the decoder should not be asked to buffer things it can't decode yet, 
but can be asked to buffer things it can't display yet.

At least, that's my understanding of how MPEG is supposed to work. 
Now, the CS22 chip may have some extra buffering capability, and 
putting things in presentation order does make things easier 
for "Trick Play", so that's probably why the TiVo stores them that 
way.

I strongly suspect that if you believe the PTS for the I-frames, and 
then calculate the PTS for the P and B-frames based on the sequence 
in the tyStream, you'll get good PTS for all frames. And you 
obviously have a good DTS for the P and B-frames. What I'm not sure 
about is where to get a DTS for the I-frames, though you could 
interpolate from the DTS of surrounding P and B-frames (or work back 
from the first B-frame, since an I-frame starts a GOP?)

Just my $0.02.

-Zandr