[DVDnav-discuss] Suggesting new method to accurately set position by time
gnosy gnu
gnosygnu at gmail.com
Sat Jun 12 16:44:23 CEST 2010
>Please, first explain what's wrong with dvdnav_time_search()
>(that currently first uses the TMAP and the ADMAP to get to the
>closest block)
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 */
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