[DVDnav-discuss] Suggesting new method to accurately set position by time

gnosygnu gnosygnu at gmail.com
Mon Jun 21 03:02:50 CEST 2010


Hi all. Just following up on the topic.

I re-excerpted my last reply below. If the patch is unacceptable, please
provide specific guidelines for revision.
Thanks.

>Date: Fri, 11 Jun 2010 15:21:34 +0200
>From: Nico Sabbi <nicola.sabbi at poste.it>
>there's much more code that I would have liked to see.
>Please, first explain what's wrong with dvdnav_time_search()

dvdnav_time_search() uses interpolation to get the sector. This
interpolation is inaccurate. The comments for the function indicate as much:
/* FIXME: right now, this function does not use the time tables but
interpolates
only the cell times */
/* FIXME: there must be a better way than interpolation */

>(that currently first uses the TMAP and the ADMAP to get to the
>closest block)

time_search uses the ADMAP only after it gets the target sector by
(inaccurate) interpolation
As far as I see, it doesn't use TMAP.

>and next explain how you want to fix is.

A quick explanation of my fix:
- use TMAP and ADMAP to get sector from time (handles approximately 95% of
dvds)
- if TMAP is corrupt, use ADMAP only (handles approximately 5% of dvds)
- if ADMAP is corrupt, fall back on interpolation (handles any outliers)

I detail the TMAP and ADMAP approach in my first email. I can resummarize
again if you feel it was too verbose.

Finally, please note I chose not to "fix" time_search b/c the fix was
complicated. I thought it would be better to leave the current behavior of
time_search as is (someone may be depending on the inaccurate
interpolation).

>The dvdnavmini is a different issue and belongs to a different thread.
>It's also a thing of the past in many respects.

I mentioned it because I wanted to explain why I modified my final
search.diff. In retrospect, no one else probably would have noticed so I
should have omitted it entirely.


More information about the DVDnav-discuss mailing list