open-standards/wai/live-conformance/tonemap
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 2b54ac2054 tonemap: digests of L2, E2 and tan over whole ranges in the corpus
A second falsification: L2's squarings rounded instead of truncated still
regenerated the corpus (the variant differs on about 3 in 100000 mantissas).
vectors.json now states the SHA-256 of L2 at 2^18 spread values, of E2's
mantissa for every fraction and of tan for every angle; both implementations
check them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 03:43:06 -04:00
..
envelopes tonemap: the corpus's second implementation, and two binding controls 2026-10-22 03:21:53 -04:00
frames.rgb8 wai: exact tone mapping — wai.meta.gainmap, wai.meta.st2094_50, wai.media.tonemap 2026-10-22 03:13:55 -04:00
README.md tonemap: digests of L2, E2 and tan over whole ranges in the corpus 2026-10-22 03:43:06 -04:00
vectors.json tonemap: digests of L2, E2 and tan over whole ranges in the corpus 2026-10-22 03:43:06 -04:00

live-conformance/tonemap — exact tone mapping

The corpus of extensions/exact-tonemap.md §10:

  • vectors.json:
    • frames: the five frames of the int_video clip as wai.video.int_motion decodes them, in frames.rgb8 (each RGB8, 48 × 48, one after another), the content hash (object) of the envelope video that carries the clip with its ST 2094-50 companion, the clip's payload (source, below wai/) and the sidecar that publishes each frame's SHA-256 (sidecar);
    • envelopes: each envelope's name, its file and its content_hash (jwp-receipts §2.1);
    • envelope_cases: an envelope and the code SPEC §7.1's component rules give it (role; null where every component conforms);
    • cases: each its records in order as JSON texts, what the verifier held (the envelopes, by name; the frames file, or "" for none), its policy (§8.1) and its expected outcome;
    • arithmetic: L2 (l2, [v, L2(v)]), E2 (e2, [y, p, e]), the table S (srgb), tan (tan_q30, [θ, m]) and the video's curves with their slopes (slopes), each at the points stated, and the SHA-256 of each over a whole range (l2_sha256: L2 at v = 1 + (k · 2654435761 mod 2^40) for k from 0 to 2^18 − 1; e2_sha256: E2's mantissa p for every fraction 0 to 65535; tan_sha256: tan for every angle 0 to 36000; each value as 8 bytes, little-endian, two's complement); large integers are written as decimal strings;
    • measurement: §6's figures, per derivation.
  • envelopes/*.wai: the envelopes, WAI2 but for gainmap-as-wai1.wai.
  • frames.rgb8: the frames above.

Tone-map equivalence. For each case, a conforming verifier reaches the outcome it states:

  • refuse: the reason of §9 and at, the record (["record", i]) or picture (["record", i, "picture", j]) refused;
  • accept: the statements of §8.3, one per record, exactly as written.

A verifier that reaches another outcome, reason, place or statement does not conform.

Provenance. wai_tonemap_vectors gen writes every file here. The stills are generated: two HDR scenes written as integer formulas in the generator (a sky with a sun six times reference white and coloured patches, one past white; a dim room with a window and a lamp), rendered to an sRGB base and a gain map by the reference's own encoder, integer throughout. The video is the int_video clip of wai-rs/tests/vectors/int_video/, generated there (a disc over a gradient). Every key is SHA-256 of the corpus's label and an index, every time is a constant, and Ed25519 signing is deterministic, so every file is the same bytes on every machine.

python3 -I ../tonemap_verify.py .