A sequence parameter set, NAL unit type 7, holds the settings for a whole coded video
sequence. The fields are bit-packed, so they have no fixed offsets; the
coding column shows how each is
read. A file can hold up to 32 sets, numbered by seq_parameter_set_id.
Fields
| Name | Coding | Condition | Description |
|---|---|---|---|
profile_idc | u(8) | the profile | |
constraint_set0_flag … constraint_set5_flag | u(1) × 6 | narrow the profile, see constraint flags | |
reserved_zero_2bits | u(2) | 0 | |
level_idc | u(8) | the level × 10 | |
seq_parameter_set_id | ue(v) | 0 to 31 | |
chroma_format_idc | ue(v) | high profiles | see chroma formats; 1 (4:2:0) when absent |
separate_colour_plane_flag | u(1) | chroma_format_idc is 3 | 1 means the three planes are coded separately |
bit_depth_luma_minus8 | ue(v) | high profiles | luma bit depth minus 8, 0 to 6 |
bit_depth_chroma_minus8 | ue(v) | high profiles | chroma bit depth minus 8, 0 to 6 |
qpprime_y_zero_transform_bypass_flag | u(1) | high profiles | 1 allows lossless transform bypass at QP′ = 0 |
seq_scaling_matrix_present_flag | u(1) | high profiles | 1 means scaling lists follow |
seq_scaling_list_present_flag[i], scaling list | u(1) | the flag above is 1 | for i below 8, or below 12 when chroma_format_idc is 3 |
log2_max_frame_num_minus4 | ue(v) | 0 to 12: frame_num has this + 4 bits | |
pic_order_cnt_type | ue(v) | 0 to 2, see picture order count | |
log2_max_pic_order_cnt_lsb_minus4 | ue(v) | type 0 | 0 to 12 |
delta_pic_order_always_zero_flag | u(1) | type 1 | |
offset_for_non_ref_pic | se(v) | type 1 | |
offset_for_top_to_bottom_field | se(v) | type 1 | |
num_ref_frames_in_pic_order_cnt_cycle | ue(v) | type 1 | 0 to 255 |
offset_for_ref_frame[i] | se(v) | type 1, repeated | |
max_num_ref_frames | ue(v) | 0 to 16 | |
gaps_in_frame_num_value_allowed_flag | u(1) | ||
pic_width_in_mbs_minus1 | ue(v) | width in macroblocks, minus 1 | |
pic_height_in_map_units_minus1 | ue(v) | height in slice-group map units, minus 1 | |
frame_mbs_only_flag | u(1) | 1 means progressive frames only | |
mb_adaptive_frame_field_flag | u(1) | frame_mbs_only_flag is 0 | 1 enables MBAFF |
direct_8x8_inference_flag | u(1) | ||
frame_cropping_flag | u(1) | 1 means the four offsets follow | |
frame_crop_left_offset, …right…, …top…, …bottom… | ue(v) × 4 | flag is 1 | see picture size |
vui_parameters_present_flag | u(1) | 1 means VUI parameters follow | |
rbsp_trailing_bits | see the byte stream page |
The high profile fields appear when profile_idc is 100, 110, 122, 244,
44, 83, 86, 118, 128 or 138.
Chroma formats
chroma_format_idc | Format |
|---|---|
| 0 | monochrome |
| 1 | 4:2:0 |
| 2 | 4:2:2 |
| 3 | 4:4:4 |
Scaling lists
Lists 0 to 5 are 4 × 4 lists of 16 entries; the rest are 8 × 8 lists of 64 entries. Each is coded as a run of differences:
| Name | Coding | Description |
|---|---|---|
delta_scale | se(v) | −128 to +127. The value is next = (last + delta_scale + 256) mod 256. A value of 0 stops the list early, and remaining entries repeat the last value |
Picture order count
pic_order_cnt_type | Method |
|---|---|
| 0 | each slice header carries pic_order_cnt_lsb, and an optional delta for the bottom field |
| 1 | order is calculated from frame_num and a repeating cycle of offsets; slices may carry deltas |
| 2 | display order is the same as decoding order; B pictures are not possible |
Picture size
Width = (pic_width_in_mbs_minus1 + 1) × 16
Height = (2 − frame_mbs_only_flag) × (pic_height_in_map_units_minus1 + 1) × 16
Cropping subtracts from these. Each offset is in crop units: 1 for monochrome or for
4:4:4 with separate planes, otherwise the chroma subsampling factor, and vertical
offsets are doubled when frame_mbs_only_flag is 0. So for 4:2:0:
Width −= 2 × (left + right)
Height −= 2 × (2 − frame_mbs_only_flag) × (top + bottom)
A 1920 × 1080 progressive 4:2:0 stream has 120 macroblocks across and 68 down, a coded size of 1920 × 1088, and a bottom crop offset of 4.
SPS extension
NAL unit type 13 gives alpha plane information for auxiliary coded pictures:
| Name | Coding | Condition | Description |
|---|---|---|---|
seq_parameter_set_id | ue(v) | the SPS this extends | |
aux_format_idc | ue(v) | 0 to 3; 0 means no auxiliary pictures | |
bit_depth_aux_minus8 | ue(v) | above not 0 | 0 to 4 |
alpha_incr_flag | u(1) | above not 0 | |
alpha_opaque_value | u(v) | above not 0 | bit_depth_aux_minus8 + 9 bits |
alpha_transparent_value | u(v) | above not 0 | same width |
additional_extension_flag | u(1) |
Subset SPS
NAL unit type 15 carries the parameters of the extra layers or views of SVC, MVC and
3D streams. A plain decoder ignores it. It starts with the same fields as an ordinary SPS
(up to the VUI), then an extension chosen by profile_idc:
| Name | Coding | Condition | Description |
|---|---|---|---|
| the SPS fields above | up to and including the VUI | ||
seq_parameter_set_svc_extension() | profile 83 or 86 (SVC) | Annex F; not listed here | |
svc_vui_parameters_present_flag | u(1) | SVC | 1: svc_vui_parameters_extension() follows |
bit_equal_to_one | f(1) | profile 118, 128, 134, 135, 138 or 139 | 1 |
seq_parameter_set_mvc_extension() | profile 118, 128 or 134 (MVC, MFC) | see MVC extension | |
mvc_vui_parameters_present_flag | u(1) | MVC | 1: mvc_vui_parameters_extension() follows |
seq_parameter_set_mvcd_extension() | profile 135, 138 or 139 (with depth) | Annex H; not listed here | |
seq_parameter_set_3davc_extension() | profile 139 (3D-AVC) | Annex I; not listed here | |
additional_extension2_flag | u(1) | 0; data after a 1 is ignored | |
rbsp_trailing_bits |
MVC extension
Used by the Multiview High (118), Stereo High (128) and MFC High (134) profiles, as on 3D Blu-ray discs.
| Name | Coding | Condition | Description |
|---|---|---|---|
num_views_minus1 | ue(v) | number of views, minus 1 | |
view_id[i] | ue(v) | per view | the view_id of each view, in view order |
num_anchor_refs_l0[i], anchor_ref_l0[i][j] | ue(v) | per view after the first | views used for inter-view prediction of anchor pictures, list 0 |
num_anchor_refs_l1[i], anchor_ref_l1[i][j] | ue(v) | the same | the same, list 1 |
num_non_anchor_refs_l0[i], non_anchor_ref_l0[i][j] | ue(v) | per view after the first | inter-view references for other pictures, list 0 |
num_non_anchor_refs_l1[i], non_anchor_ref_l1[i][j] | ue(v) | the same | the same, list 1 |
num_level_values_signalled_minus1 | ue(v) | number of levels given, minus 1 | |
level_idc[i] | u(8) | per level | a level |
num_applicable_ops_minus1[i] | ue(v) | per level | operation points at that level, minus 1 |
applicable_op_temporal_id[i][j] | u(3) | per operation point | its highest temporal ID |
applicable_op_num_target_views_minus1[i][j] | ue(v) | per operation point | views to be output, minus 1 |
applicable_op_target_view_id[i][j][k] | ue(v) | per target view | their view IDs |
applicable_op_num_views_minus1[i][j] | ue(v) | per operation point | views needed to decode them, minus 1 |
mfc_format_idc | u(6) | profile 134 | 0: base view packed side by side and the other view top and bottom; 1: the reverse; 2 to 63 reserved |
default_grid_position_flag | u(1) | format 0 or 1 | 0: the four grid positions follow |
view0_grid_position_x, …_y, view1_grid_position_x, …_y | u(4) × 4 | flag above is 0 | sampling grid of each view |
rpu_filter_enabled_flag | u(1) | profile 134 | 1: the reference processing unit filters are used |
rpu_field_processing_flag | u(1) | profile 134, interlaced | 1: the reference processing works on fields |