av1

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 1 Imported by: 35

Documentation

Overview

Package av1 contains utilities to work with the AV1 codec.

Index

Constants

View Source
const (
	// MaxOBUSize is the maximum size of a OBU.
	MaxOBUSize = 3 * 1024 * 1024

	// MaxOBUsPerTemporalUnit is the maximum number of OBUs per temporal unit.
	MaxOBUsPerTemporalUnit = 10
)

Variables

This section is empty.

Functions

func BitstreamUnmarshal

func BitstreamUnmarshal(bs []byte, removeSizeField bool) ([][]byte, error)

BitstreamUnmarshal extracts OBUs from a bitstream. Optionally, it also removes the size field from OBUs. Specification: https://aomediacodec.github.io/av1-spec/#low-overhead-bitstream-format

func ContainsKeyFrame

func ContainsKeyFrame(obus [][]byte) (bool, error)

ContainsKeyFrame checks whether OBUs contain a key frame.

func LEB128Marshal

func LEB128Marshal(v uint) []byte

LEB128Marshal encodes an unsigned integer with the LEB128 format. Specification: https://aomediacodec.github.io/av1-spec/#leb128

func LEB128Unmarshal

func LEB128Unmarshal(buf []byte) (uint, int, error)

LEB128Unmarshal decodes an unsigned integer from the LEB128 format. Specification: https://aomediacodec.github.io/av1-spec/#leb128

Types

type OBUHeader

type OBUHeader struct {
	Type    OBUType
	HasSize bool
}

OBUHeader is a OBU header. Specification: https://aomediacodec.github.io/av1-spec/#obu-header-syntax

func (*OBUHeader) Unmarshal

func (h *OBUHeader) Unmarshal(buf []byte) error

Unmarshal decodes a OBUHeader.

type OBUType

type OBUType uint8

OBUType is an OBU type.

const (
	OBUTypeSequenceHeader OBUType = 1
)

OBU types.

Jump to

Keyboard shortcuts

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