[MPlayer-dev-eng] NUT pts/startcode optimization proposal

D Richard Felker III dalias at aerifal.cx
Tue May 4 02:18:05 CEST 2004


On Tue, May 04, 2004 at 02:08:02AM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Monday 03 May 2004 22:15, Ville Saari wrote:
> > On Sun, May 02, 2004 at 02:57:18PM -0400, D Richard Felker III wrote:
> > > >From the nut spec:
> > >
> > > coded_timestamp
> > >         if coded_timestamp < (1<<msb_timestamp_shift) then its a
> > >         lsb timestamp, otherwise its a full timestamp +
> > > (1<<msb_timestamp_shift) lsb timestamps are converted to full timesamps
> > > by:
> > >         mask = (1<<msb_timestamp_shift)-1;
> > >         delta= last_timestamp - mask/2
> > >         timestamp= ((timestamp_lsb-delta)&mask) + delta
> > >         a full timestamp must be used if there is no reference timestamp
> > >         available after the last frame_startcode with the current
> > > stream_id
> >
> > Is there some reason for the definition of the lsb timestamps to be so
> > complicated? 
> yes, error recovery, if last_timestamp is wrong by a small value lsb 
> timestamps will result in the correct timestamp, delta wont

Ville, the system is Michael describes is really very smart. Make a
test program to print out the different combinations and you'll see
what we mean. It was put there for a very good reason.

Rich




More information about the MPlayer-dev-eng mailing list