1// Copyright 2020-2024 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4// Common H.264 Parameter Set descriptions 5// "operationType" attribute specifies whether this is included in the encode or decode section 6 7[[{operationType}-h264-sps]] 8 9H.264 Sequence Parameter Sets (SPS):: 10 11Represented by code:StdVideoH264SequenceParameterSet structures and 12interpreted as follows: 13 14 * code:reserved1 and code:reserved2 are used only for padding purposes and 15 are otherwise ignored; 16 * code:seq_parameter_set_id is used as the key of the SPS entry; 17 * code:level_idc is one of the enum constants 18 `STD_VIDEO_H264_LEVEL_IDC_<major>_<minor>` identifying the H.264 level 19 `<major>.<minor>` as defined in section A.3 of the <<itu-t-h264,ITU-T 20 H.264 Specification>>; 21 * if code:flags.seq_scaling_matrix_present_flag is set, then the 22 code:StdVideoH264ScalingLists structure pointed to by code:pScalingLists 23 is interpreted as follows: 24 ** code:scaling_list_present_mask is a bitmask where bit index [eq]#i# 25 corresponds to `seq_scaling_list_present_flag[i]` as defined in section 26 7.4.2.1 of the <<itu-t-h264,ITU-T H.264 Specification>>; 27 ** code:use_default_scaling_matrix_mask is a bitmask where bit index 28 [eq]#i# corresponds to `UseDefaultScalingMatrix4x4Flag[i]`, when [eq]#i 29 < 6#, or corresponds to `UseDefaultScalingMatrix8x8Flag[i-6]`, 30 otherwise, as defined in section 7.3.2.1 of the <<itu-t-h264,ITU-T 31 H.264 Specification>>; 32 ** code:ScalingList4x4 and code:ScalingList8x8 correspond to the 33 identically named syntax elements defined in section 7.3.2.1 of the 34 <<itu-t-h264,ITU-T H.264 Specification>>; 35 * if code:flags.vui_parameters_present_flag is set, then 36 code:pSequenceParameterSetVui is a pointer to a 37 code:StdVideoH264SequenceParameterSetVui structure that is interpreted 38 as follows: 39 ** code:reserved1 is used only for padding purposes and is otherwise 40 ignored; 41 ** if code:flags.nal_hrd_parameters_present_flag or 42 code:flags.vcl_hrd_parameters_present_flag is set, then the 43 code:StdVideoH264HrdParameters structure pointed to by 44 code:pHrdParameters is interpreted as follows: 45 *** code:reserved1 is used only for padding purposes and is otherwise 46 ignored; 47 *** all other members of code:StdVideoH264HrdParameters are interpreted as 48 defined in section E.2.2 of the <<itu-t-h264,ITU-T H.264 49 Specification>>; 50 ** all other members of code:StdVideoH264SequenceParameterSetVui are 51 interpreted as defined in section E.2.1 of the <<itu-t-h264,ITU-T H.264 52 Specification>>; 53 * all other members of code:StdVideoH264SequenceParameterSet are 54 interpreted as defined in section 7.4.2.1 of the <<itu-t-h264,ITU-T 55 H.264 Specification>>. 56 57[[{operationType}-h264-pps]] 58 59H.264 Picture Parameter Sets (PPS):: 60 61Represented by code:StdVideoH264PictureParameterSet structures and 62interpreted as follows: 63 64 * the pair constructed from code:seq_parameter_set_id and 65 code:pic_parameter_set_id is used as the key of the PPS entry; 66 * if code:flags.pic_scaling_matrix_present_flag is set, then the 67 code:StdVideoH264ScalingLists structure pointed to by code:pScalingLists 68 is interpreted as follows: 69 ** code:scaling_list_present_mask is a bitmask where bit index [eq]#i# 70 corresponds to `pic_scaling_list_present_flag[i]` as defined in section 71 7.4.2.2 of the <<itu-t-h264,ITU-T H.264 Specification>>; 72 ** code:use_default_scaling_matrix_mask is a bitmask where bit index 73 [eq]#i# corresponds to `UseDefaultScalingMatrix4x4Flag[i]`, when [eq]#i 74 < 6#, or corresponds to `UseDefaultScalingMatrix8x8Flag[i-6]`, 75 otherwise, as defined in section 7.3.2.2 of the <<itu-t-h264,ITU-T 76 H.264 Specification>>; 77 ** code:ScalingList4x4 and code:ScalingList8x8 correspond to the 78 identically named syntax elements defined in section 7.3.2.2 of the 79 <<itu-t-h264,ITU-T H.264 Specification>>; 80 * all other members of code:StdVideoH264PictureParameterSet are 81 interpreted as defined in section 7.4.2.2 of the <<itu-t-h264,ITU-T 82 H.264 Specification>>. 83