Identify h264 profile and level from profile-level-id in sdp?
Asked Answered
S

2

8

In a SIP video call, the receiver of the video stream respond with the capabilities of its decoder.

The parameter which defines that is the profile-level-id. Here is an example value of the profile-level-id parameter: 428014

RFC 6184 defined that as

A base16 [7] (hexadecimal) representation of the following three bytes in the sequence parameter set NAL unit is specified in 1: 1) profile_idc, 2) a byte herein referred to as profile-iop, composed of the values of constraint_set0_flag, constraint_set1_flag, constraint_set2_flag, constraint_set3_flag, constraint_set4_flag, constraint_set5_flag, and reserved_zero_2bits in bit- significance order, starting from the most-significant bit, and 3) level_idc.

According to that, the following parameters from the example value can be identified:

  • profile_idc 42
  • profile-iop 82
  • level-idc 14

How to relate those numbers to the profiles and levels defined for h264?

Stenotypy answered 9/4, 2014 at 11:20 Comment(0)
S
14

For such things you should read actual H.264 spec not Wikipedia. Using it you can parse your example as

  • profile_idc 0x42 == 66 so it is Baseline profile
  • profile-iop 0x80 mean constraint_set0_flag=1 (so it is Constrained Baseline profile) and others 0
  • level-idc 0x14 == 20 so it is Level 2.0

So result is Constrained Baseline profile Level 2.0

Speedy answered 9/4, 2014 at 17:39 Comment(3)
The 'Recommendation H.264, "Advanced video coding for generic audiovisual services"' section 7.4.2.1.1' states constraint_set0_flag equal to 1 indicates that the coded video sequence obeys all constraints specified in subclause A.2.1. constraint_set0_flag equal to 0 indicates that the coded video sequence may or may not obey all constraints specified in subclause A.2.1.. Where A.2.1 defines the Baseline profile. How did you decode that? Please answer here https://mcmap.net/q/1324555/-h264-profile-iop-explainedStenotypy
I'm looking at 2012 version of ISO/IEC 14496 10 and section A.2.1.1 defines Constrained Baseline profile as "Conformance of a bitstream to the Constrained Baseline profile is indicated by profile_idc being equal to 66 with constraint_set1_flag being equal to 1." I believe constraint_set0_flag=1 is true for just Baseline profile. Thus the example in the answer is just BaselineChemiluminescence
Also see here for discussion about the different constraint bits: https://mcmap.net/q/1324555/-h264-profile-iop-explainedChemiluminescence
G
2

Refer to following table from RFC 6184: Table 5. Combinations of profile_idc and profile-iop representing the same sub-profile corresponding to the full set of coding tools supported by one profile. In the following, x may be either 0 or 1, while the profile names are indicated as follows. CB: Constrained Baseline profile, B: Baseline profile, M: Main profile, E: Extended profile, H: High profile, H10: High 10 profile, H42: High 4:2:2 profile, H44: High 4:4:4 Predictive profile, H10I: High 10 Intra profile, H42I: High 4:2:2 Intra profile, H44I: High 4:4:4 Intra profile, and C44I: CAVLC 4:4:4 Intra profile.

      Profile     profile_idc        profile-iop
                  (hexadecimal)      (binary)

      CB          42 (B)             x1xx0000
         same as: 4D (M)             1xxx0000
         same as: 58 (E)             11xx0000
      B           42 (B)             x0xx0000
         same as: 58 (E)             10xx0000
      M           4D (M)             0x0x0000
      E           58                 00xx0000
      H           64                 00000000
      H10         6E                 00000000
      H42         7A                 00000000
      H44         F4                 00000000
      H10I        6E                 00010000
      H42I        7A                 00010000
      H44I        F4                 00010000
      C44I        2C                 00010000

It is Baseline Profile Level 2.0.

Goraud answered 23/7, 2020 at 6:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.