open-standards/wai/platform-decode-conformance/grain-free-av1/README.md
Transaction Science bf1de9b1ad
Some checks failed
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (push) Successful in 17s
wai-quantum energy-landscape jobs / does this change touch it (push) Successful in 18s
joule-code conformance gate / joule-moq-relay, its own energy on a counter (macos) (push) Successful in 1m6s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (push) Failing after 47s
wai-quantum energy-landscape jobs / the module under wasm32-wasip2 (wasmtime) (push) Successful in 2m44s
joule-code conformance gate / Build + round-trip C1-C4 vectors (push) Has been cancelled
joule-moq-remote host agent / joule-moq-remote · does this change touch it (push) Has been cancelled
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (push) Has been cancelled
joule-moq-remote host agent / joule-moq-remote, every target (macos) (push) Has been cancelled
joule-moq-room room service / joule-moq-room · does this change touch it (push) Has been cancelled
joule-moq-room room service / joule-moq-room, every target (push) Has been cancelled
joule-moq-web browser client / joule-moq-web · does this change touch it (push) Has been cancelled
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (push) Has been cancelled
wai-app and Create / wai-app · does this change touch it (push) Has been cancelled
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (push) Has been cancelled
wai-app and Create / wai-app · Create, browser end-to-end (macos) (push) Has been cancelled
wai-fleet service / does this change touch it (push) Has been cancelled
wai-fleet service / service · linux (push) Has been cancelled
wai-fleet service / service · macos (push) Has been cancelled
WAI Studio / does this change touch it (push) Has been cancelled
WAI Studio / the catalogue's actions, the unit tests and the core · linux (push) Has been cancelled
WAI Studio / Studio in Chromium and Firefox · macos (push) Has been cancelled
WAI Studio / Studio in WebKit · linux (push) Has been cancelled
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Has been cancelled
joule-code conformance gate / joule-moq-ingest, every target (push) Has been cancelled
joule-code conformance gate / joule-moq-relay, every target (push) Has been cancelled
wai-quantum energy-landscape jobs / the same bits · macos (push) Successful in 3m33s
wai-quantum energy-landscape jobs / native against WebAssembly, over many seeds (push) Successful in 4m41s
wai-audit collector and player integration / does this change touch it (push) Has been cancelled
wai-audit collector and player integration / collector · linux (push) Has been cancelled
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (push) Has been cancelled
WAI operation catalogue / does this change touch it (push) Has been cancelled
WAI operation catalogue / the catalogue and every door · linux (push) Has been cancelled
wai-key-proxy / does this change touch it (push) Has been cancelled
wai-key-proxy / proxy · linux (push) Has been cancelled
wai-ledger service / does this change touch it (push) Has been cancelled
wai-ledger service / service · linux (push) Has been cancelled
wai-ledger service / service · macos (push) Has been cancelled
wai-quantum for JavaScript / does this change touch it (push) Has been cancelled
wai-quantum for JavaScript / javascript · linux (push) Has been cancelled
wai-quantum studio and desktop / does this change touch it (push) Has been cancelled
wai-quantum studio and desktop / studio · browser (push) Has been cancelled
wai-quantum studio and desktop / desktop app · macos (push) Has been cancelled
wai-quantum studio and desktop / desktop app · linux (push) Has been cancelled
wai-quantum studio and desktop / desktop app · windows (push) Has been cancelled
wai-quantum energy-landscape jobs / the same bits · linux-arm64 (push) Has been cancelled
wai-sink-android native sink library / does this change touch it (push) Has been cancelled
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (push) Has been cancelled
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (push) Has been cancelled
wai-sink-swift native sink package / does this change touch it (push) Has been cancelled
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (push) Has been cancelled
wai-quantum energy-landscape jobs / reader, kernels, answers and the stated result · linux, release (push) Has been cancelled
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (push) Successful in 5m15s
wai cross-architecture byte-equality / does this change touch it (push) Has been cancelled
wai cross-architecture byte-equality / linux-aarch64 (push) Has been cancelled
wai cross-architecture byte-equality / linux-x86_64 (push) Has been cancelled
wai cross-architecture byte-equality / macos-arm64 (reference) (push) Has been cancelled
wai cross-architecture byte-equality / windows-x86_64 (push) Has been cancelled
wai: a refinement over the platform-decoded floor, wai.video.int_refine over a grain-free AV1 base
platform-decode §6 makes the zeroth-condition wai.video.av1 rendition, as the platform
decodes it, a base of the residual refinement layers. A stream every sequence header of
which has film_grain_params_present 0 decodes to the decoding process's frames on every
conforming decoder; a page shows its WebCodecs decoder conforming with a probe (published
SHA-256 of each frame's I420 samples), and the base's RGB8 units are the frames by the JFIF
conversion in 16-bit fixed point, so layers written once against the reference decode reach
the same stage hashes natively and in a page. A stream with film grain anywhere is refused
as a base before it is decoded.

SPEC §5's Base admission admits wai.video.av1 under wai.video.int_refine only where the base
step holds decode-equivalence (codecs::admission_needs_exact_base); staged-delivery §5 and
§6.1 give that base step its tier and units; browser-sink §4.1 and §4.4 say what the probe is
for, and change no route. wai-rs gains staged::av1 (with libdav1d under av1_base),
platform_decode::av1_stream and the grain flag; wai-web gains StageBase.fromAv1, av1Base and
av1Probe and a page that decodes through WebCodecs. The corpus
platform-decode-conformance/grain-free-av1/ holds the stream, its reference decode and probe,
two layers, a stream with film grain and seven cases, checked by wai_av1_refine_vectors,
tests/av1_refine.rs, verify.py (second implementation), the wasm32 replay and the page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-09 10:46:06 -05:00

51 lines
3.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# grain-free-av1 — a refinement over the platform-decoded floor
The corpus of [`extensions/platform-decode.md`](../../extensions/platform-decode.md) §6: a
grain-free `wai.video.av1` stream, which every conforming AV1 decoder decodes to the same
frames, as the base of `wai.video.int_refine` layers written against its reference decode.
**Equivalence.** A conforming sink makes the base from the frames its decoder gives (`I420`,
in output order) and the probe's outcome for that decoder, converts them to `RGB8` units
(§6.3), and, replaying each case of `cases.json`, reports what the case states at every step
and ends with every unit at the stated stage, producer, tier and stage hash, and the stated
clip hash. It refuses `base-grain.wai` as a base (`av1_film_grain`).
## Files
- `base.wai` — `WAI1`, `wai.video.av1`: eight frames of 160×96, 8-bit 4:2:0, codec string
`av01.0.31M.08`, every sequence header with `film_grain_params_present` 0. Encoded with
rav1e from a source clip that `wai_av1_refine_vectors` computes (integer ramps, a moving
checkerboard and a band of stripes), at quantizer 140, one thread, low latency.
- `base-grain.wai` — the same source, encoded with photon-noise film grain: refused as a base.
- `base.i420` — the reference decode of `base.wai` (libdav1d): each frame's luma plane, then
Cb, then Cr, rows tightly packed, frames in output order.
- `probe.json` — §6.2's probe of `base.wai`: the codec string and coded size a page configures,
each frame's SHA-256 over its `I420` samples (`frame_sha256`) and the clip digest.
- `layer1.wai`, `layer2.wai` — `WAI1`, `wai.video.int_refine`, `WIR1` with the identity
predictor: layer 1 (step 6) over the base's `RGB8` units toward the source clip, layer 2
(step 1) over layer 1's output, which reaches the source exactly.
- `layer1-over-grain.wai` — layer 1's payload with `refines` naming `base-grain.wai`.
- `cases.json` — `stage0_sha256` (each unit's stage-0 hash) and the cases: `stage0`,
`one-layer`, `two-layers`, `two-layers-reference`, `two-layers-out-of-order`, `unprobed` and
`film-grain`. Each states its base, the decoder whose frames make it (`reference` and
`probe-matched` at `decode-equivalence`, `unprobed` at none), its steps (an offer at step
index + 1 ms, or `expire@t`), and what a sink reports and holds.
## Verifiers
- `wai_av1_refine_vectors verify .` (from `../../wai-rs`, feature `av1_refine_vectors`,
libdav1d): decodes `base.wai` and requires `base.i420`; refuses `base-grain.wai` before
decoding it; regenerates every other file but the two streams byte for byte. `gen` writes
them from the committed streams; `gen --encode` encodes the streams again.
- `cargo test --no-default-features --features staged --test av1_refine` (add `av1_base` for
the libdav1d decode): every case through `staged::StageSink`, the probe and stage-0 hashes,
the grain flag set alone, and one changed sample.
- `python3 -I verify.py [--dav1d PATH]`: the second implementation, standard library only,
with the sink of `../../staged-conformance/staged_verify.py`; `--dav1d` decodes the stream
with the dav1d tool (section 5 input) and requires `base.i420`.
- `node ../../wai-web/demo/verify_av1_refine_wasm.mjs <pkg-node/wai_web.js>`: every case
through wai-web's wasm32 `StageSink` from `base.i420`.
- `node ../../wai-web/demo/verify_av1_refine.mjs` (Playwright): the page decodes `base.wai`
through the browser's WebCodecs, puts each decode to the probe, and replays every case from
the no-preference decode's frames, in each browser `WAI_AV1_BROWSERS` names (Chromium and
WebKit by default). What it measured is in platform-decode §6.4.