Repository navigation
Description
ci/golden/color-reference-v1.json carries 285 vectors across three source profiles — srgb_bt709, display_p3, bt2020. Of those, 57 (19 per source) are exported for the rgb device and are what P6's budget case measures.
SourceProfile::linearSrgb() is not among them. It is the default a channel gets when nothing else is declared (ColorProfileBinding::mSource = SourceProfile::linearSrgb()), and #4034 §2 says "Ordinary buffers default linear".
So P6's headline evidence —
0.3951 dE2000 and 3.66e-04 in Y against A1's 0.5 and 0.5%, over all 57 corpus vectors
— was measured on three non-default sources and not on the default one. No comment in _source_profiles() explains the omission.
Measured
Adding linear_srgb (BT.709 primaries, linear transfer) and regenerating:
| before | after | |
|---|---|---|
| corpus vectors | 285 | 380 |
exported for rgb |
57 | 76 |
| worst dE2000 above floor | 0.395096 @ display_p3-rgb-05 |
0.395096 @ display_p3-rgb-05 |
| worst luminance error | 3.66438e-04 | 3.66438e-04 |
| vectors below the black floor | 8 | 8 |
Nothing moved. The 19 linear vectors sit inside every existing bound, so this is coverage gain rather than a defect — the default source was untested and is also correct.
That is worth stating rather than assuming: the linear transfer is the identity decode, so it was the likeliest of the four to be fine, and it is.
Five places name the source set
_source_profiles() (generator), kSourceProfiles (exporter), a set literal in test_color_reference_corpus.py, the generated SourceKind enum, and a switch in tests/fl/gfx/pipeline.cpp.
Unlike the three structural-guard lists in #4330 / #4335 / #4337 — which drifted silently — every one of these failed loudly when out of step:
- exporter:
ValueError: linear_srgb-rgb-00 names an unknown source linear_srgb - corpus test: assertion on the allowed set
- C++ switch:
error: enumeration value 'LinearSrgb' not handled in switch [-Werror,-Wswitch]
Three hand-maintained lists that cannot drift undetected, against three that could. Worth noting as the contrast when deciding what to do about #4337.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
test(color): put the default source profile in the P5 reference corpus (
test(ci): make the per-pixel stage lists check each other (#4337) (#4341