AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.74k stars 430 forks source link

Allow more tolerance in pair inverse detection #1970

Open doug-walker opened 2 months ago

doug-walker commented 2 months ago

The optimizer will remove pairs of adjacent ops that are inverses of each other. However, the comparison is probably more strict than it needs to be. For example these ops are not removed:

        <FixedFunction direction=inverse, style=REC2100_Surround, params=0.833333333333333>
        <FixedFunction direction=forward, style=REC2100_Surround, params=0.8333333333333334>

This is especially problematic since the CTF writer will output the param from line 2 as the value from line 1.

The tolerance for making these comparisons should be increased slightly.