7

Identify h264 profile and level from profile-level-id in sdp?

How does one identify what the constraints actually mean? For example I have a profile-type-id: 42801e that translates to:

enter image description here

How am I to relate that to the features defined in the table here?

The above reference identified that the Constraint_set0_flag: 1 means that it's the Constrained Baseline Profile. But how to relate the flag to the three different NO's (from the table) that differentiate the Baseline profile from the Constrained Baseline Profile?

Update

Can't confirm that the above, about identifying the Constrained Baseline profile, is correct. Reference (page 306) for that statement:

Decoders conforming to the Constrained Baseline profile at a 
specific level shall be capable of decoding all bitstreams 
in which all of the following are true:

– profile_idc is equal to 66 or constraint_set0_flag is equal to 1,
– constraint_set1_flag is equal to 1, 
– level_idc and constraint_set3_flag represent a level 
less than or equal to the specified level.

It seems only the first condition is fulfilled but the second is false. The parameters for the Baseline profile state

Decoders conforming to the Baseline profile at a specific level shall be capable of decoding all bitstreams in which profile_idc is equal to 66 or constraint_set0_flag is equal to 1 and in which level_idc and constraint_set3_flag represent a level less than or equal to the specified level.

and they are both present.

Community
  • 1
  • 1
TheMeaningfulEngineer
  • 15,679
  • 27
  • 85
  • 143

2 Answers2

5

Can you clarify your question? What exactly don't you understand? You have already parsed 42801e as Constrained Baseline Profile Level 3.0.

Constrained Baseline Profile identified by constraint_set0_flag=1 mean that encoded stream don't use any of the features outside of this profile (like FMO or ASO from wikipedia table) and so can be decoded with any decoder with support of Constrained Baseline, Main or High profiles. Streams encoded with Baseline Profile (not Constrained) Profile can use this additional features (or not use but still not be indicated as Constrained) but if they will be used in stream than decoders which support only Constrained Baseline, Main or High profiles wouldn't be able to decode it.

Update

I was wrong. It is Baseline Profile Level 3.0 because constraint_set1_flag=0 and so there is no indication of Constrained Baseline Profile.

nobody555
  • 2,239
  • 18
  • 18
  • Updated, i have some doubts regarding the identification. Please comment. – TheMeaningfulEngineer May 07 '14 at 06:41
  • Your quotes from H.264 is not about how Constrained Baseline profile is indicated but what decoder supporting it with specific level support should be able to decode. You should read "7.4.2.1.1 Sequence parameter set data semantics" where it is said: `constraint_set0_flag equal to 1 indicates that the coded video sequence obeys all constraints specified in clause A.2.1.` i.e. is Constrained Baseline Profile. Also you profile_idc is equal to 66 (0x42), constraint_set0_flag=1 and decoder support level not specified (so any stream value is ok) so all you condition from A.2.1 fulfilled. – nobody555 May 07 '14 at 17:16
  • But `A.2.1` is the Baseline profile (page 283.). Constrained Baseline profile is `A.2.1.1`. And in `A.2.1.1` it states `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.` which isn't the cause for my example. Please comment. – TheMeaningfulEngineer May 07 '14 at 20:40
  • Sorry, my bad. You are right it is not Constrained Baseline profile as we have constraint_set0_flag=1 (it only indicates Baseline profile) and constraint_set1_flag=0. I misread spec by mixing constraint_set0_flag and constraint_set1_flag. But btw almost nobody really use not Constrained Baseline profile (but not every encoder marks it as Constrained). – nobody555 May 07 '14 at 21:03
  • Where is this Wikipedia table? – MarcusJ Jan 05 '17 at 05:05
  • @nobody555 I came across with a `profile_idc` equal to 66 while `constraint_set0_flag`, `constraint_set1_flag`, `constraint_set2_flag` all equal to 1. Does this still mean to be a `Constrained Baseline profile`? But the standard only defines the the value of `constraint_set0_flag` and `constraint_set1_flag` when `profile_idc` equals to 66. – Jian Guo May 20 '18 at 12:02
  • 1
    Yes. That probably is still Constrained Baseline profile. I don't know why it is also marked as Extended profile compatible (constraint_set2_flag = 1) which almost nobody use/set. But that only adds constraint that "Sequence parameter sets shall have direct_8x8_inference_flag equal to 1". This param doesn't really influence anything as stream doesn't use B-frames. – nobody555 May 20 '18 at 19:41
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 3.0.

Chunbo Hua
  • 51
  • 1