[MPlayer-dev-eng] Finalize NUT spec

Oded Shimon ods15 at ods15.dyndns.org
Sat Jan 28 15:49:57 CET 2006


On Sat, Jan 28, 2006 at 03:30:33PM +0100, Michael Niedermayer wrote:
> Hi
> 
> On Sat, Jan 28, 2006 at 04:17:15PM +0200, Oded Shimon wrote:
> [...]
> > > for(; j<n && j<syncpoints; j++){
> > >     if (!has_keyframe[j][i]) continue
> > >     A                           v
> > >     if(!A){
> > >         A                       v
> > >         B                       v
> > >         eor_pts[j][i] = last_pts + A + B
> > >     }else
> > >         B=0
> > >     keyframe_pts[j][i] = last_pts + A
> > >     last_pts += A + B
> > > }
> > 
> > I preffer this. Maybe coded slightly more efficiently.
> > 
> > > the issue with your method is:
> > > 
> > > S K1 EOR2 S ... K9 S => K1, K9 (no indication of the EOR2)
> > > 
> > > so when we seek to TS=8 we will start at the very first syncpoint and have to
> > > linear search until K9, IIRC thats twice as much as we would have to without
> > > EORs
> > 
> > Yeah, this is a break to optimal seeking. the linear search with index 
> > should always be bounded by 2 adjacent syncpoints.
> > 
> > > with my suggestion:
> > > S K1 EOR2 S ... K9 S => K1/EOR2, K9
> > 
> > Ok, just 3 things to figure out:
> > 1. if you have eor, is it coded as keyframe as well?
> > 2. if there are several, which keyframe should you code
> > 3. if there are several, which eor should you code
> > 
> > I say:
> > 1. no (the index method proposed above doesn't allow this)
> 
> id say yes, (A=0,A=pts, B=0) (with my encoding suggestion)

It's a bit wrong, because:

S EOR1 K2 S => just K2 (not K1)

EOR keyframes are supposed to be disregarded for keyframe_pts purposes. But 
it works, cause there can be no 2 frames with same pts anyway.

> > 2. the minimum in the region
> > 3. the maximum in the region
> 
> agree

Here's the patch...
Now all I have to do is figure out how to implement this in syncpoint 
cache, I actually don't see any sane way of doing it...

- ods15




More information about the MPlayer-dev-eng mailing list