Sequence_Parameter_SET_RBSP_T structure member and use:
1. Unsigned profile_idc:
It refers to the Profile corresponding to the code stream.
1.1 Baseline Profile (Baseline Profile) Compliance with the baseline PROFILE code should follow the following constraints:
a) Only I and P slices have b) NAL unit stream should not have a range of nal_unit_type values 2 to 4, including the frame_MBS_ONLY_FAG of the 2 and 4.C) Sequence parameter set (SPS), should be equal to 1D) image Weighted_Pred_Flag and Weighted_BIPRED_IDC should be a 0e) Image Parameter (PSP) Entropy_coding_mode_flag should be equal to 0F) Num_SLICE_GROUPS_MINUS1 of the image parameter value (PSP) should be between 0 and 7 ** PSP partial parameters are given in the article on the PSP. g) The Level degree corresponding to the baseline Profile should be met.
Profile_idc in line with the baseline profile is assigned 66. The decoder for the baseline Baseline in line with a certain level should be able to decode all profile_idc equal to 66 code stream or constrained_set0_flag (etc.) is 1 and Level_IDC (In the Level section) Code streams are or equal to a specified Level.
1.2 Main Profile (Main Profile) Compliance with the main profile code stream should follow the following constraints:
a) Only I, P, B slice existence. B) NAL unit flow does not include a value of NAL_UNIT_TYPE values within 2-4. Including 2 and 4.c) Num_SLICE_GROUPS_MINUS1, which cannot be allowed to have a random order (PSP), should only be a 0E) image parameter set (PSP) Redundant_PIC_PRESENT_FLAG should only be 0F) for the Level level required by the main profile Need to be reached.
The profile_idc complies with the main Profile's code stream should be 77. The decoder that meets the main profile of the Specifies Level should be able to decode all the profile_idc 77 or the constrained_set1_flag value is 1 and the level_idc value is less than or equal to the code stream of the specified Level.
1.3 Extended Profile (Extended Profile) Compliance with the extended PROFILE code stream should follow the following constraints:
a) Direct_8x8_inference_flag value of the sequence parameter set should be 1B) Entropy_coding_mode_flag value should be 0c) The value range of Num_SLICE_GROUPS_MINUS1 in the image parameter set is 0 to 7, including 0 and 7D) to the extended profile specified by the extension.
The decoder that meets the specified Level class can decode all the Profile_iDC value of 88 or the constrained_set2_flag value is 1, and the Level_IDC is less than or equal to the specified Level grade code stream.
The decoder that meets the specified Level level can decode all the Profile_IDC value of 66 or the constrained_set0_flag value is 1, and the level_idc is less than or equal to the specified Level grade code stream.
2. constrained_set0_flag When the constrained_set0_flag value is 1, it will indicate that the code stream should follow all the constraints of the baseline profile (on the baseline ", indicating that the code stream does not have to follow all the constraints of the baseline Profile.
3. Constrained_set1_flag When the constrained_set1_flag value is 1, it means that the code stream should follow all the constraints of the master profile (main profile). The Constrained_Set1_Flag value is 0, indicating that the code stream does not have to follow all the constraints of the master profile.
4. Constrained_set2_flag When the constrained_set2_flag value is 1, it will indicate that the code stream should follow all the constraints of the extended profile (Extended profile). Theconstrained_set2_flag value is 0, indicating that the code stream does not have to follow all constraints of the extended Profile. Note: When a value is one value in constraint_set1_flag, constraint_set2_flag, the code stream must meet all corresponding specified Profile constraints.
5. Level_idc It refers to the Level level corresponding to the code stream.
5.1 LEVEL constraints independent of Profile Let FR are such a variable: a) If the image N is one frame, FR is set to 1/172b) If the image N is a field, FR is set to 1 / (172 * 2)
The specified Level under any profile should meet the following constraints:
a) Theoretically accessible unit N will satisfy such a constraint from the removal time of the CPB: t (n) -t (n-1) is larger or equal to the max (picsizeinmbs, maxMbps, fr), MaxMbps is The value of the image N is pointed out in the LEVEL table, and PicsizeInMBS refers to the number of macroblocks in the image N.
b) If the image N is an output image and it is not the last output image of the code stream, the continuous output image taken from the DPB satisfies: DT (n)> = max (picsizeinmbs, maxMbps, fr), maxMbps Refers to the corresponding value for the image N. Picsizeinmbs refers to a macroblock of image N.
c) For the sum of the NumBytesinnalUnit variables of the accessible unit 0, less than or equal to 256 * chromaFormatFactor * (PICSIZEINMBS MAXMBPS * TR (0) -Trn (0) / minCr, maxMBPS and MINCR are image 0 in the Level table Value, PicsizeinMBS is the number of macroblocks of the image 0.
d) The sum of the NumBytesinnalUnit value of the accessible unit N is less than or equal to 256 * chromaFormatFactor * maxMBPS * (Tr (n) -tn (n-1)) / minCr, maxMBPS and MINCR value is the image N in the Level level table The corresponding value.
e) PicWidthinMbs * frameheightinmbs <= maxfs, MAXFS is the value specified in the Level table.
f) picwidthinmbs <= SQRT (MAXFS * 8)
g) frameheightinmbs <= SQRT (MAXFS * 8)
h) max_dec_frame_buffering <= MaxDpbSize, MaxDpbSize equal to Min (1024 * MaxDPB / (PicWidthInMbs * FrameHeightInMbs * 256 * ChromaFormatFactor, 16), MaxDPB MaxDPB value for 1024-byte unit, max_dec_frame_buffering also called DPB size value.
i) For VCL HRD parameter values, at least for a SCHEDSELIDX value, the code rate bitrate [SCHEDSELIDX] <= 1000 * maxbr and cpbsize [schedselidx] <= 1000 * Maxcpb. MaxBr and MaxCPB are values for the 1000bits / S and 1000-bit units corresponding to the Level level table. The code stream should be a value of 0 to CPB_CNT_MINUS1, including 0 and CPB_CNT_MINUS1.CPBSIZE [SCHEDSELIDX] are also called CPB large values.
j) For NAL HRD parameters, Bitrate [SCHSELIDX] <= 1200 * maxbr and cpbsize [schedselidx] <= 1200 * Maxcpb, MaxBr and MaxCPB are values under the 1200BITS / S and 1200-bit unit values under the limit level. The code stream should satisfy a value from 0 to CPB_CNT_MINUS1 in the 0 to CPB_CNT_MINUS1. K) In the brightness frame sampling, the vertical motion vector element range cannot exceed the maxvmvr, the maxvmvr value is provided in the Level limit table.
l) In the brightness frame sampling unit, the horizontal motion vector range cannot exceed -2048 to 2047.75, including -2048 and 2047.75.
m) The number of two consecutive macro motion vectors in decoding order does not exceed MaxmvSper2MB (for the last slice of the current macroblock and the first slice of the next macroblock), the maxmvsper2MB value is in the Level limit table provide.
The value of n) for any macroblock of macroblock_layer () of the bit value can not exceed 128 2048 * ChromaFormatFactor. Entropy_coding_mode_flag value depends on the value macroblock_layer () is calculated by the following manner if the entropy_coding_mode_flag is 0, then, macroblock_layer () by macroblock_layer () For other cases, the macroblock_layer () value for a macroblock is given by read_bits (1).
5.2 Level-related level related to Profile
For baseline Profile, main profile, and extended Profile's corresponding Level grade constraints in the documentation of H.264, there is a table.
6. SEQ_PARAMETER_SET_ID
SEQ_Parameter_set_id specifies the sequence parameter set indicated by the image parameter set. The seq_parameter_set_id value should be from 0 to 31, including 0 and 31 Note: When available, the encoder should use different seq_parameter_set_id values without changing a particular value of Seq_Parameter_Set_ID. The value in the grammatical structure.
7. log2_max_frame_num_minus4
LOG2_MAX_FRAME_NUM_MINUS4 Specifies the value of the variable MaxFramenum, and the value of MaxFramenum = 2 (log2_max_frame_num_minus4 4) log2_max_frame_num_minus should be between 0 and 12, including 0 and 12.
8. PIC_ORDER_CNT_TYPEPIC_ORDER_CNT_TYPE Specifies a method of understanding the order of the image. The value of PIC_ORDER_CNT_TYPE is 0, 1, 2.
Pic_Order_cnt_type is not 2 when a coded video sequence is limited
a) Contains an accessible unit of non-reference frame and follows two accessible units containing non-reference accessible unit b), which contain one of two fields, which forms a complementary non-reference field. Yes, it is followed by an accessible unit including a non-reference image. c) A accessible unit containing a non-reference field and is immediately a visible unit containing another non-reference image, which does not form complementary non-reference field pairs.
9. log2_max_pic_order_cnt_lsb_minus4log2_max_pic_order_cnt_lsb_minus4 MaxPicOrderCntLsb indicated value of the variable, which is used in the decoding process to the image sequence Calcd: MaxPicOrderCntLsb = value 2 (log2_max_pic_order_cnt_lsb_minus4 4) log2_max_pic_order_cnt_lsb_minus4 comprises a value between 0 and 12, and their. 10. DELTA_PIC_ORDER_ALWAYS_ZERO_FLAGDELTA_ALWAYS_ZERO_FLAGDELTA_PIC_ORDER_ALWAYS_ZERO_FLAG is equal to 1 means that when delta_pic_order_cnt [0] and delta_pic_order_cnt [1] do not exist in the sequence of sequences, and is considered to be 0. Delta_pic_order_always_zero_flag value is equal to 0 to show Delta_Pic_Order_cnt [0] exists in the sequence of sequences and delta_pic_order_cnt [1] may exist in the sequence of sequences.
11. OFFSET_FOR_NON_REF_PICOFFSET_FOR_NON_REF_PIC is used to calculate an image sequence value of a non-reference image. OFFSET_FOR_NON_REF_PIC value ranges (-2) ^ (31) to 2 ^ (31) -1, including boundary values.
12. OFFSET_FOR_TOP_TO_BOTTOM_FIELDOFFSET_FOR_TOP_TO_BOTTOM_FIELD is used to calculate the lower image sequence value in one frame. The value of the OFFSET_FOR_TOP_TO_BOTTOM_FIELD value ranges from (-2) ^ (31) to (2) ^ (31) -1, including boundary values.
13. Num_REF_FRAMES_IN_PIC_REF_FRAMES_IN_PIC_ORDER_CNT_CYCLENUM_REF_FRAMES_IN_PIC_REF_FRAMES_IN_PIC_IRDER_CNT_CYCLE is used to calculate image sequence values during decoding process. Num_ref_frames_in_pic_order_cnt_cycle takes a value between 0 and 255, including boundary values.
14. OFFSET_FOR_REF_FRAME [I] Offset_for_ref_frame [i] is an element in a row number_ref_frames_in_pic_order_cnt_cycle, which is used in the decoding order value of the decoding process. The value of OFFSET_FOR_REF_FRAME [I] is (-2) ^ 31 to (2) ^ (31) -1, including boundary values.
15. Num_REF_FRAMESNUM_REF_FRAMES Specifies the maximum total number of long-term and short-term reference frames, complementary reference field pairs, and unpacking reference fields predicted in the decoding process for any sequence. Num_ref_frames also determines the operating size process of the sliding window. Num_ref_frames value between 0-16, including boundary values.
16. GAPS_IN_FRAME_NUM_VALUE_ALLOWED_FLAGGAPS_IN_FRAME_NUM_VALUE_ALLOWED_FLAG value refers to the gap value of Frame_Num allowed by Frame_num and the gap value of Frame_Num during decoding.
17. PIC_WIDTH_IN_MBS_MINUS1PIC_WIDTH_IN_MBS_MINUS1 Plus 1 indicates the width value for each decoded image. The variable value of the image width in the macroblock unit is: picWidthinMBS = PIC_WIDTH_IN_MBS_MINUS1 1; the value of image width variables for brightness elements: PicWidthinsamplesl = PicWidthinMBS * 16; for color elements, image width variables: PicWidthinsamplesc = PicwidthinMbs * 8
18. PIC_HEIGHT_IN_MAP_UNITS_MINUS1PIC_HEIGHT_IN_MAP_UNITS_MINUS1 indicates the height of a slice group in the code frame or field. PicHeightInMapUnits variable values and PicSizeInMapUnits: PicHeightInMapUnits = pic_height_in_map_units_minus1 1; PicSizeInMapUnits = PicWidthInMbs * PicHeightInMapUnits19.frame_mbs_only_flagframe_mbs_only_flag equal to 0 indicates that the video sequence coded picture may be coded frame or coded field. FRAME_MBS_ONLY_FLAG equal to 1 indicates that the encoded image of each encoded video sequence is a coded frame containing only frame macroblocks.
Depends on the value of frame_mbs_only_flag, pic_height_in_map_units_minus1 defined as follows: The frame_mbs_only_flag equal to 0, pic_height_in_map_units_minus1 field macro block unit is as high frame_mbs_only_flag equal to 1, pic_height_in_map_units_minus1 is a wide field macroblock unit
FrameHeightinMbs: frameheightinmbs = (2 - frame_mbs_only_flag) * PicheightInmapUnits
20. MB_ADAPTIVE_FRAME_FIELD_FLAGMB_ADAPTIVE_FRAME_FIELD_FLAG equal to 0 indicates that the frame and field macroblock cannot be switched in one image. MB_ADAPTIVE_FRAME_FIELD_FLAG equal to 1 indicates that there is a possibility of switching in a frame, and it should be assigned when MB_ADAPTIVE_FRAME_FIELD_FLAG is not set.
21. Direct_8x8_inference_flagdirect_8x8_inference_flag indicates a method of generating B_SKIP, B_Direct_16x16 and B_Direct_8x8 in the brightness motion vector. When frame_mbs_only_flag is 0, Direct_8x8_inference_flag should be 1
22. frame_cropping_flagframe_cropping_flag is equal to 1 indicating the frame shear offset parameters used in the SPS in the SPS. Frame_cropping_flag is equal to 0 indicates that the frame shear offset does not exist.
23. frame_crop_lex_offset, frame_crop_right_offset, frame_crop_top_offset, Frame_crop_bottom_offset indicates a sample value in one frame in one window.
24. VUI_Parameters_Present_FlagVUI_Parameters_Present_flag is equal to 1 means VUI_Parameters () exists in the code stream, VUI_Parameters_Present_Flag is equal to 0 indicates that VUI_Parameters () does not exist in the stream.