Skip to main content

hevc_codec_string

Function hevc_codec_string 

Source
pub fn hevc_codec_string(fourcc: &str, sps: &HevcSpsInfo) -> String
Expand description

H.265 codec string <fourcc>.{space}{profile}.{compat}.{tier}{level}{.cons}* per ISO/IEC 14496-15 §E.3, parsed from the SPS profile_tier_level:

  • {space} = general_profile_space as a letter (0 → omitted, 1→‘A’, …), then general_profile_idc in decimal.
  • {compat} = general_profile_compatibility_flags with its 32-bit order reversed, in hex with leading zeros omitted (Main → 6).
  • {tier}{level} = ‘L’/‘H’ from general_tier_flag + general_level_idc in decimal (L4.0 → L120, L3.1 → L93).
  • {.cons}* = the six general_constraint_indicator_flags bytes, each a .XX hex segment, trailing zero bytes omitted. fourcc is hvc1 (out-of-band) or hev1 (in-band). Example: Main@L3.1 progressive → hvc1.1.6.L93.B0.