Adsk contrib - Add a method to query whether a color space is linear#1703
Merged
Conversation
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
- Added a private getProcessor method that ignore caching. - Fix the algorithm for isColorspaceLinear. - Now testing R, G, B and neutral values. Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
…e clause of the lambda function as this was causing issue on other platforms than Windows. - Remove unused variable in unit test. - other minors changes Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
…atches the desired reference space type, is not a data space, and has no transforms, so it is equivalent to the reference space and hence linear. - Added a color space in the test config to cover that. Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
Collaborator
|
Looks good to me, just wondering about usage of the Reference Gamut Compression transform as it is mentioned in the linked issue. Is it still going to return isLinear -> true because we don't have negative values in the linearity test on purpose? |
Collaborator
|
@remia , you raise a good point. The existing test is somewhat permissive. Certain CDL, FixedFunction, LUT, and Range ops could pass if they are linear over the tested points. Is that desirable? We could be more strict and just check if the optimized transform is a single Matrix, without offsets. We're very open to feedback on this. |
Collaborator
|
Thanks Doug, I think the current behaviour is good, just wanted to double check I understood correctly. Also pointing that we are missing the python binding here. |
Signed-off-by: Cedrik Fuoco <cedrik.fuoco@autodesk.com>
remia
approved these changes
Oct 27, 2022
michdolan
approved these changes
Oct 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is the implementation of issue #1399. A new method, called isColorSpaceLinear, has been added to the Config class.
See the method header in OpenColorIO.h for detailed information.