[MPlayer-dev-eng] forward pointers in NUT and possible NUT simplifications

Michael Niedermayer michaelni at gmx.at
Thu Apr 15 04:10:04 CEST 2004


Hi

several ppl complained about $subj due to the required buffering

current implementation:

startcodes&forward pointers: M->S->S->2-------> ----> ------->2
          backward pointers: M<-S<-S<-2<-------1<----1<-------2
                                      2->0->0->1->0->1->0->0->2

possible alternative:

startcodes&forward pointers: M->S->S->2->       ->    ->      2
          backward pointers: M<-S<-S<-2<-------1<----1<-------2
                                      2->0->0->1->0->1->0->0->2

problems of the alternative solution:
* currently we can detect errors in type 0 frames if they are larger then the 
forward pointer
1---->
1->0---->oops
but if the forward pointers dont point to the next type != 0 frame this wont 
work, one solution maybe to add a maximum_type_not_0_distance field to the 
main header
* following forward pointers becomes more fragile, as there are many more 
bytes involved then currently, the current average distance of type 1 frames 
is 16k, and for an audio stream individual packets may be about 100-200 bytes 
so while currently we need just 1 undamaged pointer to reach the next type 1 
frame, with the alternative solution we would need about 100 undamaged 
pointers, that is clearly a problem, the obvious solution, drop type 1 
packets completely, that would mean 8bytes more every 16kb, which is a 
negligible 0.05% overhead
now, if we do drop type 1 packets, the backward pointers would point exactly 
from one startcode to the previous, this is not terrible usefull, we could 
simply search for the startcode, and in a damaged stream the backward pointer 
couldnt be trusted anyway, so we could drop backward pointers too, the result 
would be without doubt simpler, but would it still be similarly good? rich, 
ivan what do u think?

startcodes&forward pointers: M->S->S->2        2     2        2
                                      2->0->0->2->0->2->0->0->2

-- 
Michael
level[i]= get_vlc(); i+=get_vlc();		(violates patent EP0266049)
median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]);	(violates patent #5,905,535)
buf[i]= qp - buf[i-1];				(violates patent #?)
for more examples, see http://mplayerhq.hu/~michael/patent.html
stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en




More information about the MPlayer-dev-eng mailing list