Skip to content

Negative input values resulting in unexpected output values on some CPUs #1764

@mjtitchener-fn

Description

@mjtitchener-fn

I've been investigating a report of negative input values resulting in unexpected output values on some CPUs.
We have been able to reproduce the issue on one of our Windows machines and it appears to be happening in the OCIO library.

Reproduction steps:

  1. Using input values R: 0.00532 G: 0.00075 B: -0.00293
  2. Transform from ACEScg to ACEScc.

Actual result:

R: 0.11312 G: -0.07889 B: 1.50000

Expected result:

R: 0.11312 G: -0.07889 B: -0.31065

Here's a visual example of the differences seen. Top is actual result, bottom is expected result.

cpu_differences

The user experiences this issue on machines with Dual Intel Xeon E5-2680 v2 @ 2.80GHz but doesn’t on machines with Dual Intel Xeon E5-2640 v3 @ 2.60GHz

The machine we can reproduce the issue on has Dual Intel Xeon E5-2640 0 @ 2.50GHz

One difference between the CPUs that stood out to me is Intel AVX (reproducible) vs. Intel AVX2 (not reproducible). Not sure if this is relevant though.

So far we’ve only seen this on Windows. We can only reproduce this in our latest Nuke release (14.0) but the report says they’ve encountered it since Nuke was upgraded to use OCIO v2.
It’s reproducible with the ACES 1.2 and ACES Studio configs.

Workaround:

I've found you can workaround the issue by setting the environment variable OCIO_OPTIMIZATION_FLAGS=0 to turn optimization off, or OCIO_OPTIMIZATION_FLAGS=20479 to set optimization to lossless.
In the case where the ACES Studio config is being used switching from ACEScc to ACEScct also fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugUnwanted or incorrect behavior in currently available functionality.Needs DiscussionNeeds discussion before implmentation, which could result in changes, or a decision not to proceed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions