# step: exact tone mapping · wai-rs and tonemap_verify.py # order: 610 # features: exact_tonemap # paths: wai/extensions/exact-tonemap.md # independent: tonemap live python3 -I live-conformance/tonemap_verify.py live-conformance/tonemap # # wai.media.tonemap, wai.meta.gainmap and wai.meta.st2094_50 (extensions/exact-tonemap.md): # the reference module's unit tests (the fixed-point log2 and exp2 at known points, the # table of K against its rule, the sRGB table, tan through its series, PCHIP slopes of a # line, rounding of halves for both signs) and the PNG reader's, then tests/exact_tonemap.rs # (the committed corpus regenerates byte for byte, no other file is there, every case and # envelope gets its stated outcome, §9 lists exactly the reference's codes, §6 states the # corpus's measurement against binary64, and frames.rgb8 is the int_video clip's decode # whose digests its sidecar publishes); and, in the step of every independent verifier # above, the corpus's second implementation, # tonemap_verify.py, written from the extension's text and sharing no code with wai-rs, # which computes both derivations in integer arithmetic of its own, reads PNG, envelopes # (with staged_verify.py) and both companions itself, recomputes §6's measurement, verifies # every record with WAI's strict Ed25519 rule and BLAKE3 from claim-conformance, requires # every mutated copy of the corpus to fail, and drops each of its own checks in turn and # requires the corpus to catch the weakened verifier; standard library only, run isolated # (-I). # # The paths this step brings to the workflow's trigger, and why: # wai/extensions/exact-tonemap.md: tests/exact_tonemap.rs requires this extension's §9 to list the # codes the reference reports and its §6 to state the corpus's measurement, tonemap_verify.py # reads §3.3's table, §5.4's constant and §9, and the registry's wire identifiers test reads its # sections. set -euo pipefail (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib -- exact_tonemap:: png_still::) (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test exact_tonemap)