[MPlayer-dev-eng] NUT error resilience ideas

Michael Niedermayer michaelni at gmx.at
Mon May 10 02:23:58 CEST 2004


Hi

idea 1:
store sum of size of 2 packets (current+last) instead of only the current size 
and store the size of the last packet at a syncpoint

advantages: 
* we could walk backward from a syncpoint, allthough its not exactly obvious 
how far we should walk backwards, as its difficult to distinguish damaged 
from undamaged packets

disadvantages: 
* brute force resync without a syncpoint would be very difficult
* larger packet headers, especially if small and large packets are mixed

overall, i doubt this would be a good idea, but i thought i mention it ...



idea 2:
duplicate all packet headers in an optional index at the end of the file, so 
the index is just packet headers but no packets, and some alternative value 
for the startcodes, but is otherwise identical to the actual stuff before it

advantage:
* if the specific part of the index is undamaged, we can easily resync to the 
next undamaged packet

disadvantage:
* if the index is used it adds some extra size at the end, while a keyframe or 
synccode only index would be significantly smaller

IMHO idea 2 seems to be a good idea



idea 3.
this one has low overhead but high complexity, probably too high ...
we first split the file in blocks of n packets (n may be different for each 
block) we could for simplicity also assume to split exactly at syncpoints.
each block will get an error recovery record added at its end, otherwise its 
identical to the current spec, so encoding and decoding have low latency.
to build the error recovery record we first build an array of all the packet 
headers within the block, then we calculate some parity data (RS or 
whatever), this parity data is then stored at the end of each block

so how can we use this now during decoding?
its easy in theory ...
we simply demux until we notice an error and then do a bruteforce resync to 
find the most likely packet chain up to the next syncpoint, now we have a 
damaged list of packet headers and the error recovery record from prior of 
the syncpoint, next is pretty obvious, use the error recovery record and any 
additional information about which packet headers are lost to repair them, 
after that just demux the not yet demuxed parts of the block

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