[MPlayer-dev-eng] Change pts values to use doubles instead of floats
Ivan Kalvachev
ikalvachev at gmail.com
Tue Apr 25 00:14:07 CEST 2006
2006/4/25, Corey Hickey <bugfood-ml at fatooh.org>:
> Uoti Urpala wrote:
> > Floats do not have sufficient precision to hold pts values in long
> > streams/files. After 8192 seconds the distance between two consecutive
> > floats is about 1 ms, and the error grows proportional to file length,
> > so after 65536 seconds (less than a day) it's 8 ms.
> >
> > The attached patch changes the common data structures to doubles. It
> > does not yet change any demuxers to produce pts values with higher
> > precision, many of them use floats internally.
>
> [cut]
>
> > -float ds_get_next_pts(demux_stream_t *ds) {
> > +double ds_get_next_pts(demux_stream_t *ds)
> > +{
>
> I'm not sure little cosmetic changes like this are acceptable. I usually
> try to follow the style of the original or surrounding code, especially
> when the modification is small.
This is not cosmetic change. Cosmetic changes doesn't make code slower ;)
> Other than that, assuming it doesn't break anything unforseen or have a
> measurable slowdown, the patch should be ok. I'm all for increasing
> precision when there is little or no expense. If nobody else applies or
> rejects it first, I'll test the patch tonight and apply it (without
> cosmetics) tomorrow.
>
>
> By the way, do you use mencoder? It would be nice if mencoder could have
> a share of your sync improvements.
>
> Keep it up. I wish I had time to work on this stuff too. :)
I though Uoti is nominated for developer. I'm surprised he is not
granted with cvs access yet.
What does the other think?
More information about the MPlayer-dev-eng
mailing list