A picture parameter set, NAL unit type 8, holds settings that can differ from picture to picture. Each slice names the PPS it uses, and each PPS names its SPS. Up to 256 are allowed.
Fields
| Name | Coding | Condition | Description |
|---|---|---|---|
pic_parameter_set_id | ue(v) | 0 to 255 | |
seq_parameter_set_id | ue(v) | 0 to 31 | |
entropy_coding_mode_flag | u(1) | 0 for CAVLC, 1 for CABAC | |
bottom_field_pic_order_in_frame_present_flag | u(1) | ||
num_slice_groups_minus1 | ue(v) | 0 to 7; above 0 uses flexible macroblock ordering | |
| slice group fields | above 0 | ||
num_ref_idx_l0_default_active_minus1 | ue(v) | 0 to 31 | |
num_ref_idx_l1_default_active_minus1 | ue(v) | 0 to 31 | |
weighted_pred_flag | u(1) | 1 enables weighted prediction for P and SP slices | |
weighted_bipred_idc | u(2) | for B slices: 0 default, 1 explicit, 2 implicit | |
pic_init_qp_minus26 | se(v) | initial QP minus 26 | |
pic_init_qs_minus26 | se(v) | −26 to +25, initial QS minus 26, for SP and SI slices | |
chroma_qp_index_offset | se(v) | −12 to +12 | |
deblocking_filter_control_present_flag | u(1) | ||
constrained_intra_pred_flag | u(1) | 1 means intra prediction may use only intra-coded neighbours | |
redundant_pic_cnt_present_flag | u(1) | ||
transform_8x8_mode_flag | u(1) | more data remains | 1 enables the 8 × 8 transform |
pic_scaling_matrix_present_flag | u(1) | more data remains | |
pic_scaling_list_present_flag[i], scaling list | u(1) | flag above is 1 | for i below 6 + (chroma_format_idc is 3 ? 6 : 2) × transform_8x8_mode_flag |
second_chroma_qp_index_offset | se(v) | more data remains | −12 to +12 |
rbsp_trailing_bits |
The last three optional fields are only present if the NAL unit has more data before its trailing bits.
Slice groups
When num_slice_groups_minus1 is above 0:
| Name | Coding | Condition |
|---|---|---|
slice_group_map_type | ue(v) | 0 to 6 |
run_length_minus1[i] | ue(v) | type 0, one per group |
top_left[i], bottom_right[i] | ue(v) × 2 | type 2, one pair per group except the last |
slice_group_change_direction_flag | u(1) | type 3, 4 or 5 |
slice_group_change_rate_minus1 | ue(v) | type 3, 4 or 5 |
pic_size_in_map_units_minus1 | ue(v) | type 6 |
slice_group_id[i] | u(v) | type 6, one per map unit; Ceil(Log2(num_slice_groups_minus1 + 1)) bits |
slice_group_map_type | Pattern |
|---|---|
| 0 | interleaved |
| 1 | dispersed |
| 2 | foreground rectangles with leftover |
| 3 | box-out: clockwise when slice_group_change_direction_flag is 0, counter-clockwise when 1 |
| 4 | raster scan; reverse raster scan when the flag is 1 |
| 5 | wipe right; wipe left when the flag is 1 |
| 6 | explicit: slice_group_id for every map unit |
These are the names of clause 8.2.2 and Table 8-1 of H.264. Types 3 to 5 are changing
slice groups: slice group 0 holds slice_group_change_cycle (from the slice
header) × (slice_group_change_rate_minus1 + 1) map units, up to the whole
picture, in the order named, and slice group 1 the rest. They need exactly two slice
groups.