New issue 38 by john.ima...@gmail.com:
OversamplesCalculator/InterpolatedCache improvements
http://code.google.com/p/cortex-vfx/issues/detail?id=38
We need to sort out the rounding in OversamplesCalculator - some functions
have rounding problems Andrew has observed, and another has deliberate
rounding errors in an attempt to match Maya. We should ditch the Maya
matching and sort out reliable rounding of our own. At the same time we
should consider the todo in InterpolatedCache, where we pass something like
an OversamplesCalculator to every read.
Comment #1 on issue 38 by john.ima...@gmail.com:
OversamplesCalculator/InterpolatedCache improvements
http://code.google.com/p/cortex-vfx/issues/detail?id=38
(No comment was entered for this change.)
Here is some code to demonstrate the issue I was experiencing:
> o = IECore.OversamplesCalculator()
> o.framesToTicks( 10.2 )
2550
> o.framesToTicks( 10.4 )
2599
If I re-implement framesToTicks directly in python and add round(), I get
the expected results:
> int( round( 10.2 * o.getTicksPerSecond() / o.getFrameRate() ) )
2550
> int( round( 10.4 * o.getTicksPerSecond() / o.getFrameRate() ) )
2600
However, adding the round() in c++ makes 10.4 convert to 2600 correctly,
but 10.2 converts to 2549.