Repository navigation
test(gfx): R7's neutral-axis question, measured — and the override that reaches nothing - #4317
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes add tests for ChangesColor pipeline tests
Estimated code review effort: 3 (Moderate) | ~20 minutes ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
6 of 7 tasks
zackees
force-pushed
the
test/4156-r7-neutral-axis
branch
from
September 10, 2026 19:44
e75dbf9 to
6315a4e
Compare
zackees
changed the base branch from
test/4156-r9-profile-lifetime-and-rebind
to
master
September 10, 2026 19:55
…at reaches nothing #4156 R7 is one of the three least-discussed findings. It says standard Oklab assumes D65 with white Y = 1, and that "feeding arbitrary warm/profile-white XYZ directly into those matrices does not make the target neutral axis zero-chroma". **That failure does not arise, because the mapper never feeds it profile white.** `kGamutD65Q16` is a compile-time D65, and the brightest-neutral walk, the neutral cap and the chroma ray are all anchored to it. Worst OKLab chroma over a twenty-step neutral ramp: 6.5e-05, 6.3e-05, 6.5e-05 for device blues at (0.150, 0.060), (0.180, 0.100) and (0.220, 0.160). Flat across the three, which is what a mapping space independent of the device white looks like. The ramp runs *past* the device's brightest neutral deliberately. Inside the hull the mapper hands a neutral straight back, so the first version of this case was measuring the solve -- and moving `kGamutD65Q16` to a warm white passed it. Above the cap the walk-down runs and the mapping white is load-bearing: the same mutation takes the chroma to 0.02. **R7's other half is live, in a form it did not name.** It asks for "target-white overrides" that preserve the neutral axis. `setTargetWhite` exists, validates, stores, and is carried through `Channel` -- three cases already check that plumbing. Nothing outside those accessors reads it, and the mapper's neutral is a constant no override can move. So the setter is settable and inert, which is where `setColorProfile` was before P6 wired it. That is recorded rather than left to be discovered, because a setter returning true is a promise. When someone wires it the new case fails, and its comment says what to re-measure. 304/304 unit + 84/84 examples, `bash lint` clean. Test-only. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
zackees
force-pushed
the
test/4156-r7-neutral-axis
branch
from
September 10, 2026 20:02
6315a4e to
8f71dd4
Compare
This was referenced Sep 18, 2026
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.
#4156 R7, one of the three least-discussed findings (4 mentions). Stacked on #4316 —
merge that one first; retargeting a stack past its base is how #4313 got swallowed.
R7's stated failure does not arise
It says standard Oklab assumes D65 with white Y = 1, and that feeding "arbitrary
warm/profile-white XYZ directly into those matrices does not make the target neutral axis
zero-chroma".
The mapper never feeds it profile white.
kGamutD65Q16is a compile-time D65, and thebrightest-neutral walk, the neutral cap and the chroma ray are all anchored to it. Worst
OKLab chroma over a twenty-step neutral ramp:
Flat across the three, which is what a mapping space independent of the device white looks
like. The figures are Q16 rounding.
The first version of this case proved nothing
It ramped only inside the hull, where the mapper hands a neutral straight back — so it
was measuring the solve, not the mapping space. Moving
kGamutD65Q16to a warm whitepassed it.
The ramp now runs past the device's brightest neutral, where the walk-down actually runs
and the mapping white is load-bearing. The same mutation now takes the neutral chroma to
0.02 and fails.
R7's other half is live, in a form it did not name
It asks for "target-white overrides" that preserve the neutral axis.
setTargetWhiteexists, validates its input, stores it, and is carried through
Channel— three casesalready check that plumbing.
Nothing outside those accessors reads it. The only reference in
src/beyondoptions.his another accessor inchannel.h, and the mapper's neutral is aconstexprno override can move. So the setter is settable and inert — where
setColorProfilewasbefore P6 wired it.
Recorded rather than left to be discovered, because a setter returning
trueis a promise.When someone wires it, the new case fails and its comment says what to re-measure.
Test-only. 304/304 unit + 84/84 examples,
bash lintclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01MLhWkMfzLjrnLTDMBE6Fj9
Summary by CodeRabbit