Skip to main content

h265_level

Function h265_level 

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

Lowest H.265 level whose Annex-A Tables A.8 and A.9 limits admit a width x height stream at fps carrying up to bitrate_bps (0 where no rate is declared) at the High tier or the Main one, as general_level_idc (123 = 4.1, 156 = 5.2, 186 = 6.2).

A frame is charged by MaxLumaPs, its luma samples, and MaxLumaSr, those times the frame rate; a declared rate by the tier’s MaxBR, which an encoder that validates the level against the rate refuses a CBR target past. The ladder starts at 4.1 like the H.264 one and answers 6.2 for anything beyond its limits.