av1

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package av1 reads the parts of an AV1 bitstream containers need: OBU framing, the sequence header, and the AV1CodecConfigurationRecord (av1C) that Matroska CodecPrivate and the ISO BMFF av1C box both carry.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalid = errors.New("av1: invalid bitstream")

ErrInvalid reports a malformed OBU or sequence header.

Functions

func AppendWithoutTemporalDelimiters

func AppendWithoutTemporalDelimiters(dst, data []byte) ([]byte, error)

AppendWithoutTemporalDelimiters appends the OBUs of data to dst, skipping temporal delimiter OBUs. It returns data itself without copying into dst when data contains no temporal delimiter OBUs.

func ConfigFromFrames

func ConfigFromFrames(frames [][]byte) ([]byte, error)

func StripTemporalDelimiters

func StripTemporalDelimiters(data []byte) ([]byte, error)

StripTemporalDelimiters returns a temporal unit without its temporal delimiter OBUs, as ISO BMFF and Matroska samples store it. It returns data itself when there is none to strip.

Types

type Config

type Config struct {
	SeqProfile                       int
	SeqLevelIdx0                     int
	SeqTier0                         bool
	HighBitDepth                     bool
	TwelveBit                        bool
	Monochrome                       bool
	ChromaSubsamplingX               bool
	ChromaSubsamplingY               bool
	ChromaSamplePosition             int
	InitialPresentationDelaySet      bool
	InitialPresentationDelayMinusOne int
	ConfigOBUCount                   int
	SequenceHeaderOBUPresent         bool
}

Config is a parsed AV1CodecConfigurationRecord.

func ParseConfig

func ParseConfig(private []byte) (Config, error)

ParseConfig reads an av1C record: its header fields and config OBUs.

Jump to

Keyboard shortcuts

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