Membrane.AV1 (Membrane AV1 Format v0.3.0)

View Source

AV1 video stream format for Membrane Framework.

This module defines the stream format struct used for capability negotiation between Membrane elements processing AV1 video streams.

Summary

Types

Determines how buffers of a stream with AV1 stream format are aligned

Determines the resolution and performance constraints of a bitstream, with which a decoder must be compliant. The bitrate constraint for levels 4.0 and higher is also determined by tier/0. The constraints are defined in Annex A, chapter A.3. of AV1 specification.

Determines the bit depth and subsampling constraints of a bitstream, with which a decoder must be compliant. The constraints are defined in Annex A, chapter A.2. of AV1 specification.

t()

AV1 stream format.

Determines the bitrate and compression rate constraint of a bitstream for a given level/0. In the table defining the constraints of levels (Annex A, chapter A.3. of AV1 specification), tier determines whether values from MainMbps and MainCR (:main tier), or HighMbps and HighCR for (:high tier) are assumed. :main is the only valid tier for levels lower than 4.0.

Types

alignment()

@type alignment() :: :obu | :tu

Determines how buffers of a stream with AV1 stream format are aligned:

  • :tu - each buffer contains a single TU (Temporal Unit), beginning with an OBU (Open Bistream Unit) of type OBU_TEMPORAL_DELIMITER
  • :obu - each buffer contains a number of complete OBUs, but there is no guarantee that they constitute a single TU.

framerate()

@type framerate() :: {non_neg_integer(), pos_integer()}

level()

@type level() ::
  :"2.0"
  | :"2.1"
  | :"2.2"
  | :"2.3"
  | :"3.0"
  | :"3.1"
  | :"3.2"
  | :"3.3"
  | :"4.0"
  | :"4.1"
  | :"4.2"
  | :"4.3"
  | :"5.0"
  | :"5.1"
  | :"5.2"
  | :"5.3"
  | :"6.0"
  | :"6.1"
  | :"6.2"
  | :"6.3"
  | :"7.0"
  | :"7.1"
  | :"7.2"
  | :"7.3"

Determines the resolution and performance constraints of a bitstream, with which a decoder must be compliant. The bitrate constraint for levels 4.0 and higher is also determined by tier/0. The constraints are defined in Annex A, chapter A.3. of AV1 specification.

profile()

@type profile() :: :main | :high | :professional

Determines the bit depth and subsampling constraints of a bitstream, with which a decoder must be compliant. The constraints are defined in Annex A, chapter A.2. of AV1 specification.

t()

@type t() :: %Membrane.AV1{
  alignment: alignment(),
  framerate: framerate() | nil,
  height: pos_integer() | nil,
  level: level() | nil,
  profile: profile() | nil,
  tier: tier() | nil,
  width: pos_integer() | nil
}

AV1 stream format.

tier()

@type tier() :: :main | :high

Determines the bitrate and compression rate constraint of a bitstream for a given level/0. In the table defining the constraints of levels (Annex A, chapter A.3. of AV1 specification), tier determines whether values from MainMbps and MainCR (:main tier), or HighMbps and HighCR for (:high tier) are assumed. :main is the only valid tier for levels lower than 4.0.

Functions

level_to_seq_level_idx(level)

@spec level_to_seq_level_idx(level()) :: 0..31

profile_to_seq_profile(profile)

@spec profile_to_seq_profile(profile()) :: 0..2

seq_level_idx_to_level(seq_level_idx)

@spec seq_level_idx_to_level(0..31) :: level() | nil

seq_profile_to_profile(seq_profile)

@spec seq_profile_to_profile(0..2) :: profile()

seq_tier_to_tier(seq_tier)

@spec seq_tier_to_tier(0..1) :: tier()

tier_to_seq_tier(tier)

@spec tier_to_seq_tier(tier()) :: 0..1