Video usability information (VUI, Annex E of H.265) sits at the end of the SPS. It is not needed to decode the pictures, but it tells a player how to show them: shape of the samples, colours, frame rate. The hypothetical reference decoder (HRD) parameters inside it, and in the VPS, describe the buffering model.
VUI fields
| Name | Coding | Condition | Description |
|---|---|---|---|
aspect_ratio_info_present_flag | u(1) | 1: the aspect ratio follows | |
aspect_ratio_idc | u(8) | flag above is 1 | see sample aspect ratios |
sar_width, sar_height | u(16) × 2 | aspect_ratio_idc is 255 | the sample aspect ratio; relatively prime, or 0 for unspecified |
overscan_info_present_flag | u(1) | 1: the next flag follows | |
overscan_appropriate_flag | u(1) | flag above is 1 | 1: the picture may be shown with overscan; 0: important content reaches the edges |
video_signal_type_present_flag | u(1) | 1: the next three fields follow | |
video_format | u(3) | signal type | see video format; 5 when absent |
video_full_range_flag | u(1) | signal type | 1: full range (0 to 255 for 8 bits); 0: limited range (16 to 235 luma). 0 when absent |
colour_description_present_flag | u(1) | signal type | 1: the three colour codes follow |
colour_primaries | u(8) | colour description | see colour codes; 2 when absent |
transfer_characteristics | u(8) | colour description | 2 when absent |
matrix_coeffs | u(8) | colour description | 2 when absent |
chroma_loc_info_present_flag | u(1) | 1: the chroma sample locations follow | |
chroma_sample_loc_type_top_field | ue(v) | flag above is 1 | 0 to 5, see chroma location |
chroma_sample_loc_type_bottom_field | ue(v) | flag above is 1 | 0 to 5 |
neutral_chroma_indication_flag | u(1) | 1: every chroma sample is the mid value, 1 << (bit depth − 1); a grey picture | |
field_seq_flag | u(1) | 1: each picture is a field, and a picture timing SEI message is in every access unit | |
frame_field_info_present_flag | u(1) | 1: picture timing SEI messages carry pic_struct, source_scan_type and duplicate_flag | |
default_display_window_flag | u(1) | 1: the next four offsets follow | |
def_disp_win_left_offset, …right…, …top…, …bottom… | ue(v) × 4 | flag above is 1 | a suggested display area inside the conformance window, in chroma sample units, added to the conformance offsets |
vui_timing_info_present_flag | u(1) | 1: the timing fields follow | |
vui_num_units_in_tick | u(32) | timing | clock units per tick; equal to the VPS value when that is present |
vui_time_scale | u(32) | timing | clock units per second |
vui_poc_proportional_to_timing_flag | u(1) | timing | 1: picture order count is proportional to output time |
vui_num_ticks_poc_diff_one_minus1 | ue(v) | flag above is 1 | ticks per picture order count step, minus 1 |
vui_hrd_parameters_present_flag | u(1) | timing | 1: HRD parameters follow, with the common part present |
bitstream_restriction_flag | u(1) | 1: the restriction fields follow | |
tiles_fixed_structure_flag | u(1) | restrictions | 1: every PPS in the sequence has the same tile layout |
motion_vectors_over_pic_boundaries_flag | u(1) | restrictions | 0: inter prediction never uses samples outside the picture |
restricted_ref_pic_lists_flag | u(1) | restrictions | 1: all P and B slices of a picture have the same list 0, and the same list 1 |
min_spatial_segmentation_idc | ue(v) | restrictions | 0 to 4095; a bound on the size of slices, tiles or wavefront rows, for parallel decoding |
max_bytes_per_pic_denom | ue(v) | restrictions | 0 to 16; 0 means no limit on coded bytes per picture |
max_bits_per_min_cu_denom | ue(v) | restrictions | 0 to 16; 0 means no limit on coded bits per coding unit |
log2_max_mv_length_horizontal | ue(v) | restrictions | 0 to 15: horizontal motion vectors lie in −2n to 2n − 1 quarter samples |
log2_max_mv_length_vertical | ue(v) | restrictions | the same vertically |
Picture rate is time_scale ÷ num_units_in_tick pictures per
second: unlike H.264, one tick is one picture. 25 frames per second is, for example,
27 000 000 and 1 080 000; 29.97 is 30 000 and 1 001. When field_seq_flag is 1
the pictures are fields, so the rate is a field rate.
Sample aspect ratios
aspect_ratio_idc | Sample aspect ratio | Typical use |
|---|---|---|
| 0 | unspecified | |
| 1 | 1:1 | square samples: 1920 × 1080, 3840 × 2160, 7680 × 4320 |
| 2 | 12:11 | 720 × 576 4:3 with overscan |
| 3 | 10:11 | 720 × 480 4:3 with overscan |
| 4 | 16:11 | 720 × 576 16:9 with overscan |
| 5 | 40:33 | 720 × 480 16:9 with overscan |
| 6 | 24:11 | 352 × 576 4:3, 480 × 576 16:9 with overscan |
| 7 | 20:11 | 352 × 480 4:3, 480 × 480 16:9 with overscan |
| 8 | 32:11 | 352 × 576 16:9 |
| 9 | 80:33 | 352 × 480 16:9 |
| 10 | 18:11 | 480 × 576 4:3 with overscan |
| 11 | 15:11 | 480 × 480 4:3 with overscan |
| 12 | 64:33 | 528 × 576 16:9 |
| 13 | 160:99 | 528 × 480 16:9 |
| 14 | 4:3 | 1440 × 1080 16:9 |
| 15 | 3:2 | 1280 × 1080 16:9 |
| 16 | 2:1 | 960 × 1080 16:9 |
| 17–254 | reserved; read as 0 | |
| 255 | EXTENDED_SAR: sar_width : sar_height |
Video format
video_format | Source |
|---|---|
| 0 | component |
| 1 | PAL |
| 2 | NTSC |
| 3 | SECAM |
| 4 | MAC |
| 5 | unspecified |
| 6, 7 | reserved; read as 5 |
Colour codes
Reserved values are read as 2, unspecified.
colour_primaries | Primaries |
|---|---|
| 0 | reserved |
| 1 | BT.709, sRGB: red 0.640, 0.330; green 0.300, 0.600; blue 0.150, 0.060; white D65 |
| 2 | unspecified |
| 3 | reserved |
| 4 | BT.470 System M (1953 NTSC, FCC); white C |
| 5 | BT.470 System B, G; BT.601 625-line (PAL, SECAM) |
| 6 | BT.601 525-line, SMPTE ST 170 (functionally the same as 7) |
| 7 | SMPTE ST 240 |
| 8 | generic film (colour filters, illuminant C) |
| 9 | BT.2020, BT.2100: red 0.708, 0.292; green 0.170, 0.797; blue 0.131, 0.046; white D65 |
| 10 | SMPTE ST 428-1, CIE 1931 XYZ |
| 11 | SMPTE RP 431-2, DCI-P3 (white 0.314, 0.351) |
| 12 | SMPTE EG 432-1, Display P3 (P3 primaries, white D65) |
| 13–21 | reserved |
| 22 | EBU Tech. 3213-E |
| 23–255 | reserved |
transfer_characteristics | Transfer |
|---|---|
| 0 | reserved |
| 1 | BT.709 (functionally the same as 6, 14 and 15) |
| 2 | unspecified |
| 3 | reserved |
| 4 | assumed display gamma 2.2 (BT.470 System M) |
| 5 | assumed display gamma 2.8 (BT.470 System B, G) |
| 6 | BT.601, SMPTE ST 170 |
| 7 | SMPTE ST 240 |
| 8 | linear |
| 9 | logarithmic, 100:1 range |
| 10 | logarithmic, 100 × √10 : 1 range |
| 11 | IEC 61966-2-4 (xvYCC) |
| 12 | BT.1361 extended colour gamut |
| 13 | IEC 61966-2-1, sRGB and sYCC |
| 14 | BT.2020, 10-bit |
| 15 | BT.2020, 12-bit |
| 16 | SMPTE ST 2084, BT.2100 PQ (HDR10) |
| 17 | SMPTE ST 428-1 |
| 18 | ARIB STD-B67, BT.2100 HLG |
| 19–255 | reserved |
matrix_coeffs | Matrix |
|---|---|
| 0 | identity: GBR, as in sRGB and ST 428-1 |
| 1 | BT.709: KR 0.2126, KB 0.0722 |
| 2 | unspecified |
| 3 | reserved |
| 4 | FCC: KR 0.30, KB 0.11 |
| 5 | BT.470 B, G; BT.601 625: KR 0.299, KB 0.114 |
| 6 | BT.601 525, SMPTE ST 170: the same coefficients |
| 7 | SMPTE ST 240: KR 0.212, KB 0.087 |
| 8 | YCgCo, or YCgCo-R when chroma has one more bit than luma |
| 9 | BT.2020 and BT.2100 non-constant luminance: KR 0.2627, KB 0.0593 |
| 10 | BT.2020 constant luminance |
| 11 | SMPTE ST 2085, Y′D′ZD′X |
| 12 | chromaticity-derived non-constant luminance |
| 13 | chromaticity-derived constant luminance |
| 14 | BT.2100 ICTCP |
| 15 | IPT-C2 (SMPTE’s IPT-PQ-C2) |
| 16 | YCgCo-Re |
| 17 | YCgCo-Ro |
| 18–255 | reserved |
Chroma location
For 4:2:0 only, the position of the top-left chroma sample relative to the top-left luma sample, in luma samples. For 4:2:2 and 4:4:4 the offset is always 0, 0.
| Type | Horizontal | Vertical | Common name |
|---|---|---|---|
| 0 | 0 | 0.5 | left (MPEG-2 style); the default |
| 1 | 0.5 | 0.5 | centre (MPEG-1, JPEG style) |
| 2 | 0 | 0 | top-left; recommended for BT.2020 and BT.2100 |
| 3 | 0.5 | 0 | top |
| 4 | 0 | 1 | bottom-left |
| 5 | 0.5 | 1 | bottom |
HRD parameters
hrd_parameters(commonInfPresentFlag, maxNumSubLayersMinus1) appears in the
VUI and in the VPS.
| Name | Coding | Condition | Description |
|---|---|---|---|
nal_hrd_parameters_present_flag | u(1) | common part | 1: NAL HRD (whole stream) parameters are given |
vcl_hrd_parameters_present_flag | u(1) | common part | 1: VCL HRD (slice data only) parameters are given |
sub_pic_hrd_params_present_flag | u(1) | either flag above | 1: the buffer can work on decoding units smaller than a picture |
tick_divisor_minus2 | u(8) | sub-picture | the sub-picture clock tick is the clock tick ÷ (this + 2) |
du_cpb_removal_delay_increment_length_minus1 | u(5) | sub-picture | bit length of decoding unit removal delays, minus 1 |
sub_pic_cpb_params_in_pic_timing_sei_flag | u(1) | sub-picture | 1: decoding unit delays are in picture timing SEI; 0: in decoding unit information SEI |
dpb_output_delay_du_length_minus1 | u(5) | sub-picture | bit length of pic_dpb_output_du_delay, minus 1 |
bit_rate_scale | u(4) | either flag | scale for bit rates |
cpb_size_scale | u(4) | either flag | scale for buffer sizes |
cpb_size_du_scale | u(4) | sub-picture | scale for decoding unit buffer sizes |
initial_cpb_removal_delay_length_minus1 | u(5) | either flag | bit length of the initial delays in the buffering period SEI, minus 1 |
au_cpb_removal_delay_length_minus1 | u(5) | either flag | bit length of au_cpb_removal_delay_minus1 in picture timing SEI, minus 1 |
dpb_output_delay_length_minus1 | u(5) | either flag | bit length of pic_dpb_output_delay, minus 1 |
fixed_pic_rate_general_flag[i] | u(1) | per sub-layer | 1: constant picture spacing; implies the next flag is 1 |
fixed_pic_rate_within_cvs_flag[i] | u(1) | flag above is 0 | 1: constant picture spacing within each coded video sequence |
elemental_duration_in_tc_minus1[i] | ue(v) | fixed rate | picture spacing in clock ticks, minus 1; 0 to 2047 |
low_delay_hrd_flag[i] | u(1) | not fixed rate | 1: the HRD works in low-delay mode |
cpb_cnt_minus1[i] | ue(v) | low delay flag is 0 | number of alternative buffer specifications, minus 1; 0 to 31 |
sub_layer_hrd_parameters(i) | NAL flag, then again for the VCL flag | see below |
Each sub_layer_hrd_parameters repeats, for each of the
cpb_cnt_minus1 + 1 specifications:
| Name | Coding | Condition | Description |
|---|---|---|---|
bit_rate_value_minus1[i] | ue(v) | bit rate = (this + 1) × 26 + bit_rate_scale bits per second | |
cpb_size_value_minus1[i] | ue(v) | buffer size = (this + 1) × 24 + cpb_size_scale bits | |
cpb_size_du_value_minus1[i] | ue(v) | sub-picture | (this + 1) × 24 + cpb_size_du_scale bits |
bit_rate_du_value_minus1[i] | ue(v) | sub-picture | (this + 1) × 26 + bit_rate_scale bits per second |
cbr_flag[i] | u(1) | 1: constant bit rate |