Mon 19 May 2008 08:36:14 AM UTC, original submission:
Gnash is too acurate when calculating the color transformation matrix.
Tests description:
mc1.mc11.mc111.mc1111.mc11111.mc111111
mc11:redMult 1%
mc111:redMult 20%
mc1111:redMult 1000%
mc11111:redMult 1000%
mc111111:redMult 1000%
redMult is defined in cxform, like a scaling factor.
The final concatenated 'relMult' without accuracy lost is 200%, Gnash mades this by using float numbers during the calculation. Unluckly, "no accuracy lost" is the problem:)
I believe pp uses integral alrithmatic during the cxform concatination. Play the attached file with Gnash and pp, you'll see the big difference. Test file is pretty simple, only one frame and no AS.
Note the accuracy problem is not only related to cxform, but also the transformation matrix and coordinates system in general.
I think it's predictable that using integral alrithmatic for cxform would speed it(cxform related work) up at least 100 times for CPU without FPU no surprisingly.
I plan to work on class cxform, to replace floats with ints. The accuracy would surely be lost after that. But it's actually a improvement instead of a "real lost", right?
|