[MPlayer-dev-eng] [PATCH] iterative seeking for MPEG-2 bitstreams (for discussion)

Yue Shi Lai ylai at linuxmail.org
Wed Jul 21 05:59:42 CEST 2004


Hi,

I wish to submit this patch for some discussion. My MPEG-2 hardware generates correct timestamp, and with this patch applied, it is possible to seek in it within 0.1 s precision.

It modifies the seek algorithm to check the resulted position against its expectation, and when necessary, do a corrective seek. It is an zeroth order algorithm, which means, it does not attempt to extrapolate. I think extrapolation could fail in some VBR streams and is not advisable.

The iteration is bit more complex, it tries to break a iteration for seeks <= 60 s really fast. I think this is a good idea to ensure that keyboard triggered seeks do not become significantly slower with this patch. I have set the desired precision to 0.1 s, which is a quite realistic precision in a stream with many I-frames. This requirement is relaxed to 1.0 s after 6 iterations.

This value and the maximum number of 8 iterations is an empirical value, as mostly, the number of iterations seems to be in the order of 4. The iteration also aborts if it calculates a value that is not within 10% range of the more robust timer value (that is used currently in MPlayer).

Yue Shi Lai
-- 
______________________________________________
Check out the latest SMS services @ http://www.linuxmail.org 
This allows you to send and receive SMS through your mailbox.


Powered by Outblaze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MPlayer-1.0pre5-iterative_seek.	patch
Type: application/octet-stream
Size: 2888 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040721/ea22562a/attachment.obj>


More information about the MPlayer-dev-eng mailing list