Color management nomenclature improvements #4479
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A round of color management improvements (I hope).
We were pretty squirrelly about what "linear" meant. Get more exact. Now we will treat "linear" as a legacy synonym for "lin_rec709" (sRGB primaries, but linear response). Change file format readers to say "lin_rec709" when they mean it, and not use the more generic alias "linear".
"scene_linear", on the other hand, is the internal working color space for math. Which concrete color space it is an alias for is determined by the OCIO config in use.
Use "g18_rec709" and "g22_rec709" for rec709 + gamma 1.8 or 2.2, respectvely.
A few new API calls help out: equivalent_colorspace(), set_colorspace(spec,name), set_colorspace_rec709_gamma().
OpenEXR always tagged files as linear by default. It was too aggressive about this, so with this PR, now it defaults to lin_rec709 only for files that appear to be RGB and not have any other clues about the color space.
Similarly, the raw reader was too eager to set the Exif:ColorSpace to look like sRGB even when it wasn't.
Lots of reference outputs needed to be updated.
This is a potentially big behavior change. But I think it's for the better.