UIKit0 / alembic

Automatically exported from code.google.com/p/alembic
Other
0 stars 0 forks source link

abcstitcher time/float issue #298

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It looks like this abcstitcher bug may have been reintroduced.  I think Lucas 
fixed it in 0.9.3 or 1.0 
(http://code.google.com/r/millerlucas-dev/source/detail?r=fa9b8156c95a4e64144af2
1ab6356c88624e9746).  We're testing against 1.0.5 and 1.1.2, but don't have a 
complete test case packaged up for you.  However, I looked at Lucas' changes 
back from this time and compared it to 1.1.2:

This is the code from 1.1.2:

index_t getIndexSample(index_t iCurOutIndex, TimeSamplingPtr iOutTime,
index_t iInNumSamples, TimeSamplingPtr iInTime)
{
if (iCurOutIndex == 0)
{
return 0;
}

chrono_t curTime = iOutTime->getSampleTime(iCurOutIndex);

for (index_t i = 0; i < iInNumSamples; ++i)
{
if (curTime < iInTime->getSampleTime(i))
{
return i;
}
}
return iInNumSamples;
}

and this is what it should be from Lucas change in 0.9.3 or 1.0.0:

index_t getIndexSample(index_t iCurOutIndex, TimeSamplingPtr iOutTime,
    index_t iInNumSamples, TimeSamplingPtr iInTime)
{
    // borrowed from TimeSampling.cpp
    static const chrono_t kCHRONO_TOLERANCE =
        std::numeric_limits<chrono_t>::epsilon() * 32.0 * 32.0;

    if (iCurOutIndex == 0)
    {
        return 0;
    }

    chrono_t curTime = iOutTime->getSampleTime(iCurOutIndex);

    for (index_t i = 0; i < iInNumSamples; ++i)
    {
        chrono_t inChrono = iInTime->getSampleTime(i);
        if (curTime <= inChrono ||
            Imath::equalWithAbsError(curTime, inChrono, kCHRONO_TOLERANCE))
        {
            return i;
        }
    }

    return iInNumSamples;
}

Original issue reported on code.google.com by shappysf...@gmail.com on 15 Dec 2012 at 1:24

GoogleCodeExporter commented 9 years ago
I believe you are mistaken.
I just double checked the 1.1.2 tarball AND the latest:
http://code.google.com/p/alembic/source/browse/examples/bin/AbcStitcher/util.cpp

They both look a lot like what you posted for 0.9.3 and 1.0.0

Original comment by miller.lucas on 15 Dec 2012 at 1:43

GoogleCodeExporter commented 9 years ago
Crap, sorry about that Luca.  That's weird.  I should have browsed to it here:
      http://code.google.com/p/alembic/source/browse/examples/bin/AbcStitcher/util.cpp

But I searched the code base and it found this apparently old source:
      http://code.google.com/searchframe#x0t8L6Hb-90/examples/bin/AbcStitcher/util.cpp&q=AbcStitcher/util.cpp%20package:alembic%5C.googlecode%5C.com&ct=rc&cd=1&sq=

Ok, well that's not so good.  We'll try to get you more info, but it looks like 
we're seeing the same type of problem with the stitching.  

Original comment by shappysf...@gmail.com on 15 Dec 2012 at 2:55

GoogleCodeExporter commented 9 years ago
Hey Lucas, I just checked our tarball for the 1.0.5 version that we've been 
using in production and it looks bad in there.  I've attached the bzipped 
tarball.

Original comment by shappysf...@gmail.com on 15 Dec 2012 at 3:01

Attachments:

GoogleCodeExporter commented 9 years ago
I do see that updated in the 1.1.X releases that we have downloaded.  

Original comment by shappysf...@gmail.com on 15 Dec 2012 at 3:12

GoogleCodeExporter commented 9 years ago
Was this just not included until a 1.1.0 release?

Original comment by shappysf...@gmail.com on 15 Dec 2012 at 3:21

GoogleCodeExporter commented 9 years ago
My manual check of our tags show that this is not included until 1.1

Original comment by miller.lucas on 15 Dec 2012 at 3:24

GoogleCodeExporter commented 9 years ago
Thanks Lucas.  Sorry, I think we just had this manually compiled in our 1.0.5 
release and then someone lost that change.

Original comment by shappysf...@gmail.com on 15 Dec 2012 at 3:27