nx_view_transform_gate.nx
buildroot/runtime/nx_view_transform_gate.nx
about
nx_view_transform_gate.nx -- IS THE VIEW TRANSFORM DERIVED, OR JUST TYPED?
license_tier: ORIGINAL No hw writes (Rule 26).
The claim under test is not "the curve looks nice". It is four mechanical properties, each of
which the shipped page FAILED on 2026-08-28 and each of which nx_view_transform is supposed to
make true BY CONSTRUCTION:
1. the exponent is COMPUTED from declared measurements, not hand-typed (the page carried 1.45,
whose own comment claimed "half-way" while it moved the median 45.7%);
2. the anchor is an exact FIXED POINT, so the white point cannot drift;
3. the application PRESERVES HSV saturation exactly (the page raised S mean .313 -> .411, out
of the .27-.32 band the measurement said saturation already sat inside);
4. the LUT size is SEARCHED against a declared tolerance, not chosen.
THE NEG-CONTROL IS THE LOAD-BEARING TOOTH. T5 applies the OLD per-channel form to the same
triple and requires that it RAISES saturation. Without it, T4 could pass on a transform that
does nothing at all: a no-op preserves chroma perfectly. T5 is what proves this gate can tell
the fix from the defect rather than merely tell quiet from loud.
dependencies 4 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_fixq30_lib.nxnx_view_transform_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 23 | const VG_SLOTS: i64 = 3 |
| 24 | const VG_SLOT_BYTES: i64 = 8 |
| 25 | const VG_EPS: i64 = 1024 // Q30 slack: 1024/2^30 = 9.5e-7, far below one 8-bit code |
| 26 | const VG_NONGREY_R: i64 = 800000 // a strongly non-grey probe triple, in micro |
| 27 | const VG_NONGREY_G: i64 = 400000 |
| 28 | const VG_NONGREY_B: i64 = 200000 |
| 29 | const VG_MIDGREY_MICRO: i64 = 500000 |
| 30 | const VG_HALF: i64 = 2 |
functions
| 32 | func vg_near(a: i64, b: i64) -> i64 called by 1: main |
| 40 | func vg_perchannel(ctx: *i64, g: i64, rgb: *i64) -> i64 |
| 46 | func vg_fill(rgb: *i64) -> i64 |
| 53 | func main(argc: i64, argv: **u8) -> i64 |