Skip to main content

av1_level

Function av1_level 

Source
pub fn av1_level(width: u32, height: u32, fps: u32, bitrate_bps: u64) -> u32
Expand description

Lowest AV1 level whose Annex A limits admit a width x height stream at fps carrying up to bitrate_bps (0 where no rate is declared), as seq_level_idx (8 = 4.0, 13 = 5.1, 19 = 6.3).

A frame is charged by MaxPicSize and the per-axis MaxHSize / MaxVSize, its rate by MaxDisplayRate, and a declared bitrate by the Main tier’s MaxBitrate, the tier every hardware encoder declares, which an encoder that validates the level against the rate refuses a CBR target past. MaxPicSize is its own limit, far below the product of the axis maxima – no level admits a picture that is both its widest and its tallest – so it is carried per level rather than derived. The ladder starts at 4.0 and answers 6.3 for anything beyond its limits.