open-standards/wai/encode-conformance/README.md
Transaction Science 52ce41504b encode-conformance (#484): the README's provenance line
tests/corpus_provenance.rs requires every corpus README to state its provenance
on a **Provenance.** line; encode-conformance's said it in its table only. The
line restates the table: what is generated, what an encoder made once and is
kept, and which generator writes the rest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 09:09:09 -04:00

32 lines
2.5 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.

# `encode-conformance/`: the corpus of `wai.video.encode`
The corpus of [platform-encode](../extensions/platform-encode.md) §10.1.
| path | what | how it is made |
|---|---|---|
| `streams/` | AVC and HEVC elementary streams made through each encoder interface (§3): `platform-*` by the media framework's hardware engine, `va-1-*` and `va-2-*` by two GPUs' encode engines through the video acceleration API, `gpu-driver-*` by a GPU driver's encode interface, `software-*` by the runtime-loaded software library | fixtures: made once by `wai encode avc|hevc source.y4m --idr-plan plan.txt --kbps 400 --es …` (`software-avc-128x72` with `--size 128x72`); no encoder is a pure function, so they are never regenerated |
| `streams.json` | each fixture's SHA-256 | `wai_encode_vectors gen` |
| `source.y4m`, `plan.txt` | the source every fixture was made from (256×144, 12 frames, 30 fps) and its IDR plan | generated |
| `mutated/` | streams derived from a fixture by one edit, each breaking one rule of §4.3 | generated |
| `records/`, `cases.json` | a record per case, signed with the corpus key (32 bytes of `0x45`), and every case's files and outcome | generated |
| `rendition/` | encoded renditions (§9) of the packaging golden `pack-conformance/packs/video-base-01`: `streams/` fixtures made from its source with its plan, `cases/` and `cases.json`, accepted and mutated | `wai-pack rendition-vectors gen` (key: 32 bytes of `0x46`) |
| `encode_verify.py` | the second implementation, written from the extension's text | — |
**Provenance.** Generated here, as the table states: `source.y4m` and `plan.txt` are
generated; each fixture under `streams/` and `rendition/streams/` was made once from that
source by `wai encode` through the encoder interface its name gives, and is kept, not
regenerated; `streams.json`, `mutated/`, `records/` and `cases.json` are written by
`wai_encode_vectors gen`, and `rendition/`'s cases by `wai-pack rendition-vectors gen`. Every
input is generated in this repository.
The identities in the records are the corpus's, not the encoders' that made the streams.
The software library made the same bytes on three hosts of two architectures; nothing here
relies on that.
Check:
```
cd wai/wai-rs && cargo run --locked -q --no-default-features --features platform_encode --bin wai_encode_vectors -- verify ../encode-conformance
cd wai/wai-pack && cargo run --locked -q --bin wai-pack -- rendition-vectors check ../encode-conformance/rendition
python3 -I wai/encode-conformance/encode_verify.py wai/encode-conformance
```