From a4b2681e94550b97b90022d09b7e71e89bb8b09c Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 29 Nov 2026 15:50:08 +0100 Subject: [PATCH] Add the av1 module to the landing page and the docs Co-Authored-By: Claude Sonnet 5.5 --- content/en/av1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 content/en/av1.md diff --git a/content/en/av1.md b/content/en/av1.md new file mode 100644 index 0000000..e61151f --- /dev/null +++ b/content/en/av1.md @@ -0,0 +1,46 @@ +--- +title: "av1" +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 +[`decode`]({{< relref "decode.md" >}}). + +## Using it {#using-it} + +```go +units, err := obu.ParseSection5(data, obu.Limits{}) // or obu.ParseAnnexB +var dec header.Decoder +for _, u := range units { + res, err := dec.Decode(u) + // res.Seq, res.Frame and res.Tiles carry what the OBU held +} +``` + +Every size and count read from the stream is bounded by a `Limits` value and +refused with a `LimitError`; a short payload returns `ErrTruncated`. + +## What it claims, and how it was checked {#claims} + +The parsers were written from the AV1 specification alone. The oracle is a set +of 242 conformance vectors whose header fields and header bit counts were +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. + +What the oracle does not cover: + +- **Quantizer matrices** (`using_qmatrix`): no available vector sets the flag, + so they are tested with hand-built bitstreams only and are not oracle-checked. +- **SVC L2T1 and L2T2** are compared against the 16-frame list. +- **Matroska** vectors use the remuxed IVF files. +- **Annex B** is covered by a round trip from Section 5. +- Header bit counts exclude trailing and alignment bits; tile-group bits and + redundant headers are not logged by the oracle. + +Header parsing cost against the reference decoder is not measured yet.