Skip to content

ACEScct decoding equation creates ambiguity by using \leq twice #28

@nick-shaw

Description

@nick-shaw

https://github.com/ampas/aces-docs/blob/b1e27c75c3d6bb26736ccf80f854afbcf2fe4b03/mkdocs/docs/specifications/acescct/index.md?plain=1#L150

The logarithmic portion of ACEScct is given here as being used if 0.155251141552511 <= ACEScct. But the linear portion is used if ACEScct <= 0.155251141552511. This creates ambiguity when ACEScct == 0.155251141552511.

I believe the logarithmic portion should begin with a less than symbol, not less than or equal to. That is what is used in the CSC CTL.

I note also that the CSC does not clamp at 65504 as is defined in the spec. It makes logical sense not to clamp in a float32 implementation, but that is not what the space says. I would think that either the CTL should follow the spec, or (probably preferably) the clamp should be removed from the spec, and a note added that implementations should ensure that if writing output to a half-float EXR it is advisable to pre-clamp to 65504 if a clamp is not implemented in the EXR writer.

In any case, clamping the output of the ACEScct to linear function to 65504 does not guarantee that values written to a half float EXR will be within the representable range. The AP1 to AP0 matrix could still push values beyond 65504.

e.g.

AP1 = [0, 0, 65504]
AP0 = [10734.07905124,   6257.87998005,  65602.30003517]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions