package obu

Import Path
	github.com/pion/rtp/codecs/av1/obu (on go.dev)

Dependency Relation
	imports 2 packages, and imported by 2 packages

Involved Source Files errors.go Package obu implements tools for working with the Open Bitstream Unit. obu.go
Package-Level Type Names (total 4)
/* sort by: | */
ExtensionHeader represents an OBU extension header obu_extension_header(). 5.3.3 https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=40 Reserved3Bits uint8 SpatialID uint8 TemporalID uint8 Marshal serializes the OBU extension header to a byte slice. 5.3.3 https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=40 obu_extension_header() { Type temporal_id f(3) spatial_id f(2) extension_header_reserved_3bits f(3) } func ParseOBUExtensionHeader(headerData byte) ExtensionHeader
Header represents the header of an OBU obu_header(). 5.3.2: https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=40 ExtensionHeader *ExtensionHeader HasSizeField bool Reserved1Bit bool Type Type Marshal serializes the OBU header to a byte slice. If the OBU has an extension header, the extension header is serialized as well. 5.3.2: https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=40 obu_header() { Type obu_forbidden_bit f(1) obu_type f(4) obu_extension_flag f(1) obu_has_size_field f(1) obu_reserved_1bit f(1) if ( obu_extension_flag == 1 ) obu_extension_header() } } Size returns the size of the OBU header in bytes. *Header : github.com/gogo/protobuf/proto.Sizer func ParseOBUHeader(data []byte) (*Header, error)
OBU represents an AV1 OBU. 5.1 https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=39 Header Header Payload []byte Marshal serializes the OBU to low-overhead bitstream format. 5.2 https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=40
Type represents the type of an AV1 OBU. ( Type) String() string Type : expvar.Var Type : fmt.Stringer const OBUFrame const OBUFrameHeader const OBUMetadata const OBUPadding const OBURedundantFrameHeader const OBUSequenceHeader const OBUTemporalDelimiter const OBUTileGroup const OBUTileList
Package-Level Functions (total 5)
EncodeLEB128 encodes a uint as LEB128.
ParseOBUExtensionHeader parses an OBU extension header from the given data. 5.3.3 https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=40 obu_extension_header() { Type temporal_id f(3) spatial_id f(2) extension_header_reserved_3bits f(3) }
ParseOBUHeader parses an OBU header from the given data. 5.3.2: https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=40 obu_header() { Type obu_forbidden_bit f(1) obu_type f(4) obu_extension_flag f(1) obu_has_size_field f(1) obu_reserved_1bit f(1) if ( obu_extension_flag == 1 ) obu_extension_header() } }
ReadLeb128 scans an buffer and decodes a Leb128 value. If the end of the buffer is reached and all MSB are set an error is returned.
WriteToLeb128 writes a uint to a LEB128 encoded byte slice.
Package-Level Variables (total 3)
ErrFailedToReadLEB128 indicates that a buffer ended before a LEB128 value could be successfully read.
ErrInvalidOBUHeader is returned when an OBU header has forbidden bits set.
ErrShortHeader is returned when an OBU header is not large enough. This can happen when an extension header is expected but not present.
Package-Level Constants (total 9)
OBUFrame av1 frame_obu.
OBUFrameHeader av1 frame_header_obu.
OBUMetadata av1 metadata_obu.
OBUPadding av1 padding_obu.
OBURedundantFrameHeader av1 redundant_frame_header_obu.
OBUSequenceHeader av1 sequence_header_obu.
OBUTemporalDelimiter av1 temporal_delimiter_obu.
OBUTileGroup av1 tile_group_obu.
OBUTileList av1 tile_list_obu.