The profile_tier_level structure appears in the
VPS and the SPS.
The profile says which coding tools a stream uses, the tier and level how large and fast
it is. A decoder for a given profile, tier and level can decode any stream that claims the
same or less. MP4 files and streaming manifests repeat these fields in the codec string,
such as hvc1.1.6.L93.B0: profile 1, compatibility flags, Main tier at level
3.1, constraint byte B0.
Fields
For general profile information (profilePresentFlag 1, as in every VPS and
SPS of a single-layer stream) the first 12 bytes have a fixed layout:
| Byte | Bits | Name | Description |
|---|---|---|---|
| 0 | 7–6 | general_profile_space | 0; other values are reserved and decoders ignore such a stream |
| 0 | 5 | general_tier_flag | 0 Main tier, 1 High tier |
| 0 | 4–0 | general_profile_idc | see profiles |
| 1–4 | 32 bits | general_profile_compatibility_flag[j] | bit j (from the most significant) set means the stream also conforms to profile j; the flag of its own profile is always set |
| 5 | 7 | general_progressive_source_flag | 1, 0 progressive; 0, 1 interlaced; 0, 0 unknown; 1, 1 given per picture by source_scan_type in the picture timing SEI |
| 5 | 6 | general_interlaced_source_flag | |
| 5 | 5 | general_non_packed_constraint_flag | 1: no frame packing, segmented frame packing, equirectangular or cubemap SEI messages |
| 5 | 4 | general_frame_only_constraint_flag | 1: pictures are frames, never fields |
| 5–10 | 43 bits | constraint flags or reserved zero bits | layout depends on the profile |
| 10 | 0 | general_inbld_flag or general_reserved_zero_bit | for profiles 1 to 5, 9 and 11: 1 means independent non-base layer decoding is needed (multi-layer only) |
| 11 | 8 bits | general_level_idc | 30 × the level |
Then, for each sub-layer below the highest (maxNumSubLayersMinus1 times):
| Name | Coding | Condition | Description |
|---|---|---|---|
sub_layer_profile_present_flag[i] | u(1) | per sub-layer | 1: profile information for sub-layer i follows |
sub_layer_level_present_flag[i] | u(1) | per sub-layer | 1: a level for sub-layer i follows |
reserved_zero_2bits[i] | u(2) | to fill eight pairs, when there is more than one sub-layer | 0; the flag pairs always take 16 bits |
sub_layer_profile_space[i] … sub_layer_reserved_zero_bit[i] | 88 bits | profile flag set | the same 11 bytes as above, for the sub-layer |
sub_layer_level_idc[i] | u(8) | level flag set | the sub-layer’s level |
A sub-layer value that is absent takes the value of the next higher sub-layer, and the
highest takes the general_ value.
Profiles
general_profile_idc | Profiles | Defined in |
|---|---|---|
| 1 | Main: 4:2:0, 8-bit | A.3.2 |
| 2 | Main 10: 4:2:0, 8 to 10-bit; with one_picture_only set, Main 10 Still Picture | A.3.3 |
| 3 | Main Still Picture: one 8-bit 4:2:0 picture | A.3.4 |
| 4 | format range extensions: Monochrome (8, 10, 12, 16), Main 12, Main 4:2:2 10 and 12, Main 4:4:4 (8, 10, 12), their Intra versions, Main 4:4:4 16 Intra, Main 4:4:4 Still Picture and Main 4:4:4 16 Still Picture | A.3.5 |
| 5 | high throughput: High Throughput 4:4:4 (8, 10, 14) and High Throughput 4:4:4 16 Intra | A.3.6 |
| 6 | Multiview Main and Multiview Main 10 (MV-HEVC) | G.11.1.1 |
| 7 | Scalable Main and Scalable Main 10 (SHVC) | H.11.1.1 |
| 8 | 3D Main (3D-HEVC) | I.11.1.1 |
| 9 | screen content coding: Screen-Extended Main, Main 10, Main 4:4:4 and Main 4:4:4 10 | A.3.7 |
| 10 | scalable format range extensions: Scalable Monochrome (8, 12, 16) and Scalable Main 4:4:4 | H.11.1.2 |
| 11 | high throughput screen content coding: Screen-Extended High Throughput 4:4:4, 4:4:4 10 and 4:4:4 14 | A.3.8 |
| 12 | Multiview Extended | G.11.1.2 |
| 13 | Multiview Extended 10 | G.11.1.2 |
| 14 | multiview format range extensions: Multiview Monochrome (8, 10, 12, 16) | G.11.1.3 |
| 0, 15–31 | not used; a stream may not carry them |
A Main stream commonly sets compatibility flags 1 and 2 (bytes 60 00 00 00),
since it also conforms to Main 10; a Main 10 stream with 10-bit samples sets only flag 2
(20 00 00 00).
Constraint flags
For profile 4, 5, 6, 7, 8, 9, 10 or 11 (as general_profile_idc or a set
compatibility flag), the 43 bits after general_frame_only_constraint_flag
are:
| Bits | Name | 1 means |
|---|---|---|
| 1 | general_max_12bit_constraint_flag | bit depth at most 12 |
| 1 | general_max_10bit_constraint_flag | at most 10 |
| 1 | general_max_8bit_constraint_flag | at most 8 |
| 1 | general_max_422chroma_constraint_flag | 4:2:2 or less |
| 1 | general_max_420chroma_constraint_flag | 4:2:0 or less |
| 1 | general_max_monochrome_constraint_flag | monochrome |
| 1 | general_intra_constraint_flag | intra pictures only |
| 1 | general_one_picture_only_constraint_flag | a single picture |
| 1 | general_lower_bit_rate_constraint_flag | the normal (lower) bit rate limits apply |
| 1 + 33 | general_max_14bit_constraint_flag and general_reserved_zero_33bits | for profiles 5, 9, 10 and 11: bit depth at most 14 |
| 34 | general_reserved_zero_34bits | for the other profiles of this group |
For profile 2 the bits are general_reserved_zero_7bits,
general_one_picture_only_constraint_flag (1 for Main 10 Still Picture) and
general_reserved_zero_35bits. For any other profile they are all zero
(general_reserved_zero_43bits).
The flags pick the exact range extensions profile (profile 4). A stream claiming a profile has at least these flags set (“0 or 1” rows may set the lower bit rate flag either way):
| Profile | 12 | 10 | 8 | 422 | 420 | mono | intra | one pic | lower rate |
|---|---|---|---|---|---|---|---|---|---|
| Monochrome | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 1 |
| Monochrome 10 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 |
| Monochrome 12 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 |
| Monochrome 16 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 |
| Main 12 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 |
| Main 4:2:2 10 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
| Main 4:2:2 12 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
| Main 4:4:4 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| Main 4:4:4 10 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| Main 4:4:4 12 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| Main Intra | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 0 or 1 |
| Main 10 Intra | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 or 1 |
| Main 12 Intra | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 or 1 |
| Main 4:2:2 10 Intra | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 or 1 |
| Main 4:2:2 12 Intra | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 or 1 |
| Main 4:4:4 Intra | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 or 1 |
| Main 4:4:4 10 Intra | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 or 1 |
| Main 4:4:4 12 Intra | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 or 1 |
| Main 4:4:4 16 Intra | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 or 1 |
| Main 4:4:4 Still Picture | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 or 1 |
| Main 4:4:4 16 Still Picture | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 or 1 |
For profiles 5, 9 and 11 the 14-bit flag comes first:
| Profile | 14 | 12 | 10 | 8 | 422 | 420 | mono | intra | one pic | lower rate |
|---|---|---|---|---|---|---|---|---|---|---|
| High Throughput 4:4:4 (5) | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| High Throughput 4:4:4 10 (5) | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| High Throughput 4:4:4 14 (5) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| High Throughput 4:4:4 16 Intra (5) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 or 1 |
| Screen-Extended Main (9) | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
| Screen-Extended Main 10 (9) | 1 | 1 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 |
| Screen-Extended Main 4:4:4 (9) | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| Screen-Extended Main 4:4:4 10 (9) | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| Screen-Extended High Throughput 4:4:4 (11) | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| Screen-Extended High Throughput 4:4:4 10 (11) | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| Screen-Extended High Throughput 4:4:4 14 (11) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Other combinations with these profile codes are reserved. The multi-layer profiles 6, 7, 8, 10, 12, 13 and 14 use the same flags, with their own tables in Annexes G, H and I.
Tiers and levels
general_level_idc is 30 times the level number, so level 4.1 is 123 and
level 5.1 is 153. Level 8.5 (255) has no limits: it labels streams beyond every other
level, and must use the High tier flag. Below level 4 only the Main tier exists.
| Level | level_idc | Max luma picture size | Max luma samples per second | Max bit rate, Main / High tier (1000 bits/s) | Max CPB, Main / High (1000 bits) | Max slice segments | Max tile rows × columns |
|---|---|---|---|---|---|---|---|
| 1 | 30 | 36 864 | 552 960 | 128 / – | 350 / – | 16 | 1 × 1 |
| 2 | 60 | 122 880 | 3 686 400 | 1 500 / – | 1 500 / – | 16 | 1 × 1 |
| 2.1 | 63 | 245 760 | 7 372 800 | 3 000 / – | 3 000 / – | 20 | 1 × 1 |
| 3 | 90 | 552 960 | 16 588 800 | 6 000 / – | 6 000 / – | 30 | 2 × 2 |
| 3.1 | 93 | 983 040 | 33 177 600 | 10 000 / – | 10 000 / – | 40 | 3 × 3 |
| 4 | 120 | 2 228 224 | 66 846 720 | 12 000 / 30 000 | 12 000 / 30 000 | 75 | 5 × 5 |
| 4.1 | 123 | 2 228 224 | 133 693 440 | 20 000 / 50 000 | 20 000 / 50 000 | 75 | 5 × 5 |
| 5 | 150 | 8 912 896 | 267 386 880 | 25 000 / 100 000 | 25 000 / 100 000 | 200 | 11 × 10 |
| 5.1 | 153 | 8 912 896 | 534 773 760 | 40 000 / 160 000 | 40 000 / 160 000 | 200 | 11 × 10 |
| 5.2 | 156 | 8 912 896 | 1 069 547 520 | 60 000 / 240 000 | 60 000 / 240 000 | 200 | 11 × 10 |
| 6 | 180 | 35 651 584 | 1 069 547 520 | 60 000 / 240 000 | 60 000 / 240 000 | 600 | 22 × 20 |
| 6.1 | 183 | 35 651 584 | 2 139 095 040 | 120 000 / 480 000 | 120 000 / 480 000 | 600 | 22 × 20 |
| 6.2 | 186 | 35 651 584 | 4 278 190 080 | 240 000 / 800 000 | 240 000 / 800 000 | 600 | 22 × 20 |
| 6.3 | 189 | 80 216 064 | 4 812 963 840 | 320 000 / 1 600 000 | 240 000 / 1 600 000 | 600 | 22 × 20 |
| 7 | 210 | 142 606 336 | 4 812 963 840 | 320 000 / 1 600 000 | 240 000 / 1 600 000 | 1 800 | 44 × 40 |
| 7.1 | 213 | 142 606 336 | 8 556 380 160 | 480 000 / 3 200 000 | 480 000 / 3 200 000 | 1 800 | 44 × 40 |
| 7.2 | 216 | 142 606 336 | 17 112 760 320 | 960 000 / 6 400 000 | 960 000 / 6 400 000 | 1 800 | 44 × 40 |
| 8.5 | 255 | no limits | |||||
The bit rate and buffer limits are in units of 1000 bits for the Main and Main 10
profiles; the other profiles multiply them by factors given in Table A.10 of H.265.
Width and height may each be at most √(8 × max picture size), so at level 4.1 neither
may exceed 4 222 samples. From level 5 up the CTB must be 32 × 32 or 64 × 64, and every
level limits NumPicTotalCurr to 8. Levels 6.3 to 7.2 and 8.5 were added
in version 9 of the standard.