[MPlayer-dev-eng] Lots of stuff for NUT

Oded Shimon ods15 at ods15.dyndns.org
Tue Jan 3 20:32:06 CET 2006


On Tue, Jan 03, 2006 at 06:09:13PM +0200, Oded Shimon wrote:
> On Tue, Jan 03, 2006 at 04:07:21PM +0100, Michael Niedermayer wrote:
> > and how good is:
> > 
> > syncpoint:
> > 	startcode				u(64)
> > 	coded_pts				v
> > 	stream = coded_pts % stream_count
> > 	back_ptr[stream] = back_ptr_div8[0]     v
> > 	pts[stream] = coded_pts/stream_count
> >         n=1
> > 	for (i=0; i<stream_count; i++) {
> > 		if (i == stream) continue
> > 		coded_pts			v
> >                 A= coded_pts % (n+1)
> >                 B= coded_pts / (n+1)
> >                 if(A == n)
> >                     back_ptr_div8[n++]		v
> >                 back_ptr[i]= back_ptr_div8[A]
> > 		pts[i] = covert_ts(pts[stream], timebase[stream], timebase[i])
> >                 pts[i] -= B
> > 	}
> 
> Damnit! you beat me to it, I was in the middle of a mail suggesting 
> something similar. :)
> 
> My suggestion might be a bit better, it offered also relative back_ptr's
> But yours might be better, as the 'n' changes with stream and is not 0 
> terminated ever. (Combining both is impossible..) Let's see:
> 
> 1) low bitrate file with 2 subtitles
> yours: Syncpoints: 19413 size: 407794
> mine:  Syncpoints: 19415 size: 427322
> 
> 2) low bitrate file with 10 subtitles
> yours: Syncpoints: 19445 size: 599933
> mine:  Syncpoints: 19443 size: 611125
> 
> 3) high bitrate file
> yours: Syncpoints: 27462 size: 462052
> mine:  Syncpoints: 27462 size: 462440
> 
> 
> Yours wins, I'm not even gonna bother writing my idea.
> So, are we done? Is it official? Shall I make a new patch to the spec?
> 
> P.S., we also need a new index for this.. care to do the honors? :)

Here's my patch. I chose a rather naive approach for the index, but I 
actually don't think it can be improoved much further.

The first pts in the syncpoint is always the HIGHEST keyframe pts in the 
file, making it the most precise one to our position, so I decided it is 
the pts to be used for resseting pts across all streams, also, for EOR 
streams, the pts is set to that first pts.

I decided Michael's phrasing for the max_distance keyframe/syncpoint rule 
is much better than mine and much simpler to implement.

The total sum of everything in the patch:
1. remove max_index_distance
2. remove global_time_base
3. re-arrange main header
4. add coded_stream_flags
5. Change index
6. fix small bug in info_packets (no get_s())
7. per stream back_ptr and pts in syncpoints
8. rename frame_startcode to syncpoint_startcode
9. add EOR and SOR stream flags
10. keyframes with back_pts bigger than max_distance must be accompanied by 
    syncpoint
11. define function "convert_ts"
12. Add "more_codes" frame header flag
13. Change "monotone" to MN rule
14. max_pts is coded in same way as syncpoint's coded_pts
15. Bump draft date :)
16. Change goals slightly. :) Although actually with this new index I'm not 
    sure the index is even under 100kb. This needs checking.

Go over the patch, comment on it, I want to commit it, I want your OK's.

- ods15




More information about the MPlayer-dev-eng mailing list