Subpicture index restriction in video bitstreams
By establishing unified format rules to standardize the use of video stripes and syntax elements, the problem of low efficiency in video image and bitstream conversion during video encoding and decoding is solved, achieving efficient video processing and bandwidth optimization, and is applicable to HEVC and future video encoding and decoding standards.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DOUYIN VISION CO LTD
- Filing Date
- 2021-02-10
- Publication Date
- 2026-07-07
AI Technical Summary
Existing video encoding and decoding technologies suffer from inefficiency and inconsistent format rules when processing the conversion between video images and bitstreams, especially in temporal motion vector prediction and reference image resampling, leading to unreasonable bandwidth usage.
By establishing formatting rules, standardizing the slice type, syntax element values, use of reference image lists, and sub-image boundary operations for video slices, we ensure that video processing methods conform to unified formatting rules. This includes disabling reference image resampling and disabling specific slice types, ensuring that the video slice conversion process is efficient and compliant with the HEVC standard.
It achieves efficient conversion in the video processing process, reduces bandwidth requirements, and improves the efficiency and quality of video encoding and decoding, and is suitable for HEVC and future video encoding and decoding standards.
Smart Images

Figure CN115211107B_ABST
Abstract
Description
[0001] Cross-reference to related applications
[0002] In accordance with applicable patent law and / or the rules applicable to the Paris Convention, this application promptly claims priority and benefit to International Patent Application No. PCT / CN2020 / 075194, filed on February 14, 2020. For all legal purposes, the entire disclosure of the aforementioned application is incorporated herein by reference as a part of the disclosure of this application. Technical Field
[0003] This patent document relates to image encoding and decoding as well as video encoding and decoding. Background Technology
[0004] Digital video accounts for the largest share of bandwidth usage on the Internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demand for digital video is expected to continue to grow. Summary of the Invention
[0005] This document discloses techniques that can be used by video encoders and decoders for video processing, wherein a conversion is performed between the encoded and decoded representation of the video and the pixel values of the video.
[0006] In one example aspect, a video processing method is disclosed. The method includes performing a conversion between a video comprising a video picture with video stripes and a bitstream of the video. The bitstream conforms to a format rule that specifies how the stripe type of the video stripe determines how specific information from the picture header of the video picture is inherited by the stripe header of the video stripe.
[0007] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between a video comprising video images with video stripes and a bitstream of the video. The bitstream conforms to a format rule that specifies the stripe type of the video stripes, determining the value of a first syntax element in the video stripe header. The first syntax element specifies a reference index for the juxtaposed images used for temporal motion vector prediction.
[0008] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between a video comprising video images of video stripes and a bitstream of the video. The bitstream conforms to a format rule that specifies disabling reference image resampling (RPR) of reference images in a list of juxtaposed reference images when the stripe type of the video stripe is P and temporal motion vector prediction is enabled. The reference images are indicated by reference indices of the juxtaposed images of the video stripes used for temporal motion vector prediction.
[0009] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between a video comprising video images with video stripes and a bitstream of the video. The bitstream conforms to a format rule that specifies that the stripe type of the video stripe excludes type P if a syntax element in the video stripe header indicates that the video stripe is not juxtaposed with a list of reference images 0.
[0010] In another example aspect, a video processing method is disclosed. The method includes performing a conversion between a video image comprising one or more sub-images and a bitstream of video. The bitstream conforms to a format rule that specifies the selective inclusion of a first syntax element indicating whether an operation is performed across the boundaries of sub-images in a codec layer video sequence in response to multiple sub-images in the video image.
[0011] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between a video and a bitstream of video images comprising one or more sub-images. The bitstream conforms to a format rule specifying that multiple sub-images in the video images within the bitstream are constrained by constraint flags in the bitstream.
[0012] In another example aspect, a video processing method is disclosed. The method includes performing a conversion between a video image comprising one or more sub-images and a bitstream of video. The bitstream conforms to a format rule that specifies how the number of stripes in the sub-images determines the syntax elements of signaling notifications indicating the width of the stripes, wherein the width of the stripes is specified as the number of slice columns.
[0013] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between a video and a video bitstream comprising a video picture having one or more sub-pictures, according to a format rule specifying whether each of the one or more sub-pictures in the video picture includes a single stripe based on constraint flags.
[0014] In another example aspect, a video processing method is disclosed. The method includes performing a conversion between a video comprising video images and a bitstream of the video. At least one of the video images includes one or more sub-images. The bitstream conforms to a format rule that specifies that, in order to determine the output sub-bitstream of one or more target sub-images during the extraction of the converted sub-image sub-bitstream, each target sub-image across different video images uses the same sub-image index.
[0015] In another example aspect, a video processing method is disclosed. This method includes determining an output sub-bitstream by extracting a sub-bitstream of one or more target sub-pictures from a bitstream of a video comprising video pictures. At least one of the video pictures comprises one or more sub-pictures, and the output sub-bitstream conforms to a format rule specifying that one or more target sub-pictures are represented as a single sub-picture in the output sub-bitstream.
[0016] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between a video comprising an Instantaneous Decoding Refresh (IDR) image and a bitstream of the video. The bitstream conforms to a format rule specifying that one or more syntax elements associated with a list of reference images exist in the stripe header of the IDR image.
[0017] In another example aspect, a video processing method is disclosed. The method includes performing a conversion between a video and a video bitstream, each comprising luma video blocks and chroma video blocks. The luma video blocks are segmented according to a luma segmentation tree, and the chroma video blocks are segmented according to a chroma segmentation tree. The bitstream includes luma block segmentation information indicating the luma segmentation tree and chroma block segmentation information indicating the chroma segmentation tree. The bitstream conforms to rules that allow the chroma block segmentation information to differ from the luma block segmentation information.
[0018] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between a video image comprising one or more sub-images and a bitstream of video. The bitstream conforms to a format rule that specifies one or more syntactic structures constrained based on constraint flags of syntactic elements including general constraint information.
[0019] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between a video comprising a video picture with video stripes and a bitstream of the video. The bitstream conforms to a format rule that specifies how the stripe type of the video stripe determines how specific information from the picture header of the video picture is inherited by the stripe header of the video stripe.
[0020] In another example aspect, a video processing method is disclosed. The method includes performing a conversion between video units within a video region of the video and a codec representation of the video, wherein the codec representation conforms to a syntax rule. This rule specifies that a first indicator at the video picture level and a second indicator at the video region level indicate the use of a temporal motion vector prediction codec tool during the conversion. The rule also specifies conditions under which the first and / or second indicators can be omitted from the codec representation.
[0021] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between video units within a video region of the video and a codec representation of the video, wherein the codec representation conforms to syntax rules; wherein the syntax rules specify that information from video region-level headers is inferred as information from video unit-level headers.
[0022] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between video units within a video region comprising multiple images organized as a layered video sequence and a codec representation of the video; wherein one or more fields in the codec representation indicate multiple sub-images within the video unit.
[0023] In another example aspect, a video processing method is disclosed. The method includes performing a conversion between video units within a video region comprising multiple images organized as a layered video sequence and a codec representation of the video; wherein the codec representation conforms to a format rule specifying that the value of a second field indicating the number of sub-images in the video unit controls whether the second field is suitable for indicating the applicability of a codec tool across sub-images.
[0024] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between video units within a video region comprising multiple images organized as a layered video sequence and a codec representation of the video; wherein the codec representation conforms to a format rule that specifies the number of sub-images for each video unit, controlling the values of syntax elements in the codec representation.
[0025] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between video units within a video region comprising multiple images organized as a layered video sequence and a codec representation of the video, wherein the codec representation conforms to a format rule specifying that field values indicating whether a single video stripe appears within a video unit control the codec characteristics of rectangular stripes of the video.
[0026] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between video units within a video region comprising multiple images organized as a layered video sequence and a codec representation of the video; wherein the codec representation conforms to grammatical rules such that extracted sub-images across different images in the codec representation of the layered video sequence have the same sub-image index.
[0027] In another example aspect, a video processing method is disclosed. This method includes performing a conversion between video units within a video region comprising multiple images organized as a layered video sequence and a codec representation of the video; wherein the codec representation conforms to grammatical rules, i.e., the sub-bitstream extracted for sub-image sub-bitstreams conforms to the format of a single sub-image.
[0028] In another example aspect, a video processing method is disclosed. The method includes performing a conversion between video units within a video region comprising multiple images organized as a layered video sequence and a codec representation of the video; wherein the codec representation conforms to a format rule specifying one or more constraint flags that control the occurrence of one or more syntactic elements in the syntactic structure of the codec representation.
[0029] In yet another example aspect, a video encoder apparatus is disclosed. The video encoder includes a processor configured to implement the methods described above.
[0030] In yet another example aspect, a video decoder apparatus is disclosed. The video decoder includes a processor configured to implement the methods described above.
[0031] In yet another example aspect, a computer-readable medium on which code is stored is disclosed. This code embodies one of the methods described herein in the form of processor-executable code.
[0032] These and other features are described in this document. Attached Figure Description
[0033] Figure 1 This is a block diagram of an example video processing system.
[0034] Figure 2 This is a block diagram of a video processing device.
[0035] Figure 3 This is a flowchart of an example method for video processing.
[0036] Figure 4 This is a block diagram illustrating a video encoding / decoding system according to some embodiments of the present disclosure.
[0037] Figure 5 This is a block diagram illustrating an encoder according to some embodiments of the present disclosure.
[0038] Figure 6 This is a block diagram illustrating a decoder according to some embodiments of the present disclosure.
[0039] Figure 7 This is a flowchart representation of the video processing method based on this technology.
[0040] Figure 8 This is a flowchart representation of another video processing method according to the present technology.
[0041] Figure 9 This is a flowchart representation of another video processing method according to the present technology.
[0042] Figure 10 This is a flowchart representation of another video processing method according to the present technology.
[0043] Figure 11 This is a flowchart representation of another video processing method according to the present technology.
[0044] Figure 12 This is a flowchart representation of another video processing method according to the present technology.
[0045] Figure 13 This is a flowchart representation of another video processing method according to the present technology.
[0046] Figure 14 This is a flowchart representation of another video processing method according to the present technology.
[0047] Figure 15 This is a flowchart representation of another video processing method according to the present technology.
[0048] Figure 16 This is a flowchart representation of another video processing method according to the present technology.
[0049] Figure 17 This is a flowchart representation of another video processing method according to the present technology.
[0050] Figure 18 This is a flowchart representation of another video processing method according to the present technology.
[0051] Figure 19 This is a flowchart representation of another video processing method based on this technology. Detailed Implementation
[0052] The use of chapter headings in this document is for ease of understanding and does not imply that the technologies and embodiments disclosed in each chapter are applicable only to that chapter. Furthermore, the use of H.266 terminology in some specifications is merely for ease of understanding and not to limit the scope of the disclosed technologies. Thus, the technologies described herein are also applicable to other video codec protocols and designs. Additionally, examples illustrating how the current version of the VCC standard can be modified by inserting new text (highlighting) or deleting the current text (strikethrough) are provided to illustrate some of the technologies.
[0053] This document relates to video codec technology. Specifically, it concerns High-Level Syntax (HLS) and related technologies in video codecs. It can be applied to existing video codec standards such as HEVC or standards to be implemented (General Video Codec). It can also be applied to future video codec standards or video codecs.
[0054] Video codec standards have primarily evolved through the development of well-known ITU-T and ISO / IEC standards. ITU-T developed H.261 and H.263, while ISO / IEC developed MPEG-1 and MPEG-4 Visual. These two organizations jointly developed the H.262 / MPEG-2 video standard, the H.264 / MPEG-4 Advanced Video Codec (AVC) standard, and the H.265 / HEVC standard. Since H.262, video codec standards have been based on a hybrid video codec architecture, employing temporal prediction plus transform coding. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Group (JVET) in 2015. Since then, many new methods have been adopted by JVET and applied to reference software called the Joint Exploration Model (JEM). JVET meetings are held quarterly, and the goal of new codec standards is to reduce the bitrate by 50% compared to HEVC. At the JVET meeting in April 2018, the new video codec standard was officially named Universal Video Codec (VVC), and the first version of the VVC Test Model (VTM) was released at that time. With ongoing efforts to standardize VVC, each JVET meeting adopts new codec technologies for the VVC standard.
[0055] Example Definition
[0056] The following definitions are used in this document.
[0057] Access Unit (AU): A collection of PUs belonging to different layers, and containing codec images associated with the same time for output from the DPB.
[0058] Adaptive Loop Filter (ALF): A filtering process applied as part of the decoding process and controlled by parameters transmitted in the APS.
[0059] AC transform coefficients: Any transform coefficients in which the frequency index of at least one of the two dimensions is non-zero.
[0060] ALF APS: APS that controls the ALF process.
[0061] Adaptive Parameter Set (APS): A syntactic structure containing syntactic elements that are definitively applicable to zero or more stripes, as determined by zero or more syntactic elements found in the strip header.
[0062] (For a specific image) Associated IRAP image: The preceding IRAP image in the decoding order that has the same nuh_layer_id value as the specific image (if it exists).
[0063] Associated non-VCL NAL units: Non-VCL NAL units of VCL NAL units (when present), where VCLNAL units are associated VCL NAL units of non-VCL NAL units.
[0064] The associated VCL NAL unit: the preceding VCL NAL unit in the decoding order of non-VCL NAL units in the range of EOS_NUT, EOB_NUT, SUFFIX_APS_NUT, SUFFIX_SEI_NUT, FD_NUT, RSV_NVCL_27 or UNSPEC_30…UNSPEC_31; or the next VCL NAL unit in the decoding order.
[0065] Binary bit: One bit of a binary string.
[0066] Binarization: A set of binary bit strings used for all possible values of a syntax element.
[0067] Binarization: The unique mapping process that maps all possible values of a syntax element to a set of binary bit strings.
[0068] Binary partitioning: Divide the rectangular MxN block of the sample points into two blocks, where vertical partitioning produces the first (M / 2)xN block and the second (M / 2)xN block, and horizontal partitioning produces the first Mx(N / 2) block and the second Mx(N / 2) block.
[0069] Binary bit string: An intermediate binary representation of the binary representation of a syntax element value derived from a syntax element.
[0070] Dual Prediction (B) Strip: A stripe that is decoded using intra-frame prediction or inter-frame prediction using up to two motion vectors and reference indices to predict sample values for each block.
[0071] Bitstream: A sequence of bits in the form of a NAL single bitstream or byte stream, which forms the identifier of an AU sequence. An AU sequence forms one or more codec video sequences (CVS).
[0072] Block: An MxN (M columns x N rows) array of sample points, or an MxN array of transform coefficients.
[0073] Block vector: A two-dimensional vector used for IBC prediction that provides the offset from the coordinates of the current codec block to the coordinates of the predicted block in the same decoded picture.
[0074] Byte: An 8-bit sequence that, when written or read as a bit value sequence, has its leftmost and rightmost bits representing the most significant bit and least significant bit, respectively.
[0075] Byte alignment: A position in a bitstream is byte-aligned when it is an 8-bit multiple of the position of the first bit in the bitstream; and it is said to be byte-aligned when a bit, byte, or syntax element appears in a bitstream at a byte-aligned position.
[0076] Byte stream: A wrapper around a NAL unit stream that includes a start code prefix and NAL units.
[0077] "May": A term used to refer to actions that are permitted but not necessarily required.
[0078] Chromaticity: An adjective, represented by the symbols Cb and Cr, specifying that an array of samples or a single sample represents one of two color difference signals associated with a primary color. It is important to note that the term chroma is used instead of chrominance to avoid using the meaning of linear light transmission characteristics typically associated with the term chrominance.
[0079] Clean Random Access (CRA) PU: where the encoded / decoded image is a PU of the CRA image.
[0080] Clean Random Access (CRA) Picture: The IRAP picture for each VCL NAL unit whose nal_unit_type is equal to CRA_NUT. It's important to note that a CRA picture does not refer to any picture other than itself used for inter-frame prediction during its decoding process, and can be the first picture in the bitstream in the decoding order, or it can appear later in the bitstream. A CRA picture may have an associated RADL or RASL picture. When the NoOutputBeforeRecoveryFlag of a CRA picture is equal to 1, the decoder will not output the associated RASL picture because it may be undecodeable due to the possibility that it contains references to pictures that do not exist in the bitstream.
[0081] Codec Layer Video Sequence (CLVS): A sequence of PUs with the same nuh_layer_id value consists of CLVSS PUs in decoding order, followed by zero or more non-CLVSS PUs, including all subsequent PUs but excluding any subsequent PUs that are CLVSS PUs. It is important to note that a CLVSS PU can be an IDR PU, a CRA PU, or a GDR PU. For each IDR PU, each CRA PU with HandleCraAsCvsStartFlag equal to 1, and each CRA or GDR PU that is the first PU in a bitstream layer in decoding order or the first PU in a bitstream layer after an EOS NAL unit in decoding order, the NoOutputBeforeRecoveryFlag value is equal to 1.
[0082] Start of Codec Layer Video Sequence (CLVSS) PU: where the codec image is the PU of the CLVSS image.
[0083] Codec Layer Video Sequence Start (CLVSS) Image: A codec image that serves as an IRAP image, where NoOutputBeforeRecoveryFlag equals 1, or a GDR image where NoOutputBeforeRecoveryFlag equals 1.
[0084] Image encoding / decoding: The image encoding / decoding representation includes a VCLNAL unit with a specific value of nuh_layer_id within the AU, and contains all CTUs of the image.
[0085] Codec Picture Buffer (CPB): A first-in, first-out buffer that contains DUs in the order specified in the reference decoder.
[0086] Encoding / decoding representation: Data elements represented according to their encoding / decoding format.
[0087] Coded Video Sequence (CVS): An AU sequence consisting of CVSS AUs in decoding order, followed by zero or more non-CVSS AUs, including all subsequent AUs, but excluding any subsequent AUs that are CVSS AUs.
[0088] Start of Codec Video Sequence (CVSS) AU: where each layer in the CVS has an AU for the PU, and the codec image in each PU is a CLVSS image.
[0089] Code block: An MxN block of samples with M and N values. Dividing the CTB into code blocks is a form of segmentation.
[0090] Code-decoder block (CTB): An N×N sample block with a certain N value. Dividing the components into CTBs is a kind of segmentation.
[0091] Code-decode tree unit (CTU): CTB of luminance samples, two corresponding CTBs of chrominance samples of an image with a three-sample array, or CTB of samples of a monochrome image, or an image encoded and decoded using three separate color planes and a syntax structure for encoding and decoding samples.
[0092] Codec Unit (CU): A codec block for luminance samples, two corresponding codec blocks for chrominance samples of an image with three sample arrays, or a codec block for samples of a monochrome image, or an image encoded and decoded using three separate color planes and a syntax structure for encoding and decoding samples.
[0093] Component: A single sample point in an array or in an array of three arrays (luminance and two chrominance) constituting a 4:2:0, 4:2:2, or 4:4:4 color format image, or a single sample point in an array or in an array constituting a monochrome format image.
[0094] Context variables: Variables defined for the adaptive binary arithmetic decoding process of binary bits through equations that include the most recently decoded binary bits.
[0095] Deblocking filter: A filtering process applied as part of the decoding process to minimize the appearance of visual artifacts at the boundaries between blocks.
[0096] Decoded image: An image generated by applying a decoding process to an encoded image.
[0097] Decoded Picture Buffer (DPB): A buffer that holds the decoded picture and is used to assume references, output reordering, or output delays specified by the reference decoder.
[0098] Decoder: An example of the decoding process.
[0099] Decoding order: The order in which syntax elements are processed during the decoding process.
[0100] Decoding process: This manual describes the process of reading the bitstream and deriving the decoded image from it.
[0101] Decoding Unit (DU): If DecodingUnitHrdFlag equals 0, it is an AU; otherwise, it is a subset of the AU, consisting of one or more VCLNAL units in the AU and associated non-VCL NAL units.
[0102] Simulation prevents bytes: When the syntax elements of a bitstream form a pattern of certain byte values in a way that ensures that consecutive byte-aligned sequences in a NAL unit do not contain start code prefixes, a byte equal to 0x03 exists in the NAL unit.
[0103] Encoder: An example of the encoding process.
[0104] Encoding process: The process of generating a bitstream that conforms to this specification, which is not specified in this specification.
[0105] Fill data NAL units: NAL units where nal_unit_type is equal to FD_NUT.
[0106] Flags: can take one of two possible values: variables of 0 and 1 or a single bit syntax element.
[0107] Frequency index: A one-dimensional or two-dimensional index associated with the transform coefficients before the transform is applied during the decoding process.
[0108] Progressive Decode Refresh (GDR) AU: where the codec image in each current PU is the AU of the GDR image.
[0109] Progressive Decoding Refresh (GDR) PU: where the encoded / decoded image is the PU of the GDR image.
[0110] Progressive Decoding Refresh (GDR) Image: The image for each VCL NAL unit where nal_unit_type is equal to GDR_NUT.
[0111] Hypothetical Reference Decoder (HRD): A hypothetical decoder model that specifies the variability constraints of the consistent NAL unit stream or consistent byte stream that the encoding process may produce.
[0112] Hypothetical Stream Scheduler (HSS): A hypothetical decoder model used to check the consistency of bitstreams or decoders in terms of timing and data flow when inputting bitstreams into hypothetical reference decoders.
[0113] Informative: This term is used to refer to a term provided in this specification that does not establish any mandatory requirements consistent with this specification and is therefore not considered part of this specification.
[0114] Instantaneous Decoding Refresh (IDR) PU: where the encoded and decoded image is the PU of the IDR image.
[0115] Instantaneous Decoding Refresh (IDR) Picture: An IRAP picture for each VCL NAL unit whose nal_unit_type is equal to IDR_W_RADL or IDR_N_LP. Note that the IDR picture does not reference any picture other than itself used for inter-frame prediction during its decoding process and can be the first picture in the bitstream in decoding order, or it can appear later in the bitstream. Each IDR picture is the first picture of the CVS in decoding order. When the IDR picture for each VCL NAL unit has nal_unit_type equal to IDR_W_RADL, it may have an associated RADL picture. When the IDR picture for each VCL NAL unit has nal_unit_type equal to IDR_N_LP, it has no associated preceding picture. IDR pictures do not have associated RASL pictures.
[0116] Interlayer Reference Image (ILRP): An image located in the same AU as the current image, where nuh_layer_id is less than the nuh_layer_id of the current image, and is marked as "for long-term reference".
[0117] Inter-frame encoding / decoding: Encoding / decoding of blocks, stripes, or pictures that use inter-frame prediction.
[0118] Inter-frame prediction: Predictions derived in a manner that depends on data elements (e.g., sample values or motion vectors) from one or more reference images.
[0119] Intra-Block Copy (IBC) prediction: A prediction derived in a manner that relies on the same decoding strip without referencing data elements (e.g., sample values or block vectors) of a reference image.
[0120] Intra-frame coding and decoding: Coding and decoding of codec blocks, stripes, or pictures using intra-frame prediction.
[0121] Intra-frame prediction: Predictions derived only from data elements (e.g., sample values) within the same decoded strip without referencing a reference image.
[0122] Inter-Frame Random Access Point (IRAP) AU: where each layer in the CVS has a PU and the codec image in each PU is the AU of the IRAP image.
[0123] Intra-Frame Random Access Point (IRAP) PU: where the encoded / decoded image is the PU of the IRAP image.
[0124] Intra-Frame Random Access Point (IRAP) Picture: A codec picture in which all VCLNAL units have the same nal_unit_type value in the range IDR_W_RADL to CRA_NUT (inclusive). Note that the IRAP picture does not refer to any picture other than itself used for inter-frame prediction during its decoding process and can be either a CRA picture or an IDR picture. The first picture in the bitstream in decoding order must be an IRAP or GDR picture. If the necessary parameter set is available when referenced, the IRAP picture and all subsequent non-RASL pictures in the decoding order in the CVS can be decoded correctly without performing decoding on any pictures preceding the IRAP picture in decoding order. It should also be noted that the value of mixed_nalu_types_in_pic_flag for the IRAP picture is equal to 0. When the mixed_nalu_types_in_pic_flag of an image is equal to 0, and the nal_unit_type of any stripe of the image is in the range from IDR_W_RADL to CRA_NUT (inclusive), all other stripes of the image have the same nal_unit_type value, and the image is called an IRAP image.
[0125] Intra-frame (I) stripe: A stripe that is decoded using only intra-frame prediction.
[0126] Layer: The set of all VCLNAL cells with a specific value of nuh_layer_id, and the associated non-VCL NAL cells.
[0127] Foreground image: The image that is in the same layer as the associated IRAP image and is placed before the associated IRAP image in the output order.
[0128] Leaf: The terminal node of a tree that serves as the root node of a tree with a depth of 0.
[0129] Level: A set of constraints defining the values or pre-scale transformation coefficients that may be taken for the syntax elements and variables of this specification. It is important to note that all profiles define the same set of levels, where most aspects defined at each level are common across different profiles. Within the specified constraints, individual implementations may support different levels for each supported profile.
[0130] List 0 (List 1) motion vector: The motion vector associated with the reference index pointing to the reference image List 0 (List 1).
[0131] List0 (List1) Prediction: Inter-frame prediction of strip content using a reference index pointing to the reference image List0 (List1).
[0132] LMCS APS: APS that controls the LMCS process.
[0133] Long-Term Reference Image (LTRP): An image whose nuh_layer_id is equal to the nuh_layer_id of the current image and is marked as "for long-term reference".
[0134] Luminance: An adjective, denoted by the symbol or subscript Y or L, specifying that an array of samples or a single sample represents a monochromatic signal associated with a primary color. Note that the term luma is used instead of luminance to avoid using the meaning of linear light transmission characteristics usually associated with the term luminance. Sometimes the symbol L is used instead of the symbol Y to avoid confusion with the symbol y used for vertical positions.
[0135] Luminance Mapping with Chroma Scaling (LMCS): A process applied as part of the decoding process that maps luminance samples to specific values and can apply scaling operations to the values of chroma samples.
[0136] Possibly: A term used to refer to actions that are permitted but not necessarily required. Note that the phrase "possibly or impossibly" is used in places intended to emphasize the optional nature of the described action. The use of this term in this document is merely to highlight exemplary embodiments of the requirement adopted by codec standards and does not limit the scope of the disclosed technology.
[0137] Motion vector: A two-dimensional vector used for inter-frame prediction that provides the offset from coordinates in the decoded image to coordinates in the reference image.
[0138] Multi-type tree: A tree in which a parent node can be divided into two child nodes using a binary partition or into three child nodes using a ternary partition, and each child node can become the parent node of another node divided into two or three child nodes.
[0139] Must: A term used to indicate an observation of the meaning of a requirement or requirement specified elsewhere in this specification (used only in the information context). The use of this term in this document is solely to emphasize an example embodiment of the requirement adopted by the codec standard, and not to limit the scope of the disclosed technology.
[0140] Network Abstraction Layer (NAL) Unit: A syntax structure that contains an indication of the data type to be followed, and bytes containing that data, in RBSP form, with emulation prevention bytes scattered where necessary.
[0141] Network Abstraction Layer (NAL) Unit Flow: NAL unit sequence.
[0142] Note: Terms used for prefixed informational notes (used only in the informational context).
[0143] Operation point (OP): A temporal subset of OLS, identified by the highest value of the OLS index and TemporalId.
[0144] Output layer: The layer that is the set of output layers.
[0145] Output Layer Set (OLS): A hierarchy consisting of a set of defined layers, where one or more layers in the set are designated as output layers.
[0146] Output Layer Set (OLS) Layer Index: The index from the layers in the OLS to the list of layers in the OLS.
[0147] Output order: The order in which decoded images are output from the DPB (used to specify the decoded images to be output from the DPB).
[0148] Output time: Based on the output timing DPB operation, the time specified by HRD for outputting the decoded image from the DPB (used to output the decoded image from the DPB).
[0149] Parameter: A syntax element of the Sequence Parameter Set (SPS) or Picture Parameter Set (PPS), or the second word defining the term quantization parameter.
[0150] Partitioning: Dividing a set into subsets such that each element of the set is located in exactly one of the subsets.
[0151] Images: A monochrome luminance sample array or a luminance sample array and two corresponding chrominance sample arrays in 4:2:0, 4:2:2, and 4:4:4 color formats. Note that images can be frames or fields. However, in a CVS, either all images are frames or all images are fields.
[0152] Image Header (PH): A syntactic structure containing the syntactic elements applicable to encoding and decoding images.
[0153] Image-level stripe index: When rect_slice_flag equals 1, the index of the stripe list in the image is given according to the order of signaling notification in PPS.
[0154] Image Order Count (POC): A variable associated with each image, uniquely identifying the associated image among all images in the CLVS, and indicating the position of the associated image in the output order relative to the output order of other images in the same CLVS that will be output from the DPB when the associated image is output from the DPB.
[0155] Picture Parameter Set (PPS): A syntax structure, as determined by the syntax elements in each stripe header, containing syntax elements applicable to zero or more complete encode / decode pictures.
[0156] Picture Unit (PU): A set of NAL units that are interconnected according to a defined classification rule, are sequential in decoding order, and contain only one encoded / decoded picture.
[0157] Prediction: An example of the prediction process.
[0158] Prediction process: Use the predicted values to estimate the data elements currently being decoded (e.g., sample values or motion vectors).
[0159] Predictive (P) stripe: A stripe that uses intra-frame prediction or inter-frame prediction (with at most one motion vector and reference index) to decode and predict the sample values for each block.
[0160] Predicted value: A specified value used in the decoding of subsequent data elements or a combination of previously decoded data elements (e.g., sample values or motion vectors).
[0161] Brief: A subset of the syntax rules of this specification.
[0162] A quadtree is a tree in which a parent node can be divided into four child nodes, and each child node can become the parent node of another tree divided into four child nodes.
[0163] Quantization parameters: Variables used to scale the transform coefficient level during the decoding process.
[0164] Random access: The behavior of starting the bitstream decoding process at a point other than the start point of the stream.
[0165] Random Access Decodeable Preamble (RADL) PU: where the encoded / decoded image is the PU of the RADL image.
[0166] Random Access Decodable Preamble (RADL) Images: Encoded / decoded images for each VCLNAL unit whose nal_unit_type equals RADL_NUT. Note that all RADL images are preamble images. RADL images are not used as reference images in the decoding process of subsequent images of the same associated IRAP image. When field_seq_flag equals 0, all RADL images (if present) will be decoded before all non-preamble images of the same associated IRAP image in the decoding order.
[0167] Random Access Skip Preamble (RASL) PU: The PU that encodes and decodes an image as a RASL image.
[0168] Random Access Skip Preamble (RASL) Picture: The codec picture for each VCL NAL unit whose nal_unit_type equals RASL_NUT. Note that all RASL pictures are preamble pictures of their associated CRA pictures. When the NoOutputBeforeRecoveryFlag of the associated CRA picture is 1, the RASL picture will not be output and may not be decoded correctly because the RASL picture may contain references to pictures that do not exist in the bitstream. RASL pictures are not used as reference pictures in the decoding process of non-RASL pictures. When field_seq_flag is 0, all RASL pictures (if they exist) will be decoded before all non-preamble pictures of the same associated CRA picture in the decoding order.
[0169] Raster scanning: A mapping from a rectangular two-dimensional pattern to a one-dimensional pattern, such that the first entry in the one-dimensional pattern starts from the first top row of the two-dimensional pattern scanned from left to right, followed by the second, third, and so on rows of each pattern scanned from left to right (downwards).
[0170] Raw Byte Sequence Payload (RBSP): A syntax structure containing an integer number of bytes encapsulated in NAL units, which is either empty or has the form of a string of data bits containing syntax elements, followed by RBSP stop bits and zero or more subsequent bits equal to 0.
[0171] Raw Byte Sequence Payload (RBSP) Stop Bit: A bit equal to 1 in the Raw Byte Sequence Payload (RBSP) that is located after a sequence of data bits. The position of the end of the RBSP can be identified by searching for the RBSP stop bit (the last non-zero bit in the RBSP).
[0172] Reference Index: Index of the list of reference images.
[0173] Reference image: An image used as a short-term reference image, a long-term reference image, or an inter-layer reference image. Note that the reference image contains samples that can be used for inter-frame prediction in the decoding order of subsequent images.
[0174] Reference Image List: A list of reference images used for inter-frame prediction in P-bands or B-bands. Note that two reference image lists, Reference Image List 0 and Reference Image List 1, are generated for each band of non-IDR images. The unique set of images referenced by all entries in the two reference image lists associated with an image consists of all the reference images that can be used for inter-frame prediction of the associated image or any image after the associated image in decoding order. For P-band decoding, only Reference Image List 0 is used for inter-frame prediction. For B-band decoding, both Reference Image List 0 and Reference Image List 1 are used for inter-frame prediction. For decoding I-band stripe data, there is no reference image list used for inter-frame prediction.
[0175] Reference image list 0: A list of reference images for inter-frame prediction of P or a first list of reference images for inter-frame prediction of B strips.
[0176] Reference Image List 1: A second list of reference images used for inter-frame prediction of B-band.
[0177] Reserved: A term that may be used to specify certain values of a particular syntax element for future use by ITU-T|ISO / IEC and should not be used for bitstreams conforming to this version of the specification, but may be used for bitstreams conforming to future extensions of the specification by ITU-T|ISO / IEC.
[0178] Residual: The difference between the predicted value and the decoded value of a sample or data element.
[0179] Scaling: The process of multiplying the transformation coefficient level by a factor to obtain the transformation coefficient.
[0180] Scaling list: A list that associates each frequency index with a scaling factor in the scaling process.
[0181] Scaling List APS: An APS with syntax elements for constructing a scaling list.
[0182] Sequence Parameter Set (SPS): Contains the grammatical structure of grammatical elements applicable to zero or more complete CLVSs, as determined by the contents of the grammatical elements found in the PPS referenced by the grammatical elements in each image header.
[0183] "Should": This term is used to indicate compliance with the mandatory requirements of this specification. Note that when used to indicate mandatory constraints on the values of syntax elements or on the results obtained through operations specified in the decoding process, the encoder is responsible for ensuring that the constraints are met. Any decoding process that produces the same cropped decoded image as the output of the decoding process described in this specification, when used with reference to the operations performed in the decoding process, conforms to the decoding process requirements of this specification. The use of this term in this document is merely to emphasize exemplary embodiments of the codec standard adopting this requirement and is not intended to limit the scope of the disclosed technology.
[0184] Short-term reference image (STRP): An image whose nuh_layer_id is equal to the nuh_layer_id of the current image and is marked as "used for short-term reference".
[0185] "Should": A term used to refer to actions that are encouraged to be followed under normal, expected circumstances, but are not mandatory requirements of this specification. The use of this term in this document is merely to emphasize exemplary embodiments of the requirement in the codec standard, and not to limit the scope of the disclosed technology.
[0186] Strip: An integer number of complete slices or integer number of consecutive complete CTU lines contained within a single NAL unit of an image.
[0187] Slice header: A part of the codec slice that contains data elements related to all slices or CTU lines represented in the slice.
[0188] Source: Terms used to describe video material or certain properties before encoding.
[0189] Start code prefix: A unique three-byte sequence equal to 0x000001 that serves as the prefix for each NAL unit embedded in the byte stream. Note that the position of the start code prefix can be used by the decoder to identify the beginning of a new NAL unit and the end of a previous NAL unit. Emulation prevention bytes can be included to prevent emulation of the start code prefix within a NAL unit.
[0190] Stepwise Temporal Sublayer Access (STSA) PU: where the encoded / decoded image is the PU of the STSA image.
[0191] Stepwise Temporal Sublayer Access (STSA) Picture: The codec picture for each VCLNAL unit whose nal_unit_type is equal to STSA_NUT. Note that for inter-frame prediction reference, STSA pictures do not use pictures with the same TemporalId as the STSA picture. For inter-frame prediction reference, pictures following STSA pictures with the same TemporalId as the STSA picture in decoding order do not use pictures preceding STSA pictures with the same TemporalId as the STSA picture. STSA pictures enable switching upwards from the immediately adjacent lower sublayer at the STSA picture to the sublayer containing the STSA picture. The TemporalId of the STSA picture must be greater than 0.
[0192] Data Bit String (SODB): A sequence of bits representing some of the syntax elements present in the original byte sequence payload before the stop bits, where the leftmost bit is considered the first and most significant bit, and the rightmost bit is considered the last and least significant bit.
[0193] Sub-bitstream extraction process: A defined process by which NAL units in the bitstream that do not belong to the target set (determined by the target OLS index and the highest TemporalId of the target) are removed from the bitstream, wherein the output sub-bitstream consists of NAL units in the bitstream that belong to the target set.
[0194] Sub-layer: The time-domain scalable layer of the time-domain scalable bitstream consists of VCLNAL units with specific values of the TemporalId variable and associated non-VCLNAL units.
[0195] Sublayer representation: A subset of bitstream consisting of a specific sublayer and NAL units of a lower sublayer.
[0196] Sub-image: A rectangular area containing one or more stripes within an image.
[0197] Sub-image level stripe index: When rect_slice_flag equals 1, the index of the stripe list in the sub-image according to the order of signaling notification in PPS.
[0198] Supplemental Enhancement Information (SEI) messages: These are syntactic structures with defined semantics that deliver information not required during the decoding process to determine the values of samples in the decoded image.
[0199] Syntax element: The data element represented in the bit stream.
[0200] Syntax structure: Zero or more syntax elements that appear together in a bitstream in a prescribed order.
[0201] Tripartite partitioning: Divide the rectangular MxN block of the sample points into three blocks. The vertical partitioning produces the first (M / 4)xN block, the second (M / 2)xN block, and the third (M / 4)xN block. The horizontal partitioning produces the first Mx(N / 4) block, the second Mx(N / 2) block, and the third Mx(N / 4) block.
[0202] Hierarchy: A level constraint of a specified category imposed on the values of syntax elements in a bitstream, where level constraints are nested within hierarchies, and a decoder that conforms to a certain hierarchy and level will be able to decode all bitstreams that conform to the same hierarchy or lower hierarchy or any hierarchy below that level.
[0203] A slice: A rectangular area of CTU within a specific slice column or row in an image.
[0204] Image Array: A rectangular area of CTU with a height equal to the height of the image, and a width specified by the syntax elements in the image parameter set.
[0205] A frame is a rectangular area of a CTU whose height is specified by the syntax element in the image parameter set and whose width is equal to the width of the image.
[0206] Piece scan: A specific sequence order of CTUs in a segmented image, where the CTUs are sequentially ordered in a CTU raster scan of the image, and the slices in the image are sequentially arranged in a slice raster scan of the image.
[0207] Subsequent images: Non-IRAP images that follow the associated IRAP image in output order, and are not STSA images. Note that subsequent images associated with an IRAP image also follow the IRAP image in decoding order. Images that follow the associated IRAP image in output order but precede the associated IRAP image in decoding order are not allowed.
[0208] Transformation: A part of the decoding process that converts blocks of transform coefficients into blocks of spatial values.
[0209] Transform block: A rectangular MxN sample block generated during the decoding process based on the transformation.
[0210] Transform coefficients: During the decoding process, scalars that are associated with a specific one-dimensional or two-dimensional frequency index in the transform are considered to be in the frequency domain.
[0211] Transform coefficient level: An integer representing the value associated with a specific two-dimensional frequency index during the decoding process before scaling the transform coefficient values is calculated.
[0212] Transform Unit (TU): When a single codec unit tree is used for luminance and chrominance, the transform block of the luminance sample and the two corresponding transform blocks of the chrominance sample; or, when two separate codec unit trees are used for luminance and chrominance, the transform block of the luminance sample or the two transform blocks of the chrominance sample, and the syntax structure for transforming the transform block samples.
[0213] Tree: A tree is a finite set of nodes with a unique root node.
[0214] Unspecified: A term that may be used to specify some values for a particular syntactic element to indicate that these values do not have a specified meaning in this specification and will not have a specified meaning as part of future versions of this specification.
[0215] Video codec layer (VCL) NAL unit: A collective term for codec strip NAL units and subsets of NAL units, which have reserved values for nal_unit_type, which are classified as VCL NAL units in this specification.
[0216] Some example bitstream and image formats, partitions, scanning processes, and proximity relationships are described below.
[0217] 6.3 Partitioning of Images, Sub-images, Strips, Slices, and CTUs
[0218] 6.3.2 Block, Quadtree, and Multiple Tree Structures
[0219] Samples are processed in units of CTB. The array size of each luminance CTB is CtbSizeY (in samples) in both width and height. The array width and height of each chrominance CTB are CtbWidthC and CtbHeightC (in samples), respectively.
[0220] Each CTB is assigned a segmentation signaling to identify the block size used for intra-frame or inter-frame prediction and transform encoding / decoding. Segmentation is a recursive quadtree segmentation. The root of the quadtree is associated with the CTB. The quadtree is divided until a leaf is reached, which is called a quadtree leaf. When the component width is not an integer multiple of the CTB size, the CTB at the right component boundary is incomplete. When the component height is not an integer multiple of the CTB size, the CTB at the bottom component boundary is incomplete.
[0221] The codec block is the root node of two trees (prediction tree and transform tree). The prediction tree specifies the position and size of the prediction block. The transform tree specifies the position and size of the transform block. The luminance and chrominance partitioning information is the same for the prediction tree, but may or may not be the same for the transform tree.
[0222] Blocks and associated syntactic structures are grouped into “unit” structures, as shown below:
[0223] – A transform block (for monochrome images or images with separate_colour_plane_flag equal to 1) or three transform blocks (luminance and chrominance components of images in 4:2:0, 4:2:2, or 4:4:4 color formats) and associated transform syntax structure units are associated with the transform unit.
[0224] – One codec block (monochrome image or separate_colour_plane_flag equal to 1) or three codec blocks (luminance and chrominance), with associated codec syntax structures and associated transform units associated with the codec units.
[0225] – One CTB (monochrome image or separate_colour_plane_flag equal to 1) or three CTBs (luminance and chrominance), the associated codec tree syntax structure and the associated codec unit are associated with the CTU.
[0226] 7. Syntax and Semantics
[0227] 7.3 Grammar in Tabular Form
[0228] 7.3.1 NAL Unit Syntax
[0229] 7.3.1.1 General NAL Unit Syntax
[0230]
[0231] 7.3.1.2 NAL Unit Header Syntax
[0232]
[0233] 7.3.2 Raw Byte Sequence Payload, Subsequent Bits, and Byte Alignment Syntax
[0234] 7.3.2.1 Decoding Capability Information RBSP Syntax
[0235]
[0236] 7.3.2.2 Video Parameter Set (RBSP) Syntax
[0237]
[0238]
[0239]
[0240] 7.3.2.3 Sequence Parameter Set (RBSP) Syntax
[0241]
[0242]
[0243]
[0244]
[0245]
[0246]
[0247]
[0248] 7.3.2.4 Image Parameter Set RBSP Syntax
[0249]
[0250]
[0251]
[0252]
[0253] 7.3.2.5 Adaptive Parameter Set (RBSP) Syntax
[0254]
[0255]
[0256] 7.3.2.6 Image Header RBSP Syntax
[0257]
[0258] 7.3.2.7 Image Header Structure Syntax
[0259]
[0260]
[0261]
[0262]
[0263]
[0264] 7.3.2.8 Supplemental Enhancement Information RBSP Syntax
[0265]
[0266] 7.3.2.9 AU delimiter RBSP syntax
[0267]
[0268] 7.3.2.10 End of Sequence RBSP Syntax
[0269] end_of_seq_rbsp(){ descriptor }
[0270] 7.3.2.11 End of Bitstream RBSP Syntax
[0271] end_of_bitstream_rbsp(){ descriptor }
[0272] 7.4 Semantics
[0273] 7.4.1 Overview
[0274] The semantics associated with syntactic structures and syntactic elements within those structures are specified in this section. When tables or a set of tables are used to specify the semantics of syntactic elements, any values not specified in the tables should not appear in the bitstream unless otherwise specified in this specification.
[0275] 7.4.2 NAL Unit Semantics
[0276] 7.4.2.1 General NAL Unit Semantics
[0277] NumBytesInNalUnit specifies the size of a NAL unit in bytes. This value is required for decoding NAL units. Some form of delimitation of NAL unit boundaries necessitates the inference of NumBytesInNalUnit. This is one such delimitation method for byte stream formats. Other delimitation methods may be specified outside of this specification.
[0278] Note 1 – The Video Codec Layer (VCL) is defined to effectively represent the content of video data. The NAL is defined to format this data and provide header information in a manner suitable for transmission over various communication channels or storage media. All data is contained in NAL units, each containing an integer number of bytes. The NAL unit specifies a general format for both packet-oriented and bitstream-oriented systems. The format of NAL units is the same for packet-oriented transmission and byte-stream-oriented systems, except that each NAL unit may be preceded by a start code prefix and additional padding bytes in the byte-stream format.
[0279] rbsp_byte[i] is the i-th byte of the RBSP. The RBSP is defined as an ordered sequence of bytes, as shown below:
[0280] An RBSP contains a sequence of data bits (SODB), as shown below:
[0281] – If SODB is empty (i.e., its length is zero bits), then RBSP is also empty.
[0282] – Otherwise, the RBSP contains SODB, as follows:
[0283] 1) The first byte of the RBSP contains the first (most valid, leftmost) octet of the SODB; the next byte of the RBSP contains the next octet of the SODB, and so on, until the remaining SODB is less than octets.
[0284] 2) The rbsp_trailing_bits() syntax structure is located after SODB, as shown below:
[0285] i) The first (most significant, leftmost) bit of the last RBSP byte contains the remaining bits of SODB (if any).
[0286] ii) The next bit consists of a single bit equal to 1 (i.e., rbsp_stop_one_bit).
[0287] iii) When rbsp_stop_one_bit is not the last bit of the byte alignment byte, one or more zero bits (i.e., instances of rbsp_alignment_zero_bit) will appear to cause byte alignment.
[0288] 3) In some RBSPs, after rbsp_training_bits() at the end of the RBSP, there may be one or more cabac_zero_word 16-bit syntax elements equal to 0x0000.
[0289] The syntax table uses the suffix "_rbsp" to indicate syntax structures with these RBSP attributes. These structures are carried in NAL units as the content of rbsp_byte[i] data bytes. The association between RBSP syntax structures and NAL units is specified in Table 5.
[0290] Note 2 – When the boundaries of the RBSP are known, the decoder can extract the SODB from the RBSP by concatenating the bits of the RBSP bytes and discarding the rbsp_stop_one_bit (the last (least significant, rightmost) bit equal to 1) and any subsequent (least significant, rightmost) bits equal to 0. The data required for the decoding process is contained in the SODB portion of the RBSP.
[0291] emulation_prevention_three_byte is a byte equal to 0x03. When emulation_prevention_three_byte exists in a NAL cell, it should be discarded during the decoding process.
[0292] The last byte of a NAL unit should not be equal to 0x00.
[0293] Within a NAL unit, the following three-byte sequence should not appear at any byte alignment position:
[0294] –0x000000
[0295] –0x000001
[0296] –0x000002
[0297] Within the NAL unit, any four-byte sequence beginning with 0x000003 should not appear at any byte-aligned location, except for the following sequence:
[0298] –0x00000300
[0299] –0x00000301
[0300] –0x00000302
[0301] –0x00000303
[0302] 7.4.2.2 NAL Unit Header Semantics
[0303] forbidden_zero_bit should be equal to 0.
[0304] nuh_reserved_zero_bit should be equal to 0. A value of 1 for nuh_reserved_zero_bit may be specified in the future by ITU-T|ISO / IEC. The decoder should ignore (i.e., remove and discard) NAL cells where nuh_reserved_zero_bit is equal to 1.
[0305] The nuh_layer_id specifies the identifier of the layer to which a VCLNAL cell belongs, or the identifier of the layer to which a non-VCLNAL cell applies. The value of nuh_layer_id should be in the range of 0 to 55 (inclusive). Other values of nuh_layer_id are reserved for future use by ITU-T|ISO / IEC.
[0306] The nuh_layer_id value should be the same for all VCLNAL units of the encoded / decoded image. The nuh_layer_id value of the encoded / decoded image or PU is the nuh_layer_id value of the VCL NAL unit of the encoded / decoded image or PU.
[0307] The nuh_layer_id value of AUD, PH, EOS, and FD NAL cells is subject to the following constraints:
[0308] – If nal_unit_type equals AUD_NUT, nuh_layer_id should equal vps_layer_id[0].
[0309] Otherwise, when nal_unit_type is equal to PH_NUT, EOS_NUT or FD_NUT, nuh_layer_id should be equal to the nuh_layer_id of the associated VCLNAL unit.
[0310] Note 1 – The nuh_layer_id value of DCI, VPS, and EOB NAL units is unrestricted.
[0311] The value of nal_unit_type should be the same for all images in CVSS AU.
[0312] The nal_unit_type specifies the NAL unit type, which is the type of RBSP data structure contained in the NAL unit as specified in Table 5.
[0313] The NAL units (without defined semantics) in the range of UNSPEC_28…UNSPEC_31 (inclusive) of nal_unit_type should not affect the decoding process specified in this specification.
[0314] Note 2 – NAL unit types within the range of UNSPEC_28…UNSPEC_31 (inclusive) may be used as determined by the application. The decoding process for these values of nal_unit_type is not specified in this specification. Because different applications may use these NAL unit types for different purposes, special care must be taken when designing encoders that generate NAL units using these nal_unit_type values, and when designing decoders that interpret NAL unit contents using these nal_unit_type values. This specification does not define any management of these values. These nal_unit_type values may only be applicable in the following contexts: when using “conflicts” (i.e., different definitions of the meaning of NAL unit contents with the same nal_unit_type value) is not important, is not feasible, or is managed (e.g., defined or managed) in control of the application or transport specifications, or in an environment that controls the distribution of bitstreams.
[0315] For purposes other than determining the amount of data in the DU of the bitstream decoder that should be ignored (removed and discarded from the bitstream) is the content of all NAL units that use the nal_unit_type reserved value.
[0316] Note 3 – This requirement allows for the definition of compatible extensions to this specification in the future.
[0317] Table 5 – NAL Unit Type Codes and NAL Unit Type Categories
[0318]
[0319]
[0320] Note 4 – Clean Random Access (CRA) pictures may have associated RASL or RADL pictures present in the bitstream.
[0321] Note 5 – An Instantaneous Decoding Refresh (IDR) picture with nal_unit_type equal to IDR_N_LP has no associated leading picture in the bitstream. An IDR picture with nal_unit_type equal to IDR_W_RADL has no associated RASL picture present in the bitstream, but may have an associated RADL picture in the bitstream.
[0322] For any given image's VCL NAL unit, the following applies:
[0323] – If mixed_nalu_types_in_pic_flag equals 0, then the value of nal_unit_type should be the same for all codec strip NAL units of the picture. The picture or PU is referred to as having the same NAL unit type as the codec strip NAL unit of the picture or PU.
[0324] - Otherwise (mixed_nalu_types_in_pic_flag equals 1), one or more VCLNAL units in the image have a specific value of nal_unit_type, which is equal to STSA_NUT, RADL_NUT, RASL_NUT, IDR_W_RADL, IDR_N_LP or CRA_NUT, while other VCL NAL units in the image have a different specific value of nal_unit_type, which is equal to TRAIL_NUT, RADL_NUT or RASL_NUT.
[0325] For single-layer bitstreams, the following constraints apply:
[0326] – Except for the first image in the bitstream in decoding order, each image is considered to be associated with the previous IRAP image in decoding order.
[0327] – When the image is a leading image of an IRAP image, it should be a RADL image or a RASL image.
[0328] – When an image is a follow-up image to an IRAP image, it should not be a RADL image or a RASL image.
[0329] – RASL images should not exist in the bitstream associated with IDR images.
[0330] – RADL images should not exist in the bitstream associated with an IDR image whose nal_unit_type is equal to IDR_N_LP.
[0331] Note 6: If each parameter set is available when referenced (either in the bitstream or via an external means not specified in this specification), random access can be performed at the IRAP PU position by discarding all PUs prior to the IRAP PU (and correctly decoding the IRAP picture and all subsequent non-RASL pictures in the decoding order).
[0332] - Any image that precedes the IRAP image in the decoding order should precede the IRAP image in the output order, and should also precede any RADL image associated with the IRAP image in the output order.
[0333] - Any RASL images associated with a CRA image should be placed before any RADL images associated with a CRA image in the output order.
[0334] - Any RASL image associated with a CRA image should immediately follow any IRAP image that precedes the CRA image in the decoding order in the output order.
[0335] – If field_seq_flag equals 0, and the current image is a preceding image associated with an IRAP image, then it should precede all non-preceding images associated with the same IRAP image in the decoding order. Otherwise, let picA and picB be the first and last preceding images in the decoding order associated with the IRAP image, respectively. There should be at most one non-preceding image before picA in the decoding order, and there should be no non-preceding images between picA and picB in the decoding order.
[0336] The time-domain identifier of the NAL unit is specified by subtracting 1 from num_temporal_id_plus1.
[0337] The value of nuh_temporal_id_plus1 should not be equal to 0.
[0338] The variable TemporalId is derived as follows:
[0339] TemporalId=nuh_temporal_id_plus1-1 (36)
[0340] When nal_unit_type is in the range from IDR_W_RADL to RSV_IRAP_12 (inclusive), TemporalId should be equal to 0.
[0341] When nal_unit_type equals STSA_NUT and vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]] equals 1, TemporalId should not be equal to 0.
[0342] The TemporalId value should be the same for all VCL NAL units in an AU. The TemporalId value of a codec image PU or AU is the TemporalId value of the VCLNAL units in the codec image PU or AU. The TemporalId value of a sublayer representation is the maximum value of the TemporalId of all VCLNAL units in the sublayer representation.
[0343] The TemporalId value of non-VCL NAL cells is subject to the following constraints:
[0344] – If nal_unit_type is equal to DCI_NUT, VPS_NUT, or SPS_NUT, then TemporalId should be equal to 0, and the TemporalId of the AU containing the NAL unit should be equal to 0.
[0345] Otherwise, if nal_unit_type is equal to PH_NUT, then TemporalId should be equal to the TemporalId of the PU containing the NAL unit.
[0346] Otherwise, if nal_unit_type is equal to EOS_NUT or EOB_NUT, then TemporalId should be equal to 0.
[0347] Otherwise, if nal_unit_type is equal to AUD_NUT, FD_NUT, PREFIX_SEI_NUT, or SUFFIX_SEI_NUT, then TemporalId should be equal to the TemporalId of the AU containing the NAL unit.
[0348] Otherwise, when nal_unit_type is equal to PPS_NUT, PREFIX_APS_NUT or SUFFIX_APS_NUT, TemporalId should be greater than or equal to the TemporalId of the PU containing the NAL unit.
[0349] Note 7 - When the NAL unit is a non-VCL NAL unit, the TemporalId value is equal to the minimum TemporalId value of all AUs applicable to the non-VCL NAL unit. When nal_unit_type is equal to PPS_NUT, PREFIX_APS_NUT, or SUFFIX_APS_NUT, the TemporalId can be greater than or equal to the TemporalId of the AU being included, because all PPS and APS can be included at the beginning of the bitstream (e.g., when they are transmitted out of tape and the receiver places them at the beginning of the bitstream), where the TemporalId of the first encoded / decoded picture is equal to 0.
[0350] 7.4.2.3 Encapsulating SODB (Informative) within an RBSP
[0351] This clause does not form part of this specification.
[0352] The encapsulation form of SODB within an RBSP and the emulation_prevention_three_byte of RBSP encapsulation used within a NAL unit are described for the following purposes:
[0353] – Prevents emulation of startup code within the NAL unit, while allowing arbitrary SODB representation within the NAL unit.
[0354] – By searching for the rbsp_stop_one_bit starting from the end of the RBSP in the RBSP, it becomes possible to identify the end of SODB within the NAL cell.
[0355] – In some cases (using one or more cabac_zero_word syntax elements), it is possible to make the size of the NAL unit larger than the size of the SODB.
[0356] The encoder can generate NAL units from the RBSP using the following procedure:
[0357] 1. Search for byte alignment bits for the following binary patterns in the RBSP data:
[0358] '00000000 00000000 000000xx' (where 'xx' represents any two-digit pattern: "00", "01", "10", or "11")
[0359] And insert a byte equal to 0x03 to replace the bit pattern with the pattern:
[0360] '00000000 00000000 00000011 000000xx',
[0361] Finally, when the last byte of the RBSP data is equal to 0x00 (which only occurs when the RBSP ends with a cabac_zero_word), the last byte equal to 0x03 is appended to the end of the data. When searching for the next occurrence of a byte alignment bit with the binary pattern specified above in the RBSP data, the last zero byte of the byte-aligned three-byte sequence 0x000000 in the RBSP is considered (which is replaced by the four-byte sequence 0x00000300).
[0362] 2. The generated byte sequence is then prefixed with a NAL unit header, where nal_unit_type indicates the type of RBSP data structure in the NAL unit.
[0363] The process described above leads to the construction of the entire NAL unit.
[0364] This process allows any SODB to be represented in a NAL cell while ensuring the following two things:
[0365] - Start code prefixes within NAL units that are not simulated byte alignment.
[0366] - Within the NAL unit, regardless of byte alignment, the sequence of 8 zero bits followed by the start code prefix will not be simulated.
[0367] 7.4.2.4 Order of NAL units in a bitstream
[0368] 7.4.2.4.1 Overview
[0369] Subclause 7.4.2.4 specifies restrictions on the order of NAL units in the bitstream.
[0370] Any order in which NAL units in the bitstream conform to these constraints is referred to in this paper as the decoding order of NAL units.
[0371] Within a NAL unit, the syntax in Clauses 7.3 and D.2 specifies the decoding order of the syntax elements. When a NAL unit specified in this specification includes VUI parameters or any SEI messages as defined in ITU-T H.SEI|ISO / IEC 23002-7, the syntax of the VUI parameters or SEI messages as defined in ITU-T H.SEI|ISO / IEC 23002-7 specifies the decoding order of those syntax elements. The decoder shall be able to receive the NAL unit and its syntax elements in the decoding order.
[0372] 7.4.2.4.2 The order of AUs and their relationship with CVS
[0373] A bitstream consists of one or more CVSs.
[0374] A CVS consists of one or more AUs. The order of PUs and their association with AUs are described in Clause 7.4.2.4.3.
[0375] The first AU of CVS is CVSS AU, where each current PU is a CLVSS PU, which is either an IRAP PU with NoOutputBeforeRecoveryFlag equal to 1 or a GDR PU with NoOutputBeforeRecoveryFlag equal to 1.
[0376] For each layer present in the CVS, each CVSS AU should have a PU.
[0377] The bitstream consistency requirement stipulates that, when present, the next AU following the AU containing the EOS NAL unit should be CVSSAU.
[0378] 7.4.2.4.3 The order of PUs and their relationship with AUs
[0379] An AU consists of one or more PUs in ascending order of nuh_layer_id. Clause 7.4.2.4.4 describes the order of NAL units and encoded / decoded images and their association with PUs.
[0380] An AU can have at most one AUD NAL unit. When an AUD NAL unit exists in an AU, it should be the first NAL unit of the AU, and therefore, it is the first NAL unit of the first PU of the AU.
[0381] An AU can have at most one EOB NAL unit. When an EOB NAL unit exists in an AU, it should be the last NAL unit of the AU, and therefore, it is the last NAL unit of the last PU of the AU.
[0382] A VCLNAL cell is the first VCL NAL cell of an AU (and therefore, the PU containing the VCL NAL cell is the first PU of the AU) when the VCL NAL cell is the first VCL NAL cell after the PH NAL cell and one or more of the following conditions are met:
[0383] The nuh_layer_id value of the -VCL NAL unit is less than the nuh_layer_id of the previous image in the decoding order.
[0384] The value of ph_pic_order_cnt_lsb in the –VCL NAL unit is different from the ph_pic_order_cnt_lsb of the previous image in terms of decoding order.
[0385] – The PicOrderCntVal derived for the VCL NAL unit is different from the PicOrderCntVal of the previous image in terms of decoding order.
[0386] Let FirstVclNalUnitInAu be the first VCL NAL unit of the AU. The first of the following NAL units, preceding firstVclNalUnitInAu and following the last VCL NAL unit (if any) preceding firstVclNalUnitInAu, defines the start of the new AU:
[0387] –AUD NAL unit (if present),
[0388] –DCI NAL unit (if present),
[0389] –VPS NAL unit (if it exists)
[0390] –SPS NAL unit (if present),
[0391] –PPS NAL units (if present),
[0392] –Prefixed APS NAL unit (if present),
[0393] –PH NAL unit (if present),
[0394] –Prefix SEI NAL unit (if present),
[0395] –nal_unit_type equals the NAL unit of RSV_NVCL_26 (if it exists),
[0396] –nal_unit_type is the NAL unit (if any) in the range UNSPEC28..UNSPEC29.
[0397] Note: The first NAL unit (if any) before firstVclNalUnitInAu and after the last VCLNAL unit before firstVclNalUnitInAu can only be one of the NAL units listed above.
[0398] One requirement for bitstream consistency is that, when present, the next PU in a specific layer after a PU belonging to the same layer and containing an EOS NAL unit should be a CLVSS PU, which is either an IRAP PU with NoOutputBeforeRecoveryFlag equal to 1 or a GDR PU with NoOutputBeforeRecoveryFlag equal to 1.
[0399] 7.4.2.4.4 The order of NAL units and encoded / decoded images and their relationship with the PU
[0400] A PU consists of zero or one PH NAL unit, a codec picture (including one or more VCL NAL units), and zero or more other non-VCL NAL units. The association between VCL NAL units and codec pictures is described in Clause 7.4.2.4.5.
[0401] When an image consists of more than one VCL NAL unit, a PH NAL unit should exist in the PU.
[0402] If a PH NAL unit exists in the PU, then the first VCL NAL unit of the image is the first VCL NAL unit following the PH NAL unit in the decoding order of the image. Otherwise (if no PH NAL unit exists in the PU), the first VCL NAL unit of the image is the only VCL NAL unit of the image.
[0403] The order of non-VCL NAL units (excluding AUD and EOB NAL units) within the PU should comply with the following constraints:
[0404] – When a PH NAL unit exists in a PU, it should be located before the first VCL NAL unit of the PU.
[0405] – When any DCI NAL unit, VPS NAL unit, SPS NAL unit, PPS NAL unit, prefix APS NAL unit, prefix SEI NAL unit, NAL unit with nal_unit_type equal to RSV_NVCL_26, or NAL unit with nal_unit_type in the range UNSPEC_28..UNSPEC_29 exists in the PU, they should not follow the last VCLNAL unit of the PU.
[0406] -When any DCI NAL unit, VPS NAL unit, SPS NAL unit or PPS NAL unit is present in the PU, they should be located before the PH NAL unit of the PU (if present) and before the first VCL NAL unit of the PU.
[0407] –nal_unit_type equal to SUFFIX_APS_NUT, SUFFIX_SEI_NUT, FD_NUT or RSV_NVCL_27, or in a PU within the range UNSPEC_30..UNSPEC_31, the NAL unit should not be located before the first VCL NAL unit of the PU.
[0408] – When the EOS NAL unit exists in the PU, it should be the last NAL unit among all NAL units except for the EOB NAL unit (if it exists).
[0409] 7.4.2.4.5 The order of VCL NAL units and their relationship with the encoded / decoded image
[0410] The order of VCL NAL units within an encoded / decoded image is subject to the following constraints:
[0411] – For any two NAL units A and B of a encoded / decoded image, let subpicIdxA and subpicIdxB be its subpic-level index values, and sliceAddrA and sliceddrB be its slice_address values.
[0412] – Codec stripe NAL unit A should be located before codec stripe NAL unit B if any of the following conditions are true:
[0413] –subpicIdxA is less than subpicIdxB.
[0414] –subpicIdxA equals subpicIdxB, and sliceAddrA is less than sliceAddrB.
[0415] 7.4.3. Raw Byte Sequence Payload, Trailing Bit, and Byte Alignment Semantics
[0416] 7.4.3.1 Decoding Capability Information RBSP Semantics
[0417] A DCI RBSP can be made available to the decoder by existing in the bitstream, being included in at least the first AU of the bitstream, or being provided by external means.
[0418] Note 1 – The information contained in the DCI RBSP is not required for the operation of the decoding process.
[0419] When present, all DCI NAL units in the bitstream should have the same content.
[0420] The increment of 1 in dci_max_sublayers_minus1 specifies the maximum number of temporal sublayers that may exist in each CVS of the bitstream. The value of dci_max_sublayers_minus1 should be between 0 and 6, inclusive.
[0421] The dci_reserved_zero_bit should be equal to 0 in bitstreams conforming to this version of the specification. The value 1 of dci_reserved_zero_bit is reserved for future use by ITU-T|ISO / IEC.
[0422] The increment of dci_num_ptls_minus1 by 1 specifies the number of profile_tier_level() syntax structures in the DCI NAL unit.
[0423] The requirement for bitstream consistency is that each OLS in the CVS of the bitstream should conform to at least one profile_tier_level() syntax structure in the DCI NAL unit.
[0424] Note 2: DCI NAL units may include PTL information, which may be carried in multiple profile_tier_level() syntax structures. This information is shared across multiple OLSs and does not need to include PTL information for each OLS separately.
[0425] A dci_extension_flag value of 0 indicates that the dci_extension_data_flag syntax element does not exist in the DCI RBSP syntax structure. A dci_extension_flag value of 1 indicates that the dci_extension_data_flag syntax element exists in the DCI RBSP syntax structure.
[0426] The `dci_extension_data_flag` flag can have any value. Its presence and value do not affect the consistency between the decoder and the documentation. Decoders conforming to this specification should ignore all `dci_extension_data_flag` syntax elements.
[0427] 7.4.3.2 Video Parameter Settings RBSP Semantics
[0428] The VPS RBSP should be available for the decoding process before it is referenced, included in at least one AU with TemporalId equal to 0, or provided externally.
[0429] All VPS NAL units in CVS with a specific value of vps_video_parameter_set_id should have the same content.
[0430] `vps_video_parameter_set_id` provides an identifier for the VPS that can be referenced by other syntax elements. The value of `vps_video_parameter_set_id` should be greater than 0.
[0431] The increment of 1 in vps_max_layers_minus1 specifies the maximum number of layers allowed in each CVS referencing the VPS.
[0432] The increment of `vps_max_sublayers_minus1` by 1 specifies the maximum number of temporal sublayers that may exist in each layer of a CVS referencing a VPS. The value of `vps_max_sublayers_minus1` should be between 0 and 6 (inclusive).
[0433] A value of 1 for `vps_all_layers_same_num_sublayers_flag` indicates that all layers referencing a VPS in each CVS have the same number of temporal sublayers. A value of 0 for `vps_all_layers_same_num_sublayers_flag` indicates that layers referencing a VPS in each CVS may or may not have the same number of temporal sublayers. When this value is not present, the value of `vps_all_layers_same_num_sublayers_flag` is inferred to be 1.
[0434] A `vps_all_independent_layers_flag` value of 1 indicates that all layers in the CVS are encoded and decoded independently without using inter-layer prediction. A `vps_all_independent_layers_flag` value of 0 indicates that one or more layers in the CVS can use inter-layer prediction. When it does not exist, the value of `vps_all_independent_layers_flag` is inferred to be 1.
[0435] vps_layer_id[i] specifies the nuh_layer_id value of the i-th layer. For any two non-negative integer values m and n, when m is less than n, the value of vps_layer_id[m] should be less than vps_layer_id[n].
[0436] A value of 1 for `vps_independent_layer_flag[i]` indicates that the layer at index `i` does not use inter-layer prediction. A value of 0 for `vps_independent_layer_flag[i]` indicates that the layer at index `i` can use inter-layer prediction, and the syntax element `vps_direct_ref_layer_flag[i][j]` (where `j` is in the range of 0 to `i-1` (inclusive)) must exist in the VPS. When `vps_independent_layer_flag[i]` does not exist, its value is inferred to be 1.
[0437] `vps_direct_ref_layer_flag[i][j]` equal to 0 indicates that the layer at index `j` is not a direct reference layer to the layer at index `i`. `vps_direct_ref_layer_flag[i][j]` equal to 1 indicates that the layer at index `j` is a direct reference layer to the layer at index `i`. When `vps_direct_ref_layer_flag[i][j]` (where `i` and `j` are in the range 0 to `vps_max_layers_minus1` (inclusive)) does not exist, it is inferred to be equal to 0. When `vps_independent_layer_flag[i]` equals 0, there should be at least one `j` value in the range 0 to `i-1` (inclusive) such that the value of `vps_direct_ref_layer_flag[i][j]` equals 1.
[0438] The derivation of variables NumDirectRefLayers[i], DirectRefLayerIdx[i][d], NumRefLayers[i], RefLayerIdx[i][r], and LayerUsedAsRefLayerFlag[j] is as follows:
[0439]
[0440]
[0441] The variable GeneralLayerIdx[i], which specifies that nuh_layer_id is equal to vps_layer_id[i], is derived as follows:
[0442] for(i=0;i<=vps_max_layers_minus1;i++) (38)
[0443] GeneralLayerIdx[vps_layer_id[i]]=i
[0444] For any two distinct values of i and j in the range of 0 to vps_max_layers_minus1 (inclusive), when dependencyFlag[i][j] equals 1, the bitstream consistency requirement is that the values of chroma_format_idc and bit_depth_minus8 applicable to layer i should be equal to the values of chroma_format_idc and bit_depth_minus8 applicable to layer j, respectively.
[0445] A value of 1 for `max_tid_ref_present_flag[i]` indicates that the syntax element `max_tid_il_ref_pics_plus1[i]` exists. A value of 0 for `max_tid_ref_present_flag[i]` indicates that the syntax element `max_tid_il_ref_pics_plus1[i]` does not exist.
[0446] A value of 0 for `max_tid_il_ref_pics_plus1[i]` indicates that non-IRAP images in layer i do not use inter-layer prediction. A value greater than 0 for `max_tid_il_ref_pics_plus1[i]` indicates that for decoding images in layer i, no image with a TemporalId greater than `max_tid_il_ref_pics_plus1[i] - 1` is used for ILRP. When no such image exists, the value of `max_tid_il_ref_pics_plus1[i]` is inferred to be equal to 7.
[0447] `each_layer_is_an_ols_flag` equal to 1 indicates that each OLS contains only one layer, and each layer in the CVS referencing the VPS is itself an OLS, where the single included layer is the only output layer. `each_layer_is_an_ols_flag` equal to 0 indicates that the OLS may contain multiple layers. If `vps_max_layers_minus1` equals 0, the value of `each_layer_is_an_ols_flag` is inferred to be equal to 1. Otherwise, when `vps_all_independent_layers_flag` equals 0, the value of `each_layer_is_an_ols_flag` is inferred to be equal to 0.
[0448] The condition that ols_mode_idc equals 0 indicates that the total number of OLS specified by the VPS is equal to vps_max_layers_minus1+1. The i-th OLS includes layers with layer indices from 0 to i (inclusive), and for each OLS, only the highest layer in the OLS is output.
[0449] The value of ols_mode_idc equals 1, which means that the total number of OLS specified by the VPS is equal to vps_max_layers_minus1+1. The i-th OLS includes layers with layer indices from 0 to i (inclusive), and for each OLS, all layers in the OLS are output.
[0450] The value of ols_mode_idc equal to 2 indicates that the total number of OLS specified by the VPS is explicitly signaled, and for each OLS, the output layer is explicitly signaled, and the other layers are direct or indirect reference layers to the output layer of the OLS.
[0451] The value of ols_mode_idc should be in the range of 0 to 2 (inclusive). The value of ols_mode_idc 3 is reserved for future use by ITU-T|ISO / IEC.
[0452] When vps_all_independent_layers_flag equals 1 and each_layer_is_an_ols_flag equals 0, the value of ols_mode_idc is inferred to be equal to 2.
[0453] The increment of 1 in num_output_layer_sets_minus1 specifies the total number of OLS specified by the VPS when ols_mode_idc equals 2.
[0454] The variable TotalNumOlss, which specifies the total number of OLS values for a VPS, is derived as follows:
[0455]
[0456] The condition that ols_output_layer_flag[i][j] equals 1 indicates that when ols_mode_idc equals 2, the layer whose nuh_layer_id equals vps_layer_id[j] is the output layer of the i-th OLS. The condition that ols_output_layer_flag[i][j] equals 0 indicates that when ols_mode_idc equals 2, the layer whose nuh_layer_id equals vps_layer_id[j] is not the output layer of the i-th OLS.
[0457] The following variables are derived: NumOutputLayersInOls[i], which specifies the number of output layers in the i-th OLS; NumSubLayersInLayerInOLS[i][j], which specifies the number of sublayers in the j-th layer of the i-th OLS; OutputLayerIdInOLS[i][j], which specifies the nuh_layer_id value of the j-th output layer in the i-th OLS; and LayerUsedAsOutputLayerFlag[k], which specifies whether the k-th layer is used as an output layer in at least one OLS:
[0458]
[0459]
[0460] For each value of i in the range from 0 to vps_max_layers_minus1 (inclusive), the values of LayerUsedAsRefLayerFlag[i] and LayerUsedAsOutputLayerFlag[i] should not both be equal to 0. In other words, there should be no layer that is neither the output layer of at least one OLS nor a direct reference layer to any other layer.
[0461] For each OLS, there should be at least one layer that serves as the output layer. In other words, for any value of i in the range of 0 to TotalNumOlss-1 (inclusive), the value of NumOutputLayersInOls[i] should be greater than or equal to 1.
[0462] The following methods are used to derive the variable NumLayersInOls[i], which specifies the number of layers in the i-th OLS, and the variable LayerIdInOls[i][j], which specifies the nuh_layer_id value of the j-th layer in the i-th OLS:
[0463]
[0464]
[0465] Note 1 – The 0th OLS contains only the lowest layer (i.e., the layer whose nuh_layer_id is equal to vps_layer_id[0]), and for the 0th OLS, only the layers contained are output.
[0466] The variable OlsLayerIdx[i][j], which specifies that nuh_layer_id is equal to LayerIdInOls[i][j], is derived as follows:
[0467]
[0468] The lowest layer in each OLS should be an independent layer. In other words, for each i in the range of 0 to TotalNumOlss-1 (inclusive), the value of vps_independent_layer_flag[GeneralLayerIdx[LayerIdInOls[i][0]] should be equal to 1.
[0469] Each layer should be included in at least one OLS specified by the VPS. In other words, for each layer for a specific value of nuh_layer_id, nuhLayerId equal to one of vps_layer_id[k] (k in the range of 0 to vps_max_layers_minus1 (inclusive), there should be at least one pair of values i and j, where i is in the range of 0 to TotalNumOlss-1 (inclusive) and j is in the range of NumLayersInOls[i]-1 (inclusive), such that the value of LayerIdInOls[i][j] is equal to nuhLayerId.
[0470] Increasing 1 by 1 to vps_num_ptls_minus1 specifies the number of profile_tier_level() syntax structures in the VPS. The value of vps_num_ptls_minus1 should be less than TotalNumOlss.
[0471] `pt_present_flag[i]` equal to 1 indicates that the i-th `profile_tier_level()` syntax structure in the VPS contains profile, tier, and general constraint information. `pt_present_flag[i]` equal to 0 indicates that the i-th `profile_tier_level()` syntax structure in the VPS does not contain profile, tier, and general constraint information. The value of `pt_present_flag[0]` is inferred to be equal to 1. When `pt_present_flag[i]` equals 0, the profile, tier, and general constraint information of the i-th `profile_tier_level()` syntax structure in the VPS is inferred to be the same as the (i-1)-th `profile_tier_level()` syntax structure in the VPS.
[0472] `ptl_max_temporal_id[i]` specifies the TemporalId of the highest sublayer representing the level information in the `i`th `profile_tier_level()` syntax structure of the VPS. The value of `ptl_max_temporal_id[i]` should be in the range of 0 to `vps_max_sublayers_minus1` (inclusive). When `vps_max_sublayers_minus1` equals 0, the value of `ptl_max_temporal_id[i]` is inferred to be equal to 0. When `vps_max_sublayers_minus1` is greater than 0 and `vps_all_layers_same_num_sublayers_flag` equals 1, the value of `ptl_max_temporal_id[i]` is inferred to be equal to `vps_max_sublayers_minus1`.
[0473] vps_ptl_alignment_zero_bit should be equal to 0.
[0474] `ols_ptl_idx[i]` specifies the index of the `profile_tier_level()` syntax structure in the list of `profile_tier_level()` syntax structures in the VPS that applies to the i-th OLS. When it exists, the value of `ols_ptl_idx[i]` should be in the range of 0 to `vps_num_ptls_minus1` (inclusive). When `vps_num_ptls_minus1` equals 0, the value of `ols_ptl_idx[i]` is inferred to be equal to 0.
[0475] When NumLayersInOls[i] equals 1, the profile_tier_level() syntax structure applicable to the i-th OLS also exists in the SPS referenced by the layer in the i-th OLS. One requirement for bitstream consistency is that when NumLayersInOls[i] equals 1, the profile_tier_level() syntax structure for signaling notification of the i-th OLS in the VPS and SPS should be the same.
[0476] `vps_num_dpb_params` specifies the number of `dpb_parameters()` syntax structures in the VPS. The value of `vps_num_dpb_params` should be between 0 and 16 (inclusive). If it does not exist, the value of `vps_num_dpb_params` is inferred to be 0.
[0477] `vps_sublayer_dpb_params_present_flag` controls the presence of the syntax elements `max_dec_pic_buffering_minus1[]`, `max_num_reorder_pics[]`, and `max_latency_increase_plus1[]` in the `dpb_parameters()` syntax structure of the VPS. When these elements are not present, `vps_sub_dpb_params_info_present_flag` is inferred to be equal to 0.
[0478] `dpb_max_temporal_id[i]` specifies the TemporalId of the highest sublayer representation. For this representation, DPB parameters may exist in the i-th `dpb_parameters()` syntax structure in the VPS. The value of `dpb_max_temporal_id[i]` should be in the range of 0 to `vps_max_sublayers_minus1` (inclusive). When `vps_max_sublayers_minus1` equals 0, the value of `dpb_max_temporal_id[i]` is inferred to be equal to 0. When `vps_max_sublayers_minus1` is greater than 0 and `vps_all_layers_same_num_sublayers_flag` equals 1, the value of `dpb_max_temporal_id[i]` is inferred to be equal to `vps_max_sublayers_minus1`.
[0479] ols_dpb_pic_width[i] specifies the width of the image storage buffer for the i-th OLS, in units of luminance samples.
[0480] ols_dpb_pic_height[i] specifies the height of each image storage buffer in the i-th OLS, in units of luminance samples.
[0481] `ols_dpb_params_idx[i]` specifies the index of the `dpb_parameters()` syntax structure in the VPS's list of `dpb_parameters()` syntax structures, where `NumLayersInOls[i]` is greater than 1, applicable to the `i`-th OLS. When it exists, the value of `ols_dpb_params_idx[i]` should be in the range of 0 to `vps_num_dpb_params-1` (inclusive). When `ols_dpb_params_idx[i]` does not exist, its value is inferred to be 0.
[0482] When NumLayersInOls[i] equals 1, the dpb_parameters() syntax structure applicable to the i-th OLS exists in the SPS referenced by the layer in the i-th OLS.
[0483] A value of 1 for `vps_general_hrd_params_present_flag` indicates that the syntax structure `general_hrd_parameters()` and other HRD parameters exist in the VPS RBSP syntax structure. A value of 0 for `vps_general_hrd_params_present_flag` indicates that the syntax structure `general_hrd_parameters()` and other HRD parameters do not exist in the VPS RBSP syntax structure. When it does not exist, the value of `vps_general_hrd_params_present_flag` is inferred to be 0.
[0484] When NumLayersInOls[i] equals 1, the general_hrd_parameters() syntax structure applicable to the i-th OLS appears in the SPS referenced by the layer in the i-th OLS.
[0485] A value of 1 for `vps_sublayer_cpb_params_present_flag` indicates that the i-th `ols_hrd_parameters()` syntax structure in the VPS contains the HRD parameters of the sublayer representation, where `TemporalId` is between 0 and `hrd_max_tid[i]` (inclusive). A value of 0 for `vps_sublayer_cpb_params_present_flag` indicates that the i-th `ols_hrd_parameters()` syntax structure in the VPS contains the HRD parameters of the sublayer representation, where `TemporalId` is only equal to `hrd_max_tid[i]`. When `vps_max_sublayers_minus1` is equal to 0, the value of `vps_sublayer_cpb_params_present_flag` is inferred to be 0.
[0486] When vps_sublayer_cpb_params_present_flag equals 0, the HRD parameters of the sublayer representation with TemporalId in the range of 0 to hrd_max_tid[i]-1 (inclusive) are inferred to be the same as the HRD parameters of the sublayer representation with TemporalId equal to hrd_max_tid[i]. These include the HRD parameters of the sublayer_hrd_parameters(i) syntax structure from the fixed_pic_rate_general_flag[i] syntax element up to the sublayer_hrd_parameters(i) syntax structure under the condition "if(general_vcl_hrd_params_present_flag)".
[0487] Increasing 1 to num_ols_hrd_params_minus1 specifies the number of ols_hrd_parameters() syntax structures present in the general_hrd_parameters() syntax structure when vps_general_hrd_params_present_flag equals 1. The value of num_ols_hrd_params_minus1 should be in the range of 0 to TotalNumOlss-1 (inclusive).
[0488] `hrd_max_tid[i]` specifies the TemporalId of the highest sublayer representation. For this representation, the HRD parameter is included in the i-th `ols_hrd_parameters()` syntax structure. The value of `hrd_max_tid[i]` should be in the range of 0 to `vps_max_sublayers_minus1` (inclusive). When `vps_max_sublayers_minus1` equals 0, the value of `hrd_max_tid[i]` is inferred to be 0. When `vps_max_sublayers_minus1` is greater than 0 and `vps_all_layers_same_num_sublayers_flag` equals 1, the value of `hrd_max_tid[i]` is inferred to be equal to `vps_max_sublayers_minus1`.
[0489] `ols_hrd_idx[i]` specifies the index of the `ols_hrd_parameters()` syntax structure in the VPS's list of `ols_hrd_parameters()` syntax structures applicable to the i-th OLS, when `NumLayersInOls[i]` is greater than 1. The value of `ols_hrd_idx[i]` should be in the range of 0 to `num_ols_hrd_params_minus1` (inclusive).
[0490] When NumLayersInOls[i] equals 1, the ols_hrd_parameters() syntax structure applicable to the i-th OLS appears in the SPS referenced by the layer in the i-th OLS.
[0491] If the value of num_ols_hrd_param_minus1+1 equals TotalNumOlss, then the value of ols_hrd_idx[i] is inferred to be equal to i. Otherwise, when NumLayersInOls[i] is greater than 1 and num_ols_hrd_params_minus1 equals 0, the value of ols_hrd_idx[i] is inferred to be equal to 0.
[0492] A value of 0 for `vps_extension_flag` indicates that the `vps_extension_data_flag` syntax element does not exist in the VPS RBSP syntax structure. A value of 1 for `vps_extension_flag` indicates that the `vps_extension_data_flag` syntax element exists in the VPS RBSP syntax structure.
[0493] The `vps_extension_data_flag` flag can have any value. Its presence and value do not affect the consistency of the decoder with the profile specified in this version of the specification. Decoders conforming to this version of the specification should ignore all `vps_extension_data_flag` syntax elements.
[0494] 7.4.3.3 Sequence Parameter Set (RBSP) Semantics
[0495] The SPS RBSP should be available for the decoding process before it is referenced, included in at least one AU (where TemporalId equals 0), or provided externally.
[0496] All SPS NAL cells in CVS with a specific value of sps_seq_parameter_set_id should have the same content.
[0497] sps_seq_parameter_set_id provides an identifier for SPS to reference by other syntax elements.
[0498] Regardless of the nuh_layer_id value, SPS NAL units share the same value space for sps_seq_parameter_set_id.
[0499] Let `spsLayerId` be the `nuh_layer_id` value of a specific SPS NAL cell, and `vclLayerId` be the `nuh_layer_id` value of a specific VCL NAL cell. A specific VCL NAL cell should not refer to a specific SPS NAL cell unless a layer whose `spsLayerId` is less than or equal to `vclLayerId` and whose `nuh_layer_id` is equal to `spsLayerId` is included in at least one OLS that includes layers whose `nuh_layer_id` is equal to `vclLayerId`.
[0500] When sps_video_parameter_set_id is greater than 0, it specifies the value of vps_video_parameter_set_id of the VPS referenced by SPS.
[0501] When sps_video_parameter_set_id equals 0, the following applies:
[0502] SPS does not refer to VPS.
[0503] - When decoding each CLVS that references an SPS, no VPS is referenced.
[0504] The value of –vps_max_layers_minus1 is inferred to be equal to 0.
[0505] – The CVS should contain only one layer (i.e., all VCL NAL units in the CVS should have the same nuh_layer_id value).
[0506] The value of –GeneralLayerIdx[nuh_layer_id] is inferred to be equal to 0.
[0507] The value of –vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]] is inferred to be equal to 1.
[0508] When vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]] equals 1, the nuh_layer_id of the SPS referenced by the CLVS with a specific nuh_layer_id value nuhLayerId should be equal to nuhLayerId.
[0509] In all SPS referenced by CLVS in CVS, the value of sps_video_parameter_set_id should be the same.
[0510] Increasing 1 by 1 to sps_max_sublayers_minus1 specifies the maximum number of temporal sublayers that may exist in each CLVS referencing SPS. The value of sps_max_sublayers_minus1 should be in the range of 0 to vps_max_sublayers_minus1 (inclusive).
[0511] sps_reserved_zero_4bits should be equal to 0 in bitstreams conforming to this version of the specification. Other values for sps_reserved_zero_4bits are reserved for future use by ITU-T|ISO / IEC.
[0512] A value of 1 for `sps_ptl_dpb_hrd_params_present_flag` indicates that the `profile_tier_level()` and `dpb_parameters()` syntax structures exist in SPS. Additionally, `general_hrd_parameters()` and `ols_hrd_parameters()` syntax structures may also exist in SPS. A value of 0 for `sps_ptl_dpb_hrd_params_present_flag` indicates that these four syntax structures do not exist in SPS. The value of `sps_ptl_dpb_hrd_params_present_flag` should be equal to `vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]]`.
[0513] A `gdr_enabled_flag` value of 1 indicates that the GDR image may exist in a CLVS that references SPS. A `gdr_enabled_flag` value of 0 indicates that the GDR image does not exist in a CLVS that references SPS.
[0514] chroma_format_idc specifies the chroma sampling relative to luminance sampling as defined in Clause 6.2.
[0515] A `separate_colour_plane_flag` value of 1 indicates that the three color components of a 4:4:4 chroma format are encoded and decoded separately. A `separate_colour_plane_flag` value of 0 indicates that the color components are not encoded and decoded separately. When `separate_colour_plane_flag` does not exist, it is inferred to be equal to 0. When `separate_colour_plane_flag` is equal to 1, the encoded and decoded image consists of three separate components, each consisting of encoded and decoded samples of a color plane (Y, Cb, or Cr), using monochrome encoding and decoding syntax. In this case, each color plane is associated with a `specific_color_plane_id` value.
[0516] Note 1 – The decoding process between color planes with different color_plane_id values is independent. For example, the decoding process for a monochrome image with one color_plane_id value does not use any data from monochrome images with different color_plane_id values for inter-frame prediction.
[0517] Based on the value of separate_colour_plane_flag, assign the value of the variable ChromaArrayType as follows:
[0518] – If separate_colour_plane_flag equals 0, then ChromaArrayType is set to equal chroma_format_idc.
[0519] Otherwise (if separate_colour_plane_flag equals 1), ChromaArrayType is set to 0.
[0520] A `res_change_in_clvs_allowed_flag` value of 1 indicates that the image's spatial resolution may change within a CLVS referencing SPS. A `res_change_in_clvs_allowed_flag` value of 0 indicates that the image's spatial resolution will not change within any CLVS referencing SPS.
[0521] `pic_width_max_in_luma_samples` specifies the maximum width of each decoded image that references SPS, in units of luminance samples. `pic_width_max_in_luma_samples` should not be equal to 0 and should be an integer multiple of `Max(8, MinCbSizeY)`.
[0522] One requirement for bitstream consistency is that, for any OLS containing one or more OLS indexes i that reference the SPS layer, the value of pic_width_max_in_luma_samples should be less than or equal to the value of ols_dpb_pic_width[i].
[0523] `pic_height_max_in_luma_samples` specifies the maximum height of each decoded image that references SPS, in units of luminance samples. `pic_height_max_in_luma_samples` should not be equal to 0 and should be an integer multiple of `Max(8,MinCbSizeY)`.
[0524] One requirement for bitstream consistency is that, for any OLS containing one or more layers referencing SPS, the value of pic_height_max_in_luma_samples should be less than or equal to the value of ols_dpb_pic_height[i].
[0525] A `sps_conformance_window_flag` value of 1 indicates that the consistency trimming window offset parameter immediately follows in SPS. A `sps_conformance_window_flag` value of 0 indicates that the consistency trimming window offset parameter does not exist in SPS.
[0526] `sps_conf_win_left_offset`, `sps_conf_win_right_offset`, `sps_conf_win_top_offset`, and `sps_conf_win_bottom_offset` specify the cropping window applied to the image, where `pic_width_in_luma_samples` equals `pic_width_max_in_luma_samples` and `pic_height_in_luma_samples` equals `pic_height_max_in_luma_samples`. When `sps_conformance_window_flag` equals 0, the values of `sps_conf_win_left_offset`, `sps_conf_win_right_offset`, `sps_conf_win_top_offset`, and `sps_conf_win_bottom_offset` are inferred to be equal to 0.
[0527] The consistent cropping window contains luminance samples, where the horizontal image coordinates range from SubWidthC*sps_conf_win_left_offset to pic_width_max_in_luma_samples-(SubWidthC*sps_conf_win_right_offset+1) and the vertical image coordinates range from SubHeightC*sps_conf_win_top_offset to pic_height_max_in_luma_samples-(SubHeightC*sps_conf_win_bottom_offset+1) (inclusive).
[0528] The value of SubWidthC*(sps_conf_win_left_offset+sps_conf_win_right_offset) should be less than pic_width_max_in_luma_samples, and the value of SubHeightC*(sps_conf_win_top_offset+sps_conf_win_bottom_offset) should be less than pic_height_max_in_luma_samples.
[0529] When ChromaArrayType is not equal to 0, the corresponding specified sample points of the two chroma arrays are samples with picture coordinates (x / SubWidthC, y / SubHeightC), where (x, y) are the picture coordinates of the specified luminance sample point.
[0530] Note 2 – The consistent cropping window offset parameter applies only to the output. All internal decoding processes apply to the uncropped image size.
[0531] The value of sps_log2_ctu_size_minus5 plus 5 specifies the size of the luminance codec tree block for each CTU. The value of sps_log2_ctu_size_minus5 should be in the range of 0 to 2 (inclusive). The value of sps_log2_ctu_size_minus5 is reserved for future use by ITU-T|ISO / IEC.
[0532] The derivation of variables CtbLog2SizeY and CtbSizeY is as follows:
[0533] CtbLog2SizeY=sps_log2_ctu_size_minus5+5 (43)
[0534] CtbSizeY = 1 <CtbLog2SizeY (44)
[0535] A subpic_info_present_flag value of 1 indicates the existence of subpicture information in CLVS, and each picture in CLVS may contain one or more subpictures. A subpic_info_present_flag value of 0 indicates the absence of subpicture information in CLVS, and each picture in CLVS contains only one subpicture.
[0536] When res_change_in_clvs_allowed_flag equals 1, the value of subpic_info_present_flag should be equal to 0.
[0537] Note 3 – When the bitstream is the result of a sub-bitstream extraction process and contains only a subset of subpictures of the input bitstream of the sub-bitstream extraction process, it may be necessary to set the value of subpic_info_present_flag to 1 in the RBSP of the SPS.
[0538] The increment of 1 in `sps_num_subpics_minus1` specifies the number of subpicks in each picture within the CLVS. The value of `sps_num_subpics_minus1` should be in the range of 0 to Ceil(pic_width_max_in_luma_samples÷CtbSizeY)*Ceil(pic_height_max_in_luma_samples÷CtbSizeY)–1 (inclusive). If it does not exist, the value of `sps_num_subpics_minus1` is inferred to be 0.
[0539] A value of 1 for `sps_independent_subpics_flag` indicates that no intra-frame prediction, inter-frame prediction, or loop filtering operations can be performed across any subpicture boundary in the CLVS. A value of 0 for `sps_independent_subpics_flag` indicates that inter-frame prediction or loop filtering operations are allowed across subpicture boundaries in the CLVS. When it does not exist, the value of `sps_independent_subpics_flag` is inferred to be 0.
[0540] `subpic_ctu_top_left_x[i]` specifies the horizontal position of the top left CTU of the i-th subpicture, in units of CTB size. The length of the syntax element is `Ceil(Log2((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY))` bits. When it does not exist, the value of `subpic_ctu_top_left_x[i]` is inferred to be equal to 0.
[0541] `subpic_ctu_top_left_y[i]` specifies the vertical position of the top left CTU of the i-th subpicture, in units of CTB size. The length of the syntax element is `Ceil(Log2((pic_height_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY))` bits. When it does not exist, the value of `subpic_ctu_top_left_y[i]` is inferred to be equal to 0.
[0542] The increment of 1 in `subpic_width_minus1[i]` specifies the width of the i-th subpicture, in units of `CtbSizeY`. The length of the syntax element is `Ceil(Log2((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY))` bits. When it does not exist, the value of `subpic_width_minus1[i]` is inferred to be equal to `((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-subpic_ctu_top_left_x[i]-1`.
[0543] The increment of 1 in `subpic_height_minus1[i]` specifies the height of the i-th subpicture, in units of `CtbSizeY`. The length of the syntax element is `Ceil(Log2((pic_height_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY))` bits. When it does not exist, the value of `subpic_height_minus1[i]` is inferred to be equal to `((pic_height_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-subpic_ctu_top_left_y[i]-1`.
[0544] A subpic_treated_as_pic_flag[i] equal to 1 indicates that the i-th subpick of each encoded / decoded image in CLVS is treated as an image during decoding, excluding loop filtering operations. A subpic_treated_as_pic_flag[i] equal to 0 indicates that the i-th subpick of each encoded / decoded image in CLVS is not treated as an image during decoding, excluding loop filtering operations. When it does not exist, the value of subpic_treated_as_pic_flag[i] is inferred to be equal to sps_independent_subpics_flag.
[0545] When subpic_treated_as_pic_flag[i] equals 1, the requirement for bitstream consistency is that, in the OLS including the layer containing the i-th subpicture as the output layer, all of the following conditions for each output layer and its reference layer are true:
[0546] – All images in the output layer and its reference layer should have the same pic_width_in_luma_samples value and the same pic_height_in_luma_samples value.
[0547] – All SPS referenced by the output layer and its reference layer should have the same sps_num_subpics_minus1 value, and should have the same subpic_ctu_top_left_x[j], subpic_ctu_top_left_y[j], subpic_width_minus1[j], subpic_height_minus1[j], and loop_filter_across_subpic_enabled_flag[j] values (for each j value in the range from 0 to sps_num_subpics_minus1 (inclusive)).
[0548] For each j value in the range of 0 to sps_num_subpics_minus1 (inclusive), all pictures in each access unit of the output layer and its reference layer should have the same SubpicIdVal[j] value.
[0549] The value of loop_filter_across_subpic_enabled_flag[i] equal to 1 indicates that loop filtering can be performed across the boundary of the i-th subpic in each encoded / decoded picture in CLVS.
[0550] If loop_filter_across_subpic_enabled_flag[i] is equal to 0, the loop filtering operation is not performed across the boundary of the i-th subpic in each codec image in CLVS. When it does not exist, the value of loop_filter_across_subpic_enabled_pic_flag[i] is inferred to be equal to 1 - sps_independent_subpics_flag.
[0551] One requirement for bitstream consistency is that the shape of sub-pictures should be such that each sub-picture, when decoded, should have its entire left boundary and entire top boundary consisting of the picture boundary or the boundary of the previously decoded sub-picture.
[0552] The increment of 1 in `sps_subpic_id_len_minus1` specifies the number of bits used to represent the syntax elements `sps_subpic_id[i]`, `pps_subpic_id[i]` (if present), and `slice_subpic_id` (if present). The value of `sps_subpic_id_len_minus1` should be between 0 and 15 (inclusive). The value of `1 << (sps_subpic_id_len_minus1 + 1)` should be greater than or equal to `sps_num_subpics_minus1 + 1`.
[0553] A subpic_id_mapping_explicitly_signalled_flag value of 1 indicates that the subpick ID mapping is explicitly signaled in the PPS referenced by the SPS or CLVS codec image. A subpic_id_mapping_explicitly_signalled_flag value of 0 indicates that the subpick ID mapping is not explicitly signaled in the CLVS codec image. When it does not exist, the value of subpic_id_mapping_explicitly_signalled_flag is inferred to be 0.
[0554] A subpic_id_mapping_in_sps_flag value of 1 indicates that when subpic_id_mapping_explicitly_signalled_flag is 1, the subpic ID mapping is signaled in the SPS. A subpic_id_mapping_in_sps_flag value of 0 indicates that when subpic_id_mapping_explicitly_signalled_flag is 1, the subpic ID mapping is signaled in the PPS referenced by the CLVS codec image.
[0555] sps_subpic_id[i] specifies the subpick ID of the i-th subpick. The length of the sps_subpic_id[i] syntax element is sps_subpic_id_len_minus1+1 bits.
[0556] bit_depth_minus8 specifies the bit depth (BitDepth) of the samples in the luma and chroma arrays, as well as the value of the offset (QpBdOffset) for the luma and chroma quantization parameter ranges, as shown below:
[0557] BitDepth=8+bit_depth_minus8 (45)
[0558] QpBdOffset=6*bit_depth_minus8 (46)
[0559] bit_depth_minus8 should be in the range of 0 to 8 (inclusive).
[0560] The `sps_entropy_coding_sync_enabled_flag` being set to 1 specifies that a particular synchronization procedure for the context variable is called before decoding the CTU, which includes the first CTB of the CTB line in each slice of each picture in the SPS, and that a particular stored procedure for the context variable is called after decoding the CTU, which also includes the first CTB of the CTB line in each slice of each picture in the SPS.
[0561] The `sps_entropy_coding_sync_enabled_flag` being equal to 0 specifies that a specific synchronization procedure for the context variable does not need to be called before decoding the CTU, which includes the first CTB of the CTB line in each slice of each picture in SPS, and that a specific stored procedure for the context variable does not need to be called after decoding the CTU, which includes the first CTB of the CTB line in each slice of each picture in SPS.
[0562] A value of 1 for `sps_wpp_entry_point_offsets_present_flag` indicates that signaling for the entry point offset of the CTU line may appear in the strip header of images referencing SPS when `sps_entropy_coding_sync_enabled_flag` is 1. A value of 0 for `sps_wpp_entry_point_offsets_present_flag` indicates that signaling for the entry point offset of the CTU line does not exist in the strip header of images referencing SPS. When it does not exist, the value of `sps_wpp_entry_point_offsets_present_flag` is inferred to be 0.
[0563] A value of 1 for `sps_weighted_pred_flag` indicates that weighted predictions can be applied to P-strips that reference SPS. A value of 0 for `sps_weighted_pred_flag` indicates that weighted predictions are not applied to P-strips that reference SPS.
[0564] A value of 1 for `sps_weighted_bipred_flag` indicates that explicit weighted predictions can be applied to B-strips that reference SPS. A value of 0 for `sps_weighted_bipred_flag` indicates that explicit weighted predictions cannot be applied to B-strips that reference SPS.
[0565] log2_max_pic_order_cnt_lsb_minus4 specifies the value of the variable MaxPicOrderCntLsb used for image order counting during the decoding process, as shown below:
[0566] MaxPicOrderCntLsb=2 (log2_max_pic_order_cnt_lsb_minus4+4) (47)
[0567] The value of log2_max_pic_order_cnt_lsb_minus4 should be between 0 and 12 (inclusive).
[0568] A value of 1 for sps_poc_msb_flag indicates that the ph_poc_msb_present_flag syntax element exists in the PH that references SPS. A value of 0 for sps_poc_msb_flag indicates that the ph_poc_msb_present_flag syntax element does not exist in the PH that references SPS.
[0569] Increasing 1 to poc_msb_len_minus1 specifies the length (in bits) of the poc_msb_val syntax element when it appears in a PH that references SPS. The value of poc_msb_len_minus1 should be between 0 and 32 - log2_max_pic_order_cnt_lsb_minus4-5 (inclusive).
[0570] `num_extra_ph_bits_bytes` specifies the number of extra bytes in the PH syntax structure of a SPS-encoded image. In bitstreams conforming to this version of the specification, the value of `num_extra_ph_bits_bytes` should be equal to 0. Although this version of the specification requires `num_extra_ph_bits_bytes` to be equal to 0, decoders conforming to this version of the specification should allow values of `num_extra_ph_bits_bytes` equal to 1 or 2 in the syntax.
[0571] `num_extra_sh_bits_bytes` specifies the number of extra bits in the stripe header of a SPS-encoded image. In bitstreams conforming to this version of the specification, the value of `num_extra_sh_bits_bytes` should be equal to 0. Although this version of the specification requires `num_extra_sh_bits_bytes` to be equal to 0, decoders conforming to this version of the specification should allow values of `num_extra_sh_bits_bytes` equal to 1 or 2 in the syntax.
[0572] `sps_sublayer_dpb_params_flag` controls the presence of the syntax elements `max_dec_pic_buffering_minus1[i]`, `max_num_reorder_pics[i]`, and `max_latency_increase_plus1[i]` in the `dpb_parameters()` syntax structure in SPS. When these elements are not present, the value of `sps_sub_dpb_params_info_present_flag` is inferred to be 0.
[0573] A long_term_ref_pics_flag value of 0 indicates that no LTRP is used for inter-frame prediction of any codec picture in CLVS. A long_term_ref_pics_flag value of 1 indicates that LTRP can be used for inter-frame prediction of one or more codec pictures in CLVS.
[0574] An `inter_layer_ref_pics_present_flag` value of 0 indicates that no ILRP is used for inter-frame prediction of any codec picture in CLVS. An `inter_layer_ref_pic_flag` value of 1 indicates that ILRP can be used for inter-frame prediction of one or more codec pictures in CLVS. When `sps_video_parameter_set_id` equals 0, the value of `inter_layer_ref_pics_present_flag` is inferred to be 0. When `vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]]` equals 1, the value of `inter_layer_ref_pics_present_flag` should be 0.
[0575] A value of 1 for `sps_idr_rpl_present_flag` indicates that the reference image list syntax element exists in the bar header of the IDR image. A value of 0 for `sps_idr_rpl_present_flag` indicates that the reference image list syntax element does not exist in the bar header of the IDR image.
[0576] The fact that rpl1_same_as_rpl0_flag equals 1 indicates that the syntax element num_ref_pic_lists_in_sps[1] and the syntax structure ref_pic_list_struct(1,rplsIdx) do not exist, and the following applies:
[0577] The value of –num_ref_pic_lists_in_sps[1] is inferred to be equal to the value of num_ref_pic_lists_in_sps[0].
[0578] The value of each syntax element in –ref_pic_list_struct(1,rplsIdx) is inferred to be equal to the value of the corresponding syntax element in ref_pic_list_struct(0,rplsIdx) that is equal to rplsIdx, ranging from 0 to num_ref_pic_lists_in_sps[0]-1.
[0579] num_ref_pic_lists_in_sps[i] specifies the number of ref_pic_list_struct(listIdx,rplsIdx) syntax structures whose listIdx is equal to i contained in the SPS. The value of num_ref_pic_lists_in_sps[i] should be between 0 and 64 (inclusive).
[0580] Note 4 – For each value of listIdx (equal to 0 or 1), since there may be a ref_pic_list_struct(listIdx, rplsIdx) syntax structure with direct signaling notification in the strip header of the current image, the decoder should allocate memory for a total of num_ref_pic_lists_in_sps[i]+1ref_pic_list_struct(listIdx, rplsIdx) syntax structures.
[0581] A value of 1 for `qtbtt_dual_tree_intra_flag` indicates that, for I-stripes, each CTU is implicitly partitioned into codec units with 64×64 luma samples, and these codec units are the roots of two separate codec tree syntax structures for luma and chroma. A value of 0 for `qtbtt_dual_tree_intra_flag` indicates that separate codec tree syntax structures are not used for I-stripes. When `qtbtt_dual_tree_intra_flag` does not exist, it is inferred to be equal to 0.
[0582] The value of log2_min_luma_coding_block_size_minus2 plus 2 specifies the minimum luminance codec block size. The value of log2_min_luma_coding_block_size_minus2 should be in the range of 0 to Min(4,sps_log2_ctu_size_minus5+3) (inclusive).
[0583] The derivation of variables MinCbLog2SizeY, MinCbSizeY, IbcBufWidthY, IbcBufWidthC, and Vsize is as follows:
[0584] MinCbLog2SizeY=log2_min_luma_coding_block_size_minus2+2 (48)
[0585] MinCbSizeY=1< <MinCbLog2SizeY (49)
[0586] IbcBufWidthY=256*128 / CtbSizeY (50)
[0587] IbcBufWidthC=IbcBufWidthY / SubWidthC (51)
[0588] VSize = Min(64, CtbSizeY) (52)
[0589] The value of MinCbSizeY shall be less than or equal to VSize.
[0590] Derive the variables CtbWidthC and CtbHeightC that respectively specify the width and height of the array of each chroma CTB as follows:
[0591] – If chroma_format_idc is equal to 0 (monochrome) or separate_colour_plane_flag is equal to 1, then both CtbWidthC and CtbHeightC are equal to 0.
[0592] – Otherwise, derive CtbWidthC and CtbHeightC as follows:
[0593] CtbWidthC = CtbSizeY / SubWidthC (53)
[0594] CtbHeightC = CtbSizeY / SubHeightC (54)
[0595] For log2BlockWidth in the range from 0 to 4 (inclusive) and log2BlockHeight in the range from 0 to 4 (inclusive), call the upper-right diagonal scan order array initialization process specified in Clause 6.5.2 with 1 << log2BlockWidth and 1 << log2BlockHeight as inputs, and assign the output to DiagScanOrder[log2BlockWidth][log2BlockHeight].
[0596] For log2BlockWidth in the range from 0 to 6 (inclusive) and log2BlockHeight in the range from 0 to 6 (inclusive), call the horizontal and vertical traversal scan order array initialization process specified in Clause 6.5.3 with 1 << log2BlockWidth and 1 << log2BlockHeight as inputs, and assign the output to HorTravScanOrder[log2BlockWidth][log2BlockHeight] and VerTravScanOrder[log2BlockWidth][log2BlockHeight].
[0597] A partition_constraints_override_enabled_flag value of 1 indicates that partition_constraints_override_flag exists in the PH that references SPS. A partition_constraints_override_enabled_flag value of 0 indicates that partition_constraints_override_flag does not exist in the PH that references SPS.
[0598] `sps_log2_diff_min_qt_min_cb_intra_slice_luma` specifies the default difference between the radix-2 logarithm of the smallest size of the luminance samples in the luminance leaf blocks generated by the quadtree partitioning of the CTU and the radix-2 logarithm of the smallest decoder block size in the luminance samples of the luminance CUs in the strip, where `slice_type` equals 2(I) of the referenced SPS. When `partition_constraints_override_enabled_flag` equals 1, the default difference can be overridden by `ph_log2_diff_min_qt_min_cb_luma` present in the referenced SPS PH. The value of `sps_log2_diff_min_qt_min_cb_intra_slice_luma` should be in the range of 0 to `CtbLog2SizeY - MinCbLog2SizeY` (inclusive). The radix-2 logarithm of the smallest size of the luminance samples in the luminance leaf blocks generated by the quadtree partitioning of the CTU is derived as follows:
[0599] MinQtLog2SizeIntraY=sps_log2_diff_min_qt_min_cb_intra_slice_luma+MinCbLog2SizeY (55)
[0600] `sps_max_mtt_hierarchy_depth_intra_slice_luma` specifies the default maximum hierarchical depth of a codec unit, which is generated by quadtree partitioning of a quadtree leaf in a stripe with slice_type equal to 2(I) of the referenced SPS. When `partition_constraints_override_enabled_flag` is equal to 1, the default maximum hierarchical depth can be overridden by `ph_max_mtt_hierarchy_depth_intra_slice_luma` in the referenced SPS's PH. The value of `sps_max_mtt_hierarchy_depth_intra_slice_luma` should be in the range of 0 to 2*(CtbLog2SizeY - MinCbLog2SizeY) (inclusive).
[0601] `sps_log2_diff_max_bt_min_qt_intra_slice_luma` specifies the default difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a binary partitioned luminance codec block and the smallest size (width or height) of the luminance samples in a luminance leaf block, which is generated by a quadtree partition of the CTU in a slice with `slice_type` equal to 2(I) of the SPS. When `partition_constraints_override_enabled_flag` equals 1, the default difference can be overridden by `ph_log2_diff_max_bt_min_qt_luma`, which exists in the PH of the SPS. The value of `sps_log2_diff_max_bt_min_qt_intra_slice_luma` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeIntraY` (inclusive). When sps_log2_diff_max_bt_min_qt_intra_slice_luma does not exist, the value of sps_log2_diff_max_bt_min_qt_intra_slice_luma is inferred to be equal to 0.
[0602] `sps_log2_diff_max_tt_min_qt_intra_slice_luma` specifies the default difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a ternary partitioned luminance codec block and the smallest size (width or height) of the luminance samples in a luminance leaf block, which is generated by a quadtree partition of a CTU with slice_type equal to 2(I) of the SPS. When `partition_constraints_override_enabled_flag` equals 1, the default difference can be overridden by `ph_log2_diff_max_tt_min_qt_luma` existing in the PH of the SPS. The value of `sps_log2_diff_max_tt_min_qt_intra_slice_luma` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeIntraY` (inclusive). When sps_log2_diff_max_tt_min_qt_intra_slice_luma does not exist, the value of sps_log2_diff_max_tt_min_qt_intra_slice_luma is inferred to be equal to 0.
[0603] `sps_log2_diff_min_qt_min_cb_inter_slice` specifies the default difference between the radix-2 logarithm of the smallest size of the luminance samples in the luminance leaf blocks generated by the quadtree partitioning of the CTU and the radix-2 logarithm of the smallest luminance codec block size in the luminance samples of the luminance CUs in the strip, where `slice_type` equals 0 (B) or 1 (P) of the referenced SPS. When `partition_constraints_override_enabled_flag` equals 1, the default difference can be overridden by `ph_log2_diff_min_qt_min_cb_luma` present in the referenced SPS's PH. The value of `sps_log2_diff_min_qt_min_cb_inter_slice` should be in the range of 0 to `CtbLog2SizeY - MinCbLog2SizeY` (inclusive). The radix-2 logarithm of the smallest size of the luminance samples in the luminance leaf blocks generated by the quadtree partitioning of the CTU is derived as follows:
[0604] MinQtLog2SizeInterY=sps_log2_diff_min_qt_min_cb_inter_slice+MinCbLog2SizeY (56)
[0605] `sps_max_mtt_hierarchy_depth_inter_slice` specifies the default maximum hierarchical depth of the codec unit, which is generated by multi-type tree partitioning of quadtree leaves in slices with `slice_type` equal to 0(B) or 1(P) of the referenced SPS. When `partition_constraints_override_enabled_flag` is equal to 1, the default maximum hierarchical depth can be overridden by `ph_max_mtt_hierarchy_depth_inter_slice` existing in the referenced SPS's `PH`. The value of `sps_max_mtt_hierarchy_depth_inter_slice` should be in the range of 0 to 2*(CtbLog2SizeY - MinCbLog2SizeY) (inclusive).
[0606] `sps_log2_diff_max_bt_min_qt_inter_slice` specifies the default difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a binary partitioned luminance codec block and the smallest size (width or height) of the luminance samples in a luminance leaf block, which is generated by quadtree partitioning of the CTU in a slice with `slice_type` equal to reference 0 (B) or 1 (P). When `partition_constraints_override_enabled_flag` equals 1, the default difference can be overridden by referencing `ph_log2_diff_max_bt_min_qt_luma` present in the PH of the SPS. The value of `sps_log2_diff_max_bt_min_qt_inter_slice` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeInterY` (inclusive). When sps_log2_diff_max_bt_min_qt_inter_slice does not exist, the value of sps_log2_diff_max_bt_min_qt_inter_slice is inferred to be equal to 0.
[0607] `sps_log2_diff_max_tt_min_qt_inter_slice` specifies the default difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a ternary partitioned luminance codec block and the smallest size (width or height) of the luminance samples in a luminance leaf block, which is generated by quadtree partitioning the CTU in a slice with `slice_type` equal to 0 (B) or 1 (P) of the referenced SPS. When `partition_constraints_override_enabled_flag` is equal to 1, the default difference can be overridden by `ph_log2_diff_max_tt_min_qt_luma` present in the referenced SPS's PH. The value of `sps_log2_diff_max_tt_min_qt_inter_slice` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeInterY` (inclusive). When sps_log2_diff_max_tt_min_qt_inter_slice does not exist, the value of sps_log2_diff_max_tt_min_qt_inter_slice is inferred to be equal to 0.
[0608] `sps_log2_diff_min_qt_min_cb_intra_slice_chroma` specifies the default difference between the radix-2 logarithm of the smallest size of the luminance samples in the chroma leaf blocks generated from the quadtree partitioning of the chroma CTU (where `treeType` equals `DUAL_TREE_CHROMA`) and the radix-2 logarithm of the smallest decoder block size in the luminance samples of the chroma CUs with `treeType` equal to `DUAL_TREE_CHROMA` in the slices with `slice_type` equal to 2(I) referenced by SPS. When `partition_constraints_override_enabled_flag` equals 1, the default difference can be overridden by `ph_log2_diff_min_qt_min_cb_chroma` present in the PH referenced by SPS. The value of `sps_log2_diff_min_qt_min_cb_intra_slice_chroma` should be in the range of 0 to `CtbLog2SizeY - MinCbLog2SizeY` (inclusive). When it does not exist, the value of `sps_log2_diff_min_qt_min_cb_intra_slice_chroma` is inferred to be equal to 0. The radix-2 logarithm of the smallest size of the chroma leaf block's luminance sample generated by a quadtree partition of a CTU with `treeType` equal to `DUAL_TREE_CHROMA` is derived as follows:
[0609] MinQtLog2SizeIntraC=sps_log2_diff_min_qt_min_cb_intra_slice_chroma+MinCbLog2SizeY(57)
[0610] `sps_max_mtt_hierarchy_depth_intra_slice_chroma` specifies the default maximum hierarchical depth of a chroma codec unit, which is generated by a multi-type tree partition of chroma quadtree leaves with `treeType` equal to `DUAL_TREE_CHROMA` in a slice of type 2(I) referencing SPS. When `partition_constraints_override_enabled_flag` is equal to 1, the default maximum hierarchical depth can be overridden by `ph_max_mtt_hierarchy_depth_chroma` present in the `ph` referenced by SPS. The value of `sps_max_mtt_hierarchy_depth_intra_slice_chroma` should be in the range of 0 to 2*(CtbLog2SizeY - MinCbLog2SizeY) (inclusive). When it does not exist, the value of `sps_max_mtt_hierarchy_depth_intra_slice_chroma` is inferred to be equal to 0.
[0611] `sps_log2_diff_max_bt_min_qt_intra_slice_chroma` specifies the default difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a binary partitioned chroma codec block and the smallest size (width or height) of the luminance samples in a chroma leaf block, which is generated by quadtree partitioning of a chroma CTU with `treeType` equal to `DUAL_TREE_CHROMA` in a stripe of type 2(I) referencing SPS. When `partition_constraints_override_enabled_flag` equals 1, the default difference can be overridden by `ph_log2_diff_max_bt_min_qt_chroma` existing in the PH of SPS. The value of `sps_log2_diff_max_bt_min_qt_intra_slice_chroma` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeIntraC` (inclusive). When sps_log2_diff_max_bt_min_qt_intra_slice_chroma does not exist, the value of sps_log2_diff_max_bt_min_qt_intra_slice_chroma is inferred to be equal to 0.
[0612] `sps_log2_diff_max_tt_min_qt_intra_slice_chroma` specifies the default difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a ternary partitioned chroma codec block and the smallest size (width or height) of the luminance samples in a chroma leaf block generated by a quadtree partition of a chroma CTU with `slice_type` equal to `SPS_2(I)` and `treeType` equal to `DUAL_TREE_CHROMA`. When `partition_constraints_override_enabled_flag` is equal to 1, this default difference can be overridden by `ph_log2_diff_max_tt_min_qt_chroma`, which exists in the `PH` of the SPS. The value of `sps_log2_diff_max_tt_min_qt_intra_slice_chroma` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeIntraC` (inclusive). When sps_log2_diff_max_tt_min_qt_intra_slice_chroma does not exist, the value of sps_log2_diff_max_tt_min_qt_intra_slice_chroma is inferred to be equal to 0.
[0613] A value of 1 for sps_max_luma_transform_size_64_flag indicates that the maximum transformation size in the luminance sample is 64. A value of 0 for sps_max_luma_transform_size_64_flag indicates that the maximum transformation size in the luminance sample is 32.
[0614] When CtbSizeY is less than 64, the value of sps_max_luma_transform_size_64_flag should be equal to 0.
[0615] The variables MinTbLog2SizeY, MaxTbLog2SizeY, MinTbSizeY, and MaxTbSizeY are derived as follows:
[0616] MinTbLog2SizeY=2 (58)
[0617] MaxTbLog2SizeY=sps_max_luma_transform_size_64_flag? 6:5 (59)
[0618] MinTbSizeY=1< <MinTbLog2SizeY (60)
[0619] MaxTbSizeY = 1 <MaxTbLog2SizeY (61)
[0620] A value of 0 for `sps_joint_cbcr_enabled_flag` disables joint encoding and decoding of chroma residuals. A value of 1 for `sps_joint_cbcr_enabled_flag` enables joint encoding and decoding of chroma residuals. When `sps_joint_cbcr_enabled_flag` does not exist, its value is inferred to be 0.
[0621] When `sps_joint_cbcr_enabled_flag` equals 1, `same_qp_table_for_chroma` equal to 1 specifies that only one chroma QP mapping table is signaled, and this table applies to Cb and Cr residuals, and also to the joint Cb-Cr residual. When `same_qp_table_for_chroma` equals 0, it specifies that when `sps_joint_cbcr_enabled_flag` equals 1, the chroma QP mapping table is signaled in SPS, two for Cb and Cr, and one for the joint Cb-Cr. When `same_qp_table_for_chroma` is not present in the bitstream, its value is inferred to be 1.
[0622] The value of qp_table_start_minus26[i] plus 26 specifies the starting luminance and chrominance QP used to describe the i-th chrominance QP mapping table. The value of qp_table_start_minus26[i] should be in the range of -26 - QpBdOffset to 36 (inclusive). When qp_table_start_minus26[i] does not exist in the bitstream, its value is inferred to be equal to 0.
[0623] The increment of 1 in num_points_in_qp_table_minus1[i] specifies the number of points used to describe the i-th chroma QP mapping table. The value of num_points_in_qp_table_minus1[i] should be in the range of 0 to 63+QpBdOffset (inclusive). When num_points_in_qp_table_minus1[0] is not present in the bitstream, the value of num_points_in_qp_table_minus1[0] is inferred to be equal to 0.
[0624] delta_qp_in_val_minus1[i][j] specifies the increment value of the input coordinates used to derive the pivot point of the i-th chromaticity QP mapping table. When delta_qp_in_val_minus1[0][j] does not exist in the bitstream, the value of delta_qp_in_val_minus1[0][j] is inferred to be equal to 0.
[0625] delta_qp_diff_val[i][j] specifies the incremental value used to derive the output coordinates of the j-th pivot point of the i-th chromaticity QP mapping table.
[0626] The i-th chromaticity QP mapping table ChromaQpTable[i] is derived as follows (for i = 0 … numQpTables-1):
[0627]
[0628]
[0629] When same_qp_table_for_chroma equals 1, ChromaQpTable[1][k] and ChromaQpTable[2][k] are set to be equal to ChromaQpTable[0][k] (for k in the range of -QpBdOffset to 63 (inclusive)).
[0630] The requirement for bitstream consistency is that the values of qpInVal[i][j] and qpOutVal[i][j] should be in the range of -QpBdOffset to 63 (inclusive), for i in the range of 0 to numQpTables-1 (inclusive), and for j in the range of 0 to num_points_in_qp_table_minus1[i]+1 (inclusive).
[0631] A value of 1 for `sps_sao_enabled_flag` indicates that the adaptive sampling offset process is applied to the reconstructed image after the deblocking filtering process. A value of 0 for `sps_sao_enabled_flag` indicates that the adaptive sampling offset process is not applied to the reconstructed image after the deblocking filtering process.
[0632] A value of 0 for sps_alf_enabled_flag disables the cross-component adaptive loop filter. A value of 1 for sps_alf_enabled_flag enables the adaptive loop filter.
[0633] A value of 0 for sps_ccalf_enabled_flag disables the cross-component adaptive loop filter. A value of 1 for sps_ccalf_enabled_flag enables the cross-component adaptive loop filter.
[0634] A value of 1 for `sps_transform_skip_enabled_flag` indicates that `transform_skip_flag` may exist in the transform unit syntax. A value of 0 for `sps_transform_skip_enabled_flag` indicates that `transform_skip_flag` does not exist in the transform unit syntax.
[0635] log2_transform_skip_max_size_minus2 specifies the maximum block size to be skipped during transformation, and should be in the range of 0 to 3 (inclusive).
[0636] The variable MaxTsSize is set to equal to 1 << (log2_transform_skip_max_size_minus2+2).
[0637] A value of 1 for `sps_bdpcm_enabled_flag` indicates that `intra_bdpcm_luma_flag` and `intra_bdpcm_chroma_flag` may exist in the codec unit syntax of an intra-codec unit. A value of 0 for `sps_bdpcm_enabled_flag` indicates that `intra_bdpcm_luma_flag` and `intra_bdpcm_chroma_flag` do not exist in the codec unit syntax of an intra-codec unit. When they do not exist, the value of `sps_bdpcm_enabled_flag` is inferred to be 0.
[0638] `sps_ref_wraparound_enabled_flag` equal to 1 specifies that horizontal wraparound motion compensation is applied in inter-frame prediction. `sps_ref_wraparound_enabled_flag` equal to 0 specifies that horizontal wraparound motion compensation is not applied. When the value of (CtbSizeY / MinCbSizeY+1) is greater than (pic_width_in_luma_samples / MinCbSizeY-1), where pic_width_in_luma_samples is the value of pic_width_in_luma_samples in any PPS referencing SPS, the value of `sps_ref_wraparound_enabled_flag` should be equal to 0.
[0639] A value of 1 for `sps_temporal_mvp_enabled_flag` indicates that temporal motion vector predictions can be used in CLVS. A value of 0 for `sps_temporal_mvp_enabled_flag` indicates that temporal motion vector predictions are not used in CLVS.
[0640] `sps_sbtmvp_enabled_flag` equal to 1 indicates that sub-block-based temporal motion vector predictions can be used to decode images, where the `slice_type` of all slices in CLVS is not equal to 'I'. `sps_sbtmvp_enabled_flag` equal to 0 indicates that sub-block-based temporal motion vector predictions are not used in CLVS. When `sps_sbtmvp_enabled_flag` does not exist, it is inferred to be equal to 0.
[0641] A value of 1 for `sps_amvr_enabled_flag` specifies that adaptive motion vector differential resolution is used in motion vector encoding and decoding. A value of 0 for `amvr_enabled_flag` specifies that adaptive motion vector differential resolution is not used in motion vector encoding and decoding.
[0642] A value of 0 for sps_bdof_enabled_flag disables bidirectional optical stream inter-frame prediction. A value of 1 for sps_bdof_enabled_flag enables bidirectional optical stream inter-frame prediction.
[0643] A value of 1 for `sps_bdof_pic_present_flag` indicates that `ph_disable_bdof_flag` exists in the PH referencing SPS. A value of 0 for `sps_bdof_pic_present_flag` indicates that `ph_disable_bdof_flag` does not exist in the PH referencing SPS. When `sps_bdof_pic_present_flag` does not exist, its value is inferred to be 0.
[0644] A value of 1 for sps_smvd_enabled_flag indicates that symmetric motion vector difference can be used for motion vector decoding. A value of 0 for sps_smvd_enabled_flag indicates that symmetric motion vector difference is not used in motion vector encoding and decoding.
[0645] A value of 1 for `sps_dmvr_enabled_flag` enables decoder motion vector optimization based on inter-frame double prediction. A value of 0 for `sps_dmvr_enabled_flag` disables decoder motion vector optimization based on inter-frame double prediction.
[0646] A value of 1 for `sps_dmvr_pic_present_flag` indicates that the `ph_disable_dmvr_flag` exists in the `PH` referencing SPS. A value of 0 for `sps_dmvr_pic_present_flag` indicates that the `ph_disable_dmvr_flag` does not exist in the `PH` referencing SPS. When `sps_dmvr_pic_present_flag` does not exist, its value is inferred to be 0.
[0647] A value of 1 for sps_mmvd_enabled_flag indicates that merge mode with motion vector difference is enabled. A value of 0 for sps_mmvd_enabled_flag indicates that merge mode with motion vector difference is disabled.
[0648] A value of 1 for sps_isp_enabled_flag enables intra-frame prediction with sub-partitions. A value of 0 for sps_isp_enabled_flag disables intra-frame prediction with sub-partitions.
[0649] A value of 1 for sps_mrl_enabled_flag enables intra-frame prediction with multiple reference lines. A value of 0 for sps_mrl_enabled_flag disables intra-frame prediction with multiple reference lines.
[0650] A value of 1 for sps_mip_enabled_flag enables matrix-based intra prediction. A value of 0 for sps_mip_enabled_flag disables matrix-based intra prediction.
[0651] A value of 0 for `sps_cclm_enabled_flag` disables intra-frame prediction using the cross-component linear model from the luma component to the chroma component. A value of 1 for `sps_cclm_enabled_flag` enables intra-frame prediction using the cross-component linear model from the luma component to the chroma component. When `sps_cclm_enabled_flag` is not present, it is inferred to be equal to 0.
[0652] A value of 1 for `sps_chroma_horizontal_collocated_flag` indicates that the prediction process operates in a manner designed for the chroma sample location, which is not horizontally shifted relative to the corresponding luminance sample location. A value of 0 for `sps_chroma_horizontal_collocated_flag` indicates that the prediction process operates in a manner designed for the chroma sample location, which is shifted 0.5 units to the right relative to the corresponding luminance sample location. When `sps_chroma_horizontal_collocated_flag` does not exist, it is inferred to be equal to 1.
[0653] A value of 1 for `sps_chroma_vertical_collocated_flag` indicates that the prediction process operates in a manner designed for the chroma sample position, which is not vertically shifted relative to the corresponding luminance sample position. A value of 0 for `sps_chroma_vertical_collocated_flag` indicates that the prediction process operates in a manner designed for the chroma sample position, which is shifted downwards by 0.5 luminance samples relative to the corresponding luminance sample position. When `sps_chroma_vertical_collocated_flag` does not exist, it is inferred to be equal to 1.
[0654] A value of 1 for `sps_mts_enabled_flag` indicates that both `sps_explicit_mts_intra_enabled_flag` and `sps_explicit_mts_inter_enabled_flag` exist in the sequence parameter set RBSP syntax. A value of 0 for `sps_mts_enabled_flag` indicates that both `sps_explicit_mts_intra_enabled_flag` and `sps_explicit_mts_inter_enabled_flag` do not exist in the sequence parameter set RBSP syntax.
[0655] A value of 1 for `sps_explicit_mts_intra_enabled_flag` indicates that `mts_idx` may exist in the intra codec unit syntax. A value of 0 for `sps_explicit_mts_intra_enabled_flag` indicates that `mts_idx` does not exist in the intra codec unit syntax. When it does not exist, the value of `sps_explicit_mts_intra_enabled_flag` is inferred to be 0.
[0656] A value of 1 for `sps_explicit_mts_inter_enabled_flag` indicates that `mts_idx` may exist in the inter-frame codec unit syntax. A value of 0 for `sps_explicit_mts_inter_enabled_flag` indicates that `mts_idx` does not exist in the inter-frame codec unit syntax. When it does not exist, the value of `sps_explicit_mts_inter_enabled_flag` is inferred to be 0.
[0657] The `six_minus_max_num_merge_cand` parameter specifies the maximum number of merging motion vector prediction (MVP) candidates supported by SPS, subtracted from 6. The maximum number of merging MVP candidates, `MaxNumMergeCand`, is derived as follows:
[0658] MaxNumMergeCand=6-six_minus_max_num_merge_cand (63)
[0659] The value of MaxNumMergeCand should be in the range of 1 to 6 (inclusive).
[0660] A value of 0 for sps_sbt_enabled_flag disables subblock transforms for the inter-frame prediction CU. A value of 1 for sps_sbt_enabled_flag enables subblock transforms for the inter-frame prediction CU.
[0661] `sps_affine_enabled_flag` specifies whether affine-based motion compensation can be used for inter-frame prediction. If `sps_affine_enabled_flag` equals 0, the syntax should be restricted so that affine-based motion compensation is not used in CLVS, and `inter_affine_flag` and `cu_affine_type_flag` do not exist in the CLVS codec unit syntax. Otherwise (`sps_affine_enabled_flag` equals 1), affine-based motion compensation can be used in CLVS.
[0662] five_minus_max_num_subblock_merge_cand specifies the maximum number of subblock-based merging motion vector prediction candidates supported in SPS, minus 5.
[0663] `sps_affine_type_flag` specifies whether motion compensation based on a 6-parameter affine model can be used for inter-frame prediction. If `sps_affine_type_flag` equals 0, the syntax should be restricted so that motion compensation based on a 6-parameter affine model is not used in CLVS, and `cu_affine_type_flag` does not exist in the codec unit syntax of CLVS. Otherwise (`sps_affine_type_flag` equals 1), motion compensation based on a 6-parameter affine model can be used in CLVS. When it does not exist, the value of `sps_affine_type_flag` is inferred to be equal to 0.
[0664] A value of 1 for `sps_affine_amvr_enabled_flag` specifies that adaptive motion vector difference resolution is used in motion vector encoding and decoding in affine inter-frame mode. A value of 0 for `sps_affine_amvr_enabled_flag` specifies that adaptive motion vector difference resolution is not used in motion vector encoding and decoding in affine inter-frame mode. When it does not exist, the value of `sps_affine_amvr_enabled_flag` is inferred to be 0.
[0665] `sps_affine_prof_enabled_flag` specifies whether prediction optimization using optical flow can be used for affine motion compensation. If `sps_affine_prof_enabled_flag` equals 0, affine motion compensation should not be optimized using optical flow. Otherwise (`sps_affine_prof_enabled_flag` equals 1), affine motion compensation can be optimized using optical flow. When it does not exist, the value of `sps_affine_prof_enabled_flag` is inferred to be 0.
[0666] A value of 1 for `sps_prof_pic_present_flag` indicates that `ph_disable_prof_flag` exists in the PH referencing SPS. A value of 0 for `sps_prof_pic_present_flag` indicates that `ph_disable_prof_flag` does not exist in the PH referencing SPS. When `sps_prof_pic_present_flag` does not exist, its value is inferred to be 0.
[0667] A value of 1 for `sps_palette_enabled_flag` indicates that the `pred_mode_plt_flag` may exist in the codec unit syntax. A value of 0 for `sps_palette_enabled_flag` indicates that the `pred_mode_plt_flag` does not exist in the codec unit syntax. When `sps_palette_enabled_flag` does not exist, it is inferred to be equal to 0.
[0668] A value of 1 for `sps_act_enabled_flag` indicates that adaptive color transformation can be used, and `cu_act_enabled_flag` can appear in the codec unit syntax. A value of 0 for `sps_act_enabled_flag` indicates that adaptive color transformation is not used, and `cu_act_enabled_flag` does not exist in the codec unit syntax. When `sps_act_enabled_flag` does not exist, it is inferred to be equal to 0.
[0669] The minimum allowed quantization parameters for transform skip modes are specified in min_qp_prime_ts_minus4 as follows:
[0670] QpPrimeTsMin=4+min_qp_prime_ts_minus4 (64)
[0671] The value of min_qp_prime_ts_minus4 should be in the range of 0 to 48 (inclusive).
[0672] `sps_bcw_enabled_flag` specifies whether double prediction with CU weights can be used for inter-frame prediction. If `sps_bcw_enabled_flag` equals 0, the syntax should be restricted so that double prediction with CU weights is not used in CLVS, and `bcw_idx` does not exist in the CLVS codec unit syntax. Otherwise (`sps_bcw_enabled_flag` equals 1), double prediction with CU weights can be used in CLVS.
[0673] A value of 1 for `sps_ibc_enabled_flag` indicates that the IBC prediction mode can be used for image decoding in CLVS. A value of 0 for `sps_ibc_enabled_flag` indicates that the IBC prediction mode is not used in CLVS. When `sps_ibc_enabled_flag` does not exist, it is inferred to be equal to 0.
[0674] The `six_minus_max_num_ibc_merge_cand` parameter specifies the maximum number of IBC merging block vector prediction (BVP) candidates supported in SPS to be subtracted from 6.
[0675] The maximum number of BVP candidates, MaxNumIbcMergeCand, for IBC merging is derived as follows:
[0676]
[0677] `sps_ciip_enabled_flag` specifies that `ciip_flag` may appear in the codec unit syntax used for inter-frame codec units. `sps_ciip_enabled_flag` equal to 0 specifies that `ciip_flag` does not exist in the codec unit syntax used for inter-frame codec units.
[0678] A value of 1 for sps_fpel_mmvd_enabled_flag specifies that merge mode with motion vector difference uses integer sample precision. A value of 0 for sps_fpel_mmvd_enabled_flag specifies that merge mode with motion vector difference can use fractional sample precision.
[0679] `sps_gpm_enabled_flag` specifies whether geometry-partition-based motion compensation can be used for inter-frame prediction. `sps_gpm_enabled_flag` equal to 0 indicates that the syntax should be constrained so that geometry-partition-based motion compensation is not used in CLVS, and that `merge_gpm_partition_idx`, `merge_gpm_idx0`, and `merge_gpm_idx1` do not exist in the CLVS codec unit syntax. `sps_gpm_enabled_flag` equal to 1 indicates that geometry-partition-based motion compensation can be used in CLVS. When it does not exist, the value of `sps_gpm_enabled_flag` is inferred to be 0.
[0680] max_num_merge_cand_minus_max_num_gpm_cand specifies the maximum number of geometric segmentation merge pattern candidates supported in the SPS, subtracted from MaxNumMergeCand.
[0681] If sps_gpm_enabled_flag equals 1 and MaxNumMergeCand is greater than or equal to 3, then the maximum number of geometric segmentation merge pattern candidates, MaxNumGeoMergeCand, is derived as follows:
[0682]
[0683]
[0684] The value of MaxNumGeoMergeCand should be in the range of 2 to MaxNumMergeCand (inclusive).
[0685] A value of 1 for sps_lmcs_enabled_flag specifies that a luma map with chroma scaling is used in CLVS. A value of 0 for sps_lmcs_enabled_flag specifies that a luma map with chroma scaling is not used in CLVS.
[0686] A value of 1 for sps_lfnst_enabled_flag indicates that lfnst_idx may exist in the intra-frame codec unit syntax. A value of 0 for sps_lfnst_enabled_flag indicates that lfnst_idx does not exist in the intra-frame codec unit syntax.
[0687] The value of sps_ladf_enabled_flag equal to 1 indicates that sps_num_ladf_intervals_minus2, sps_ladf_lowest_interval_qp_offset, sps_ladf_qp_offset[i] and sps_ladf_delta_threshold_minus1[i] exist in SPS.
[0688] Increasing 1 to sps_num_ladf_interval_minus2 specifies the number of sps_ladf_delta_threshold_minus1[i] and sps_ladf_qp_offset[i] syntax elements present in SPS. The value of sps_num_ladf_intervals_minus2 should be in the range of 0 to 3 (inclusive).
[0689] sps_ladf_lowest_interval_qp_offset specifies the offset used to derive the variable qP as defined in clause 8.8.3.6.1. The value of sps_ladf_lowest_interval_qp_offset should be in the range of -63 to 63 (inclusive).
[0690] sps_ladf_qp_offset[i] specifies the offset array used to derive the variable qP as defined in clause 8.8.3.6.1. The value of sps_ladf_qp_offset[i] should be in the range of -63 to 63 (inclusive).
[0691] `sps_ladf_delta_threshold_minus1[i]` is used to calculate the value of `SpsLadfIntervalLowerBound[i]`, which specifies the lower bound of the i-th luminance intensity level interval. The value of `sps_ladf_delta_threshold_minus1[i]` should be between 0 and 2. BitDepth The range is within -3 (inclusive).
[0692] The value of SpsLadfIntervalLowerBound[0] is set to 0.
[0693] For each value of i in the range from 0 to (inclusive) sps_num_ladf_intervals_minus2, derive the variable SpsLadfIntervalLowerBound[i+1] as follows:
[0694] SpsLadfIntervalLowerBound[i+1]=SpsLadfIntervalLowerBound[i] (67)+sps_ladf_delta_threshold_minus1[i]+1
[0695] The value of the variable `Log2ParMrgLevel` is specified by adding 2 to `log2_parallel_merge_level_minus2`. This value is used in the derivation process of spatial merging candidates as specified in Clause 8.5.2.3, the derivation process of motion vectors and reference indices in the sub-block merge pattern as specified in Clause 8.5.5.2, and the invocation used to control the update process of the historical motion vector prediction list as specified in Clause 8.5.2.1. The value of `log2_parallel_merge_level_minus2` should be in the range of 0 to `CtbLog2SizeY-2` (inclusive). The variable `Log2ParMrgLevel` is derived as follows:
[0696] Log2ParMrgLevel=log2_parallel_merge_level_minus2+2(68)
[0697] A value of 1 for `sps_scaling_list_enabled_flag` indicates that the scaling list is used in the scaling process of the transformation coefficients. A value of 0 for `sps_scaling_list_enabled_flag` indicates that the scaling list is not used in the scaling process of the transformation coefficients.
[0698] A value of 0 for `sps_dep_quant_enabled_flag` disables correlated quantization for images referencing SPS. A value of 1 for `sps_dep_quant_enabled_flag` enables correlated quantization for images referencing SPS.
[0699] A value of 0 for `sps_sign_data_hiding_enabled_flag` disables sign bit hiding for images referencing SPS. A value of 1 for `sps_sign_data_hiding_enabled_flag` enables sign bit hiding for images referencing SPS. When `sps_sign_data_hiding_enabled_flag` does not exist, it is inferred to be equal to 0.
[0700] A `sps_virtual_boundaries_enabled_flag` value of 1 indicates that loop filtering across virtual boundaries can be disabled in CLVS-encoded images. A `sps_virtual_boundaries_enabled_flag` value of 0 indicates that loop filtering across virtual boundaries is not disabled in CLVS-encoded images. Loop filtering operations include deblocking filters, sample adaptive offset filters, and adaptive loop filter operations.
[0701] `sps_virtual_boundaries_present_flag` equal to 1 specifies that signaling information about virtual boundaries is provided in the SPS. `sps_virtual_boundaries_present_flag` equal to 0 specifies that signaling information about virtual boundaries is not provided in the SPS. When there is signaling for one or more virtual boundaries in the SPS, loop filtering operations are disabled across virtual boundaries in images referencing the SPS. Loop filtering operations include deblocking filtering, adaptive sampling offset filtering, and adaptive loop filtering operations.
[0702] One requirement for bitstream consistency is that when the value of res_change_in_clvs_allowed_flag is equal to 1, the value of sps_virtual_boundaries_present_flag should be equal to 0.
[0703] sps_num_ver_virtual_boundaries specifies the number of sps_virtual_boundaries_pos_x[i] syntax elements that exist in SPS. When sps_num_ver_virtual_boundaries does not exist, it is inferred to be equal to 0.
[0704] sps_virtual_boundaries_pos_x[i] specifies the position of the i-th vertical virtual boundary, in units of luminance samples divided by 8. The value of sps_virtual_boundaries_pos_x[i] should be in the range of 1 to Ceil(pic_width_in_luma_samples÷8)-1 (inclusive).
[0705] sps_num_hor_virtual_boundaries specifies the number of sps_virtual_boundaries_pos_y[i] syntax elements that exist in SPS. When sps_num_hor_virtual_boundaries does not exist, it is inferred to be equal to 0.
[0706] When sps_virtual_boundaries_enabled_flag equals 1 and sps_virtual_boundaries_present_flag equals 1, the sum of sps_num_ver_virtual_boundaries and sps_num_hor_virtual_boundaries should be greater than 0.
[0707] sps_virtual_boundaries_pos_y[i] specifies the position of the i-th horizontal virtual boundary, in units of luminance samples divided by 8. The value of sps_virtual_boundaries_pos_y[i] should be in the range of 1 to Ceil(pic_height_in_luma_samples÷8)-1 (inclusive).
[0708] A value of 1 for `sps_general_hrd_params_present_flag` indicates that the syntax structure `general_hrd_parameters()` exists in the SPS RBSP syntax structure. A value of 0 for `sps_general_hrd_params_present_flag` indicates that the syntax structure `general_hrd_parameters()` does not exist in the SPS RBSP syntax structure.
[0709] A value of 1 for `sps_sublayer_cpb_params_present_flag` specifies that the syntax structure `old_hrd_parameters()` in the SPS RBSP includes the HRD parameters of the sublayer representation, where `TemporalId` is in the range of 0 to `sps_max_sublayers_minus1` (inclusive). A value of 0 for `sps_sublayer_cpb_params_present_flag` specifies that the syntax structure `ols_hrd_parameters()` in the SPS RBSP includes the HRD parameters of the sublayer representation, where `TemporalId` is equal to only `sps_max_sublayers_minus1`. When `sps_max_sublayers_minus1` is equal to 0, the value of `sps_sublayer_cpb_params_present_flag` is inferred to be 0.
[0710] When `sps_sublayer_cpb_params_present_flag` equals 0, the HRD parameters of the sublayer representation (where `TemporalId` is in the range of 0 to `sps_max_sublayers_minus1-1` (inclusive)) are inferred to be the same as the HRD parameters of the sublayer representation (where `TemporalId` equals `sps_max_sublayers_minus1`). These include the HRD parameters of the `sublayer_hrd_parameters(i)` syntax structure from the `fixed_pic_rate_general_flag[i]` syntax element up to the `ols_hrd_parameters` syntax structure under the condition "if(general_vcl_hrd_params_present_flag)".
[0711] A field_seq_flag value of 1 indicates that CLVS conveys an image representing a field. A field_seq_flag value of 0 indicates that CLVS conveys an image representing a frame. When general_frame_only_constraint_flag is 1, the value of field_seq_flag should be 0.
[0712] When field_seq_flag equals 1, a Frame Field Information (SEI) message should be presented for each codec image in CLVS.
[0713] Note 5 – The specified decoding process does not treat the images representing fields or frames differently. Therefore, the sequence of images representing fields will be encoded and decoded using the image dimensions of a single field. For example, an image representing a 1080i field will typically have a cropped output dimension of 1920x540, and the sequence image rate will typically represent the rate of the source field (typically between 50 and 60 Hz), rather than the source frame rate (typically between 25 and 30 Hz).
[0714] A value of 1 for `vui_parameters_present_flag` indicates that the syntax structure `vui_parameters()` exists within the SPSRBSP syntax structure. A value of 0 for `vui_parameters_present_flag` indicates that the syntax structure `vui_parameters()` does not exist within the SPSRBSP syntax structure.
[0715] A value of 0 for sps_extension_flag indicates that the sps_extension_data_flag syntax element does not exist in the SPS RBSP syntax structure. A value of 1 for sps_extension_flag indicates that the sps_extension_data_flag syntax element exists in the SPS RBSP syntax structure.
[0716] The `sps_extension_data_flag` flag can have any value. Its presence and value do not affect the consistency of the decoder with the profile specified in this version of the specification. Decoders conforming to this version of the specification should ignore all `sps_extension_data_flag` syntax elements.
[0717] 7.4.3.4 Image Parameter Set RBSP Semantics
[0718] The PPS RBSP should be available for the decoding process before it is referenced, included in at least one AU (where TemporalId is less than or equal to the TemporalId of the PPS NAL unit), or provided externally.
[0719] All PPS NAL cells within a PU that have a specific value of pps_pic_parameter_set_id should have the same content.
[0720] The `pps_pic_parameter_set_id` identifier identifies PPS for reference by other syntax elements. The value of `pps_pic_parameter_set_id` should be in the range of 0 to 63 (inclusive).
[0721] Regardless of the nuh_layer_id value, PPS NAL cells share the same value space for pps_pic_parameter_set_id.
[0722] Let ppsLayerId be the nuh_layer_id value of a specific PPS NAL cell, and let vclLayerId be the nuh_layer_id value of a specific VCL NAL cell. A specific VCL NAL cell should not reference a specific PPS NAL cell unless ppsLayerId is less than or equal to vclLayerId, and the layer whose nuh_layer_id is equal to ppsLayerId is included in at least one OLS that includes layers whose nuh_layer_id is equal to vclLayerId.
[0723] The `pps_seq_parameter_set_id` parameter specifies the value of `sps_seq_parameter_set_id` used for SPS. The value of `pps_seq_parameter_set_id` should be in the range of 0 to 15 (inclusive). The value of `pps_seq_parameter_set_id` should be the same across all PPSs referenced by images encoded and decoded in CLVS.
[0724] A mixed_nalu_types_in_pic_flag value of 1 indicates that each image referencing PPS has multiple VCL NAL units, the VCL NAL units do not have the same nal_unit_type value, and the image is not an IRAP image. A mixed_nalu_types_in_pic_flag value of 0 indicates that each image referencing PPS has one or more VCL NAL units, and the VCL NAL units of each image referencing PPS have the same nal_unit_type value.
[0725] When no_mixed_nalu_types_in_pic_constraint_flag equals 1, the value of mixed_nalu_types_in_pic_flag should be equal to 0.
[0726] For each stripe in image picA with a nal_unit_type value nalUnitTypeA in the range IDR_W_RADL to CRA_NUT (inclusive), and image picA also contains one or more stripes with another nal_unit_type value (i.e., the value of mixed_nalu_types_in_pic_flag of image picA is equal to 1), the following applies:
[0727] – The stripe should belong to the subpic A, and its corresponding subpic_treated_as_pic_flag[i] value is equal to 1.
[0728] – The stripe should not belong to a sub-picture of picA containing a VCL NAL unit, where nal_unit_type is not equal to nalUnitTypeA.
[0729] – If nalUnitTypeA equals CRA, then for all subsequent PUs following the current picture in the CLVS in both the decoding and output orders, the RefPicList[0] and RefPicList[1] of the stripes in subpicA of those PUs should not include any picture preceding picA in the decoding order in the active entry.
[0730] – Otherwise (i.e., nalUnitTypeA equals IDR_W_RADL or IDR_N_LP), for all PUs in the CLVS after the current picture in the decoding order, the RefPicList[0] or RefPicList[1] of the stripe in subpicA of those PUs should not include any picture before picA in the decoding order in the active entry.
[0731] Note 1 – A mixed_nalu_types_in_pic_flag value of 1 indicates that the image referencing PPS contains stripes with different NAL unit types, such as encoder-decoder images derived from sub-picture bitstream merging operations. The encoder must ensure further alignment of the matching bitstream structure and parameters of the original bitstream. An example of these alignments is as follows: When sps_idr_rpl_flag is equal to 0 and mixed_nalu_types_in_pic_flag is equal to 1, the image referencing PPS cannot have stripes with nal_unit_type equal to IDR_W_RADL or IDR_N_LP.
[0732] `pic_width_in_luma_samples` specifies the width of each decoded image referencing PPS, in units of luminance samples. `pic_width_in_luma_samples` should not be equal to 0, should be an integer multiple of Max(8, MinCbSizeY), and should be less than or equal to `pic_width_max_in_luma_samples`.
[0733] When res_change_in_clvs_allowed_flag equals 0, the value of pic_width_in_luma_samples should be equal to pic_width_max_in_luma_samples.
[0734] `pic_height_in_luma_samples` specifies the height of each decoded image in terms of luminance samples (PPS). `pic_height_in_luma_samples` should not be equal to 0, should be an integer multiple of `Max(8, MinCbSizeY)`, and should be less than or equal to `pic_height_max_in_luma_samples`.
[0735] When res_change_in_clvs_allowed_flag equals 0, the value of pic_height_in_luma_samples should be equal to pic_height_max_in_luma_samples.
[0736] The variables PicWidthInCtbsY, PicHeightInCtbsY, PicSizeInCtbsY, PicWidthInMinCbsY, PicHeightInMinCbsY, PicSizeInMinCbsY, PicSizeInSamplesY, PicWidthInSamplesC, and PicHeightInSamplesC are derived as follows:
[0737] PicWidthInCtbsY=Ceil(pic_width_in_luma_samples÷CtbSizeY) (69)
[0738] PicHeightInCtbsY=Ceil(pic_height_in_luma_samples÷CtbSizeY) (70)
[0739] PicSizeInCtbsY=PicWidthInCtbsY*PicHeightInCtbsY (71)
[0740] PicWidthInMinCbsY=pic_width_in_luma_samples / MinCbSizeY (72)
[0741] PicHeightInMinCbsY=pic_height_in_luma_samples / MinCbSizeY (73)
[0742] PicSizeInMinCbsY=PicWidthInMinCbsY*PicHeightInMinCbsY (74)
[0743] PicSizeInSamplesY=pic_width_in_luma_samples*pic_height_in_luma_samples (75)
[0744] PicWidthInSamplesC=pic_width_in_luma_samples / SubWidthC (76)
[0745] PicHeightInSamplesC=pic_height_in_luma_samples / SubHeightC (77)
[0746] A value of 1 for pps_conformance_window_flag indicates the consistency clipping window offset parameter immediately following the PPS. A value of 0 for pps_conformance_window_flag indicates that there is no consistency clipping window offset parameter in the PPS.
[0747] `pps_conf_win_left_offset`, `pps_conf_win_right_offset`, `pps_conf_win_top_offset`, and `pps_conf_win_bottom_offset` specify the sample points of the image in the CLVS output during the decoding process, using a rectangular area defined in the image coordinates as the output. When `pps_conformance_window_flag` equals 0, the values of `pps_conf_win_left_offset`, `pps_conf_win_right_offset`, `pps_conf_win_top_offset`, and `pps_conf_win_bottom_offset` are inferred to be equal to 0.
[0748] The consistent cropping window contains luminance samples with horizontal image coordinates from SubWidthC*pps_conf_win_left_offset to pic_width_in_luma_samples-(SubWidthC*pps_conf_win_right_offset+1) and vertical image coordinates from SubHeightC*pps_conf_win_top_offset to pic_height_in_luma_samples-(SubHeightC*pps_conf_win_bottom_offset+1)(inclusive).
[0749] The value of SubWidthC*(pps_conf_win_left_offset+pps_conf_win_right_offset) should be less than pic_width_in_luma_samples, and the value of SubweightC*(pps_conf_win_top_offset+pps_conf_win_bottom_offset) should be less than pic_height_in_luma_samples.
[0750] When ChromaArrayType is not equal to 0, the corresponding specified sample points of the two chroma arrays are sample points with image coordinates (x / SubWidthC, y / SubHeightC), where (x, y) are the image coordinates of the specified brightness sample point.
[0751] Note 2 – The consistent cropping window offset parameter applies only to the output. All internal decoding processes apply to the uncropped image size.
[0752] Let ppsA and ppsB be any two PPSs referencing the same SPS. One requirement for bitstream consistency is that when ppsA and ppsB have the same pic_width_in_luma_samples and pic_height_in_luma_samples values, respectively, ppsA and ppsB should also have the same pps_conf_win_left_offset, pps_conf_win_right_offset, pps_conf_win_top_offset, and pps_conf_win_bottom_offset values, respectively.
[0753] When pic_width_in_luma_samples equals pic_width_max_in_luma_samples and pic_height_in_luma_samples equals pic_height_max_in_luma_samples, a requirement for bitstream consistency is that pps_conf_win_left_offset, pps_conf_win_right_offset, pps_conf_win_top_offset, and pps_conf_win_bottom_offset are equal to sps_conf_win_left_offset, sps_conf_win_right_offset, sps_conf_win_top_offset, and sps_conf_win_bottom_offset, respectively.
[0754] A scaling_window_explicit_signalling_flag value of 1 indicates that a scaling window offset parameter exists in PPS. A scaling_window_explicit_signalling_flag value of 0 indicates that a scaling window offset parameter does not exist in PPS. When res_change_in_clvs_allowed_flag is equal to 0, the value of scaling_window_explicit_signalling_flag should be equal to 0.
[0755] `scaling_win_left_offset`, `scaling_win_right_offset`, `scaling_win_top_offset`, and `scaling_win_bottom_offset` specify the offsets of the image size applied to the scaling ratio calculation. When these values are not present, the values of `scaling_win_left_offset`, `scaling_win_right_offset`, `scaling_win_top_offset`, and `scaling_win_bottom_offset` are inferred to be equal to `SubWidthC*conf_win_left_offset`, `SubWidthC*conf_win_right_offset`, `SubHeightC*conf_win_top_offset`, and `SubHeightC*conf_win_bottom_offset`, respectively.
[0756] The value of SubWidthC*(scaling_win_left_offset+scaling_win_right_offset) should be less than pic_width_in_luma_samples, and the value of SubHeightC*(scaling_win_top_offset+scaling_win_bottom_offset) should be less than pic_height_in_luma_samples.
[0757] The variables PicOutputWidthL and PicOutputHeightL are derived as follows:
[0758] PicOutputWidthL=pic_width_in_luma_samples- (78)SubWidthC*(scaling_win_right_offset+scaling_win_left_offset)
[0759] PicOutputHeightL=pic_height_in_luma_samples- (79)SubWidthC*(scaling_win_bottom_offset+scaling_win_top_offset)
[0760] Let refPicOutputWidthL and refPicOutputHeightL be the PicOutputWidthL and PicOutputHeightL of the reference image that references the current image of this PPS, respectively. This is a bitstream consistency requirement that satisfies all of the following conditions:
[0761] –PicOutputWidthL*2 should be greater than or equal to refPicWidthInLumaSamples.
[0762] –PicOutputHeightL*2 should be greater than or equal to refPicHeightInLumaSamples.
[0763] –PicOutputWidthL should be less than or equal to refPicWidthInLumaSamples*8.
[0764] –PicOutputHeightL should be less than or equal to refPicHeightInLumaSamples*8.
[0765] –PicOutputWidthL*pic_width_max_in_luma_samples should be greater than or equal to refPicOutputWidthL*(pic_width_in_luma_samples-Max(8,MinCbSizeY)).
[0766] –PicOutputHeightL*pic_height_max_in_luma_samples should be greater than or equal to refPicOutputHeightL*(pic_height_in_luma_samples-Max(8,MinCbSizeY)).
[0767] `output_flag_present_flag` equal to 1 indicates that the `pic_output_flag` syntax element exists in the header of the stripe referencing PPS. `output_flag_present_flag` equal to 0 indicates that the `pic_output_flag` syntax element does not exist in the header of the stripe referencing PPS.
[0768] `subpic_id_mapping_in_pps_flag` equal to 1 specifies that signaling notification of subpicture ID mapping is performed in the PPS. `subpic_id_mapping_in_pps_flag` equal to 0 specifies that signaling notification of subpicture ID mapping is not performed in the PPS. If `subpic_id_mapping_explicitly_signalled_flag` is 0 or `subpic_id_mapping_in_sps_flag` is 1, then the value of `subpic_id_mapping_in_pps_flag` should be 0. Otherwise (if `subpic_id_mapping_explicitly_signalled_flag` is 1 and `subpic_id_mapping_in_sps_flag` is 0), the value of `subpic_id_mapping_in_pps_flag` should be 1.
[0769] pps_num_subpics_minus1 should be equal to sps_num_subpics_minus1.
[0770] pps_subpic_id_len_minus1 should be equal to sps_subpic_id_len_minus1.
[0771] pps_subpic_id[i] specifies the subpick ID of the i-th subpick. The length of the pps_subpic_id[i] syntax element is pps_subpic_id_len_minus1+1 bits.
[0772] For each value of i in the range from 0 to (inclusive) sps_num_subpics_minus1, the derivation of the variable SubpicIdVal[i] is as follows:
[0773]
[0774] The requirement for bitstream consistency is applied by the following two constraints:
[0775] – For any two differences between i and j in the range from 0 to sps_num_subpics_minus1 (inclusive), SubpicIdVal[i] should not be equal to SubpicIdVal[j].
[0776] – When the current image is not the first image of CLVS, for each i value in the range from 0 to sps_num_subpics_minus1 (inclusive), if the value of SubpicIdVal[i] is not equal to the value of SubpicIdVal[i] of the previous image in the decoding order of the same layer, then the nal_unit_type of all codec strip NAL units of the subpic with subpic index i in the current image should be equal to a specific value in the range from IDR_W_RADL to CRA_NUT (inclusive).
[0777] A value of no_pic_partition_flag of 1 indicates that no image segmentation is applied to each image referencing PPS. A value of no_pic_partition_flag of 0 indicates that each image referencing PPS can be segmented into multiple slices or strips.
[0778] One requirement for bitstream consistency is that the value of no_pic_partition_flag should be the same for all PPS referenced by the image being encoded and decoded in CLVS.
[0779] One requirement for bitstream consistency is that when the value of sps_num_subpics_minus1+1 is greater than 1, the value of no_pic_partition_flag should not be equal to 1.
[0780] The value pps_log2_ctu_size_minus5 plus 5 specifies the size of the luminance codec tree block for each CTU.
[0781] pps_log2_ctu_size_minus5 should be equal to sps_log2_ctu_size_minus5.
[0782] The increment of 1 in `num_exp_tile_columns_minus1` specifies the number of explicitly provided tile column widths. The value of `num_exp_tile_columns_minus1` should be in the range of 0 to `PicWidthInCtbsY-1` (inclusive). When `no_pic_partition_flag` equals 1, the value of `num_exp_tile_columns_minus1` is inferred to be 0.
[0783] The increment of 1 in `num_exp_tile_rows_minus1` specifies the number of explicitly provided tile row heights. The value of `num_exp_tile_rows_minus1` should be in the range of 0 to `PicHeightInCtbsY-1` (inclusive). When `no_pic_partition_flag` is equal to 1, the value of `num_tile_rows_minus1` is inferred to be equal to 0.
[0784] The increment of tile_column_width_minus1[i] by 1 specifies the width of the i-th tile column in CTB units, for i within the range of 0 to num_exp_tile_columns_minus1-1 (inclusive).
[0785] `tile_column_width_minus1[num_exp_tile_columns_minus1]` is used to deduce the width of a tile column whose index is greater than or equal to `num_exp_tile_columns_minus1`, as specified in Clause 6.5.1. The value of `tile_column_width_minus1[i]` should be in the range of 0 to `PicWidthInCtbsY-1` (inclusive). When it does not exist, the value of `tile_column_width_minus1[0]` is deduced to be equal to `PicWidthInCtbsY-1`.
[0786] `tile_row_height_minus1[i]` incremented by 1 specifies the height of the i-th slice row in CTB units for i in the range of 0 to num_exp_tile_rows_minus1-1 (inclusive). `tile_row_height_minus1[num_exp_tile_rows_minus1]` is used to deduce the height of slice rows whose index is greater than or equal to num_exp_tile_rows_minus1, as specified in Clause 6.5.1. The value of `tile_row_height_minus1[i]` should be in the range of 0 to PicHeightInCtbsY-1 (inclusive). When it does not exist, the value of `tile_row_height_minus1[0]` is deduced to be equal to PicHeightInCtbsY-1.
[0787] A `rect_slice_flag` value of 0 specifies that slices within each slice are arranged in raster scan order, and no slice information is signaled in the PPS. A `rect_slice_flag` value of 1 specifies that slices within each slice cover a rectangular area of the image, and slice information is signaled in the PPS. When it does not exist, `rect_slice_flag` is inferred to be equal to 1. When `subpic_info_present_flag` is equal to 1, the value of `rect_slice_flag` should be equal to 1.
[0788] A single_slice_per_subpic_flag value of 1 indicates that each subpicture consists of one and only one rectangular stripe. A single_slice_per_subpic_flag value of 0 indicates that each subpicture can consist of one or more rectangular stripes. When single_slice_per_subpic_flag is 1, num_slices_in_pic_minus1 is inferred to be equal to sps_num_subpics_minus1. When it does not exist, the value of single_slice_per_subpic_flag is inferred to be 0.
[0789] The increment of 1 in `num_slices_in_pic_minus1` specifies the number of rectangular slices in each image referenced by PPS. The value of `num_slices_in_pic_minus1` should be in the range of 0 to `MaxSlicesPerPicture-1` (inclusive), where `MaxSlicesPerPicture`. When `no_pic_partition_flag` equals 1, the value of `num_slices_in_pic_minus1` is inferred to be equal to 0.
[0790] A tile_idx_delta_present_flag value of 0 indicates that the tile_idx_delta value does not exist in the PPS, and all rectangular stripes in the image referencing the PPS are specified in raster order according to the procedure defined in Clause 6.5.1. A tile_idx_delta_present_flag value of 1 indicates that the tile_idx_delta value may exist in the PPS, and all rectangular stripes in the image referencing the PPS are specified in raster order according to the procedure defined in Clause 6.5.1. When it does not exist, the value of tile_idx_delta_present_flag is inferred to be equal to 0.
[0791] The value of slice_width_in_tiles_minus1[i] plus 1 specifies the width of the i-th rectangular strip in terms of slice columns. The value of slice_width_in_tiles_minus1[i] should be in the range of 0 to NumTileColumns-1 (inclusive).
[0792] The following applies when slice_width_in_tiles_minus1[i] does not exist:
[0793] – If NumTileColumns equals 1, then the value of slice_width_in_tiles_minus1[i] is inferred to be equal to 0.
[0794] Otherwise, infer the value of slice_width_in_tiles_minus1[i] according to Clause 6.5.1.
[0795] The value of slice_height_in_tiles_minus1[i] plus 1 specifies the height of the i-th rectangular strip in units of slice rows. The value of slice_height_in_tiles_minus1[i] should be in the range of 0 to NumTileRows-1 (inclusive).
[0796] The following applies when slice_height_in_tiles_minus1[i] does not exist:
[0797] – If NumTileRows equals 1, or tile_idx_delta_present_flag equals 0, and tileIdx%NumTileColumns is greater than 0, then the value of slice_height_in_tiles_minus1[i] is inferred to be equal to 0.
[0798] Otherwise (NumTileRows is not equal to 1, and tile_idx_delta_present_flag is equal to 1 or tileIdx%NumTileColumns is equal to 0), when tile_idx_delta_present_flag is equal to 1 or tileIdx%NumTileColumns is equal to 0, the value of slice_height_in_tiles_minus1[i] is inferred to be equal to slice_height_in_tiles_minus1[i-1].
[0799] `num_exp_slices_in_tile[i]` specifies the number of slice heights explicitly provided in the current slice containing multiple rectangular slices. The value of `num_exp_slices_in_tile[i]` should be in the range of 0 to RowHeight[tileY]-1 (inclusive), where tileY is the slice row index containing the i-th slice. When it does not exist, the value of `num_exp_slices_in_tile[i]` is inferred to be equal to 0. When `num_exp_slices_in_tile[i]` is equal to 0, the value of the variable `NumSlicesInTile[i]` is inferred to be equal to 1.
[0800] The value of exp_slice_height_in_ctus_minus1[j] plus 1 specifies the height of the j-th rectangular strip in the current slice, in units of CTU rows. The value of exp_slice_height_in_ctus_minus1[j] should be in the range of 0 to RowHeight[tileY]-1 (inclusive), where tileY is the slice row index of the current slice.
[0801] When num_exp_slices_in_tile[i] is greater than 0, the variables NumSlicesInTile[i] and SliceHeightInCtusMinus1[i+k] are derived as follows (for k in the range from 0 to NumSlicesInTile[i]-1 (inclusive):
[0802]
[0803] `tile_idx_delta[i]` specifies the difference between the tile index of the first tile in the i-th rectangular strip and the tile index of the first tile in the (i+1)-th rectangular strip. The value of `tile_idx_delta[i]` should be in the range of -NumTilesInPic+1 to NumTilesInPic–1 (inclusive). When it does not exist, the value of `tile_idx_delta[i]` is inferred to be equal to 0. When it exists, the value of `tile_idx_delta[i]` should not be equal to 0.
[0804] A `loop_filter_across_tiles_enabled_flag` value of 1 indicates that loop filtering operations can be performed across tile boundaries in images referencing PPS. A `loop_filter_across_tiles_enabled_flag` value of 0 indicates that loop filtering operations will not be performed across tile boundaries in images referencing PPS. Loop filtering operations include deblocking filtering, adaptive sampling offset filtering, and adaptive loop filtering. When it does not exist, the value of `loop_filter_across_tiles_enabled_flag` is inferred to be 1.
[0805] A `loop_filter_across_slices_enabled_flag` value of 1 indicates that loop filtering operations can be performed across slice boundaries in images referencing PPS. A `loop_filter_across_slice_enabled_flag` value of 0 indicates that loop filtering operations will not be performed across slice boundaries in images referencing PPS. Loop filtering operations include deblocking filtering, adaptive sampling offset filtering, and adaptive loop filtering. When it does not exist, the value of `loop_filter_across_slices_enabled_flag` is inferred to be 0.
[0806] A cabac_init_present_flag value of 1 indicates that the cabac_init_flag exists in the stripe header referencing PPS. A cabac_init_present_flag value of 0 indicates that the cabac_init_flag does not exist in the stripe header referencing PPS.
[0807] Incrementing 1 by num_ref_idx_default_active_minus1[i] (when i equals 0) specifies the inferred value of the variable NumRefIdxActive[0] for the P or B stripe (where num_ref_idx_active_override_flag equals 0), and when i equals 1, specifies the inferred value of NumRefIdxActive[1] for the B stripe (where num_ref_idx_active_override_flag equals 0). The value of num_ref_idx_default_active_minus1[i] should be in the range of 0 to 14 (inclusive).
[0808] A value of 0 for rpl1_idx_present_flag indicates that ref_pic_list_sps_flag[1] and ref_pic_list_idx[1] do not exist in the PH syntax structure or strip header of the image referencing PPS. A value of 1 for rpl1_idx_present_flag indicates that ref_pic_list_sps_flag[1] and ref_pic_list_idx[1] may exist in the PH syntax structure or strip header of the image referencing PPS.
[0809] init_qp_minus26 plus 26 specifies the SliceQp reference for each slice of PPS. Y The initial value. When decoding a non-zero value of ph_qp_delta, the SliceQP is modified at the image level. Y The initial value, or when decoding a non-zero value of slice_qp_delta, modifies SliceQp at the slice level. Y The initial value of init_qp_minus26 should be in the range of -(26+QpBdOffset) to +37 (inclusive).
[0810] A value of 1 for `cu_qp_delta_enabled_flag` indicates that the `ph_cu_qp_delta_subdiv_intra_slice` and `ph_cu_qp_delta_subdiv_inter_slice` syntax elements exist in the `PH` referencing `PPS`, and `cu_qp_delta_abs` may exist in the `Transform Unit` syntax. A value of 0 for `cu_qp_delta_enabled_flag` indicates that the `ph_cu_qp_delta_subdiv_intra_slice` and `ph_cu_qp_delta_subdiv_inter_slice` syntax elements do not exist in the `PH` referencing `PPS`, and `cu_qp_delta_abs` does not exist in the `Transform Unit` syntax.
[0811] A value of 1 for `pps_chroma_tool_offsets_present_flag` indicates that syntax elements related to chroma tool offsets exist in the PPS RBSP syntax structure. A value of 0 for `pps_chroma_tool_offsets_present_flag` indicates that syntax elements related to chroma tool offsets do not exist in the PPS RBSP syntax structure. When `ChromaArrayType` is 0, the value of `pps_chroma_tool_offsets_present_flag` should be 0.
[0812] pps_cb_qp_offset and pps_cr_qp_offset are specified for use in deriving Qp', respectively. Cb and Qp' Cr Brightness quantization parameter Qp' Y The offsets. The values of pps_cb_qp_offset and pps_cr_qp_offset should be in the range of -12 to +12 (inclusive). When ChromaArrayType equals 0, pps_cb_qp_offset and pps_cr_qp_offset are not used during decoding, and the decoder should ignore their values. When they do not exist, the values of pps_cb_qp_offset and pps_cr_qp_offset are inferred to be equal to 0.
[0813] A value of 1 for `pps_joint_cbcr_qp_offset_present_flag` indicates that `pps_joint_cbcr_qp_offset_value` and `joint_cbcr_qp_offset_list[i]` exist in the PPS RBSP syntax structure. A value of 0 for `pps_joint_cbcr_qp_offset_present_flag` indicates that `pps_joint_cbcr_qp_offset_value` and `joint_cbcr_qp_offset_list[i]` do not exist in the PPS RBSP syntax structure. When `ChromaArrayType` equals 0 or `sps_joint_cbcr_enabled_flag` equals 0, the value of `pps_joint_cbcr_qp_offset_present_flag` should be 0. When it does not exist, the value of `pps_joint_cbcr_qp_offset_present_flag` is inferred to be 0.
[0814] The pps_joint_cbcr_qp_offset_value specification is used to derive Qp' CbCr Brightness quantization parameter Qp' Y The offset. The value of pps_joint_cbcr_qp_offset_value should be in the range of -12 to +12 (inclusive). When ChromaArrayType equals 0 or sps_joint_cbcr_enabled_flag equals 0, pps_joint_cbcr_qp_offset_value is not used during decoding, and the decoder should ignore its value. When pps_joint_cbcr_qp_offset_present_flag equals 0, pps_joint_cbcr_qp_offset_value does not exist and is inferred to be equal to 0.
[0815] A value of 1 for `pps_slice_chroma_qp_offsets_present_flag` indicates that the `slice_cb_qp_offset` and `slice_cr_qp_offset` syntax elements exist in the associated slice header. A value of 0 for `pps_slice_chroma_qp_offsets_present_flag` indicates that the `slice_cb_qp_offset` and `slice_cr_qp_offset` syntax elements do not exist in the associated slice header. When they do not exist, the value of `pps_slice_chroma_qp_offsets_present_flag` is inferred to be 0.
[0816] A value of 1 for `pps_cu_chroma_qp_offset_list_enabled_flag` indicates that the syntax elements `ph_cu_chroma_qp_offset_subdiv_intra_slice` and `ph_cu_chroma_qp_offset_subdiv_inter_slice` exist in the PH referencing PPS, and `cu_chroma_qp_offset_flag` may exist in the Transform Unit syntax and Palette Encoding / Decoding syntax. A value of 0 for `pps_cu_chroma_qp_offset_list_enabled_flag` indicates that the syntax elements `ph_cu_chroma_qp_offset_subdiv_intra_slice` and `ph_cu_chroma_qp_offset_subdiv_inter_slice` do not exist in the PH referencing PPS, and `cu_chroma_qp_offset_flag` does not exist in the Transform Unit syntax and Palette Encoding / Decoding syntax. When it does not exist, the value of `pps_cu_chroma_qp_offset_list_enabled_flag` is inferred to be 0.
[0817] The increment of 1 in `chroma_qp_offset_list_len_minus1` specifies the number of `cb_qp_offset_list[i]`, `cr_qp_offset_list[i]`, and `joint_cbcr_qp_offset_list[i]` syntax elements present in the PPS RBSP syntax structure. The value of `chroma_qp_offset_list_len_minus1` should be in the range of 0 to 5 (inclusive).
[0818] cb_qp_offset_list[i], cr_qp_offset_list[i], and joint_cbcr_qp_offset_list[i] specify the values to be used for Qp'. Cb 、Qp' Cr and Qp' CbCr The derivation of offsets. The values of cb_qp_offset_list[i], cr_qp_offset_list[i], and joint_cbcr_qp_offset_list[i] should be in the range of -12 to +12 (inclusive). When pps_joint_cbcr_qp_offset_present_flag equals 0, joint_cbcr_qp_offset_list[i] does not exist and is inferred to be equal to 0.
[0819] A value of 0 for pps_weighted_pred_flag indicates that weighted predictions should not be applied to P-strips referencing PPS. A value of 1 for pps_weighted_pred_flag indicates that weighted predictions should be applied to P-strips referencing PPS. When sps_weighted_pred_flag is 0, the value of pps_weighted_pred_flag should also be 0.
[0820] A value of 0 for pps_weighted_bipred_flag indicates that explicit weighted predictions should not be applied to B-strips referencing PPS. A value of 1 for pps_weighted_bipred_flag indicates that explicit weighted predictions are applied to B-strips referencing PPS. When pps_weighted_bipred_flag is 0, the value of pps_weighted_bipred_flag should also be 0.
[0821] A deblocking_filter_control_present_flag value of 1 indicates whether a deblocking filter control syntax element exists in the PPS. A deblocking_filter_control_present_flag value of 0 indicates that a deblocking filter control syntax element does not exist in the PPS.
[0822] A value of 1 for `deblocking_filter_override_enabled_flag` indicates that `ph_deblocking_filter_override_flag` exists in the PH referencing PPS, or that `slice_deblocking_filter_override_flag` exists in the slice header referencing PPS. A value of 0 for `deblocking_filter_override_enabled_flag` indicates that `ph_deblocking_filter_override_flag` does not exist in the PH referencing PPS, or that `slice_deblocking_filter_override_flag` does not exist in the slice header referencing PPS. When neither exists, the value of `deblocking_filter_override_enabled_flag` is inferred to be 0.
[0823] A value of 1 for pps_deblocking_filter_disabled_flag indicates that the deblocking filter operation should not be applied to slices that reference PPS, where slice_deblocking_filter_disabled_flag does not exist.
[0824] A value of 0 for `pps_deblocking_filter_disabled_flag` indicates that the deblocking filter operation should not be applied to slices referencing PPS, where `slice_deblocking_filter_disabled_flag` does not exist. When it does not exist, the value of `pps_deblocking_filter_disabled_flag` is inferred to be 0.
[0825] `pps_beta_offset_div2` and `pps_tc_offset_div2` specify the default deblocking parameter offsets applied to the β and tC (divided by 2) of the luminance components of the referenced PPS strip, unless the default deblocking parameter offsets are overridden by deblocking parameter offsets present in the image header or strip header of the referenced PPS strip. The values of both `pps_beta_offset_div2` and `pps_tc_offset_div2` should be in the range of -12 to 12 (inclusive). When not present, the values of `pps_beta_offset_div2` and `pps_tc_offset_div2` are inferred to be equal to 0.
[0826] `pps_cb_beta_offset_div2` and `pps_cb_tc_offset_div2` specify the default deblocking parameter offsets for the β and tC (divided by 2) of the Cb components of the slice referencing PPS, unless the default deblocking parameter offset is overridden by a deblocking parameter offset present in the image header or slice header of the slice referencing PPS. The values of `pps_cb_beta_offset_div2` and `pps_cb_tc_offset_div2` should both be in the range of -12 to 12 (inclusive). When not present, the values of `pps_cb_beta_offset_div2` and `pps_cb_tc_offset_div2` are inferred to be equal to 0.
[0827] `pps_cr_beta_offset_div2` and `pps_cr_tc_offset_div2` specify the default deblocking parameter offsets for the β and tC (divided by 2) of the Cr component of the slice referencing PPS, unless the default deblocking parameter offset is overridden by a deblocking parameter offset present in the image header or slice header of the slice referencing PPS. The values of both `pps_cr_beta_offset_div2` and `pps_cr_tc_offset_div2` should be in the range of -12 to 12 (inclusive). When not present, the values of `pps_cr_beta_offset_div2` and `pps_cr_tc_offset_div2` are inferred to be equal to 0.
[0828] A value of 1 for `rpl_info_in_ph_flag` indicates that the reference image list information exists within the PH syntax structure, but not within the header of a PPS that references a PPS that does not contain a PH syntax structure. A value of 0 for `rpl_info_in_ph_flag` indicates that the reference image list information does not exist within the PH syntax structure, but may exist within the header of a PPS that references a PPS that does not contain a PH syntax structure.
[0829] A value of 1 for `dbf_info_in_ph_flag` indicates that the deblocking filter information exists within the PH syntax structure, but not in the strip header referencing a PPS that does not contain a PH syntax structure. A value of 0 for `dbf_info_in_ph_flag` indicates that the deblocking filter information does not exist within the PH syntax structure, but may exist in the strip header referencing a PPS that does not contain a PH syntax structure. When it does not exist, the value of `dbf_info_in_ph_flag` is inferred to be 0.
[0830] A `sao_info_in_ph_flag` value of 1 indicates that the SAO filter information exists within the PH syntax structure, but not within the strip header referencing a PPS that does not contain a PH syntax structure. A `sao_info_in_ph_flag` value of 0 indicates that the SAO filter information does not exist within the PH syntax structure, but may exist within the strip header referencing a PPS that does not contain a PH syntax structure.
[0831] An alf_info_in_ph_flag value of 1 indicates that the ALF information exists within the PH syntax structure, but not within the stripe header referencing a PPS that does not contain a PH syntax structure. An alf_info_in_ph_flag value of 0 indicates that the ALF information does not exist within the PH syntax structure, but may exist within the stripe header referencing a PPS that does not contain a PH syntax structure.
[0832] A value of 1 for `wp_info_in_ph_flag` indicates that the weighted prediction information may exist in the PH syntax structure, but not in the stripe header referencing a PPS that does not contain a PH syntax structure. A value of 0 for `wp_info_in_ph_flag` indicates that the weighted prediction information does not exist in the PH syntax structure, but may exist in the stripe header referencing a PPS that does not contain a PH syntax structure. When it does not exist, the value of `wp_info_in_ph_flag` is inferred to be 0.
[0833] A value of 1 for `qp_delta_info_in_ph_flag` indicates that the QP increment information exists within the PH syntax structure, but not within the stripe header referencing a PPS that does not contain a PH syntax structure. A value of 0 for `qp_delta_info_in_ph_flag` indicates that the QP increment information does not exist within the PH syntax structure, but may exist within the stripe header referencing a PPS that does not contain a PH syntax structure.
[0834] `pps_ref_wraparound_enabled_flag` equal to 1 specifies that horizontal wraparound motion compensation is applied in inter-frame prediction. `pps_ref_wraparound_enabled_flag` equal to 0 specifies that horizontal wraparound motion compensation is not applied. When the value of `CtbSizeY / MinCbSizeY+1` is greater than `pic_width_in_luma_samples / MinCbSizeY-1`, the value of `pps_ref_wraparound_enabled_flag` should be equal to 0. When `sps_ref_wraparound_enabled_flag` is equal to 0, the value of `pps_ref_wraparound_enabled_flag` should also be equal to 0.
[0835] The value of pps_ref_wraparound_offset plus (CtbSizeY / MinCbSizeY) + 2 specifies the offset used to calculate the horizontal wraparound position in units of MinCbSizeY luminance samples. The value of pps_ref_wraparound_offset should be in the range of 0 to (pic_width_in_luma_samples / MinCbSizeY) - (CtbSizeY / MinCbSizeY) - 2 (inclusive).
[0836] The variable PpsRefWraparoundOffset is set to equal pps_ref_wraparound_offset+(CtbSizeY / MinCbSizeY)+2.
[0837] A picture_header_extension_present_flag value of 0 indicates that the PH extension syntax element does not exist in the PH referencing PPS. A picture_header_extension_present_flag value of 1 indicates that the PH extension syntax element exists in the PH referencing PPS. In bitstreams conforming to this specification version, picture_header_extension_present_flag should be equal to 0.
[0838] A slice_header_extension_present_flag value of 0 indicates that the slice header of a PPS-referenced codec image does not contain a slice header extension syntax element. A slice_header_extension_present_flag value of 1 indicates that the slice header of a PPS-referenced codec image contains a slice header extension syntax element. slice_header_extension_present_flag should be equal to 0 in bitstreams conforming to this specification version.
[0839] A value of 0 for pps_extension_flag indicates that no pps_extension_data_flag syntax element exists in the PPS RBSP syntax structure. A value of 1 for pps_extension_flag indicates that the pps_extension_data_flag syntax element exists in the PPS RBSP syntax structure.
[0840] The `pps_extension_data_flag` parameter can have any value. Its presence and value do not affect the consistency of the decoder with the profile specified in this version of the specification. Decoders conforming to this version of the specification should ignore all `pps_extension_data_flag` syntax elements.
[0841] 7.4.3.5 Adaptive Parameter Set Semantics
[0842] Each APS RBSP should be available for the decoding process before it is referenced, included in at least one AU (whose TemporalId is less than or equal to the TemporalId of the codec strip NAL unit that references it), or provided externally.
[0843] All APS NAL units within a PU that have specific values for adaptation_parameter_set_id and aps_params_type, regardless of whether they are prefix or suffix APS NAL units, should have the same content.
[0844] adaptation_parameter_set_id provides an identifier for APS to be referenced by other syntax elements.
[0845] When aps_params_type is equal to ALF_APS or SCALING_APS, the value of adaptation_parameter_set_id should be in the range of 0 to 7 (inclusive).
[0846] When aps_params_type equals LMCS_APS, the value of adaptation_parameter_set_id should be in the range of 0 to 3 (inclusive).
[0847] Let apsLayerId be the nuh_layer_id value of a specific APS NAL cell, and vclLayerId be the nuh_layer_id value of a specific VCL NAL cell. A specific VCL NAL cell should not reference a specific APS NAL cell unless apsLayerId is less than or equal to vclLayerId, and the layer whose nuh_layer_id is equal to apsLayerId is included in at least one OLS that includes layers whose nuh_layer_id is equal to vclLayerId.
[0848] aps_params_type specifies the type of APS parameters carried in APS, as shown in Table 6.
[0849] Table 6 – APS Parameter Type Codes and APS Parameter Types
[0850]
[0851] All APS NAL cells with a specific value of aps_params_type share the same value space for adaptation_parameter_set_id, regardless of the nuh_layer_id value. APS NAL cells with different values of aps_params_type use a separate value space for adaptation_parameter_set_id.
[0852] Note 1 – APS NAL units (with specific values for adaptation_parameter_set_id and aps_params_type) can be shared between images, and different stripes within an image can reference different ALF APSs.
[0853] Note 2 – The suffix APS NAL unit associated with a specific VCL NAL unit (which is located before the suffix APS NAL unit in the decoding order) is not used by the specific VCL NAL unit, but is used by the VCL NAL unit that is located after the suffix APS NAL unit in the decoding order.
[0854] An aps_extension_flag value of 0 indicates that the aps_extension_data_flag syntax element does not exist in the APS RBSP syntax structure. An aps_extension_flag value of 1 indicates that the aps_extension_data_flag syntax element exists in the APS RBSP syntax structure.
[0855] The `aps_extension_data_flag` flag can have any value. Its presence and value do not affect the consistency of the decoder with the profile specified in this version of the specification. Decoders conforming to this version of the specification should ignore all `aps_extension_data_flag` syntax elements.
[0856] 7.4.3.6 Image Header RBSP Semantics
[0857] The PH RBSP contains the PH syntax structure, namely picture_header_structure().
[0858] 7.4.3.7 Image header structure and semantics
[0859] The PH syntax structure contains general information about all stripes of the encoded / decoded image associated with the PH syntax structure.
[0860] A value of 1 for `gdr_or_irap_pic_flag` indicates that the current image is either a GDR or IRAP image. A value of 0 for `gdr_or_irap_pic_flag` indicates that the current image may or may not be a GDR or IRAP image.
[0861] A `gdr_pic_flag` value of 1 indicates that the image associated with the PH (Profile Image) is a GDR (Gross Reflection Image). A `gdr_pic_flag` value of 0 indicates that the image associated with the PH is not a GDR image. When it does not exist, the value of `gdr_pic_flag` is inferred to be 0. When `gdr_enabled_flag` is 0, the value of `gdr_pic_flag` should be 0.
[0862] A ph_inter_slice_allowed_flag value of 0 indicates that the slice_type of all codec slices in the image is equal to 2. A ph_inter_slice_allowed_flag value of 1 indicates that the image may or may not contain one or more codec slices with a slice_type of 0 or 1.
[0863] A value of 0 for `ph_intra_slice_allowed_flag` indicates that the slice_type of all codec slices in the image is either 0 or 1. A value of 1 for `ph_intra_slice_allowed_flag` indicates that the image may or may not contain one or more codec slices with a slice_type of 2. When none exist, the value of `ph_intra_slice_allowed_flag` is inferred to be 1.
[0864] Note 1 – For bitstreams that support sub-picture-based merging without altering the PH NAL unit, the encoder is expected to set the values of ph_inter_slice_allowed_flag and ph_intra_slice_allowed_flag to 1.
[0865] A non_reference_picture_flag value of 1 indicates that a picture associated with a pH is never used as a reference picture. A non_reference_picture_flag value of 0 indicates that a picture associated with a pH may or may not be used as a reference picture.
[0866] The `ph_pic_parameter_set_id` parameter specifies the value of `pps_pic_parameter_set_id` for the PPS currently in use. The value of `ph_pic_parameter_set_id` should be in the range of 0 to 63 (inclusive).
[0867] One requirement for bitstream consistency is that the TemporalId value of PH should be greater than or equal to the TemporalId value of PPS whose pps_pic_parameter_set_id is equal to ph_pic_parameter_set_id.
[0868] `ph_pic_order_cnt_lsb` specifies the image order count of the current image modulo `MaxPicOrderCntLsb`. The length of the `ph_pic_order_cnt_lsb` syntax element is `log2_max_pic_order_cnt_lsb_minus4+4` bits. The value of `ph_pic_order_cnt_lsb` should be in the range of 0 to `MaxPicOrderCntLsb-1` (inclusive).
[0869] After decoding a CLVSS image that is not the first image in the bitstream, the no_output_of_prior_pics_flag will affect the output of previously decoded images in the DPB.
[0870] `recovery_poc_cnt` specifies the recovery point of the decoded images according to the output order. If the current image is a GDR image associated with the PH, and there exists an image `picA` in the CLVS that follows the current GDR image in the decoding order, whose `PicOrderCntVal` is equal to the current GDR image's `PicOrderCntVal` plus the value of `recovery_poc_cnt`, then image `picA` is called the recovery point image. Otherwise, the first image in the output order whose `PicOrderCntVal` is greater than the current image's `PicOrderCntVal` plus the value of `recovery_poc_cnt` is called the recovery point image. In the decoding order, the recovery point image must not be located before the current GDR image. The value of `recovery_poc_cnt` should be in the range of 0 to `MaxPicOrderCntLsb-1` (inclusive).
[0871] When the current image is a GDR image, the variable RpPicOrderCntVal is derived as follows:
[0872] RpPicOrderCntVal=PicOrderCntVal+recovery_poc_cnt (82)
[0873] Note 2 – When gdr_enabled_flag equals 1 and the current image’s PicOrderCntVal is greater than or equal to the associated GDR image’s RpPicOrderCntVal, the current and subsequent decoded images are exactly matched in output order with the corresponding images generated by the decoding process starting from the previous IRAP image (if any), and are located before the associated GDR image in the decoding order.
[0874] ph_extra_bit[i] can be equal to 1 or 0. Decoders conforming to this version of the specification should ignore the value of ph_extra_bit[i]. Its value does not affect the consistency of the decoder with the profile specified in this version of the specification.
[0875] A value of 1 for `ph_poc_msb_present_flag` indicates that the syntax element `poc_msb_val` exists in the PH (Physical Layer). A value of 0 for `ph_poc_msb_present_flag` indicates that the syntax element `poc_msb_val` does not exist in the PH. The value of `ph_poc_msb_present_flag` should be 0 when `vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]]` is 0 and an image exists in the current AU (Activity Object) of the current layer's reference layer.
[0876] poc_msb_val specifies the POC MAB value of the current image. The length of the syntax element poc_msb_val is poc_msb_len_minus1+1 bits.
[0877] A value of 1 for `ph_alf_enabled_flag` indicates that the adaptive loop filter is enabled for all stripes associated with `PH`, and can be applied to the Y, Cb, or Cr color components within the stripes. A value of 0 for `ph_alf_enabled_flag` indicates that the adaptive loop filter can be disabled for one, several, or all stripes associated with `PH`. When it does not exist, `ph_alf_enabled_flag` is inferred to be equal to 0.
[0878] ph_num_alf_aps_ids_luma specifies the number of ALF APSs referenced by the stripe associated with the PH.
[0879] ph_alf_aps_id_luma[i] specifies the adaptation_parameter_set_id of the i-th ALFAPS referenced by the luminance component of the strip associated with PH.
[0880] The value of alf_luma_filter_signal_flag for the APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to ph_alf_aps_id_luma[i] should be equal to 1.
[0881] The TemporalId of the APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to ph_alf_aps_id_luma[i] should be less than or equal to the TemporalId of the image associated with PH.
[0882] A value of 0 for `ph_alf_chroma_idc` indicates that the adaptive loop filter is not applied to the Cb and Cr color components. A value of 1 for `ph_alf_chroma_idc` indicates that the adaptive loop filter is applied to the Cb color component. A value of 2 for `ph_alf_chroma_idc` indicates that the adaptive loop filter is applied to the Cr color component. A value of 3 for `ph_alf_chroma_idc` indicates that the adaptive loop filter is applied to both the Cb and Cr color components. When `ph_alf_chroma_idc` does not exist, it is inferred to be equal to 0.
[0883] The ph_alf_aps_id_chroma parameter specifies the adaptation_parameter_set_id of the ALF APS referenced by the chromaticity components of the band associated with PH.
[0884] The alf_chroma_filter_signal_flag value of the APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to ph_alf_aps_id_chroma should be equal to 1.
[0885] The TemporalId of the APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to ph_alf_aps_id_chroma should be less than or equal to the TemporalId of the image associated with PH.
[0886] A value of 1 for `ph_cc_alf_cb_enabled_flag` indicates that the cross-component filter for the Cb color components is enabled for all stripes associated with `PH`, and can be applied to the Cb color components within the stripes. A value of 0 for `ph_cc_alf_cb_enabled_flag` indicates that the cross-component filter for the Cb color components can be disabled for one or more or all stripes associated with `PH`. When it does not exist, `ph_cc_alf_cb_enabled_flag` is inferred to be equal to 0.
[0887] ph_cc_alf_cb_aps_id specifies the adaptation_parameter_set_id of the ALF APS referenced by the Cb color component of the strip associated with PH.
[0888] The alf_cc_cb_filter_signal_flag value of the APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to ph_cc_alf_cb_aps_id should be equal to 1.
[0889] A value of 1 for `ph_cc_alf_cr_enabled_flag` indicates that the cross-component filter for the Cr color component is enabled for all stripes associated with `PH`, and can be applied to the Cr color component within the stripe. A value of 0 for `ph_cc_alf_cr_enabled_flag` indicates that the cross-component filter for the Cr color component can be disabled for one or more or all stripes associated with `PH`. When it does not exist, `ph_cc_alf_cr_enabled_flag` is inferred to be equal to 0.
[0890] ph_cc_alf_cr_aps_id specifies the adaptation_parameter_set_id of the ALF APS referenced by the Cr color component of the band associated with PH.
[0891] The value of alf_cc_cr_filter_signal_flag for an APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to ph_cc_alf_cr_aps_id should be equal to 1.
[0892] A value of 1 for ph_lmcs_enabled_flag indicates that luminance mapping with chroma scaling is enabled for all stripes associated with PH. A value of 0 for ph_lmcs_enabled_flag indicates that luminance mapping with chroma scaling can be disabled for one or more or all stripes associated with PH. When ph_lmcs_enabled_flag does not exist, its value is inferred to be 0.
[0893] ph_lmcs_aps_id specifies the adaptation_parameter_set_id of the LMCS APS referenced by the stripe associated with the PH. The TemporalId of the APS NAL cell whose aps_params_type is equal to LMCS_APS and whose adaptation_parameter_set_id is equal to ph_lmcs_aps_id should be less than or equal to the TemporalId of the image associated with the PH.
[0894] A value of 1 for ph_chroma_residual_scale_flag indicates that chroma residual scaling is enabled for all stripes associated with PH. A value of 0 for ph_chroma_residual_scale_flag indicates that chroma residual scaling can be disabled for one or more or all stripes associated with PH. When ph_chroma_residual_scale_flag does not exist, it is inferred to be equal to 0.
[0895] A value of 1 for `ph_scaling_list_present_flag` specifies that the scaling list data used for the stripes associated with the PH is derived based on the scaling list data contained in the reference scaling list APS. A value of 0 for `ph_scaling_list_present_flag` specifies that the scaling list data used for the stripes associated with the PH is set to 16. When it does not exist, the value of `ph_scaling_list_present_flag` is inferred to be 0.
[0896] `ph_scaling_list_aps_id` specifies the `adaptation_parameter_set_id` of the scaling list APS. The `TemporalId` of the APS NAL cell whose `aps_params_type` is equal to `SCALING_APS` and whose `adaptation_parameter_set_id` is equal to `ph_scaling_list_aps_id` should be less than or equal to the `TemporalId` of the image associated with the `PH`.
[0897] `ph_virtual_boundaries_present_flag` equal to 1 specifies that information about virtual boundaries is signaled in the PH (Pictorial View). `ph_virtual_boundaries_present_flag` equal to 0 specifies that information about virtual boundaries is not signaled in the PH. When one or more virtual boundaries are signaled in the PH, loop filtering operations are disabled across virtual boundaries in the image. Loop filtering operations include deblocking filtering, sample adaptive offset filtering, and adaptive loop filtering operations. When not present, the value of `ph_virtual_boundaries_present_flag` is inferred to be 0.
[0898] One requirement for bitstream consistency is that when subpic_info_present_flag equals 1, the value of ph_virtual_boundaries_present_flag should be equal to 0.
[0899] The variable VirtualBoundariesPresentFlag is derived as follows:
[0900]
[0901] `ph_num_ver_virtual_boundaries` specifies the number of `ph_virtual_boundaries_pos_x[i]` syntax elements present in `PH`. When `ph_num_ver_virtual_boundaries` does not exist, it is inferred to be equal to 0.
[0902] The variables NumVerVirtualBoundaries are derived as follows:
[0903]
[0904] ph_virtual_boundaries_pos_x[i] specifies the position of the i-th vertical virtual boundary, in units of luminance samples divided by 8. The value of ph_virtual_boundaries_pos_x[i] should be in the range of 1 to Ceil(pic_width_in_luma_samples÷8)-1 (inclusive).
[0905] The list VirtualBoundariesPosX[i] (for i in the range from 0 to NumVirtualBoundaries-1 (inclusive)) is derived as follows, specifying the position of the vertical virtual boundary in units of luminance samples:
[0906]
[0907] The distance between any two vertical virtual boundaries should be greater than or equal to the CtbSizeY luminance sample.
[0908] `ph_num_hor_virtual_boundaries` specifies the number of `ph_virtual_boundaries_pos_y[i]` syntax elements present in `PH`. When `ph_num_hor_virtual_boundaries` does not exist, it is inferred to be equal to 0.
[0909] The parameters NumHorVirtualBoundaries are derived as follows:
[0910]
[0911] When sps_virtual_boundaries_enabled_flag equals 1 and ph_virtual_boundaries_present_flag equals 1, the sum of ph_num_ver_virtual_boundaries and ph_num_hor_virtual_boundaries should be greater than 0.
[0912] ph_virtual_boundaries_pos_y[i] specifies the position of the i-th horizontal virtual boundary, in units of luminance samples divided by 8. The value of ph_virtual_boundaries_pos_y[i] should be in the range of 1 to Ceil(pic_height_in_luma_samples÷8)-1 (inclusive).
[0913] The list VirtualBoundariesPosY[i] (for i in the range from 0 to NumVirtualBoundaries-1 (inclusive)) is derived as follows, specifying the position of the horizontal virtual boundary in units of luminance samples:
[0914]
[0915] The distance between any two horizontal virtual boundaries should be greater than or equal to CtbSizeY luminance samples.
[0916] The `pic_output_flag` affects the decoded image output and deletion process. When `pic_output_flag` does not exist, it is inferred to be equal to 1.
[0917] A partition_constraints_override_flag value of 1 indicates that the partition constraint parameters exist in the partition property (PH). A partition_constraints_override_flag value of 0 indicates that the partition constraint parameters do not exist in the PH. When the parameter does not exist, the value of partition_constraints_override_flag is inferred to be 0.
[0918] `ph_log2_diff_min_qt_min_cb_intra_slice_luma` specifies the radix-2 logarithm of the smallest size of the luminance samples in the luminance leaf blocks generated by the quadtree partitioning of the CTU, and the radix-2 logarithm of the smallest decoder block size in the luminance samples of the luminance CUs in the slices with a slice_type equal to 2 associated with the PH. The value of `ph_log2_diff_min_qt_min_cb_intra_slice_luma` should be in the range of 0 to `CtbLog2SizeY - MinCbLog2SizeY` (inclusive). When it does not exist, the value of `ph_log2_diff_min_qt_min_cb_luma` is inferred to be equal to `sps_log2_diff_min_qt_min_cb_intra_slice_luma`.
[0919] `ph_max_mtt_hierarchy_depth_intra_slice_luma` specifies the maximum hierarchical depth of the encoding / decoding unit resulting from a multi-type tree partition of quadrangular leaves in a slice with a slice_type of 2 (I) associated with `PH`. The value of `ph_max_mtt_hierarchy_depth_intra_slice_luma` should be in the range of 0 to 2*(CtbLog2SizeY - MinCbLog2SizeY) (inclusive). When it does not exist, the value of `ph_max_mtt_hierarchy_depth_intra_slice_luma` is inferred to be equal to `sps_max_mtt_hierarchy_depth_intra_slice_luma`.
[0920] `ph_log2_diff_max_bt_min_qt_intra_slice_luma` specifies the difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a luminance codec block that can be partitioned using binary partitioning and the smallest size (width or height) of the luminance samples in a luminance leaf block resulting from a quadtree partition of a CTU in a stripe with a slice_type equal to 2(I) associated with PH. The value of `ph_log2_diff_max_bt_min_qt_intra_slice_luma` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeIntraY` (inclusive). When it does not exist, the value of `ph_log2_diff_max_bt_min_qt_intra_slice_luma` is inferred to be equal to `sps_log2_diff_max_bt_min_qt_intra_slice_luma`.
[0921] `ph_log2_diff_max_tt_min_qt_intra_slice_luma` specifies the difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a luminance codec block that can be partitioned using ternary partitioning and the smallest size (width or height) of the luminance samples in a luminance leaf block resulting from a quadtree partitioning of a CTU in a stripe with a slice_type equal to 2(I) associated with PH. The value of `ph_log2_diff_max_tt_min_qt_intra_slice_luma` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeIntraY` (inclusive). When it does not exist, the value of `ph_log2_diff_max_tt_min_qt_intra_slice_luma` is inferred to be equal to `sps_log2_diff_max_tt_min_qt_intra_slice_luma`.
[0922] `ph_log2_diff_min_qt_min_cb_intra_slice_chroma` specifies the difference between the radix-2 logarithm of the smallest size of the luminance samples in the chrominance leaf blocks generated by partitioning a quadtree of chrominance CTUs with `treeType` equal to `DUAL_TREE_CHROMA`, and the radix-2 logarithm of the smallest decoder block size in the luminance samples of chrominance CUs with `treeType` equal to `DUAL_TREE_CHROMA` in a slice with `slice_type` equal to 2(I) associated with the PH value. The value of `ph_log2_diff_min_qt_min_cb_intra_slice_chroma` should be within the range of 0 to `CtbLog2SizeY - MinCbLog2SizeY` (inclusive). When it does not exist, the value of `ph_log2_diff_min_qt_min_cb_intra_slice_chroma` is inferred to be equal to `sps_log2_diff_min_qt_cb_intra_slice_chroma`.
[0923] `ph_max_mtt_hierarchy_depth_intra_slice_chroma` specifies the maximum hierarchical depth of chroma codec units generated by multi-type tree partitioning of chroma quadtree leaves with a `treeType` equal to `DUAL_TREE_CHROMA` in a slice with a `slice_type` of 2 (I) associated with `PH`. The value of `ph_max_mtt_hierarchy_depth_intra_slice_chroma` should be in the range of 0 to 2*(CtbLog2SizeY - MinCbLog2SizeY) (inclusive). When it does not exist, the value of `ph_max_mtt_hierarchy_depth_intra_slice_chroma` is inferred to be equal to `sps_max_mtt_hierarchy_depth_intra_slice_chroma`.
[0924] `ph_log2_diff_max_bt_min_qt_intra_slice_chroma` specifies the difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a chroma codec block that can be partitioned using binary partitioning, and the smallest size (width or height) of the luminance samples in a chroma leaf block produced by quadtree partitioning of a chroma CTU with `slice_type` equal to 2(I) and `treeType` equal to `DUAL_TREE_CHROMA`. The value of `ph_log2_diff_max_bt_min_qt_intra_slice_chroma` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeIntraC` (inclusive). When it does not exist, the value of `ph_log2_diff_max_bt_min_qt_intra_slice_chroma` is inferred to be equal to `sps_log2_diff_max_bt_min_qt_intra_slice_chroma`.
[0925] `ph_log2_diff_max_tt_min_qt_intra_slice_chroma` specifies the difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a ternary partitioned chroma codec block and the smallest size (width or height) of the luminance samples in a chroma leaf block resulting from a quadtree partition of a chroma CTU with `treeType` equal to `DUAL_TREE_CHROMA` in a stripe with `slice_type` equal to 2(I) associated with `PH`. The value of `ph_log2_diff_max_tt_min_qt_intra_slice_chroma` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeIntraC` (inclusive). When it does not exist, the value of `ph_log2_diff_max_tt_min_qt_intra_slice_chroma` is inferred to be equal to `sps_log2_diff_max_tt_min_qt_intra_slice_chroma`.
[0926] `ph_cu_qp_delta_subdiv_intra_slice` specifies the maximum `cbSubdiv` value of the codec unit in the intra-slice representing `cu_qp_delta_abs` and `cu_qp_delta_sign_flag`. The value of `ph_cu_qp_delta_subdiv_intra_slice` should be in the range of 0 to 2*(CtbLog2SizeY-MinQtLog2SizeIntraY+ph_max_mtt_hierarchy_depth_intra_slice_luma) (inclusive).
[0927] When it does not exist, the value of ph_cu_qp_delta_subdiv_intra_slice is inferred to be equal to 0.
[0928] `ph_cu_chroma_qp_offset_subdiv_intra_slice` specifies the maximum `cbSubdiv` value of the codec unit within the intra-slice representing `cu_chroma_qp_offset_flag`. The value of `ph_cu_chroma_qp_offset_subdiv_intra_slice` should be within the range of 0 to 2 * (CtbLog2SizeY - MinQtLog2SizeIntraY + ph_max_mtt_hierarchy_depth_intra_slice_luma) (inclusive).
[0929] When it does not exist, the value of ph_cu_chroma_qp_offset_subdiv_intra_slice is inferred to be equal to 0.
[0930] `ph_log2_diff_min_qt_min_cb_inter_slice` specifies the difference between the radix-2 logarithm of the smallest size among the luminance samples of the luminance leaf block generated by the quadtree partitioning of the CTU and the radix-2 logarithm of the smallest luminance codec block size among the luminance samples of the luminance CU in the strip with slice_type equal to 0 (B) or 1 (P) associated with PH. The value of `ph_log2_diff_min_qt_min_cb_inter_slice` should be in the range of 0 to `CtbLog2SizeY - MinCbLog2SizeY` (inclusive). When it does not exist, the value of `ph_log2_diff_min_qt_min_cb_luma` is inferred to be equal to `sps_log2_diff_min_qt_min_cb_inter_slice`.
[0931] `ph_max_mtt_hierarchy_depth_inter_slice` specifies the maximum hierarchical depth of the encoding / decoding unit generated by multi-type tree partitioning of quad-leaf trees in stripes with a slice_type associated with PH equal to 0 (B) or 1 (P). The value of `ph_max_mtt_hierarchy_depth_inter_slice` should be in the range of 0 to 2*(CtbLog2SizeY - MinCbLog2SizeY) (inclusive). When it does not exist, the value of `ph_max_mtt_hierarchy_depth_inter_slice` is inferred to be equal to `sps_max_mtt_hierarchy_depth_inter_slice`.
[0932] `ph_log2_diff_max_bt_min_qt_inter_slice` specifies the difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in the luminance codec block that can be partitioned using binary partitions and the smallest size (width or height) of the luminance samples in the luminance leaf block generated by the quadtree partitioning of the CTU in the stripe with slice_type equal to 0 (B) or 1 (P) associated with PH. The value of `ph_log2_diff_max_bt_min_qt_inter_slice` should be in the range of 0 to CtbLog2SizeY-MinQtLog2SizeInterY (inclusive). When it does not exist, the value of `ph_log2_diff_max_bt_min_qt_inter_slice` is inferred to be equal to `sps_log2_diff_max_bt_min_qt_inter_slice`.
[0933] `ph_log2_diff_max_tt_min_qt_inter_slice` specifies the difference between the radix-2 logarithm of the largest size (width or height) of the luminance samples in a luminance codec block that can be partitioned using ternary partitions and the smallest size (width or height) of the luminance samples in a luminance leaf block resulting from a quadtree partition of a CTU in a stripe with a slice_type equal to 0 (B) or 1 (P) associated with the PH. The value of `ph_log2_diff_max_tt_min_qt_inter_slice` should be in the range of 0 to `CtbLog2SizeY - MinQtLog2SizeInterY` (inclusive). When it does not exist, the value of `ph_log2_diff_max_tt_min_qt_inter_slice` is inferred to be equal to `sps_log2_diff_max_tt_min_qt_inter_slice`.
[0934] `ph_cu_qp_delta_subdiv_inter_slice` specifies the maximum `cbSubdiv` value of the codec unit in the inter-frame slice representing `cu_qp_delta_abs` and `cu_qp_delta_sign_flag`. The value of `ph_cu_qp_delta_subdiv_inter_slice` should be in the range of 0 to 2*(CtbLog2SizeY-MinQtLog2SizeInterY+ph_max_mtt_hierarchy_depth_inter_slice) (inclusive).
[0935] When it does not exist, the value of ph_cu_qp_delta_subdiv_inter_slice is inferred to be equal to 0.
[0936] `ph_cu_chroma_qp_offset_subdiv_inter_slice` specifies the maximum `cbSubdiv` value of the codec unit in the inter-frame slice representing `cu_chroma_qp_offset_flag`. The value of `ph_cu_chroma_qp_offset_subdiv_inter_slice` should be in the range of 0 to 2*(CtbLog2SizeY-MinQtLog2SizeInterY+ph_max_mtt_hierarchy_depth_inter_slice) (inclusive).
[0937] When it does not exist, the value of ph_cu_chroma_qp_offset_subdiv_inter_slice is inferred to be equal to 0.
[0938] `ph_temporal_mvp_enabled_flag` specifies whether temporal motion vector prediction values can be used for inter-frame prediction of the slice associated with the PH. If `ph_temporal_mvp_enabled_flag` equals 0, the syntax elements of the slice associated with the PH should be constrained so that temporal motion vector prediction values are not used in the decoding of the slice. Otherwise (if `ph_temporal_mvp_enabled_flag` equals 1), temporal motion vector prediction values can be used to decode the slice associated with the PH. When it does not exist, the value of `ph_temporal_mvp_enabled_flag` is inferred to be 0. When there is no reference image in the DPB with the same spatial resolution as the current image, the value of `ph_temporal_mvp_enabled_flag` should be 0.
[0939] The maximum number of merging MVP candidates, MaxNumSubblockMergeCand, based on subblocks is derived as follows:
[0940]
[0941] The value of MaxNumSubblockMergeCand should be in the range of 0 to 5 (inclusive).
[0942] A value of 1 for ph_collocated_from_l0_flag specifies that the juxtaposed images used for temporal motion vector prediction are derived from reference image list 0. A value of 0 for ph_collocated_from_l0_flag specifies that the juxtaposed images used for temporal motion vector prediction are derived from reference image list 1.
[0943] ph_collocated_ref_idx specifies the reference index for the juxtaposed images used for temporal motion vector prediction.
[0944] When ph_collocated_from_l0_flag equals 1, ph_collocated_ref_idx refers to the entry in reference image list 0, and the value of ph_collocated_ref_idx should be in the range of 0 to num_ref_entries[0][PicRplsIdx[0]]-1 (inclusive).
[0945] When ph_collocated_from_l0_flag equals 0, ph_collocated_ref_idx refers to the entry in reference image list 1, and the value of ph_collocated_ref_idx should be in the range of 0 to num_ref_entries[1][PicRplsIdx[1]]-1 (inclusive).
[0946] When it does not exist, the value of ph_collocated_ref_idx is inferred to be equal to 0.
[0947] A `mvd_l1_zero_flag` equal to 1 indicates that the `mvd_coding(x0,y0,1)` syntax structure was not parsed, and for `compIdx = 0..1` and `cpIdx = 0..2`, `MvdL1[x0][y0][compIdx]` and `MvdCpL1[x0][y0][cpIdx][compIdx]` are set to 0. A `mvd_l1_zero_flag` equal to 0 indicates that the `mvd_coding(x0,y0,1)` syntax structure was parsed.
[0948] A value of 1 for `ph_fpel_mmvd_enabled_flag` specifies that the merge mode with motion vector difference uses integer sample precision in the strips associated with the PH. A value of 0 for `ph_fpel_mmvd_enabled_flag` specifies that the merge mode with motion vector difference can use fractional sample precision in the strips associated with the PH. When it does not exist, the value of `ph_fpel_mmvd_enabled_flag` is inferred to be 0.
[0949] A value of 1 for ph_disable_bdof_flag disables inter-frame bidirectional prediction based on bidirectional optical flow in the stripe associated with PH. A value of 0 for ph_disable_bdof_flag allows inter-frame bidirectional prediction based on bidirectional optical flow to be enabled or disabled in the stripe associated with PH.
[0950] The following applies when ph_disable_bdof_flag is not present:
[0951] – If sps_bdof_enabled_flag equals 1, then the value of ph_disable_bdof_flag is inferred to be equal to 0.
[0952] Otherwise (if sps_bdof_enabled_flag equals 0), the value of ph_disable_bdof_flag is inferred to be equal to 1.
[0953] A value of 1 for `ph_disable_dmvr_flag` disables inter-frame bidirectional prediction based on decoder motion vector optimization in the stripe associated with the PH. A value of 0 for `ph_disable_dmvr_flag` allows inter-frame bidirectional prediction based on decoder motion vector optimization to be enabled or disabled in the stripe associated with the PH.
[0954] The following applies when ph_disable_dmvr_flag is not present:
[0955] – If sps_dmvr_enabled_flag equals 1, the value of ph_disable_dmvr_flag is inferred to be equal to 0.
[0956] Otherwise (sps_dmvr_enabled_flag equals 0), the value of ph_disable_dmvr_flag is inferred to be equal to 1.
[0957] A value of 1 for ph_disable_prof_flag disables prediction optimization with optical flow in the stripe associated with pH. A value of 0 for ph_disable_prof_flag enables or disables prediction optimization with optical flow in the stripe associated with pH.
[0958] The following applies when ph_disable_prof_flag is not present:
[0959] – If sps_affine_prof_enabled_flag equals 1, then the value of ph_disable_prof_flag is inferred to be equal to 0.
[0960] Otherwise (sps_affine_prof_enabled_flag equals 0), the value of ph_disable_prof_flag is inferred to be equal to 1.
[0961] ph_qp_delta specifies the Qp to be used for encoding / decoding blocks in the image. Y The initial value is retained until it is modified by the value of CuQpDeltaVal in the codec unit layer.
[0962] When qp_delta_info_in_ph_flag equals 1, derive the Qp of all bands in the image as follows: Y Initial value of quantization parameter SliceQp Y :
[0963] SliceQp Y =26+init_qp_minus26+ph_qp_delta (89)
[0964] SliceQp Y The value should be in the range of -QpBdOffset to +63 (inclusive).
[0965] `ph_joint_cbcr_sign_flag` specifies whether the juxtaposed residual samples of the two chromaticity components have inverted signs in the transform unit where `tu_joint_cbcr_residual_flag[x0][y0]` equals 1. When `tu_joint_cbcr_residual_flag[x0][y0]` equals 1 for the transform unit, `ph_joint_cbcr_sign_flag` equals 0, which specifies that the sign of each residual sample of the Cr (or Cb) component is the same as the sign of the juxtaposed Cb (or Cr) residual sample, and `ph_joint_cbcr_sign_flag` equals 1, which specifies that the sign of each residual sample of the Cr (or Cb) component is given by the inverted sign of the juxtaposed Cb (or Cr) residual sample.
[0966] A value of 1 for ph_sao_luma_enabled_flag indicates that SAO is enabled for the luma component in all stripes associated with PH; a value of 0 for ph_sao_luma_enabled_flag indicates that SAO for the luma component can be disabled for one or more or all stripes associated with PH. When ph_sao_luma_enabled_flag does not exist, it is inferred to be equal to 0.
[0967] A value of 1 for ph_sao_chroma_enabled_flag indicates that SAO is enabled for the chroma components in all stripes associated with PH; a value of 0 for ph_sao_chroma_enabled_flag indicates that SAO for the chroma components can be disabled for one or more or all stripes associated with PH. When ph_sao_chroma_enabled_flag does not exist, it is inferred to be equal to 0.
[0968] A value of 0 for `ph_dep_quant_enabled_flag` disables correlated quantization for the current image. A value of 1 for `ph_dep_quant_enabled_flag` enables correlated quantization for the current image. When `ph_dep_quant_enabled_flag` does not exist, it is inferred to be equal to 0.
[0969] A value of 0 for `pic_sign_data_hiding_enabled_flag` disables sign bit hiding for the current image. A value of 1 for `pic_sign_data_hiding_enabled_flag` enables sign bit hiding for the current image. When `pic_sign_data_hiding_enabled_flag` does not exist, it is inferred to be equal to 0.
[0970] A value of 1 for `ph_deblocking_filter_override_flag` indicates that a deblocking parameter exists in `ph_deblocking_filter_override_flag`. A value of 0 for `ph_deblocking_filter_override_flag` indicates that a deblocking parameter does not exist in `ph_deblocking_filter_override_flag`. When the parameter does not exist, the value of `ph_deblocking_filter_override_flag` is inferred to be 0.
[0971] A value of 1 for `ph_deblocking_filter_disabled_flag` indicates that the deblocking filter operation is not applied to stripes associated with `ph`. A value of 0 for `ph_deblocking_filter_disabled_flag` also indicates that the deblocking filter operation is not applied to strips associated with `ph`. When `ph_deblocking_filter_disabled_flag` does not exist, it is inferred to be equal to `pps_deblocking_filter_disabled_flag`.
[0972] `ph_beta_offset_div2` and `ph_tc_offset_div2` specify the deblocking parameter offsets applied to the luminance components of the strips associated with `PH`, specifically the values of `β` and `tC` (divided by 2). The values of both `ph_beta_offset_div2` and `ph_tc_offset_div2` should be in the range of -12 to 12 (inclusive). When not present, the values of `ph_beta_offset_div2` and `ph_tc_offset_div2` are inferred to be equal to `pps_beta_offset_div2` and `pps_tc_offset_div2`, respectively.
[0973] `ph_cb_beta_offset_div2` and `ph_cb_tc_offset_div2` specify the deblocking parameter offsets applied to the β and tC (divided by 2) of the Cb component of the strip associated with PH. The values of both `ph_cb_beta_offset_div2` and `ph_cb_tc_offset_div2` should be in the range of -12 to 12 (inclusive). When not present, the values of `ph_cb_beta_offset_div2` and `ph_cb_tc_offset_div2` are inferred to be equal to `pps_cb_beta_offset_div2` and `pps_cb_tc_offset_div2`, respectively.
[0974] `ph_cr_beta_offset_div2` and `ph_cr_tc_offset_div2` specify the deblocking parameter offsets applied to the β and tC (divided by 2) of the Cr component of the strip associated with PH. The values of both `ph_cr_beta_offset_div2` and `ph_cr_tc_offset_div2` should be in the range of -12 to 12 (inclusive). When not present, the values of `ph_cr_beta_offset_div2` and `ph_cr_tc_offset_div2` are inferred to be equal to `pps_cr_beta_offset_div2` and `pps_cr_tc_offset_div2`, respectively.
[0975] `ph_extension_length` specifies the length of the PH extension data in bytes, excluding the bits used for signaling notifications within `ph_extension_length` itself. The value of `ph_extension_length` should be in the range of 0 to 256 (inclusive). If it does not exist, the value of `ph_extension_length` is inferred to be 0.
[0976] `ph_extension_data_byte` can have any value. Decoders conforming to this version of the specification should ignore the value of `ph_extension_data_byte`. Its value does not affect the consistency of the decoder with the profile specified in this version of the specification.
[0977] 7.4.8 Semantic Terms with Headers
[0978] 7.4.8.1 General Strip Header Semantics
[0979] The variable CuQpDeltaVal is set to 0, which specifies the difference between the quantization parameter and its prediction for the codec unit containing cu_qp_delta_abs. This specifies the Qp' value for determining the codec unit containing cu_chroma_qp_offset_flag. Cb 、Qp' Cr and Qp' CbCr The variable CuQpOffset is used to quantize the individual values of the parameters. Cb CuQpOffset Cr and CuQpOffset CbCr All of them were set to 0.
[0980] A picture_header_in_slice_header_flag value of 1 indicates that the PH syntax structure exists in the slice header. A picture_header_in_slice_header_flag value of 0 indicates that the PH syntax structure does not exist in the slice header.
[0981] One requirement for bitstream consistency is that the value of picture_header_in_slice_header_flag should be the same in all codec stripes in CLVS.
[0982] When the picture_header_in_slice_header_flag of the codec stripe is equal to 1, the requirement for bitstream consistency is that no VCL NAL unit with nal_unit_type equal to PH_NUT should exist in CLVS.
[0983] When picture_header_in_slice_header_flag equals 0, the picture_header_in_slice_header_flag of all codec strips in the current picture should be equal to 0, and the current PU should have PH NAL units.
[0984] `slice_subpic_id` specifies the subpick ID of the subpick containing the slice. If `slice_subpic_id` exists, the value of the variable `CurrSubpicIdx` is deduced such that `SubpicIdVal[CurrSubpicIdx]` equals `slice_subpic_id`. Otherwise (if `slice_subpic_id` does not exist), `CurrSubpicIdx` is deduced to be 0. The length of `slice_subpic_id` is `sps_subpic_id_len_minus1+1` bits.
[0985] `slice_address` specifies the slice address. When it does not exist, the value of `slice_address` is inferred to be 0. When `rect_slice_flag` is equal to 1 and `NumSlicesInSubpic[CurrSubicIdx]` is equal to 1, the value of `slice_address` is inferred to be 0.
[0986] If rect_slice_flag equals 0, the following applies:
[0987] - The stripe address is the raster scan chip index.
[0988] The length of -slice_address is Ceil(Log2(NumTilesInPic)) bits.
[0989] The value of -slice_address should be in the range of 0 to NumTilesInPic-1 (inclusive).
[0990] Otherwise (rect_slice_flag equals 1), the following applies:
[0991] - A stripe address is a sub-image-level stripe index.
[0992] The length of -slice_address is Ceil(Log2(NumSlicesInSubpic[CurrSubpicIdx])) bits.
[0993] The value of -slice_address should be in the range of 0 to NumSlicesInSubpic[CurrSubpicIdx]-1 (inclusive).
[0994] Bitstream consistency requires the application of the following constraints:
[0995] - If rect_slice_flag is equal to 0 or subpic_info_present_flag is equal to 0, then the value of slice_address should not be equal to the value of slice_address of any other codec strip NAL unit of the same codec image.
[0996] Otherwise, the slice_subpic_id and slice_address value pairs should not be equal to the slice_subpic_id and slice_address value pairs of any other codec strip NAL unit of the same codec image.
[0997] - The shape of the image stripes should be such that each CTU, when decoded, should have its entire left and top boundaries composed of the image boundary or the boundary of the previously decoded CTU.
[0998] sh_extra_bit[i] can be equal to 1 or 0. Decoders conforming to this version of the specification should ignore the value of sh_extra_bit[i]. Its value does not affect the consistency of the decoder with the profile specified in this version of the specification.
[0999] The increment of 1 in num_tiles_in_slice_minus1 (if present) specifies the number of slices in the strip. The value of num_tiles_in_slice_minus1 should be in the range of 0 to NumTilesInPic-1 (inclusive).
[1000] The variable NumCtusInCurrSlice, which specifies the number of CTUs in the current slice, and the list CtbAddrInCurrSlice[i], which specifies the raster scan addresses of the i-th CTB in the slice, are derived as follows (for i in the range from 0 to NumCtusInCurrSlice-1 (inclusive):
[1001]
[1002] The variables SubpicLeftBoundaryPos, SubpicTopBoundaryPos, SubpicRightBoundaryPos, and SubpicBotBoundaryPos are derived as follows:
[1003]
[1004] The slice_type specifies the encoding / decoding type of the stripes according to Table 9.
[1005] Table 9 — Association with slice_type name
[1006] slice_type The name of slice_type 0 B (B band) 1 P (P-band) 2 I(I strip)
[1007] When it does not exist, the value of slice_type is inferred to be equal to 2.
[1008] When ph_intra_slice_allowed_flag equals 0, the value of slice_type should be 0 or 1. When nal_unit_type is in the range from IDR_W_RADL to CRA_NUT (inclusive) and vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]] equals 1, slice_type should be 2.
[1009] Derive the variables MinQtLog2SizeY, MinQtLog2SizeC, MinQtSizeY, MinQtSizeC, MaxBtSizeY, MaxBtSizeC, MinBtSizeY, MaxTtSizeY, MaxTtSizeC, MinTtSizeY, MaxMttDepthY and MaxMttDepthC as follows: If slice_type is equal to 2 (I),
[1010] MinQtLog2SizeY = MinCbLog2SizeY + ph_log2_diff_min_qt_min_cb_intra_slice_luma (119)
[1011] MinQtLog2SizeC = MinCbLog2SizeY + ph_log2_diff_min_qt_min_cb_intra_slice_chroma (120)
[1012] MaxBtSizeY = 1 << (MinQtLog2SizeY + ph_log2_diff_max_bt_min_qt_intra_slice_luma) (121)
[1013] MaxBtSizeC = 1 << (MinQtLog2SizeC + ph_log2_diff_max_bt_min_qt_intra_slice_chroma) (122)
[1014] MaxTtSizeY = 1 << (MinQtLog2SizeY + ph_log2_diff_max_tt_min_qt_intra_slice_luma) (123)
[1015] MaxTtSizeC = 1 << (MinQtLog2SizeC + ph_log2_diff_max_tt_min_qt_intra_slice_chroma) (124)
[1016] MaxMttDepthY = ph_max_mtt_hierarchy_depth_intra_slice_luma (125)
[1017] MaxMttDepthC = ph_max_mtt_hierarchy_depth_intra_slice_chroma (126)
[1018] CuQpDeltaSubdiv=ph_cu_qp_delta_subdiv_intra_slice (127)
[1019] CuChromaQpOffsetSubdiv=ph_cu_chroma_qp_offset_subdiv_intra_slice(128)Otherwise(slice_type equal to 0(B)or 1(P)),
[1020] MinQtLog2SizeY=MinCbLog2SizeY+ph_log2_diff_min_qt_min_cb_inter_slice(129)
[1021] MinQtLog2SizeC=MinCbLog2SizeY+ph_log2_diff_min_qt_min_cb_inter_slice(130)
[1022] MaxBtSizeY=1<<(MinQtLog2SizeY+ph_log2_diff_max_bt_min_qt_inter_slice) (131)
[1023] MaxBtSizeC=1<<(MinQtLog2SizeC+ph_log2_diff_max_bt_min_qt_inter_slice) (132)
[1024] MaxTtSizeY=1<<(MinQtLog2SizeY+ph_log2_diff_max_tt_min_qt_inter_slice) (133)
[1025] MaxTtSizeC=1<<(MinQtLog2SizeC+ph_log2_diff_max_tt_min_qt_inter_slice) (134)
[1026] MaxMttDepthY=ph_max_mtt_hierarchy_depth_inter_slice (135)
[1027] MaxMttDepthC=ph_max_mtt_hierarchy_depth_inter_slice (136)
[1028] CuQpDeltaSubdiv=ph_cu_qp_delta_subdiv_inter_slice (137)
[1029] CuChromaQpOffsetSubdiv=ph_cu_chroma_qp_offset_subdiv_inter_slice(138)
[1030] MinQtSizeY = 1 <MinQtLog2SizeY (139)
[1031] MinQtSizeC = 1 <MinQtLog2SizeC (140)
[1032] MinBtSizeY=1< <MinCbLog2SizeY (141)
[1033] MinTtSizeY=1< <MinCbLog2SizeY (142)
[1034] A slice_alf_enabled_flag value of 1 indicates that the adaptive loop filter is enabled and can be applied to the Y, Cb, or Cr color components in the slice. A slice_alf_enabled_flag value of 0 indicates that the adaptive loop filter is disabled for all color components in the slice. When it does not exist, the value of slice_alf_enabled_flag is inferred to be equal to ph_alf_enabled_flag.
[1035] `slice_num_alf_aps_ids_luma` specifies the number of ALF APSs referenced by the slice. When `slice_alf_enabled_flag` is equal to 1 and `slice_num_alf_aps_ids_luma` does not exist, the value of `slice_num_alf_aps_ids_luma` is inferred to be equal to the value of `ph_num_alf_aps_ids_luma`.
[1036] `slice_alf_aps_id_luma[i]` specifies the `adaptation_parameter_set_id` of the i-th ALF APS referenced by the luminance component of the slice. The `TemporalId` of the APS NAL unit where `aps_params_type` equals `ALF_APS` and `adaptation_parameter_set_id` equals `slice_alf_aps_id_luma[i]` should be less than or equal to the `TemporalId` of the slice NAL unit being encoded or decoded. When `slice_alf_enabled_flag` equals 1 and `slice_alf_aps_id_luma[i]` does not exist, the value of `slice_alf_aps_id_luma[i]` is inferred to be equal to the value of `ph_alf_aps_id_luma[i]`.
[1037] The value of alf_luma_filter_signal_flag for the APS NAL cell where aps_params_type is equal to ALF_APS and adaptation_parameter_set_id is equal to slice_alf_aps_id_luma[i] should be equal to 1.
[1038] A slice_alf_chroma_idc equal to 0 indicates that the adaptive loop filter is not applied to the Cb and Cr color components. A slice_alf_chroma_idc equal to 1 indicates that the adaptive loop filter is applied to the Cb color component. A slice_alf_chroma_idc equal to 2 indicates that the adaptive loop filter is applied to the Cr color component. A slice_alf_chroma_idc equal to 3 indicates that the adaptive loop filter is applied to both the Cb and Cr color components. When slice_alf_chroma_idc does not exist, it is inferred to be equal to ph_alf_chroma_idc.
[1039] `slice_alf_aps_id_chroma` specifies the `adaptation_parameter_set_id` of the ALF APS referenced by the chroma components of the slice. The `temporalId` of the APS NAL unit where `aps_params_type` equals `ALF_APS` and `adaptation_parameter_set_id` equals `slice_alf_aps_id_chroma` should be less than or equal to the `temporalId` of the slice NAL unit being encoded or decoded. When `slice_alf_enabled_flag` equals 1 and `slice_alf_aps_id_chroma` does not exist, the value of `slice_alf_aps_id_chroma` is inferred to be equal to the value of `ph_alf_aps_id_chroma`.
[1040] The alf_chroma_filter_signal_flag value of the APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to slice_alf_aps_id_chroma should be equal to 1.
[1041] A slice_cc_alf_cb_enabled_flag value of 0 indicates that the cross component filter is not applied to the Cb color component. A slice_cc_alf_cb_enabled_flag value of 1 indicates that the cross component filter is enabled and can be applied to the Cb color component. When slice_cc_alf_cb_enabled_flag does not exist, it is inferred to be equal to ph_cc_alf_cb_enabled_flag.
[1042] slice_cc_alf_cb_aps_id specifies the adaptation_parameter_set_id referenced by the Cb color component of the stripe.
[1043] The TemporalId of the APS NAL unit whose aps_params_type equals ALF_APS and whose adaptation_parameter_set_id equals slice_cc_alf_cb_aps_id should be less than or equal to the TemporalId of the slice NAL unit being encoded or decoded. When slice_cc_alf_cb_enabled_flag equals 1 and slice_cc_alf_cb_aps_id does not exist, the value of slice_cc_alf_cb_aps_id is inferred to be equal to the value of ph_cc_alf_cb_aps_id.
[1044] The value of alf_cc_cb_filter_signal_flag for the APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to slice_cc_alf_cb_aps_id should be equal to 1.
[1045] A slice_cc_alf_cr_enabled_flag value of 0 indicates that the cross-component filter is not applied to the Cr color component. A slice_cc_alf_cb_enabled_flag value of 1 indicates that the cross-component adaptive loop filter is enabled and can be applied to the Cr color component. When slice_cc_alf_cr_enabled_flag does not exist, it is inferred to be equal to ph_cc_alf_cr_enabled_flag.
[1046] `slice_cc_alf_cr_aps_id` specifies the `adaptation_parameter_set_id` referenced by the Cr color component of the slice. The TemporalId of the APS NAL unit where `aps_params_type` equals `ALF_APS` and `adaptation_parameter_set_id` equals `slice_cc_alf_cr_aps_id` should be less than or equal to the TemporalId of the slice NAL unit being encoded or decoded. When `slice_cc_alf_cr_enabled_flag` equals 1 and `slice_cc_alf_cr_aps_id` does not exist, the value of `slice_cc_alf_cr_aps_id` is inferred to be equal to the value of `ph_cc_alf_cr_aps_id`.
[1047] The value of alf_cc_cr_filter_signal_flag for an APS NAL cell whose aps_params_type is equal to ALF_APS and whose adaptation_parameter_set_id is equal to slice_cc_alf_cr_aps_id should be equal to 1.
[1048] When separate_colour_plane_flag equals 1, colour_plane_id identifies the color plane associated with the current stripe. The value of colour_plane_id should be in the range of 0 to 2 (inclusive). colour_plane_id values 0, 1, and 2 correspond to the Y, Cb, and Cr planes, respectively. The value of colour_plane_id 3 is reserved for future use by ITU-T|ISO / IEC.
[1049] Note 1 – There is no correlation between the decoding processes of different color planes of an image.
[1050] A value of 1 for num_ref_idx_active_override_flag indicates the existence of the syntax element num_ref_idx_active_minus1[0] for P and B stripes, and the existence of the syntax element num_ref_idx_active_minus1[1] for B stripe. A value of 0 for num_ref_idx_active_override_flag indicates the absence of the syntax elements num_ref_idx_active_minus1[0] and num_ref_idx_active_minus1[1]. When they do not exist, the value of num_ref_idx_active_override_flag is inferred to be 1.
[1051] num_ref_idx_active_minus1[i] is used to derive the variable NumRefIdxActive[i] specified in Equation 143. The value of num_ref_idx_active_minus1[i] should be in the range of 0 to 14 (inclusive).
[1052] For i equal to 0 or 1, when the current stripe is a B stripe, num_ref_idx_active_override_flag equals 1, and num_ref_idx_active_minus1[i] does not exist, num_ref_idx_active_minus1[i] is inferred to be equal to 0.
[1053] When the current stripe is a P stripe, num_ref_idx_active_override_flag is equal to 1, and num_ref_idx_active_minus1[0] does not exist, num_ref_idx_active_minus1[0] is inferred to be equal to 0.
[1054] The variable NumRefIdxActive[i] is derived as follows:
[1055]
[1056] The value of NumRefIdxActive[i]-1 specifies the maximum reference index of the reference image list i that can be used to decode the strip. When the value of NumRefIdxActive[i] is equal to 0, no reference index of the reference image list i can be used to decode the strip.
[1057] When the current stripe is a P stripe, the value of NumRefIdxActive[0] should be greater than 0.
[1058] When the current stripe is a B stripe, both NumRefIdxActive[0] and NumRefIdxActive[1] should be greater than 0.
[1059] `cabac_init_flag` specifies the method used to determine the initialization table used during context variable initialization. When `cabac_init_flag` does not exist, it is inferred to be equal to 0.
[1060] A slice_collocated_from_l0_flag value of 1 specifies that the juxtaposed image used for temporal motion vector prediction is derived from reference image list 0. A slice_collocated_from_l0_flag value of 0 specifies that the juxtaposed image used for temporal motion vector prediction is derived from reference image list 1.
[1061] The following applies when slice_type is equal to B or P, ph_temporal_mvp_enabled_flag is equal to 1, and slice_collocated_from_l0_flag does not exist:
[1062] – If rpl_info_in_ph_flag equals 1, then slice_collocated_from_l0_flag is inferred to be equal to ph_collocated_from_l0_flag.
[1063] Otherwise (rpl_info_in_ph_flag equals 0 and if slice_type equals P, then the value of slice_collocated_from_l0_flag is inferred to be equal to 1).
[1064] The slice_collocated_ref_idx specifies the reference index for the juxtaposed images used for temporal motion vector prediction.
[1065] When slice_type equals P or slice_type equals B and collocated_from_l0_flag equals 1, slice_collocated_ref_idx refers to the entry in reference image list 0, and the value of slice_collocated_ref_idx should be in the range of 0 to NumRefIdxActive[0]-1 (inclusive).
[1066] When slice_type equals B and slice_collocated_from_l0_flag equals 0, slice_collocated_ref_idx refers to the entry in reference image list 1, and the value of slice_collocated_ref_idx should be in the range of 0 to NumRefIdxActive[1]-1 (inclusive).
[1067] The following applies when slice_collocated_ref_idx does not exist:
[1068] – If rpl_info_in_ph_flag equals 1, then the value of slice_collocated_ref_idx is inferred to be equal to ph_collocated_ref_idx.
[1069] Otherwise (rpl_info_in_ph_flag equals 0), the value of slice_collocated_ref_idx is inferred to be equal to 0.
[1070] One requirement for bitstream consistency is that the image referenced by slice_collocated_ref_idx should be identical for all slices of the encoded and decoded image.
[1071] One requirement for bitstream consistency is that the values of pic_width_in_luma_samples and pic_height_in_luma_samples of the reference image referenced by slice_collocated_ref_idx should be equal to the values of pic_width_in_luma_samples and pic_height_in_luma_samples of the current image, respectively, and RprConstraintsActive[slice_collocated_from_l0_flag? 0:1][slice_collocated_ref_idx] should be equal to 0.
[1072] slice_qp_delta specifies the Qp used for encoding / decoding blocks in a slice. Y The initial value remains unchanged until it is modified by the CuQpDeltaVal value in the codec unit layer.
[1073] When qp_delta_info_in_ph_flag equals 0, derive the Qp of the stripe as follows: Y Initial value of quantization parameter SliceQp Y :
[1074] SliceQp Y =26+init_qp_minus26+slice_qp_delta (144)
[1075] SliceQp Y The value should be in the range of -QpBdOffset to +63 (inclusive).
[1076] When any of the following conditions are true:
[1077] The values of –wp_info_in_ph_flag, pps_weighted_pred_flag, and slice_type are all equal to 1.
[1078] The values of –wp_info_in_ph_flag, pps_weighted_bipred_flag, and slice_type are all equal to 1 and B, respectively.
[1079] The following applies:
[1080] The value of –NumRefIdxActive[0] should be less than or equal to the value of NumWeightsL0.
[1081] – For each reference image index RefPicList[0][i] (for i in the range from 0 to NumRefIdxActive[0]-1 (inclusive), the luminance weight, Cb weight and Cr weight applied to the reference image index are LumaWeightL0[i], ChromaWeightL0[0][i] and ChromaWeightL0[1][i], respectively.
[1082] When wp_info_in_ph_flag equals 1, pps_weighted_bipred_flag equals 1, and slice_type equals B, the following applies:
[1083] The value of –NumRefIdxActive[1] should be less than or equal to the value of NumWeightsL1.
[1084] – For each reference image index RefPicList[1][i] (for i in the range from 0 to NumRefIdxActive[1]-1 (inclusive), the luminance weight, Cb weight and Cr weight applied to the reference image index are LumaWeightL1[i], ChromaWeightL1[0][i] and ChromaWeightL1[1][i], respectively.
[1085] slice_cb_qp_offset specifies the offset when determining Qp' Cb The value of the quantization parameter should be added to the difference between pps_cb_qp_offset and the original value. The value of slice_cb_qp_offset should be in the range of -12 to +12 (inclusive). If slice_cb_qp_offset does not exist, it is inferred to be equal to 0. The value of pps_cb_qp_offset + slice_cb_qp_offset should be in the range of -12 to +12 (inclusive).
[1086] slice_cr_qp_offset specifies the offset when determining Qp' Cr The value of the quantization parameter should be added to the difference between pps_cr_qp_offset and the original value. The value of slice_cr_qp_offset should be in the range of -12 to +12 (inclusive). If slice_cr_qp_offset does not exist, it is inferred to be equal to 0. The value of pps_cr_qp_offset + slice_cr_qp_offset should be in the range of -12 to +12 (inclusive).
[1087] slice_joint_cbcr_qp_offset specifies the offset when determining Qp' CbCrWhen adding the value of `pps_joint_cbcr_qp_offset_value`, the difference should be added to `pps_joint_cbcr_qp_offset`. The value of `slice_joint_cbcr_qp_offset` should be in the range of -12 to +12 (inclusive). If `slice_joint_cbcr_qp_offset` does not exist, it is inferred to be equal to 0. The value of `pps_joint_cbcr_qp_offset_value + slice_joint_cbcr_qp_offset` should be in the range of -12 to +12 (inclusive).
[1088] A value of 1 for `cu_chroma_qp_offset_enabled_flag` indicates that `cu_chroma_qp_offset_flag` may exist in the transform unit and the palette codec syntax. A value of 0 for `cu_chroma_qp_offset_enabled_flag` indicates that `cu_chroma_qp_offset_flag` does not exist in the transform unit or the palette codec syntax. When it does not exist, the value of `cu_chroma_qp_offset_enabled_flag` is inferred to be 0.
[1089] A slice_sao_luma_flag value of 1 indicates that SAO is enabled for the luminance component in the current slice; a slice_sao_luma_flag value of 0 indicates that SAO is disabled for the luminance component in the current slice. When slice_sao_luma_flag does not exist, it is inferred to be equal to ph_sao_luma_enabled_flag.
[1090] A slice_sao_chroma_flag value of 1 indicates that SAO is enabled for the chroma components in the current slice; a slice_sao_chroma_flag value of 0 indicates that SAO is disabled for the chroma components in the current slice. When slice_sao_chroma_flag does not exist, it is inferred to be equal to ph_sao_chroma_enabled_flag.
[1091] A slice_deblocking_filter_override_flag value of 1 indicates the presence of a deblocking parameter in the slice header. A slice_deblocking_filter_override_flag value of 0 indicates the absence of a deblocking parameter in the slice header. When the parameter is absent, the value of slice_deblocking_filter_override_flag is inferred to be equal to ph_deblocking_filter_override_flag.
[1092] A slice_deblocking_filter_disabled_flag value of 1 indicates that the deblocking filter is not applied to the current slice. A slice_deblocking_filter_disabled_flag value of 0 indicates that the deblocking filter is applied to the current slice. When slice_deblocking_filter_disabled_flag does not exist, it is inferred to be equal to ph_deblocking_filter_disabled_flag.
[1093] `slice_beta_offset_div2` and `slice_tc_offset_div2` specify the deblocking parameter offsets for β and tC (divided by 2) applied to the luminance component of the current slice. The values of both `slice_beta_offset_div2` and `slice_tc_offset_div2` should be in the range of -12 to 12 (inclusive). When not present, the values of `slice_beta_offset_div2` and `slice_tc_offset_div2` are inferred to be equal to `ph_beta_offset_div2` and `ph_tc_offset_div2`, respectively.
[1094] `slice_cb_beta_offset_div2` and `slice_cb_tc_offset_div2` specify the deblocking parameter offsets of β and tC (divided by 2) applied to the Cb components of the current slice. The values of both `slice_cb_beta_offset_div2` and `slice_cb_tc_offset_div2` should be in the range of -12 to 12 (inclusive). When not present, the values of `slice_cb_beta_offset_div2` and `slice_cb_tc_offset_div2` are inferred to be equal to `ph_cb_beta_offset_div2` and `ph_cb_tc_offset_div2`, respectively.
[1095] `slice_cb_beta_offset_div2` and `slice_cb_tc_offset_div2` specify the deblocking parameter offsets for β and tC (divided by 2) applied to the Cr component of the current slice. The values of `slice_cr_beta_offset_div2` and `slice_cr_tc_offset_div2` should both be in the range of -12 to 12 (inclusive). When not present, the values of `slice_cr_beta_offset_div2` and `slice_cr_tc_offset_div2` are inferred to be equal to `ph_cr_beta_offset_div2` and `ph_cr_tc_offset_div2`, respectively.
[1096] The `slice_ts_residual_coding_disabled_flag` specifies the `residual_coding()` syntax structure used to parse the residual samples of the transform skipped blocks of the current slice. A `slice_ts_residual_coding_disabled_flag` value of 0 indicates that the `residual_ts_coding()` syntax structure is used to parse the residual samples of the transform skipped blocks of the current slice. When `slice_ts_residual_coding_disabled_flag` does not exist, it is inferred to be equal to 0.
[1097] A slice_lmcs_enabled_flag value of 1 indicates that luma mapping with chroma scaling is enabled for the current slice. A slice_lmcs_enabled_flag value of 0 indicates that luma mapping with chroma scaling is not enabled for the current slice. When slice_lmcs_enabled_flag does not exist, it is inferred to be equal to 0.
[1098] A slice_scaling_list_present_flag value of 1 indicates that the scaling list data used for the current slice is inferred from the scaling list data contained in a reference scaling list APS where aps_params_type equals SCALING_APS and adaptation_parameter_set_id equals ph_scaling_list_aps_id. A slice_scaling_list_present_flag value of 0 indicates that the scaling list data used for the current image is the default scaling list data inferred as specified in Clause 7.4.3.21. When it does not exist, the value of slice_scaling_list_present_flag is inferred to be 0.
[1099] The variable NumEntryPoints, which specifies the number of entry points in the current strip, is derived as follows:
[1100]
[1101] Increasing offset_len_minus1 by 1 specifies the length (in bits) of the entry_point_offset_minus1[i] syntax element. The value of offset_len_minus1 should be in the range of 0 to 31 (inclusive).
[1102] The increment of entry_point_offset_minus1[i] by 1 specifies the offset of the i-th entry point (in bytes), and is represented by offset_len_minus1 plus 1 bit. The stripe data following the stripe header consists of NumEntryPoints+1 subsets, where the subset index values range from 0 to NumEntryPoints (inclusive). The first byte of the stripe data is considered byte 0. When present, for subset identification purposes, simulations appearing in the stripe data portion of the NAL unit of the codec stripe prevent bytes from being counted as part of the stripe data. Subset 0 consists of bytes 0 to entry_point_offset_minus1[0] (inclusive) of the codec stripe data, and subset k consists of bytes firstByte[k] to lastByte[k] (inclusive) of the codec stripe data (where k is in the range of 1 to NumEntryPoints-1 (inclusive)), where firstByte[k] and lastByte[k] are defined as:
[1103]
[1104] lastByte[k]=firstByte[k]+entry_point_offset_minus1[k] (147)
[1105] The last subset (subset index equal to NumEntryPoints) consists of the remaining bytes of the encoded and decoded stripe data.
[1106] When sps_entropy_coding_sync_enabled_flag equals 0 and the stripe contains one or more complete slices, each subset should consist of all the codec bits of all CTUs located within the same slice in the stripe, and the number of subsets (i.e., the value of NumEntryPoints+1) should be equal to the number of slices in the stripe.
[1107] When `sps_entropy_coding_sync_enabled_flag` equals 0 and the stripe contains a subset of CTU rows from a single slice, `NumEntryPoints` should be 0 and the number of subsets should be 1. The subset should consist of all the codec bits for all CTUs in the stripe.
[1108] When sps_entropy_coding_sync_enabled_flag equals 1, each subset k (where k is in the range of 0 to NumEntryPoints (inclusive)) should consist of all the code-decode bits of all CTUs in the on-chip CTU line, and the number of subsets (i.e., the value of NumEntryPoints+1) should be equal to the total number of on-chip specific CTU lines in the stripe.
[1109] `slice_header_extension_length` specifies the length of the slice header extension data in bytes, excluding the bits used for signaling notifications within `slice_header_extension_length` itself. The value of `slice_header_extension_length` should be in the range of 0 to 256 (inclusive). If it does not exist, the value of `slice_header_extension_length` is inferred to be equal to 0.
[1110] The slice_header_extension_data_byte[i] can have any value. Decoders conforming to this version of the specification should ignore the values of all slice_header_extension_data_byte[i] syntax elements. Their values do not affect the consistency of the decoder with the profile specified in this version of the specification.
[1111] Example technical problems solved by the publicly disclosed technical solutions
[1112] There are several potential problems in the current design of HLS, which are described below.
[1113] (1) Control of the temporal prediction flags in SPS, image header and strip header causes problems with P strip and / or B strip.
[1114] a) The image header and stripe level control of the temporal prediction flag may result in uninitialized juxtaposed images and / or juxtaposed reference indices for P stripes.
[1115] b) Slice_collocated_ref_idx refers to an entry in reference image list 1 that can be used for P-slices.
[1116] c) For P-slices, the value of slice_collocated_ref_idx refers to an entry in the reference image list 0 that may extend beyond the range of o to NumRefIdxActive[0]-1.
[1117] d) The image-level and strip-level temporal prediction flags are about whether the juxtaposed images come from L0 or L1, and which reference images are referenced, but there are no high-level controls such as whether temporal prediction is allowed, which may not be clear enough.
[1118] (2) Considering the interaction of related grammatical elements, it may be necessary to modify the semantics of the related grammatical elements of the sub-images in order to obtain a more accurate interpretation.
[1119] a) When there is only one subpick, sps_independent_subpics_flag may be equal to 0.
[1120] b) When there is only one stripe in the sub-image, the value of slice_width_in_tiles_minus1 still needs to be calculated rather than inferred.
[1121] c) When there is only one stripe and / or one slice in the image, single_slice_per_subpic_flag may be equal to 0.
[1122] d) When `single_slice_per_subpic_flag` does not exist, for example, when `no_pic_partition_flag` equals 1, then `single_slice_per_subpic_flag` is inferred to be 0. A requirement for bitstream consistency is that when the value of `sps_num_subpics_minus1+1` is greater than 1, the value of `no_pic_partition_flag` should not be equal to 1. Therefore, an image contains only one sub-image. And since the sub-image contains only one stripe, in this case, `single_slice_per_subpic_flag` should equal 1.
[1123] (3) During the extraction of sub-image sub-bit streams, some syntax elements were not set correctly.
[1124] a) The syntax elements for subpicks extracted during the sub-bitstream extraction process, such as sps_independent_subpics_flag, subpic_treated_as_pic_flag, loop_filter_across_subpic_enabled_flag, and no_pic_partition_flag, are not written, which may be undesirable.
[1125] b) The sub-image sub-bitstream extraction process depends on the sub-image ID, which can change based on different images. This will result in extracting different sub-image indices from different images, which may be undesirable.
[1126] c) The output streams sps_num_subpics_minus1 and pps_num_subpics_minus1 of the subpics sub-bitstream extraction process are written to 1, which indicates that two subpics should be extracted at a time, which may not be the desired outcome.
[1127] (4) Syntax elements on the reference image list may appear in the IDR image without any usage.
[1128] (5) It is incorrect to assume that the segmentation information is the same for the brightness and chromaticity of the prediction tree.
[1129] (6) The syntax elements of the encoding and decoding tools are not restricted or constrained by the corresponding general constraint flags, and the values of some general constraint flags are not restricted by the relevant constraints, which may lead to some conflicts.
[1130] a) res_change_in_clvs_allowed_flag is not constrained by the value of the general constraint flag no_res_change_in_clvs_constraint_flag.
[1131] b) scaling_window_explicit_signalling_flag is not constrained by no_res_change_in_clvs_constraint_flag.
[1132] c) scaling_window_explicit_signalling_flag is not subject to the constraints of res_change_in_clvs_allowed_flag.
[1133] d) The value of sps_num_subpics_minus1 is not constrained by one_subpic_per_pic_constraint_flag.
[1134] e) subpic_treated_as_pic_flag is not subject to the constraints of one_subpic_per_pic_constraint_flag and / or sps_num_subpics_minus1 and / or pps_num_subpics_minus1.
[1135] f) loop_filter_across_subpic_enabled_flag is not constrained by one_subpic_per_pic_constraint_flag and / or sps_num_subpics_minus1 and / or pps_num_subpics_minus1.
[1136] g) One_subpic_per_pic_constraint_flag is not subject to the constraints of one_slice_per_pic_constraint_flag.
[1137] h) no_bdpcm_constraint_flag is not subject to the constraints of no_transform_skip_constraint_flag.
[1138] i)num_slices_in_pic_minus1 is not subject to the constraints of one_slice_per_pic_constraint_flag.
[1139] j)num_tiles_in_slice_minus1 is not subject to the constraints of one_slice_per_pic_constraint_flag.
[1140] Example technologies and embodiments
[1141] The following detailed inventions should be considered as examples for interpreting general concepts. These inventions should not be interpreted narrowly. Furthermore, these inventions can be combined in any way. In the following description, deleted portions are marked between [[]], and added portions are marked as... Bold italic with underline .
[1142] Time-domain prediction related HLS
[1143] 1. Two levels of control can be used in TMVP: one is the image level, and the other is the strip / slice / sub-image / brick level.
[1144] a) In one example, TMVP can be enabled by indicating the presence of a first syntax element of at least one inter-frame codec stripe that references the flag in a picture-level signaling notification (e.g., represented by ph_temporal_mvp_allowed_flag).
[1145] i. In one example, it can be signaled in the image header or PPS.
[1146] ii. In one example, it can be conditionally signaled, for example, based on TMVP enabled in SPS and / or the current picture containing at least one inter-frame codec stripe and / or RPL present in the current picture header.
[1147] b) In one example, a second syntax element (e.g., represented by sh_temporal_mvp_allowed_flag) can be used in the stripe-level signaling notification to indicate whether TMVP is enabled for the current stripe, which may depend on the first syntax element.
[1148] i. In one example, signaling can only be used to notify sh_temporal_mvp_allowed_flag if ph_temporal_mvp_allowed_flag is equal to 1. Otherwise, it is inferred to be 0.
[1149] ii. In one example, signaling can only be used to notify sh_temporal_mvp_allowed_flag if ph_temporal_mvp_allowed_flag is equal to 0. Otherwise, it is inferred to be 1.
[1150] c) In one example, a second syntax element (e.g., represented by sh_temporal_mvp_allowed_flag) can be used in the stripe-level signaling notification to indicate whether TMVP is enabled in the current stripe, which may depend on whether TMVP is enabled in the RPL and / or SPS present in the current stripe header and / or whether the current stripe is an inter-frame encoded stripe.
[1151] d) In one example, the signaling notification third syntax element (e.g., tmvp_info_in_ph_flag) indicates whether the TMVP information is signaled in the picture header or in the stripe header.
[1152] i.TMVP information may include whether TMVP is enabled.
[1153] ii.TMVP information may include information about the juxtaposed reference images.
[1154] iii. In one example, tmvp_info_in_ph_flag is signaled only if TMVP is enabled at the sequence level. (For example, sps_temporal_mvp_enabled_flag equals 1).
[1155] e) In one example, the second syntax element is inferred to be equal to the default value (e.g., the value of the first syntax element) when it does not exist. For example, sh_temporal_mvp_allowed_flag is inferred to be equal to ph_temporal_mvp_allowed_flag when it does not exist.
[1156] 2. Whether and / or how the juxtaposed image information is inherited from PH to SH (e.g., the juxtaposed image comes from list 0; the reference image index of the juxtaposed image) depends at least on the stripe type and whether the reference image list information exists in the PH syntax structure (e.g., rpl_info_in_ph_flag is 1).
[1157] a) In one example, when slice_type equals P, rpl_info_in_ph_flag equals 1 (or / and ph_temporal_mvp_enabled_flag equals 1), slice_collocated_from_l0_flag is set to 1, regardless of the value of ph_collocated_from_l0_flag.
[1158] i. Alternatively, when slice_type equals P, slice_collocated_from_l0_flag can be inferred to be equal to 1 regardless of other conditions.
[1159] b) In another example, when slice_type equals B and slice_collocated_from_l0_flag equals 1, slice_collocated_ref_idx references an entry in reference image list 0, and the value of slice_collocated_ref_idx should be in the range of 0 to NumRefIdxActive[0]-1 (inclusive).
[1160] c) In one example, when slice_type equals P, slice_collocated_from_l0_flag can be inferred to be 1 when TMVP is enabled.
[1161] d) In one example, when slice_type is equal to P and TMVP is enabled and slice_collocated_ref_idx is in the range of 0 to NumRefIdxActive[0]-1 (inclusive).
[1162] e) In one example, when slice_type is equal to P and TMVP is enabled, RprConstraintsActive[0][slice_collocated_ref_idx] of slice P may need to be equal to 0.
[1163] f) In one example, the following example modification can be introduced.
[1164] The slice_collocated_ref_idx specifies the reference index for the juxtaposed images used for temporal motion vector prediction.
[1165] When slice_type equals P or slice_type equals B and slice_ When collocated_from_l0_flag equals 1, slice_collocated_ref_idx references the entry in reference image list 0. Furthermore, the value of slice_collocated_ref_idx should be in the range of 0 to NumRefIdxActive[0]-1 (inclusive).
[1166] When slice_type equals B and slice_collocated_from_l0_flag equals 0, slice_collocated_ref_idx refers to the entry in reference image list 1, and the value of slice_collocated_ref_idx should be in the range of 0 to NumRefIdxActive[1]-1 (inclusive).
[1167] The following applies when slice_collocated_ref_idx does not exist:
[1168] – If rpl_info_in_ph_flag equals 1, then the value of slice_collocated_ref_idx is inferred to be equal to ph_collocated_ref_idx.
[1169] Otherwise (rpl_info_in_ph_flag equals 0), the value of slice_collocated_ref_idx is inferred to be equal to 0.
[1170] One requirement for bitstream consistency is that the image referenced by slice_collocated_ref_idx should be identical for all slices of the encoded and decoded image.
[1171] One requirement for bitstream consistency is that the values of pic_width_in_luma_samples and pic_height_in_luma_samples of the reference image referenced by slice_collocated_ref_idx should be equal to the values of pic_width_in_luma_samples and pic_height_in_luma_samples of the current image, respectively, and RprConstraintsActive[slice_collocated_from_l0_flag? 0:1][slice_collocated_ref_idx] should be equal to 0.
[1172] g) In one example, when ph_collocated_from_l0_flag equals 0, it may be required that the image does not contain P-bands.
[1173] i. In one example, the following example modification can be introduced.
[1174] slice_type specifies the encoding / decoding type of the slice according to Table 9.
[1175] Table 9 - Name Associations of Slice_Type
[1176] slice_type The name of slice_type 0 B (B band) 1 P (P-band) 2 I(I strip)
[1177] When it does not exist, the value of slice_type is inferred to be equal to 2.
[1178] When ph_intra_slice_allowed_flag equals 0, the value of slice_type should be 0 or 1. When nal_unit_type is in the range from IDR_W_RADL to CRA_NUT (inclusive), and vps_independent_layer_flag[GeneralLayerIdx[nuh_layer_id]] equals 1, slice_type should be 2.
[1179]
[1180] ii. Alternatively, whether the signaling notification stripe type may depend on whether the juxtaposed image comes from list 0.
[1181] 1. In one example, signaling for the strip type that references the current image header can be skipped if all of the following conditions are true.
[1182] –rpl_info_in_ph_flag equals 1
[1183] –ph_temporal_mvp_enabled_flag equals 1
[1184] –ph_intra_slice_allowed_flag equals 0
[1185] –ph_collocated_from_l0_flag equals 0
[1186] Alternatively, the band type can be inferred to be a B band.
[1187] h) In one example, when ph_temporal_mvp_enabled_flag equals 1 and rpl_info_in_ph_flag equals 1, the value of slice_collocated_from_l0_flag for the P-slice can always be inferred to be equal to 1. The following example can be used to modify this.
[1188] A slice_collocated_from_l0_flag value of 1 specifies that the juxtaposed image used for temporal motion vector prediction is derived from reference image list 0. A slice_collocated_from_l0_flag value of 0 specifies that the juxtaposed image used for temporal motion vector prediction is derived from reference image list 1.
[1189] The following applies when slice_type equals B or P, ph_temporal_mvp_enabled_flag equals 1, and slice_collocated_from_l0_flag does not exist:
[1190] – If rpl_info_in_ph_flag is equal to 1, slice_collocated_from_l0_flag is inferred to be equal to ph_collocated_from_l0_flag.
[1191] Otherwise (rpl_info_in_ph_flag equals 0 and slice_type equals P), the value of slice_collocated_from_l0_flag is inferred to be equal to 1.
[1192]
[1193] i) In one example, when slice_type equals P and slice_collocated_from_l0_flag equals 0, slice_collocated_ref_idx can be considered to refer to an inactive entry in reference image list 1, and it may be necessary that the reference image referenced by that inactive entry in reference image list 1 should also be referenced by an active entry in reference image list 0. The following example can be modified.
[1194] The slice_collocated_ref_idx specifies the reference index for the juxtaposed images used for temporal motion vector prediction.
[1195] When slice_type equals P or slice_type equals B and When collocated_from_l0_flag equals 1, slice_collocated_ref_idx refers to the entry in reference image list 0, and the value of slice_collocated_ref_idx should be in the range of 0 to NumRefIdxActive[0]-1 (inclusive).
[1196] When slice_type equals B and slice_collocated_from_l0_flag equals 0, slice_collocated_ref_idx refers to the entry in reference image list 1, and the value of slice_collocated_ref_idx should be in the range of 0 to NumRefIdxActive[1]-1 (inclusive).
[1197]
[1198] The following applies when slice_collocated_ref_idx does not exist:
[1199] – If rpl_info_in_ph_flag equals 1, then the value of slice_collocated_ref_idx is inferred to be equal to ph_collocated_ref_idx.
[1200] Otherwise (rpl_info_in_ph_flag equals 0), the value of slice_collocated_ref_idx is inferred to be equal to 0.
[1201] One requirement for bitstream consistency is that the image referenced by slice_collocated_ref_idx should be identical for all slices of the encoded and decoded image.
[1202] One requirement for bitstream consistency is that the values of pic_width_in_luma_samples and pic_height_in_luma_samples of the reference image referenced by slice_collocated_ref_idx should be equal to the values of pic_width_in_luma_samples and pic_height_in_luma_samples of the current image, respectively, and RprConstraintsActive[slice_collocated_from_l0_flag? 0:1][slice_collocated_ref_idx] should be equal to 0.
[1203] j) Alternatively, B and P stripes referencing the same image header can use different juxtaposed images.
[1204] i. In one example, even if the RPL is signaled in the image header, the reference image index of the juxtaposed image can be further signaled in the strip header.
[1205] 1. In one example, when the current stripe is a P stripe, the signaling in the image header informs the RPL signal to enable temporal motion vector prediction (e.g., ph_temporal_mvp_enabled_flag is true), and ph_collocated_from_l0_flag is equal to 0, which can further signal the reference image index of the co-located image.
[1206] a) Alternatively, it also points to reference image list 0.
[1207] ii. In one example, two juxtaposed reference picture indices can be signaled or derived, one for a B-strip and the other for a P-strip referencing the same picture header.
[1208] 1. In one example, signaling can only be used to notify these two indexes when ph_collocated_from_l0_flag is equal to 0.
[1209] k) In one example, signaling can be used to indicate the existence of B and P stripes that reference the same picture header.
[1210] i. Alternatively, the signaling information in the picture header can indicate the type of the stripe referencing the same picture header.
[1211] ii. Alternatively, signaling may be used to indicate whether only B-bands referencing the same image header exist (excluding P-bands).
[1212] iii. Alternatively, signaling may be used to indicate whether only P-bands (excluding B-bands) referencing the same picture header exist.
[1213] iv. Alternatively, signaling may be used to indicate whether only B and I stripes referencing the same picture header exist.
[1214] v. Alternatively, signaling may be used to indicate whether only P-bands and I-bands referencing the same picture header exist.
[1215] vi. Alternatively, an indication of a stripe type referencing the same picture header may be signaled in the picture header only when the RPL is signaled in the picture header.
[1216] vii. Alternatively, RPL may be signaled in the picture header only if the signaling notification in the picture header refers to the stripe type of the same picture header.
[1217] l) Alternatively, when slice_type equals P and slice_collocated_from_l0_flag equals 0, it can be modified before using slice_collocated_ref_idx, for example, to map to an index in the range of 0 to NumRefIdxActive[0]-1 (inclusive).
[1218] i. In one example, when slice_type equals P and slice_collocated_from_l0_flag equals 0, slice_collocated_ref_idx references an entry in reference image list 0, and slice_collocated_ref_idx is set to (slice_collocated_ref_idx>(NumRefIdxActive[0]1)?default_col_ref_idx:slice_collocated_ref_idx), where the variable default_col_ref_idx is in the range from 0 to NumRefIdxActive[0]-1 (inclusive).
[1219] 1. In one example, the variable default_col_ref_idx is set to 0.
[1220] 2. In one example, a signaling notification can be used to notify the variable.
[1221] m) In a consistent bitstream, it may not be allowed to have two stripes associated with a picture header, but one of them is a P stripe and the other is a B stripe.
[1222] n) In a consistent bitstream, it may not be permissible to have two stripes associated with a picture header of a signaling notification RPL, but one of them is a P stripe and the other is a B stripe.
[1223] o) In a consistent bitstream, a stripe associated with a picture header that uses two reference picture lists to signal to the RPL may not be allowed, but that stripe is a P-stripe.
[1224] HLS related to sub-images
[1225] 3. The number of subpics in each picture in CLVS (e.g., sps_num_subpics_minus1 and / or pps_num_subpics_minus1) can be adjusted by a general constraint flag (e.g., one_subpic_per_pic_constraint_flag).
[1226] a) In one example, when the general constraint flag (e.g., one_subpic_per_pic_constraint_flag) is equal to 1, it may be required that the values of sps_num_subpics_minus1 and / or pps_num_subpics_minus1 be equal to 0.
[1227] b) In one example, the following example modification can be introduced.
[1228] The increment of `sps_num_subpics_minus1` by 1 specifies the number of subpicks in each picture within the CLVS. The value of `sps_num_subpics_minus1` should be in the range of 0 to Ceil(pic_width_max_in_luma_samples÷CtbSizeY)*Ceil(pic_height_max_in_luma_samples÷CtbSizeY)-1 (inclusive). If it does not exist, the value of `sps_num_subpics_minus1` is inferred to be 0.
[1229] 4. Whether the signaling notification specifies the syntax elements of "no intra-frame prediction, no inter-frame prediction, and no loop filtering operation performed across any subpicture boundary in CLVS" (e.g., sps_independent_subpics_flag) may depend on the number of subpictures in each picture in CLVS (e.g., sps_num_subpics_minus1).
[1230] a) In one example, when there is only one subpick in each picture in CLVS, the syntax element sps_independent_subpics_flag may not be signaled and inferred as 1.
[1231] b) In one example, the following example modification can be introduced.
[1232] A value of 1 for `sps_independent_subpics_flag` indicates that intra-frame prediction, inter-frame prediction, and loop filtering operations cannot be performed across any subpicture boundary in the CLVS. A value of 0 for `sps_independent_subpics_flag` indicates that inter-frame prediction or loop filtering operations are allowed across subpicture boundaries in the CLVS. When it does not exist, the value of `sps_independent_subpics_flag` is inferred to be equal to [[0]]1.
[1233] c) In one example, the following example modification can be introduced.
[1234] A value of 1 for `sps_independent_subpics_flag` indicates that intra-frame prediction, inter-frame prediction, and loop filtering operations cannot be performed across any subpicture boundary in the CLVS. A value of 0 for `sps_independent_subpics_flag` indicates that inter-frame prediction or loop filtering operations are allowed across subpicture boundaries in the CLVS. When it does not exist, the value of `sps_independent_subpics_flag` is inferred to be 0.
[1235] 5. The value of subpic_treated_as_pic_flag may depend on whether there is only one subpic in the image.
[1236] a) In one example, if one_subpic_per_pic_constraint_flag is equal to 1, then the value of subpic_treated_as_pic_flag may be equal to 1, or inferred to be equal to 1.
[1237] b) In one example, if sps_num_subpics_minus1 equals 0, then the value of subpic_treated_as_pic_flag may be equal to 1, or inferred to be equal to 1.
[1238] c) In one example, if pps_num_subpics_minus1 equals 0, then the value of subpic_treated_as_pic_flag may need to be equal to 1.
[1239] 6. The value of loop_filter_across_subpic_enabled_flag may depend on whether there is only one subpic in the image.
[1240] a) In one example, if one_subpic_per_pic_constraint_flag is equal to 1, then the value of loop_filter_across_subpic_enabled_flag may be equal to 0, or inferred to be equal to 0.
[1241] b) In one example, if sps_num_subpics_minus1 equals 0, then the value of loop_filter_across_subpic_enabled_flag may be equal to 0, or inferred to be equal to 0.
[1242] c) In one example, if pps_num_subpics_minus1 equals 0, then the value of loop_filter_across_subpic_enabled_flag may need to be equal to 0.
[1243] 7. Whether the width of the i-th rectangular strip in units of slices is specified (e.g., slice_width_in_tiles_minus1) may depend on single_slice_per_subpic_flag.
[1244] a) In one example, if slice_width_in_tiles_minus1 does not exist but single_slice_per_subpic_flag is equal to 1, then the value of slice_width_in_tiles_minus1 may not be set.
[1245] b) In one example, the following example modification can be introduced.
[1246] The value of slice_width_in_tiles_minus1[i] plus 1 specifies the width of the i-th rectangular strip in terms of slice columns. The value of slice_width_in_tiles_minus1[i] should be in the range of 0 to NumTileColumns-1 (inclusive).
[1247] When slice_width_in_tiles_minus1[i] does not exist The following applies:
[1248] – If NumTileColumns equals 1, then the value of slice_width_in_tiles_minus1[i] is inferred to be equal to 0.
[1249] Otherwise, infer the value of slice_width_in_tiles_minus1[i] according to Clause 6.5.1.
[1250] 8. Whether each subpicture consists of one and only one rectangular strip (e.g., single_slice_per_subpic_flag) can be adjusted by a general constraint flag (e.g., one_slice_per_pic_constraint_flag).
[1251] a) In another example, when the syntax element single_slice_per_subpic_flag does not exist, the value of single_slice_per_subpic_flag can be inferred to be equal to 1.
[1252] b) In another example, when the syntax element single_slice_per_subpic_flag is not present, the value of single_slice_per_subpic_flag can be inferred based on whether the current image is segmented (e.g., no_pic_partition_flag).
[1253] c) In one example, the following example modification can be introduced.
[1254] `single_slice_per_subpic_flag` equal to 1 indicates that each subpicture consists of one and only one rectangular stripe. `single_slice_per_subpic_flag` equal to 0 indicates that each subpicture can consist of one or more rectangular stripes. When `single_slice_per_subpic_flag` equals 1, `num_slices_in_pic_minus1` is inferred to be equal to `sps_num_subpics_minus1`. [[When it does not exist, the value of `single_slice_per_subpic_flag` is inferred to be 0.]]
[1255] d) In one example, the following example modification can be introduced.
[1256] A single_slice_per_subpic_flag value of 1 indicates that each subpicture consists of one and only one rectangular stripe. A single_slice_per_subpic_flag value of 0 indicates that each subpicture can consist of one or more rectangular stripes. When single_slice_per_subpic_flag is 1, num_slice_in_pic_minus1 is inferred to be equal to sps_num_subpics_minus1. When it does not exist, the value of single_slice_per_subpic_flag is inferred to be 0.
[1257] e) In one example, the following example modification can be introduced.
[1258] A single_slice_per_subpic_flag value of 1 indicates that each subpicture consists of one and only one rectangular stripe. A single_slice_per_subpic_flag value of 0 indicates that each subpicture can consist of one or more rectangular stripes. When single_slice_per_subpic_flag is 1, num_slices_in_pic_minus1 is inferred to be equal to sps_num_subpics_minus1. When it does not exist, the value of single_slice_per_subpic_flag is inferred to be 0.
[1259] f) In one example, the following example modification can be introduced.
[1260] A single_slice_per_subpic_flag value of 1 indicates that each subpicture consists of one and only one rectangular stripe. A single_slice_per_subpic_flag value of 0 indicates that each subpicture can consist of one or more rectangular stripes. When single_slice_per_subpic_flag is 1, num_slices_in_pic_minus1 is inferred to be equal to sps_num_subpics_minus1. When it does not exist, the value of single_slice_per_subpic_flag is inferred to be 0.
[1261] g) In one example, the following example modification can be introduced.
[1262] `single_slice_per_subpic_flag` equal to 1 indicates that each subpicture consists of one and only one rectangular stripe. `single_slice_per_subpic_flag` equal to 0 indicates that each subpicture can consist of one or more rectangular stripes. When `single_slice_per_subpic_flag` equals 1, `num_slices_in_pic_minus1` is inferred to be equal to `sps_num_subpics_minus1`. When it does not exist, the value of `single_slice_per_subpic_flag` is inferred to be equal to [[0]]. .
[1263] 9. In one example, regarding the derivation of outputting a sub-bitstream during sub-picture sub-bitstream extraction, extracted sub-pictures across different pictures in CLVS may need to have the same sub-picture index.
[1264] a) For example, it may be necessary to extract the target sub-image ID of a sub-image, which can reference the same sub-image index between different images in CLVS.
[1265] b) For example, if subpic_id_mapping_explicitly_signalled_flag is equal to 1, and when processing subpick sub-bitstream extraction, it may be necessary to notify the subpick ID mapping in PPS without signaling (e.g., subpic_id_mapping_in_pps_flag is equal to 0).
[1266] i. In one example, if subpic_id_mapping_explicitly_signalled_flag equals 1, and when processing subpick sub-bitstream extraction, it may be necessary to signal the subpick ID mapping in SPS (e.g., subpic_id_mapping_in_sps_flag equals 1).
[1267] c) For example, which sub-image to extract during sub-image sub-bitstream extraction may depend on the sub-image index.
[1268] d) For example, which syntax elements to rewrite and / or remove during sub-image sub-bitstream extraction may depend on the sub-image index.
[1269] e) In one example, the following example modification can be introduced.
[1270] C.7 Sub-image Sub-bitstream Extraction Process
[1271] The input to this process is the bitstream inBitstream, the target OLS index targetOlsIdx, the highest target TemporalId value tIdTarget, and an array of target subpic[[ID]] index values for each layer subpicIdxTarget[].
[1272] The output of this process is the sub-bitstream outBitstream.
[1273] The requirement for bitstream consistency of the input bitstream is that any output sub-bitstream that satisfies all of the following conditions should be a consistent bitstream:
[1274] – The output sub-bitstream is the output of the process specified in this clause, where the bitstream targetOlsIdx is equal to the index of the OLS list specified by the VPS, and subpicIdxTarget[] is equal to the subpic ID that exists in the OLS, as input.
[1275] – The output sub-bitstream contains at least one VCL NAL unit, where nuh_layer_id is equal to each nuh_layer_id value in LayerIdInOls[targetOlsIdx].
[1276] – The output sub-bitstream contains at least one VCL NAL unit whose TemporalId is equal to tIdTarget.
[1277] Note: A consistent bitstream contains one or more codec stripe NAL units with TemporalId equal to 0, but does not necessarily contain codec stripe NAL units with nuh_layer_id equal to 0.
[1278] – The output sub-bitstream contains at least one VCLNAL unit, where nuh_layer_id is equal to LayerIdInOls[targetOlsIdx][i], and slice_subpic_id is equal to the value in subpicIdxTarget[i] (for each i in the range from 0 to NumLayersInOls[targetOlsIdx]-1).
[1279] The output sub-bitstream outBitstream is derived as follows:
[1280] The sub-bitstream extraction procedure specified in Annex C.6 is invoked with inBitstream, targetOlsIdx, and tIdTarget as inputs, and the output of the procedure is assigned to outBitstream.
[1281] –If some external means not specified in this specification are available to provide a replacement parameter set for the sub-bitstream outBitstream, then replace all parameter sets with the replacement parameter set.
[1282] – Otherwise, when a sub-image-level information SEI message exists in inBitstream, the following applies:
[1283] – For all entries whose subpic ID is equal to subpicIdxTarget[], rewrite the general_level_idc value in the ols_ptl_idx[targetOlsIdx]th entry in the profile_tier_level() syntax structure list of all referenced VPS NAL units to be equal to SubpicSetLevelIdc derived in D.3.8.
[1284] For a subpicture set consisting of subpictures whose subpicture ID is equal to all entries in subpicIdxTarget[] and j ranges from 0 to hrd_cpb_cnt_minus1, rewrite the values of cpb_size_value_minus1[tIdTarget][j] and bit_rate_value_minus1[tIdTarget][j] of the j-th CPB in the ols_hrd_parameters() syntax structure list of all referenced VPS NAL units, so as to correspond to SubpicSetCpbSizeVcl[0], SubpicSetCpbSizeNal[0], SubpicSetBitrateVcl[0] and SubpicSetBitrateNal[0] derived in D.3.8.
[1285] For the i-th layer where i is in the range of 0 to NumLayersInOls[targetOlsIdx]-1, the following applies.
[1286] –subpicIdx is set to the value equal to subpicIdxTarget[i].
[1287] –For subpicture[[ID]] The set of subpicks that are equal to subpicIdx is used to rewrite the value of general_level_idc in the profile_tier_level() syntax structure of all referenced SPS NAL units. The sps_ptl_dpb_hrd_params_present_flag that is equal to 1 will be equal to SubpicSetLevelIdc derived in D.3.8.
[1288] – For all referenced SPS NAL units, in the ols_hrd_parameters() syntax structure list, the values of cpb_size_value_minus1[tIdTarget][j] and bit_rate_value_minus1[tIdTarget][j] of the j-th CPB in the ols_hrd_idx[targetOlsIdx] entry are used to correspond to the values of SubpicCpbSizeVcl[0][SubpicIdxList[subPicIdx]], SubpicBitrateVcl[0][SubpicIdxList[subPicIdx]], and SubpicBitrateNal[0][SubpicIdxList[subPicIdx]], as in D.3.8 for subpicture[[ID]]. The subpick j is equal to subpicIdx and ranges from 0 to hrd_cpb_cnt_minus1.
[1289] – Set the values of pic_width_max_in_luma_samples and pic_height_max_in_luma_samples in all referenced SPS NAL cells, as well as the values of pic_width_in_luma_samples and pic_height_in_luma_samples in all referenced PPS NAL cells, to equal subpic_width_minus1[SubpicIdxList[subPicIdx]] and subpic_height_minus1[SubpicIdxList[subPicIdx]].
[1290] Rewrite the values of sps_num_subpics_minus1 in all referenced SPS NAL cells and pps_num_subpics_minus1 in all referenced PPS NAL cells to 1.
[1291] Rewrite the syntax elements subpic_ctu_top_left_x[SubpicIdxList[subPicIdx]] and subpic_ctu_top_left_y[SubpicIdxList[subPicIdx]] in the referenced SPS NAL unit to 0 (if they exist).
[1292] For each j where SubpicIdxList[j] is not equal to subPicIdx, remove all referenced syntax elements subpic_ctu_top_left_x[j], subpic_ctu_top_left_y[j], subpic_width_minus1[j], subpic_height_minus1[j], subpic_treated_as_pic_flag[j], loop_filter_across_subpic_enabled_flag[j], and sps_subpic_id[j] from the SPS NAL unit.
[1293] Rewrite all referenced PPS syntax elements related to slice and strip structure to remove all slice rows, slice columns, and stripes that are not related to the subpicture whose subpicture ID is equal to subPicIdx.
[1294] Remove all VCL NAL units from outBitstream whose nuh_layer_id is equal to nuh_layer_id of layer i and whose slice_subpic_id is not equal to subPicIdx.
[1295] When sli_cbr_constraint_flag equals 1, remove all NAL units with nal_unit_type equal to FD_NUT and filter payload SEI messages not associated with VCL NAL units of subpicIdxTarget[], and set cbr_flag[tIdTarget][j] equal to 1 for the j-th CPB in the ols_hrd_idx[targetOlsIdx] entry of the ols_hrd_parameters() syntax structure list of all referenced VPS NAL units and SPS NAL units, where j is in the range from 0 to hrd_cpb_cnt_minus1. Otherwise (sli_cbr_constraint_flag equals 0), remove all NAL units with nal_unit_type equal to FD_NUT and filter payload SEI messages, and set cbr_flag[tIdTarget][j] to equal to 0.
[1296] – When outBitstream contains an SEI NAL unit for an extensible nested SEI message applicable to outBitstream (where nesting_ols_flag equals 1 and nesting_subpic_flag equals 1), extract the appropriate non-extensible nested SEI message from the extensible nested SEI message, where payloadType equals 1 (picture timing) or 130 (decoding unit information), and put the extracted SEI message into outBitstream.
[1297] 10. In one example, regarding the derivation of the output sub-bitstream during sub-picture sub-bitstream extraction, the extracted sub-bitstream can be regarded as a single sub-picture in the output bitstream.
[1298] a) In one example, for a syntax structure that references an output sub-bitstream that extracts subpicks, the syntax element `sps_independent_subpics_flag` can be overridden to equal 1.
[1299] b) In one example, signaling notifications from the syntax structure of the output sub-bitstream may not be available (e.g., the syntax elements subpic_treated_as_pic_flag and / or loop_filter_across_subpic_enabled_flag that reference the extracted subpic in all output layers may be removed).
[1300] i. In one example, for a syntax structure that references an output sub-bitstream that extrac...
Claims
1. A video processing method, comprising: Perform a conversion between a video including video images and the bitstream of the video, wherein at least one of the video images includes one or more sub-images; The bitstream conforms to the format rules; and The format rules specify that, for the output sub-bitstream of one or more target sub-images determined during the sub-image sub-bitstream extraction process of the conversion, each target sub-image across different video images uses the same sub-image index, and the different video images are located in a codec layer video sequence CLVS; The one or more target sub-images used to determine the output sub-bitstream in the sub-image sub-bitstream extraction process are determined based on the sub-image index.
2. The method according to claim 1, wherein, A list of target sub-image index values for the one or more target sub-images is used as input to the sub-image sub-bitstream extraction process, wherein the list of target sub-image index values is the same across the different video images.
3. The method according to claim 1, wherein, One or more sub-image identifiers across the different video images are used in the sub-image sub-bitstream extraction process, and the one or more sub-image identifiers correspond to the same list of target sub-image indices.
4. The method according to claim 1, wherein, The method of modifying the syntax elements used to determine the output sub-bitstream during the sub-image sub-bitstream extraction process is determined based on the sub-image index.
5. The method according to claim 4, wherein, Modifying the syntax element may involve rewriting and / or removing the syntax element.
6. The method according to claim 1, wherein, If the syntax element indicating the sub-picture identifier mapping is explicitly transmitted via signaling in the bitstream, the sub-picture identifier mapping is omitted in the picture parameter set.
7. The method according to claim 1, wherein, When the syntax element indicating the sub-picture identifier mapping is explicitly transmitted via signaling in the bitstream, the sub-picture identifier mapping is transmitted via signaling in the picture parameter set.
8. The method according to any one of claims 1 to 7, wherein, The conversion includes encoding the video into the bitstream.
9. The method according to any one of claims 1 to 7, wherein, The conversion includes decoding the video from the bitstream.
10. A method for storing a bitstream of video, comprising: The bit stream is generated by performing the following method; as well as The bitstream is stored in a non-transitory computer-readable recording medium; The method includes: The video bitstream is generated based on the video images, wherein at least one of the video images includes one or more sub-images. Wherein, the bitstream conforms to a format rule, and the format rule stipulates that, for the output sub-bitstream in which one or more target sub-images are determined during the sub-image sub-bitstream extraction process, each target sub-image across different video images uses the same sub-image index, and the different video images are located in a codec layer video sequence (CLVS); and The one or more target sub-images used to determine the output sub-bitstream in the sub-image sub-bitstream extraction process are determined based on the sub-image index.
11. A video decoding apparatus including a processor configured to implement the method of any one of claims 1 to 7, 9-10.
12. A video encoding apparatus including a processor configured to perform the method of any one of claims 1 to 8, 10.
13. A computer program product having computer code stored thereon, said code, when executed by a processor, causing the processor to perform the method of any one of claims 1 to 11.
14. A non-transitory computer-readable recording medium storing a bitstream of video generated by a method performed by a video processing apparatus, wherein, The method includes: The video bitstream is generated based on the video images, wherein at least one of the video images includes one or more sub-images. The bitstream conforms to a format rule, and the format rule stipulates that for the output sub-bitstream in which one or more target sub-pictures are determined during the sub-picture sub-bitstream extraction process, each target sub-picture across different video pictures uses the same sub-picture index, and the different video pictures are located in a codec layer video sequence CLVS; The one or more target sub-images used to determine the output sub-bitstream in the sub-image sub-bitstream extraction process are determined based on the sub-image index.