Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assert in OCIODisplay plugin when premult param is set. #29

Merged

Conversation

acolwell
Copy link
Collaborator

@acolwell acolwell commented Apr 2, 2023

This fixes an assert in the OCIODisplay plugin when the premult param is set. The comment above the assert in copyPixelData() indicates that !unpremult && premult should never happen, but a call to this function in OCIODisplayPlugin::render() does allow this to happen when the premult param is set. I've added the necessary code to handle this situation. I verified the behavior by creating a node graph that compares the output of an OCIODisplay node with premult unchecked against the output of a Premult -> OCIODisplay(w/ premult checked)->Unpremult set of nodes.

I also discovered that there were several unused copyPixelData() methods in the OCIODisplay and the other OCIO plugins so I've removed them.

…ted unused copyPixelData() functions from all OCIO plugins.

Signed-off-by: Aaron Colwell <300262+acolwell@users.noreply.github.com>
Copy link
Member

@devernay devernay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devernay devernay merged commit 0c792d0 into NatronGitHub:master Apr 4, 2023
@acolwell acolwell deleted the fix_ociodisplay_premult_assert branch April 5, 2023 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants