[MPlayer-dev-eng] Finalize NUT spec

Michael Niedermayer michaelni at gmx.at
Sat Jan 28 15:03:24 CET 2006


Hi

On Sat, Jan 28, 2006 at 08:05:29AM +0200, Oded Shimon wrote:
> On Fri, Jan 27, 2006 at 05:40:09PM +0200, Oded Shimon wrote:
> > We're almost there.
> > 
> > 1) EOR in index.
> > I propose, in this section of index:
> >             for(; j<n && j<syncpoints; j++){
> >                 if (!has_keyframe[j][i]) continue
> >                 A                           v
> >                 last_pts += A
> >                 keyframe_pts[j][i] = last_pts
> >             }
> > 
> > Change to:
> > 
> >             for(; j<n && j<syncpoints; j++){
> >                 if (!has_keyframe[j][i]) continue
> >                 A                           v
> >                 if (A) {
> >                     last_pts += A
> >                     keyframe_pts[j][i] = last_pts
> >                 } else {
> >                     A                       v
> >                     last_pts += A
> >                     eor_pts[j][i] = last_pts
> >                 }
> >             }
> > 
> > Where EOR pts should only be given if there isn't any keyframe in the 
> > _entire_ syncpoint region (between this syncpoint and the last syncpoint)
> > 
> > S EOR3 K7 EOR10 S => key 7
> > 
> > S frame7 EOR10 S => eor 10
> > 
> > S K7 EOR10 S .... S .... S K13 S => key 7, eor 10, no key, key 13
> > 
> > I think this breaks optimal seeking in some silly situations, I'm not sure, 
> > maybe strict interleaving saves you from that. Either way, I don't think it 
> > is worth fixing.
> > Found it:
> > S K7 S ... S ... S EOR10 K13 S
> > 
> > We want pts 11, we'll end up at K7 cause EOR10 is "silenced" by the K13. 
> > Only question left, do we care. I don't.
> 
> 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

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
    }
}

or

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
}


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

with my suggestion:
S K1 EOR2 S ... K9 S => K1/EOR2, K9


[...]
-- 
Michael




More information about the MPlayer-dev-eng mailing list