Issue 38 in cortex-vfx: OversamplesCalculator/InterpolatedCache improvements

0 views
Skip to first unread message

corte...@googlecode.com

unread,
Feb 16, 2011, 8:20:09 PM2/16/11
to cortex...@googlegroups.com
Status: Accepted
Owner: john.ima...@gmail.com
Labels: Milestone-Cortex6 Priority-High

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.


corte...@googlecode.com

unread,
Feb 16, 2011, 8:24:11 PM2/16/11
to cortex...@googlegroups.com
Updates:
Labels: Component-IECore

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.)

corte...@googlecode.com

unread,
Feb 17, 2011, 12:15:06 PM2/17/11
to cortex...@googlegroups.com

Comment #2 on issue 38 by andrewk....@gmail.com:
OversamplesCalculator/InterpolatedCache improvements
http://code.google.com/p/cortex-vfx/issues/detail?id=38

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.

Reply all
Reply to author
Forward
0 new messages