diff --git a/content/en/av1.md b/content/en/av1.md index e61151f..3b62801 100644 --- a/content/en/av1.md +++ b/content/en/av1.md @@ -6,9 +6,12 @@ weight: 16 # av1 {#av1} `github.com/go-avkit/av1` is a clean-room AV1 decoder in pure Go, built in -stages S0 to S8. **Stage S0 (v0.1.0) parses the bitstream structure and does not -decode pixels**: OBU headers and Section 5 or Annex B streams, the sequence -header, and the frame header with its decoder state. It is not yet behind +stages S0 to S8. **Stages S0 and S1 (v0.2.0) parse syntax and do not decode +pixels**: OBU headers and Section 5 or Annex B streams, the sequence header, +the frame header with its decoder state, and the tile syntax of every frame +type (the `block` package: intra and inter mode info, reference frames, the +motion vector stack, motion field estimation, intra block copy, palette, +transform sizes and types, coefficients). It is not yet behind [`decode`]({{< relref "decode.md" >}}). ## Using it {#using-it} @@ -25,6 +28,18 @@ for _, u := range units { Every size and count read from the stream is bounded by a `Limits` value and refused with a `LimitError`; a short payload returns `ErrTruncated`. +Tiles are parsed with `block`: + +```go +f, err := block.NewFrame(seq, fh, slots) // slots: *block.FrameState per reference slot +st, err := block.DecodeTileFrame(f, tileNum, tileData, &cdfs) +// st.Symbols, st.BitsConsumed; cdfs now holds the adapted CDFs +state := f.State() // keep it in the slots the frame refreshes +``` + +Only the syntax is parsed, so motion vectors are exact but nothing is +predicted or reconstructed. + ## What it claims, and how it was checked {#claims} The parsers were written from the AV1 specification alone. The oracle is a set @@ -33,6 +48,11 @@ dumped by a reference decoder used as a black box; **all 242 match**. The parsers are also fuzzed (including a differential fuzz against `mp4ff`), and a mutation sweep deletes every refusal in turn: each deletion is caught by a test. +For tiles (S1), a second set of goldens records, for every frame of the same 242 +vectors, the tile size, symbol count, bits consumed and the hash of the +end-of-frame CDFs; **all 242 match**, inter frames and intra block copy +included. The tile parser is fuzzed (corpora committed). + What the oracle does not cover: - **Quantizer matrices** (`using_qmatrix`): no available vector sets the flag,