[MPlayer-G2-dev] new release: pre39

Arpi arpi at thot.banki.hu
Mon Aug 4 11:09:32 CEST 2003


Hi,

> On Mon, Aug 04, 2003 at 09:11:31AM +0200, Arpi wrote:
> > > relative pts, or absolute? With 32bit int, you only have room for
> > > ~4000 seconds before you wrap....and many movies are longer than that!
> > 
> > it's absolute time counter truncated to 32 bits. it's far enough.
> > no movies encoded at 1/4000 fps...
> 
> ??

the integer 1/1000000 res. counters are used to do timing between 2 frames.
so unless you have an 1/4000 fps "movie" (i would call it very slow
slideshow instead) it won't overflow :)

> > > BTW2, this would suggest that the float-based method was also very
> > 
> > it wasnt inprecise (or at least it was hidden by correction codes)
> > but since all the system timer code work with microsecs, it was
> > easier (and more accurate) this way.
> 
> If a movie goes beyond ~4000 seconds, you'd be using 13 bits of the
> float for the integral part, leaving 11 bits for the fractional part.
> That's still 0.5 ms precision, so not too bad, but it could start

Sure. This is why absolute PTS is in double, and float/int is used for
inter-frame durations/relative pts only.


> generating bad timestamps encoding to variable-fps output formats.
> Also, there's the case where you're working with really long files,
> where the error could easily get as large as frame durations, so I'd
> be happier using doubles, at least wherever absolute pts is needed.

then RTFS mp_image.h ;)

> For relative, float is certainly fine.

sure.

> By inexact I mean it's not based on the same time base as the file,
> but rather approximation by float or fixed point number.

yes, but since realtime timers (usleep, rtc and so on) are 1/1000000 based
i nee dto convert to that base to do teh actual timing. and no human will
be able to see the difference between 1us and 1.024 us, but not even 1us and
10us i think.

> > no, but it's fun to see, esp. at mixed hard/soft telecined material :)
> 
> Ah, but I thought the new code didn't change nominal framerate, just
> delay rff frames by 1/120 sec...

actually there is no thing as framerate in g2, only relative pts (or
duration). so actually it prints 1/duration...

(it printed duration in ms before, but fps loosk better)


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu



More information about the MPlayer-G2-dev mailing list