[MPlayer-dev-eng] enhancement for yuv4mpeg output driver
Michael Niedermayer
michaelni at gmx.at
Fri Jan 21 00:08:51 CET 2005
Hi
On Thursday 20 January 2005 22:51, Trent Piepho wrote:
> On Thu, 20 Jan 2005, Michael Niedermayer wrote:
> > see the attached file, which checks this by brute force
>
> It is nice that you really check that av_d2q works instead of just stating
> it must be so.
>
> However, your test cheated at one thing! The fps value is passed to the vo
> driver via a float global variable. You passed the fps value (a/(double)b)
> directly to av_d2q, this allows gcc to leave the floating point number in a
> register and give you extra precision.
i seriously doubt that gcc passes floating point numbers via registers,
instead its passed as a double over the stack
>
> Try this little change to make it a fair comparison:
>
> @@ -12,0 +13,2 @@
> +float vo_fps;
> +
> @@ -22 +24,2 @@
> - q= av_d2q(a/(double)b, MAXI);
> + vo_fps = a/(double)b;
> + q= av_d2q(vo_fps, MAXI);
>
> Now you find many many cases where av_d2q fails! Such as these, after
> raising MAXI to 60000:
> 23993/1001 -> 29410/1227
> 23997/1001 -> 36439/1520
> 24000/1001 -> 31001/1293 Where I have seen this before???
but it works if u limit it to 30000 ...
[...]
--
Michael
"nothing is evil in the beginning. Even Sauron was not so." -- Elrond
More information about the MPlayer-dev-eng
mailing list