Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions content/en/av1.md
Original file line number Diff line number Diff line change
@@ -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.
Loading