Help us shape the future of Go! Take the 2026 Go Developer Survey

gav1d

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: BSD-2-Clause

README

gav1d

Status Go Reference

AV1 video and AVIF image decoder and encoder in pure Go.

A port of dav1d, bit-exact against it. No CGo, no dependencies.

SIMD support for amd64 (AVX2, AVX-512), arm64 (NEON) and riscv64 (RVV, with GORISCV64=rva23u64). Build with -tags noasm for pure Go everywhere.

Decoding

img, err := avif.Decode(r)

avif.Decode returns *image.NRGBA, or *image.NRGBA64 above 8 bits, and registers itself with image.RegisterFormat. The av1 package decodes the bitstream on its own, a temporal unit at a time:

d := av1.Decoder{}

for _, tu := range temporalUnits {
    pics, err := d.DecodeOBUs(tu)
    ...
}

Supported

8/10/12-bit, 4:2:0/4:2:2/4:4:4/monochrome, film grain, scalable streams, and in the container alpha, grid, clap/irot/imir, colr, image sequences, Exif and XMP, and gain maps.

License

The decoder is a port of dav1d; the encoder's forward transform is a port of libaom. Both are BSD-2-Clause, and both notices are in COPYING.

This project is an implementation of a codec. It gives you no special rights on the AV1 patents. Please read the AV1 patent license that applies to the AV1 specification and codec.

Directories

Path Synopsis
Package av1 decodes the AV1 bitstream.
Package av1 decodes the AV1 bitstream.
Package avif decodes AVIF images and image sequences.
Package avif decodes AVIF images and image sequences.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL