test(engine): lock down sRGB→BT.2020 LUT with byte-exact reference values#377
test(engine): lock down sRGB→BT.2020 LUT with byte-exact reference values#377vanceingalls wants to merge 1 commit intomainfrom
Conversation
a1d1fdd to
afe3517
Compare
6d042d3 to
871f1ad
Compare
afe3517 to
6f1bc71
Compare
871f1ad to
bc32a77
Compare
2af7fa2 to
f675c92
Compare
c20707c to
dd9b53a
Compare
889ec57 to
7edeb28
Compare
d8e0888 to
a55e4d6
Compare
7edeb28 to
93e21ac
Compare
a55e4d6 to
049c8d8
Compare
93e21ac to
23721fc
Compare
049c8d8 to
3d6fcbc
Compare
23721fc to
29fbdb2
Compare
3d6fcbc to
dea53b2
Compare
29fbdb2 to
73a1f75
Compare
dea53b2 to
4c00dea
Compare
73a1f75 to
01eb2f9
Compare
4c00dea to
af20010
Compare
01eb2f9 to
1ee49d8
Compare
af20010 to
31e0809
Compare
981e6a8 to
b66e6e5
Compare
90fb170 to
4220482
Compare
b66e6e5 to
c694a91
Compare
|
Hi, generate-lut-reference.py uses PEP585 built-in generics (e.g., list[int], tuple[int, ...]) which fail to parse on Python <3.9, but the repo does not pin a minimum Python version for engine scripts, so the regeneration workflow can break for some developers/CI environments. Severity: remediation recommended | Category: reliability How to fix: Pin Python or avoid generics Agent prompt to fix - you can give this to your LLM of choice:
Found by Qodo code review |
c694a91 to
c642d12
Compare
075f18f to
3089c8e
Compare
c642d12 to
b91be60
Compare
b91be60 to
699fd72
Compare
Address jrusso1020's nit on PR #365 (non-blocking review): both READMEs now explain where the tolerance values come from. - hdr-regression/README.md: add a budget-breakdown table that derives the 30 frames from the deltas in PRs #369 (window C fix → 5) and #375 (window F fix → 0). The table doubles as a contract: if a future change forces the budget back up, exactly one bucket has regressed and the table tells you which one to investigate first. - hdr-hlg-regression/README.md: add a 'Tolerance' section explaining why 0 is the right floor (HLG is a pure pass-through path, HEVC over rgb48le is byte-deterministic on the same fixture, so any drift is a real regression). The regeneration command for generate-hdr-photo-pq.py was already documented at README lines 67-71, so no changes needed there.
699fd72 to
2e76501
Compare

Summary
Add a 12-row reference table covering the full sRGB range with byte-exact 16-bit HLG and PQ signal values, plus three guard tests, locking down the
buildSrgbToHdrLut()math.Why
Chunk 9Fofplans/hdr-followups.md. The matrix-free fast path throughblitRgba8OverRgb48leruns every DOM pixel throughbuildSrgbToHdrLut()(sRGB EOTF → linear → HDR OETF → 16-bit). Any drift in the EOTF/OETF math — constant changes, branch swaps, rounding-mode regressions — would silently corrupt every text / UI / overlay pixel composited onto an HDR frame.Existing tests covered structural invariants (transparent passthrough, opaque overwrite, alpha blending, channel symmetry, HLG ≠ PQ) but no byte-exact reference values, so a uniform scale or constant tweak could pass everything.
What changed
alphaBlit.test.tscovering black, shadow, mid-grays, highlight, near-white, and white with exact 16-bit HLG and PQ signal values.Reference values mirror
buildSrgbToHdrLut()exactly and were verified against the existing HLG mid-gray comment in the file.Test plan
alphaBlit.test.tsinvariants unchanged.Stack
Chunk 9F of
plans/hdr-followups.md. Test-only change, independent of all other chunks.