blendop.cl: use the work profile's matrix for Lab channel display - #22330
Open
masterpiga wants to merge 2 commits into
Open
masterpiga wants to merge 2 commits into
masterpiga wants to merge 2 commits into
Conversation
The OpenCL channel display converts the displayed gray back to Lab through the work profile, but took the matrix from the blend profile, which is unset when blending in Lab. Every Lab channel then showed as a solid color.
Member
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.

Another bug found while working on Flexi.
With OpenCL enabled, displaying a Lab channel of a parametric mask (L, a, b, C or h) shows a solid color instead of the channel.
blendop_display_channelconverts the displayed gray back to Lab with the work profile, but passesprofile_info->matrix_in, the blend profile's matrix, which is not set up when blending in Lab. This change useswork_profile_info->matrix_in, as the CPU path does (dt_develop_blendif_lab_blend). It has been there since 7657ec9.To reproduce: with OpenCL on, set a module's blend colorspace to Lab, enable a parametric mask, and display any of its Lab channels, for example by hovering a channel slider with channel display active. The center view turns into a solid color, black in monochrome mode and blue for b in false color. RGB channels and the CPU path are unaffected. Tested by forcing the channel display on both paths: after the fix, OpenCL matches the CPU output (identical for b, within 1/255 for L).
Co-authored with Claude.