[MPlayer-dev-eng] Finalize NUT spec

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


On Sat, Jan 28, 2006 at 03:03:24PM +0100, Michael Niedermayer wrote:
> On Sat, Jan 28, 2006 at 08:05:29AM +0200, Oded Shimon wrote:
> > I think I've got a solution.. Using same method above: Treat EOR same as 
> > keyframes (they are keyframes after all), however, don't mark the 
> > syncpoint region as eor'd if there is any non-eor keyframe in it:
> > 
> > S EOR3 K7 EOR10 S => key 3
> > 
> > S frame7 EOR10 S => eor 10
> > 
> > S K7 EOR10 S .... S .... S K13 S => key 7, eor 10, no key, key 13
> 
> what i dont like on your method is that eor 10 which is between S0..S1 is
> stored in the entry for S1..S2, while if K7 wouldnt be there it would be
> stored in S0..S1

You're right, I hated that about my method too.

> why not do something like:
> 
> for(; j<n && j<syncpoints; j++){
>     if (!has_keyframe[j][i]) continue
>     A                           v
>     last_pts += A
>     keyframe_pts[j][i] = last_pts
>     if(has_eor[j][i]){
>         B                       v
>         last_pts += B
>         eor_pts[j][i] = last_pts
>     }
> }

Problem is it makes it harder/impossible to interleave index like we did

> 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)
2. the minimum in the region
3. the maximum in the region


So:
S EOR1 S => EOR1
S K1 EOR2 K3 EOR4 S => K1/EOR4
S EOR1 K2 EOR3 K4 S => K2/... I'm not sure. no EOR at all?

Ok, refined:
code first keyframe in region.
if eor is set by the end of region, give pts of that eor.

I think that's it...

- ods15




More information about the MPlayer-dev-eng mailing list