METHOD AND APPARATUS FOR SIGNALING THE NUMBER OF CANDIDATES FOR THE FUSION MODE.
Patent Information
- Application Number
- MX2022008643
- Authority / Receiving Office
- MX · MX
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-01-14
- Filing Date
- 2022-07-12
- Publication Date
- 2026-02-25
- Estimated Expiration
- 2041-01-13
AI Technical Summary
Existing video coding technologies face challenges in efficiently compressing video data while maintaining image quality, particularly in limited bandwidth and storage scenarios, necessitating improved compression techniques that enhance the compression ratio without sacrificing image quality.
A method and apparatus for signaling the maximum number of geometric partition fusion mode candidates in video decoding, which conditionally signals the number of candidates based on indicators in the bitstream, optimizing bitstream utilization and decoding efficiency.
This approach improves bitstream utilization and decoding efficiency by conditionally signaling the maximum number of geometric partition merge mode candidates, enhancing compression performance without compromising image quality.
Smart Images

Figure MX431118B0
Abstract
Description
METHOD AND DEVICE FOR SIGNALING THE NUMBER OF CANDIDATES FOR THE MERGER MODE CROSS REFERENCE TO RELATED REQUESTS This patent application claims priority to US62 / 961,159, filed on January 14, 2020. The description of the aforementioned patent application is incorporated herein by reference in its entirety. FIELD OF THE INVENTION The embodiments of the present application generally relate to the field of moving image coding and more particularly to indicate the number of fusion mode candidates. BACKGROUND OF THE INVENTION Video coding (video encoding and decoding) is used in a wide range of digital video applications, for example digital TV broadcasting, video streaming over the Internet and mobile networks, real-time conversational applications such as video chat. video, video conferencing, DVD and Blu-ray discs, video content acquisition and editing systems, and security application camcorders. The amount of video data required to represent even a relatively short video can be substantial, which can result in difficulties when the data is transmitted or otherwise communicated over a communications network with limited bandwidth capacity. Thus, video data is generally compressed before being communicated over modern telecommunications networks. The size of a video could also be an issue when the video is stored on a storage device because memory resources may be limited. Video compression devices often use software and / or hardware at the source to encode video data before transmission or storage, thereby decreasing the amount of data needed to represent digital video images. The compressed data is then received at the destination by a video decompression device that decodes the video data. With limited network resources and increasing demands for higher video quality, improved compression and decompression techniques that improve the compression ratio with little or no sacrifice in image quality are desirable. BRIEF DESCRIPTION OF THE INVENTION Embodiments of the present application provide apparatus and methods for encoding and decoding according to the independent claims. The above and other objectives are achieved by the subject matter of the independent claims. Additional forms of implementation are evident from the dependent claims, the description and the figures. Particular embodiments are described in the attached independent claims, with other embodiments in the dependent claims. The first aspect of the present invention provides a method for obtaining a maximum number of geometric partition fusion mode candidates for video decoding, the method comprising: obtain a bitstream for a video sequence; obtaining a value of a first indicator according to the bitstream, where the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; obtaining a value of a second flag according to the bitstream, wherein the second flag represents whether a motion compensation based on the geometric partition is enabled for the video sequence; analyze a value of a third flag of the bitstream, when the value of the first flag is greater than a threshold and when the value of the second flag is equal to a preset value, where the third flag represents the maximum number of mode candidates geometric partition merge subtracted from the value of the first indicator. In accordance with embodiments of the present invention, a fusion mode candidate number indicator signaling scheme is described. The maximum number of candidates for the geometric partition merge mode is conditionally signaled. Therefore, bitstream utilization and decoding efficiency have been improved. In an implementation, wherein the method further comprises: setting the value of the maximum number of candidates for the geometric partition merge mode to 2, when the value of the first indicator is equal to the threshold and when the value of the second indicator is equal to the value preset. In an implementation, wherein the method further comprises: setting the value of the maximum number of candidates for the geometric partition merge mode to 0, when the value of the first indicator is less than the threshold or when the value of the second indicator is not equal to the preset value. In an implementation, where the threshold is 2. In an implementation, where the default value is 1. In an implementation, wherein the step of obtaining a value of a second indicator is performed after the step of obtaining a value of a first indicator. In one implementation, the first pointer is obtained according to a syntax element encoded in the bitstream. In an implementation, where the value of the second indicator is analyzed from the set ΜΛ / t / ZUZZ / U í Ί Z4Ó of sequence parameters, SPS, of the bit stream, when the value of the first indicator is greater than or equal to the threshold. For example parse a syntax element in the sequence parameter set, SPS of the bitstream to obtain the value of the second flag. In an implementation, where the value of the second flag is obtained from the sequence parameter set, SPS, of the bitstream. For example parse a syntax element in the sequence parameter set, SPS of the bitstream to obtain the value of the second flag. In an implementation, where the value of the third flag is obtained from the sequence parameter set, SPS, of the bitstream. For example parse a syntax element in the sequence parameter set, SPS of the bitstream to obtain the value of the second flag. The second aspect of the present invention provides a video decoding apparatus, the video decoding apparatus comprising: a receiving module, which is configured to obtain a bit stream for a video sequence; a get module, which is configured to obtain a value of a first indicator according to the bitstream, wherein the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; the obtaining module is configured to obtain a value of a second flag according to the bitstream, wherein the second flag represents whether a motion compensation based on the geometric partition is enabled for the video sequence; an analysis module, which is configured to analyze a value of a third indicator of the bitstream, when the value of the first indicator is greater than a threshold and when the value of the second indicator is equal to a preset value, wherein the third flag represents the maximum number of geometric partition merge mode candidates subtracted from the value of the first flag. The method according to the first aspect of the invention can be carried out by the apparatus according to the second aspect of the invention. Additional characteristics and forms of implementation of the method according to the first aspect of the invention correspond to the characteristics and forms of implementation of the apparatus according to the second aspect of the invention. In an implementation, wherein the get module is configured to set the value of the maximum number of geometric partition merge mode candidates to 2, when the value of the first flag is equal to the threshold and when the value of the second flag is equal to the preset value. In an implementation, wherein the get module is configured to set the value of the maximum number of geometric partition merge mode candidates to 0, when the value of the first flag is less than the threshold or when the value of the second ΜΛ / t / ZUZZ / U í 1Z4Ó indicator is not equal to the preset value. In an implementation, where the threshold is 2. In an implementation, where the default value is 1. In an implementation, wherein the step of obtaining a value of a second indicator is performed after the step of obtaining a value of a first indicator. In an implementation, wherein the value of the second flag is parsed from the sequence parameter set, SPS, of the bitstream, when the value of the first flag is greater than or equal to the threshold. In an implementation, where the value of the second flag is obtained from the sequence parameter set, SPS, of the bitstream. In an implementation, where the value of the third flag is obtained from the sequence parameter set, SPS, of the bitstream. In one implementation, a method for obtaining a maximum number of geometric partition fusion mode candidates for video decoding is described, wherein the method comprises: obtain a bitstream for a video sequence; obtaining a value of a first indicator according to the bitstream, where the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; and only if the obtained value of the first indicator is equal to or greater than a threshold: obtain a value of a second indicator according to the bitstream, where the second indicator represents whether a motion compensation based on the geometric partition is enabled for video stream; and analyze a value of a third indicator of the bitstream, only when the value of the first indicator is greater than the threshold and the value of the second indicator is equal to a preset value, where the third indicator represents the maximum number of candidates for the geometric partition blending mode subtracted from the first indicator value. The third aspect of the present invention provides a method for encoding a maximum number of geometric partition fusion mode candidates, the method comprising: determining a value of a first indicator, wherein the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; determining a value of a second flag, wherein the second flag represents whether a motion compensation based on geometric partitioning is enabled for a video sequence; encoding a value of a third indicator in a bit stream, when the value of the first indicator is greater than a threshold and when the value of the second indicator is equal to a preset value, where the third indicator represents the maximum number of candidates for the geometric partition blending mode subtracted from the first indicator value. In accordance with embodiments of the present invention, a fusion mode candidate number indicator signaling scheme is described. The maximum number of candidates for the geometric partition merge mode is conditionally signaled. Therefore, bitstream utilization and decoding efficiency have been improved. In an implementation, wherein the method further comprises: setting the value of the maximum number of candidates for the geometric partition merge mode to 2, when the value of the first indicator is equal to the threshold and when the value of the second indicator is equal to the value preset. In an implementation, wherein the method further comprises: setting the value of the maximum number of candidates for the geometric partition merge mode to 0, when the value of the first indicator is less than the threshold or when the value of the second indicator is not equal to the preset value. In an implementation, where the threshold is 2. In an implementation, where the default value is 1. In an implementation, wherein the step of determining a value of a second indicator is performed after the step of determining a value of a first indicator. In an implementation, wherein the value of the second flag is encoded in a sequence parameter set, SPS, of the bitstream, when the value of the first flag is greater than or equal to the threshold. In an implementation, wherein the value of the second flag is encoded in a sequence parameter set, SPS, of the bitstream. In an implementation, wherein the value of the third flag is encoded in a sequence parameter set, SPS, of the bitstream. The fourth aspect of the present invention provides a video coding apparatus, the video coding apparatus comprises: a determination module, which is configured to determine a value of a first indicator, wherein the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; the determination module is configured to determine a value of a second flag, wherein the second flag represents whether a motion compensation based on the geometric partition is enabled for a video sequence; an encoding module, which is configured to encode a value of a third indicator in a bit stream, when the value of the first indicator is greater than a threshold and when the value of the second indicator is equal to a preset value, wherein The third flag represents the maximum number of geometric partition merge mode candidates subtracted from the value of the first flag. The method according to the third aspect of the invention can be carried out by the apparatus according to the fourth aspect of the invention. Additional characteristics and forms of implementation of the method according to the third aspect of the invention correspond to the characteristics and forms of implementation of the apparatus according to the fourth aspect of the invention. In an implementation, wherein the determination module is configured to set the value of the maximum number of candidates for the geometric partition merge mode to 2, when the value of the first indicator is equal to the threshold and when the value of the second indicator is equal to the preset value. In an implementation, wherein the determination module is configured to set the value of the maximum number of geometric partition merge mode candidates to 0, when the value of the first indicator is less than the threshold or when the value of the second indicator is not is equal to the preset value. In an implementation, where the threshold is 2. In an implementation, where the default value is 1. In an implementation, wherein the step of determining a value of a second indicator is performed after the step of determining a value of a first indicator. In an implementation, wherein the value of the second flag is encoded in a sequence parameter set, SPS, of the bitstream, when the value of the first flag is greater than or equal to the threshold. In an implementation, wherein the value of the second flag is encoded in a sequence parameter set, SPS, of the bitstream. In an implementation, wherein the value of the third flag is encoded in a sequence parameter set, SPS, of the bitstream. The fifth aspect of the present invention provides a decoder comprising a processing circuit for carrying out the method according to the first aspect and any of the implementations of the first aspect. The sixth aspect of the present invention provides an encoder comprising a processing circuit for carrying out the method according to the third aspect and any of the implementations of the third aspect. The seventh aspect of the present invention provides a computer program product comprising program code for performing the method according to the first aspect, the third aspect and any of the implementations of the first aspect, the third aspect when executed in a computer or a processor. The eighth aspect of the present invention provides a decoder, comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processors and storing programming for execution ΜΛ / t / ZUZZ / U ί 1Z4Ó by the processors, wherein the programming, when executed by the processors, configures the decoder to carry out the method according to any of the first aspect, the third aspect and any of the implementations from the first aspect, the third aspect. The ninth aspect of the present invention provides a non-transitory computer-readable medium carrying program code that, when executed by a computing device, causes the computing device to perform the method according to any of the first aspect, the third aspect and any of the implementations of the first aspect, the third aspect. The tenth aspect of the present invention provides an encoder comprising a processing circuit for carrying out the method according to the third aspect and any of the implementations of the third aspect. The eleventh aspect of the present invention provides an encoder, comprising: one or more processors; and a non-transitory computer-readable storage medium coupled to the processors and storing the schedule for execution by the processors, wherein the schedule, when executed by the processors, configures the decoder to carry out the method in accordance with any of the third aspect and any of the implementations of the third aspect. The twelfth aspect of the present invention provides a non-transitory storage medium comprising a bit stream encoded / decoded by the method of any of the above embodiments. The thirteenth aspect of the present invention provides an encoded bitstream for the video signal by including a plurality of syntax elements, wherein the plurality of syntax elements comprises a second flag (such as sps geo enabled flag), and in where a third flag sps max num merge cand minus max num geo cand is conditionally flagged at least based on a value of the sps_geo_enabled_flag. The fourteenth aspect of the present invention provides a non-transitory storage medium that includes an encoded bit stream decoded by an image decoding device, the bit stream being generated by dividing a frame of a video signal or an image signal into a plurality of blocks, and including a plurality of syntax elements, wherein the plurality of syntax elements comprises a third indicator (such as sps_max_num_merge_cand_minus_max_num_geo_cand) according to any of the preceding claims. The fifteenth aspect of the present invention provides a method for video decoding, the method comprising: obtain a bitstream for a video sequence; obtaining a value of a first indicator according to the bitstream, where the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; obtaining a value of a second flag according to the bitstream, wherein the second flag represents whether a motion compensation based on the geometric partition is enabled for the video sequence; analyze a value of a third flag of the bitstream, when the value of the first flag is greater than a threshold and when the value of the second flag is equal to a preset value, where the third flag represents the maximum number of mode candidates geometric partition merge subtracted from first indicator value; constructing a list of merge candidates for a current coding block, according to the motion vectors of neighboring blocks of the current coding block; obtain a fusion index according to the value of the third indicator; obtain a motion vector of the current encoding block according to the merge index and merge candidate list; reconstruct the current coding block according to the motion vector of the current coding block. The sixteenth aspect of the present invention provides a video decoding apparatus, the video decoding apparatus comprising: a receiving module, which is configured to obtain a bit stream for a video sequence; a get module, which is configured to obtain a value of a first indicator according to the bitstream, wherein the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; the obtaining module is configured to obtain a value of a second flag according to the bitstream, wherein the second flag represents whether a motion compensation based on the geometric partition is enabled for the video sequence; an analysis module, which is configured to analyze a value of a third indicator of the bitstream, when the value of the first indicator is greater than a threshold and when the value of the second indicator is equal to a preset value, wherein the third flag represents the maximum number of geometric partition merge mode candidates subtracted from the value of the first flag; a merge candidate list construction module, which is configured to construct a merge candidate list for a current coding block, according to motion vectors of neighboring blocks of the current coding block; the get module is configured to get a fusion index according to the value of the third indicator; a motion vector obtaining module, which is configured to obtain a motion vector of the current coding block according to the fusion index and the ΜΛ / ί 1 or list of merger candidates; a pixel reconstruction module, which is configured to reconstruct the current encoding block according to the motion vector of the current encoding block. The details or examples around the fifteenth aspect of the present invention and sixteenth aspect of the present invention could refer to the previous examples described in the first aspect to the fourteenth aspect of the present invention. The above and other objectives are achieved by the subject matter of the independent claims. Additional forms of implementation are evident from the dependent claims, the description and the figures. Details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description, drawings and claims. BRIEF DESCRIPTION OF THE DRAWINGS In the following embodiments of the invention they are described in more detail with reference to the accompanying figures and drawings, in which: FIGURE 1A is a block diagram showing an example of a video coding system configured to implement embodiments of the invention. FIGURE 1B is a block diagram showing another example of a video coding system configured to implement embodiments of the invention. FIGURE 2 is a block diagram showing an example of a video encoder configured to implement embodiments of the invention. FIGURE 3 is a block diagram showing an example structure of a video decoder configured to implement embodiments of the invention. FIGURE 4 is a block diagram illustrating an example of an encoding apparatus or a decoding apparatus. FIGURE 5 is a block diagram illustrating another example of an encoding apparatus or a decoding apparatus. FIGURE 6 is a flowchart for encoder-side decision making of weighted prediction and parameter estimation. FIGURE 7 illustrates an example of a triangle prediction mode. FIGURE 8 illustrates an example of a geometric prediction mode. FIGURE 9 illustrates another example of a geometric prediction mode. FIGURE 10 is a block diagram showing an example structure of a content delivery system 3100 that performs a content delivery service. FIGURE 11 is a block diagram showing a structure of an example of a terminal device. ΜΛ / í 1 or FIGURE 12 is a block diagram illustrating an example of an inter prediction method according to the present application. FIGURE 13 is a block diagram illustrating an example of an apparatus for inter prediction according to the present application. FIGURE 14 is a block diagram illustrating another example of an apparatus for inter prediction according to the present application. FIGURE 15 is a flow chart showing one embodiment of the method according to the present invention. FIGURE 16 is a block diagram showing one embodiment of apparatus according to the present invention. In the following identical reference signs refer to identical or at least functionally equivalent characteristics unless otherwise explicitly stated. DETAILED DESCRIPTION OF THE INVENTION In the following description, reference is made to the accompanying figures, which form part of the description, and which show, by way of illustration, specific aspects of embodiments of the invention or specific aspects in which the embodiments of the present invention can be wear. It is understood that embodiments of the invention may be used in other aspects and comprise structural or logical changes not represented in the figures. The following detailed description should therefore not be taken in a limiting sense, and the scope of the present invention is defined by the appended claims. For example, it is understood that a description in relation to a described method may also be valid for a corresponding device or system configured to perform the method and vice versa. For example, if one or a plurality of specific steps of the method are described, a corresponding device may include one or a plurality of units, for example functional units, for performing the described step or the plurality of steps of the method (for example a unit that performs one or a plurality of steps, or a plurality of units each performing one or more of the plurality of steps), even if such one or more units are not explicitly described or illustrated in the figures. On the other hand, for example, if a specific apparatus is described based on one or a plurality of units, for example functional units, a corresponding method may include a step to realize the functionality of one or a plurality of units (for example a step that performs the functionality of one or a plurality of units, or a plurality of steps each performing the functionality of one or more of the plurality of units), even if such step or a plurality of steps is not explicitly described or illustrated in the figures. Furthermore, it is understood that the characteristics of the various exemplary embodiments and / or aspects described herein may be combined with each other, unless specifically indicated. ΜΛ / t / ZUZZ / U ί 1Z4Ó opposite. Video encoding typically refers to the processing of a sequence of images, which form the video or video sequence. Instead of the term “photo” the term “frame” or “image” can be used synonymously in the field of video coding. Video encoding (or encoding in general) comprises two parts, video encoding and video decoding. Video encoding is performed at the source side, typically comprising processing (e.g. by compression) the original video images to reduce the amount of data required to represent the video images (for further storage and / or transmission). efficient). Video decoding is performed at the destination side and typically involves reverse processing compared to the encoder to reconstruct the video images. The modalities that refer to “coding” of video images (or images in general) will be understood to refer to “coding” or “decoding” of respective video images or video sequences. The combination of the encoding part and the decoding part is also known as CODEO (Coding and Decoding). In the case of lossless video encoding, the original video images can be reconstructed, that is, the reconstructed video images have the same quality as the original video images (assuming no transmission loss or other data loss). during storage or transmission). In the case of lossy video coding, additional compression, for example by quantization, is performed to reduce the amount of data representing the video images, which cannot be completely reconstructed in the decoder, i.e. the quality of the images. reconstructed video images is lower or worse compared to the quality of the original video images. Various video coding standards that belong to the group of “hybrid lossy video codes” (that is, they combine spatial and temporal prediction in the sample domain and 2D transformation coding to apply quantization in the transformation domain). Each image of a video sequence is typically divided into a set of non-overlapping blocks and encoding is typically performed at a block level. In other words, in the encoder, the video is typically processed, that is, encoded, at a block level (video block), for example by using spatial prediction (intra-image) and / or temporal prediction (Inter-image). image) to generate a prediction block, subtracting the prediction block from the current block (currently processed block / to be processed) to obtain a residual block, transforming the residual block, and quantizing the residual block in the transformation domain to reduce the amount of data to be transmitted (compression), while in the decoder the reverse processing compared to the encoder is applied to the encoded or compressed block to reconstruct the current block for representation. Furthermore, the encoder duplicates the processing loop of the decoder so that both will generate identical predictions (for example intra and inter predictions) and / or reconstructions for processing, that is, encoding, of subsequent blocks. In the following embodiments of a video coding system 10, a video encoder 20 and a video decoder 30 are described based on FIGURES 1A to 3. FIGURE 1A is a schematic block diagram illustrating an example coding system 10, for example a video coding system 10 (or short coding system 10) that may use techniques of this present application. The video encoder 20 (or short encoder 20) and video decoder 30 (or short decoder 30) of the video coding system 10 represent examples of devices that can be configured to perform techniques according to various examples described in the present application. . As shown in FIGURE 1A, the encoding system 10 comprises a source device 12 configured to provide encoded image data 21 for example to a destination device 14 for decoding the encoded image data 13. The source device 12 comprises an encoder 20, and may additionally, that is, optionally, comprise an image source 16, a pre-processor (or pre-processing unit) 18, for example an image pre-processor 18, and a communication or communication unit 22. The image source 16 may comprise or be any type of image capture device, for example a camera for capturing a real-world image, and / or any type of image generating device, for example a computer graphics processor. to generate a computer-animated image, or any kind of other device to obtain and / or provide an image of the real world, a computer-generated image (for example, screen content, a virtual reality image, VR )) and / or any combination thereof (for example an augmented reality (AR) image). The image source can be any kind of memory or storage that stores any of the aforementioned images. Unlike the pre-processor 18 and the processing performed by the pre-processing unit 18, the image or image data 17 may also be referred to as raw image or raw image data 17. The pre-processor 18 is configured to receive the (raw) image data 17 and to perform pre-processing on the image data 17 to obtain a pre-processed image 19 or pre-processed image data 19. The pre-processing performed by preprocessor 18, for example, may comprise cropping, color format conversion (e.g. from RGB to YCbCr), color correction, or noise removal. Can ΜΛ / t / ZUZZ / U / 1Z4Ó understand that the pre-processing unit 18 may be an optional component. The video encoder 20 is configured to receive the preprocessed image data 19 and provides encoded image data 21 (further details will be described below, for example, based on FIGURE 2). The communication interface 22 of the source device 12 may be configured to receive the encoded image data 21 and to transmit the encoded image data 21 (or any further processed version thereof) over the communication channel 13 to another device, e.g. example the destination device 14 or any other device, for storage or direct reconstruction. The destination device 14 comprises a decoder 30 (for example a video decoder 30), and may additionally, that is, optionally, comprise a communication interface or communication unit 28, a post-processor 32 (or post-processing unit 32) and a display device 34. The communication interface 28 of the destination device 14 is configured to receive the encoded image data 21 (or any further processed version thereof), for example directly from the source device 12 or from any other source, for example a recording device. storage, for example an encoded image data storage device, and provides the encoded image data 21 to the decoder 30. The communication interface 22 and the communication interface 28 may be configured to transmit or receive the encoded image data 21 or encoded data 13 via a direct communication link between the source device 12 and the destination device 14, for example a direct wired or wireless connection, or through any type of network, for example a wired or wireless network or any combination thereof, or any type of private and public network, or any type of combination thereof. The communication interface 22 may be, for example, configured to package the encoded image data 21 in an appropriate format, for example packets, and / or process the encoded image data using any kind of encoding or transmission processing for transmission. through a communication link or communication network. The communication interface 28, which forms the counterpart of the communication interface 22, can be, for example, configured to receive the transmitted data and process the transmitted data using any kind of corresponding decoding or transmission processing and / or unpacking to obtain the encoded image data 21. Both the communication interface 22 and the communication interface 28 can be configured as unidirectional communication interfaces as indicated by the arrow of the communication channel 13 in FIGURE 1A pointing from the source device 12 to the ΜΛ / t / ZUZZ / U ί 1Z4Ó destination device 14, or bidirectional communication interfaces, and may be configured, for example to send and receive messages, for example to establish a connection, to recognize and exchange any other information related to the link communication and / or data transmission, for example transmission of encoded image data. The decoder 30 is configured to receive the encoded image data 21 and provides decoded image data 31 or a decoded image 31 (further details will be described below, for example, based on FIGURE 3 or FIGURE 5). The post-processor 32 of the destination device 14 is configured to post-process the decoded image data 31 (also called reconstructed image data), for example the decoded image 31, to obtain post-processed image data 33, for example a post-processed image 33. The post-processing performed by the post-processing unit 32 may comprise, for example, color format conversion (for example from YCbCr to RGB), color correction, cropping, or resampling, or any other processing, for example to prepare the decoded image data 31 for display, for example by display device 34. The display device 34 of the destination device 14 is configured to receive the post-processed image data 33 to display the image, for example to a user or viewer. The display device 34 may be or comprise any type of display for representing the reconstructed image, for example an integrated or external display or monitor. Displays, for example, may comprise liquid crystal displays (LCD), organic light emitting diode (OLED) displays, plasma displays, projectors, micro LED displays, liquid crystal on silicon ( liquid crystal on Silicon, LCoS), digital light processor (DLP) or any kind of other display. Although FIGURE 1A depicts the source device 12 and the destination device 14 as separate devices, the device embodiments may also comprise both or both of the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality. In such embodiments the source device 12 or corresponding functionality and the destination device 14 or corresponding functionality may be implemented using the same hardware and / or software or by separate hardware and / or software or any combination thereof. As will be evident to those skilled in the art based on the description, the existence and (exact) division of functionalities of the different units or functionalities within the source device 12 and / or destination device 14 as shown in FIGURE 1A may vary depending on the actual device and app. The encoder 20 (for example a video encoder 20) or the decoder 30 (for example a video decoder 30) or both the encoder 20 and the decoder 30 can be implemented by means of a processing circuit as shown in FIGURE 1B, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs ), discrete logic, hardware, dedicated video encoding, or any combination thereof. The encoder 20 may be implemented by means of a processing circuit 46 to incorporate the various modules as explained with respect to the encoder 20 of FIGURE 2 and / or any other encoder system or subsystem described herein. The decoder 30 may be implemented by means of a processing circuit 46 to incorporate the various modules as explained with respect to the decoder 30 of FIGURE 3 and / or any other decoder system or subsystem described herein. The processing circuitry can be configured to perform the various operations as explained below. As shown in FIGURE 5, if the techniques are partially implemented in software, a device may store instructions for the software on a suitable, non-transitory, computer-readable storage medium and may execute the instructions in hardware using one or more processors to perform the techniques of this description. Both the video encoder 20 and the video decoder 30 can be integrated as part of a combined encoder / decoder (CODEC) in a simple device, for example, as shown in FIGURE 1B. The source device 12 and the destination device 14 may comprise any wide range of devices, including any kind of portable or stationary device, for example portable PC or laptop computer, mobile phones, smartphones, tablets or tablet computers, cameras, desktop, set-top boxes, televisions, display devices, digital media players, video game consoles, video streaming devices (such as content service servers or content delivery servers), streaming receiving device, streaming transmitting device, or similar and cannot use any kind of operating system. In some cases, the source device 12 and the destination device 14 can be equipped for wireless communication. Thus, the source device 12 and the destination device 14 may be wireless communication devices. In some cases, the video coding system 10 illustrated in FIGURE 1A is simply an example and the techniques of the present application can be applied to video coding configurations (e.g., video encoding or video decoding) that do not They necessarily include no data communication between the encoding and decoding devices. In other examples, data is retrieved from local memory, transmitted over a network, or the like. A video encoding device may encode and store data in memory, and / or a video decoding device may retrieve and decode data from memory. In some examples, encoding and decoding are performed by devices that do not communicate with each other, but rather simply encode data into memory and / or retrieve and decode data from memory. For ease of description, embodiments of the invention are described herein, for example, with reference to High-Efficiency Video Coding (HEVC) or Versatile Video Coding reference software. Video coding (VVC), the next-generation video coding standard developed by the Joint Collaboration Team on Video Coding (JCT-VC) of the ITU-T Video Coding Expert Group ( ITU-T Video Coding Experts Group (VCEG) and the ISO / IEC Motion Picture Experts Group (MPEG). One of ordinary skill in the art will understand that the embodiments of the invention are not limited to HEVC or VVC. Encoder and encoding method FIGURE 2 shows a schematic block diagram of an example video encoder 20 that is configured to implement the techniques of the present application. In the example of FIGURE 2, the video encoder 20 comprises an input 201 (or input interface 201), a residual calculation unit 204, a transformation processing unit 206, a quantization unit 208, a quantization unit inverse 210, and inverse transformation processing unit 212, a reconstruction unit 214, a loop filter unit 220, a decoded picture buffer (DPB) 230, a mode selection unit 260, a entropy coding unit 270 and an output 272 (or output interface 272). The mode selection unit 260 may include an inter prediction unit 244, an intra prediction unit 254, and a partition unit 262. The inter prediction unit 244 may include a motion estimation unit and a motion compensation unit. (not shown). A video encoder 20 as shown in FIGURE 2 may also be called a hybrid video encoder or a video encoder according to a hybrid video coder. The residual calculation unit 204, the transformation processing unit 206, the quantization unit 208, the mode selection unit 260 may be called forming a forward signal path of the encoder 20, while the reverse quantization unit 210, the inverse transformation processing unit 212, the reconstruction unit 214, the buffer 216, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244 and the intra prediction 254 can be called forming a backward signal path of the video encoder 20, where the backward signal path of the video encoder 20 corresponds to the signal path of the decoder (the video decoder 30 in FIGURE 3 ). The inverse quantization unit 210, the inverse transformation processing unit 212, the reconstruction unit 214, the loop filter 220, the decoded picture buffer (DPB) 230, the inter prediction unit 244 and the intra prediction unit 254 also refer to forming the “embedded decoder” of the video encoder 20. Images and image partitioning (images and blocks) The encoder 20 may be configured to receive, for example via input 201, an image 17 (or image data 17), for example an image of a sequence of images forming a video or video sequence. The received image or image data may also be a pre-processed image 19 (or pre-processed image data 19). For the sake of simplicity, the following description refers to image 17. Image 17 may also be referred to as the current image or the image to be encoded (particularly in video coding to distinguish the current image from other images, for example previously encoded images and / or decoded from the same video sequence, that is the video sequence that also comprises the current image). A (digital) image is or can be considered as a set or two-dimensional array of samples with intensity values. A sample in the array may also be called a pixel (short form for image element) or pei. The number of samples in the horizontal and vertical direction (or axis) of the set or image defines the size and / or resolution of the image. For color representation, typically three color components are used, that is, the image may be represented or include three sample sets. In RBG or color space format an image comprises a corresponding red, green and blue sample set. However, in video coding each pixel is typically represented in a luminance and chrominance format or color space, for example YCbCr, which comprises a luminance component denoted by Y (sometimes L is also used instead) and two chrominance components indicated by Cb and Cr. The luminance (or short luma) component Y represents the brightness or intensity of the gray level (for example as in a grayscale image), while the two chrominance components ( or chroma short) Cb and Cr represent the components of chromaticity or color information. Accordingly, an image in YCbCr format comprises one luminance sample set of luminance sample values (Y), and two chrominance sample sets of chrominance values (Cb and Cr). Images in RGB format can be converted or transformed into YCbCr format and vice versa, the process is also known as color transformation or conversion. If an image is monochrome, the image may comprise only one ΜΛ / t / ZUZZ / U / Ί Z4Ó luminescence sample set. Consequently, an image can be, for example, a set of luma samples in monochrome format or a set of luma samples and two corresponding sets of chroma samples in 4:2:0, 4:2:2, and 4: 4:4 color format. Embodiments of the video encoder 20 may comprise an image partition unit (not shown in FIGURE 2) configured to divide the image 17 into a plurality of (typically non-overlapping) image blocks 203. These blocks may also be referred to as image blocks. root, macroblocks (H.264 / AVC) or coding tree blocks (CTB) or coding tree units (CTU) (H.265 / HEVC and VVC). The image partition unit can be configured to use the same block size for all images in a video sequence and the corresponding grid that defines the block size, or to change the block size between images or subsets or groups of images, and divide each image into the corresponding blocks. In additional embodiments, the video encoder may be configured to directly receive a block 203 of image 17, for example one, several, or all of the blocks that form image 17. Image block 203 may also be referred to as current image block or block. of image to encode. Like image 17, image block 203 again is or can be considered as a two-dimensional set or array of samples with intensity values (sample values), although of lower dimension than image 17. In other words, the Block 203 may comprise, for example, one sample set (for example a luma set in the case of a monochrome image 17, or a luma or chroma set in the case of a color image) or three sample sets (for example example one luma set and two chroma in the case of a color image 17) or any other number and / or class of sets depending on the color format applied. The number of samples in the horizontal and vertical direction (or axis) of block 203 defines the size of block203. Consequently, a block can be, for example, an MxN set (M columns by N rows) of samples, or an MxN set of transformation coefficients. The modalities of the video encoder 20 as shown in FIGURE 2 can be configured to encode the image 17 block by block, for example the encoding and prediction is performed per block 203. The embodiments of the video encoder 20 as shown in FIGURE 2 can further be configured to divide and / or encode the image using segments (also known as video segments), where an image can be divided or encoded using one or more segments (typically non-overlapping), and each segment may comprise one or more blocks (e.g. CTU). ΜΛ / t / ZUZZ / U / Ί Z4Ó The embodiments of the video encoder 20 as shown in FIGURE 2 can further be configured to split and / or encode the image by using tile groups (also known as video tile groups) and / or tiles (also known as video tiles). video), where an image may be divided or encoded using one or more groups of tiles (typically non-overlapping), and each tile group may comprise, for example, one or more blocks (e.g. CTU) or one or more tiles , where each tile, for example may be rectangular in shape and may comprise one or more blocks (for example CTU), for example complete or fractional blocks. Residual calculation The residual calculation unit 204 may be configured to calculate a residual block 205 (also known as residual 205) based on the image block 203 and a prediction block 265 (further details around the prediction block 265 are provided later), for example by subtracting sample values from the prediction block 265 from sample values from the image block 203, sample by sample (pixel by pixel) to obtain the residual block 205 in the sample domain. Transformation The transformation processing unit 206 may be configured to apply a transformation, for example a discrete cosine transform (DCT) or discrete sine transform (DST), on the sample values of the residual block 205. to obtain transformation coefficients 207 in a transform domain. The transformation coefficients 207 may also be called residual transformation coefficients and represent the residual block 205 in the transformation domain. The transformation processing unit 206 may be configured to apply integer DCT / DST approximations, such as the transforms specified for H.265 / HEVC. Compared to an orthogonal DCT transform, such integer approximations are typically scaled by a certain factor. In order to preserve the norm of the residual block that is processed by forward and inverse transforms, additional scaling factors are applied as part of the transform process. Scaling factors are typically chosen based on certain constraints such as scaling factors being a power of two for shift operations, bit depth of transformation coefficients, trade-off between accuracy and implementation costs, etc. . Specific scaling factors are, for example, specified for the inverse transform, for example by inverse transform processing unit 212 (and the corresponding inverse transform, for example by inverse transform processing unit 312 in video decoder 30). and the corresponding scale factors for the transform towards M A / IZ / ¿U¿¿ / U f1 forward, for example by the transformation processing unit 206, in an encoder 20 may be specified accordingly. The modes of the video encoder 20 (respectively transform processing unit 206) can be configured to generate transform parameters, for example a type of transform or transforms, for example directly or encoded or compressed by means of the entropy coding unit 270 , so that, for example, the video decoder 30 can receive and use the transform parameters for decoding. Quantification The quantization unit 208 may be configured to quantize the transformation coefficients 207 to obtain quantized coefficients 209, for example by applying scalar quantization or vector quantization. The quantized coefficients 209 may also be called quantized transformation coefficients 209 or quantized residual coefficients 209. The quantization process may reduce the bit depth associated with some or all of the transformation coefficients 207. For example, an n-bit transformation coefficient may be rounded to an m-bit transformation coefficient during quantization, where n is greater that m. The degree of quantization can be changed by adjusting a quantization parameter (QP). For example for scalar quantization, different scales can be applied to achieve finer or coarser quantization. Smaller quantization stage sizes correspond to finer quantization, while larger quantization stage sizes correspond to coarser quantization. The applicable quantization step size may be indicated by a quantization parameter (QP). The quantization parameter may for example be an index of a predefined set of applicable quantization step sizes. For example, small quantization parameters may correspond to fine quantization (small quantization stage sizes) and large quantization parameters may correspond to coarse quantization (large quantization stage sizes) or vice versa. Quantification may include division by a quantization step size and a corresponding and / or inverse dequantization, for example by inverse quantization unit 210, may include multiplication by the quantization step size. Embodiments according to some standards, for example HEVC, may be configured to use a quantization parameter to determine the quantization step size. Generally, the quantization step size can be calculated based on a quantization parameter using a fixed point approximation of an equation that includes division. Additional scaling factors can be entered to ΜΛ / t / ZUZZ / U f Ί Z4Ó quantization and dequantization to restore the norm of the residual block, which could be modified due to the scale used in the fixed point approximation of the equation for the size of the quantization step and parameter of quantification. In an example implementation, inverse transform scaling and dequantization can be combined. Alternatively, custom quantization tables can be used and signaled from an encoder to a decoder, for example in a bitstream. Quantization is a lossy operation, where the loss increases with increasing quantization stage sizes. The modes of the video encoder 20 (respectively quantization unit 208) can be configured to generate quantization parameters (QP), for example directly or encoded by the entropy coding unit 270, so that, for example, the Video decoder 30 can receive and apply quantization parameters for decoding. Inverse quantization The inverse quantization unit 210 is configured to apply the inverse quantization of the quantization unit 208 on the quantized coefficients to obtain dequantized coefficients 211, for example by applying the inverse quantization scheme applied by the quantization unit 208 based on or using the same quantization stage size as the quantization unit 208. The dequantized coefficients 211 may also be called dequantized residual coefficients 211 and correspond, although typically not identical to the transformation coefficients due to quantization loss, to the transformation coefficients 207. Inverse transform The inverse transform processing unit 212 is configured to apply the inverse transform of the transform applied by the transform processing unit 206, for example an inverse discrete cosine transform (DCT) or inverse discrete sine transform ( discrete sine transform, DST) or other inverse transforms, to obtain a reconstructed residual block 213 (or the corresponding dequantized coefficients 213) in the sample domain. The reconstructed residual block 213 may also be called the transform block 213. Reconstruction The reconstruction unit 214 (e.g. counter or adder 214) is configured to add the transform block 213 (i.e. reconstructed residual block 213) to the prediction block 265 to obtain a reconstructed block 215 in the sample domain, e.g. add - sample by sample - the sample values of the reconstructed residual block 213 and the sample values of the prediction block 265. ΜΛ / t / ZUZZ / U f 1Z4Ó Filtration The loop filter unit 220 (or short “loop filter” 220), is configured to filter the reconstructed block 215 to obtain a filtered block 221, or generally, to filter the reconstructed samples to obtain filtered samples. The loop filter unit, for example, is configured to smooth pixel transitions, or otherwise improve video quality. The loop filter unit 220 may comprise one or more loop filters such as a deblocking filter, a sample-adaptive offset (SAO) filter or one or more filters, for example a bilateral filter, a adaptive loop filter (ALF), sharpening filters, smoothing filters or collaborative filters, or any combination thereof. Although the loop filter unit 220 is shown in FIGURE 2 as being a loop filter, in other configurations, the loop filter unit 220 may be implemented as a loop post-filter. The filtered block 221 may also be referred to as the filtered reconstructed block 221. The embodiments of the video encoder 20 (respectively loop filter unit 220) can be configured to generate loop filter parameters (such as adaptive sample shift information), for example directly or encoded by means of the entropy coding unit. 270, so that, for example, a decoder 30 can receive and apply the same loop filter parameters or respective loop filters for decoding. Decoded Image Buffer The decoded picture buffer (DPB) 230 may be a memory that stores reference images, or generally reference image data, for encoding video data by the video encoder 20. The DPB 230 can be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM ( resistive RAM, RRAM), or other types of memory devices. The decoded picture buffer (DPB) 230 may be configured to store one or more filtered blocks 221. The decoded picture buffer 230 may further be configured to store other previously filtered blocks, for example previously reconstructed and filtered blocks 221. , from the same current image or from different images, for example previously reconstructed images, and can provide complete previously reconstructed images, that is decoded (and corresponding reference blocks and samples) and / or a partially reconstructed current image (and reference blocks and corresponding samples), for example for inter prediction. The decoded picture buffer (DPB) 230 may also be configured to store one or more unfiltered reconstructed blocks 215, or generally unfiltered reconstructed samples, for example if the reconstructed block 215 is not filtered by the unit. of loop filter 220, or any other additional processed version of the reconstructed blocks or samples. Mode selection (partition and prediction) The mode selection unit 260 comprises partition unit 262, inter prediction unit 244 and intra prediction unit 254, and is configured to receive or obtain original image data, for example an original block 203 (current image block 203). current 17), and reconstructed image data, for example filtered and / or unfiltered reconstructed samples or blocks of the same (current) image and / or of one or a plurality of previously decoded images, for example of decoded image buffer 230 or other buffers (for example line buffer, not shown). The reconstructed image data is used as reference image data for prediction, for example inter prediction or intra prediction, to obtain a prediction block 265 or predictor 265. The mode selection unit 260 may be configured to determine or select a partition for a current block prediction mode (including non-slicing) and a prediction mode (for example an intra or inter prediction mode) and generate a block of corresponding prediction 265, which is used for the calculation of the residual block 205 and for the reconstruction of the reconstructed block 215. The modes of the mode selection unit 260 may be configured to select the partition and prediction mode (for example from those supported by or available to the mode selection unit 260), which provide the best combination or in other words the minimum residual (minimum residual means best compression for transmission or storage), or minimum signaling overhead (minimum signaling overhead means best compression for transmission or storage), or which considers or balances both. The mode selection unit 260 may be configured to determine the partition and prediction mode based on rate distortion optimization (RDO), that is, selecting the prediction mode that provides minimum rate distortion. Terms like “best”, “minimum”, “optimal” etc. In this context they do not necessarily refer to a “best”, “minimum”, “optimal”, general, etc. but may also refer to the fulfillment of a termination or selection criterion such as a value that exceeds or falls below a threshold or other constraints that potentially lead to “sub-optimal selection” but reduce complexity and processing time. . In other words, the partition unit 262 can be configured to partition the block 203 into smaller block partitions or sub-blocks (which again form blocks), for example iteratively using quad-tree-partitioning, QT), binary partitioning (BT) or triple-tree-partitioning (TT) or any combination thereof, and to perform, for example, the prediction for each of the block partitions or sub-blocks, wherein the mode selection comprises selecting the tree structure of the partitioned block 203 and the prediction modes are applied to each of the block partitions or sub-blocks. Next, the partitioning (for example by partition unit 260) and prediction processing (by inter prediction unit 244 and intra prediction unit 254) performed by an example video encoder 20 will be explained in more detail. Partition The partition unit 262 may partition (or divide) a current block 203 into smaller partitions, for example smaller blocks of square or rectangular size. These smaller blocks (which may also be called sub-blocks) can further be divided into even smaller partitions. This is also known as tree partitioning or hierarchical tree partitioning, where a root block, for example at root tree level 0 (hierarchy level 0, depth 0), can be partitioned recursively, for example partitioned into two or more blocks of a next lower tree level, for example nodes at tree level 1 (hierarchy level 1, depth 1), where these blocks can again be partitioned into two or more blocks of a next lower level, for example tree level 2 (hierarchy level 2, depth 2), etc. until the partition is terminated, for example because a termination criterion is met, for example a maximum tree depth or a minimum block size is reached. Blocks that are not further split are also referred to as leaf blocks or leaf nodes of the tree. A tree that uses partitioning into two partitions is called a binary tree (BT), a tree that uses partitioning into three partitions is called a ternary tree (triple-tree-partitioning, TT), and a tree that uses partitioning into four partitions is called quad-treepartitioning (QT). As mentioned above, the term “block” as used herein may be a portion, particularly a square or rectangular portion, of an image. With reference to, for example, HEVC and VVC, the block may be or correspond to a coding tree unit (CTU), a coding unit (CU), a prediction unit, PU), and transform unit (TU) and / or corresponding blocks, for example a coding tree block (CTB), a coding block (CB), a transform block (TB) or prediction block (PB). For example, a coding tree unit (CTU) can be either ΜΛ / t / ZUZZ / U / 1Z4Ó comprise a CTB of luma samples, two corresponding CTBs of chroma samples of an image that has three sample sets, or one CTB of samples of a monochrome image or an image that is encoded using three planes separate color and syntactic structures used to encode the samples. Consequently, a coding tree block (CTB) can be an NxN block of samples for some value of N such that the division of a component into the CTBs is a partition. A coding unit (CU) may be or comprise a luma sample coding block, two corresponding chroma sample coding blocks of an image having three sample sets, or a single image sample coding block. monochrome or an image that is encoded using three separate color planes and syntactic structures used to encode the samples. Consequently a coding block (CB) can be an MxN block of samples for some values of M and N such that the division of a CTB into the coding blocks is a partition. In embodiments, for example, according to HEVC, a coding tree unit (CTU) can be divided into CUs by using a quad tree structure denoted as a coding tree. The decision whether to encode an image area using inter-photo (temporal) or intra-photo (spatial) prediction is made at the CU level. Each CU can further be divided into one, two or four PUs according to the type of PU division. Within a PU, the same prediction process is applied and the relevant information is transmitted to the decoder on a PU basis. After obtaining the residual block by applying the prediction process based on the PU Split Type, a CU can be partitioned into transform units (TUs) according to another quad-tree structure similar to the coding tree for the CU. In embodiments, for example, according to the latest video coding standard currently under development, which is called Versatile Video Coding (VVC), a combined Quad-tree and binary tree partition , QTBT) for example is used to split an encoding block. In the QTBT block structure, a CU can be square or rectangular in shape. For example, a coding tree unit (CTU) is first partitioned by a quad-tree structure. Quad-tree leaf nodes are further partitioned by a binary tree or ternary (or triple) tree structure. The leaf nodes of the partitioning tree are called coding units (CUs), and that segmentation is used for prediction and transform processing without any additional partitioning. This means that the CU, PU and TU have the same block size in the QTBT encoding block structure. In parallel, multi-partitioning, for example, triple-tree partitioning can be used in conjunction with the QTBT block structure. In one example, the mode selection unit 260 of the video encoder 20 can be configured to perform any combination of the partitioning techniques described herein. As described above, the video encoder 20 is configured to determine or select the best or optimal prediction mode from a set of (e.g., pre-determined) prediction modes. The set of prediction modes may comprise, for example, intra prediction modes and / or inter prediction modes. Intra prediction The set of intra prediction modes may comprise 35 different intra prediction modes, for example non-directional modes such as DO (or mean) mode and planar mode, or directional modes, for example as defined in HEVC, or may comprise 67 different intra prediction modes, for example non-directional modes such as DC (or medium) mode and planar mode, or directional modes, for example as defined for VVC. The intra prediction unit 254 is configured to use reconstructed samples of neighboring blocks of the same current image to generate an intra prediction block 265 according to an intra prediction mode of the set of intra prediction modes. The intra prediction unit 254 (or generally the mode selection unit 260) is further configured to output intra prediction parameters (or general information indicative of the intra prediction mode selected for the block) to the entropy coding unit. 270 in the form of syntax elements 266 for inclusion in the encoded image data 21, so that, for example, the video decoder 30 can receive and use the prediction parameters for decoding. Interprediction The set of (or possible) inter prediction modes depends on the available reference images (that is, at least partially decoded previous images, for example stored in DBP 230) and other inter prediction parameters, for example whether the reference image is entire or only a part, for example a search window area around the current block area, of the reference image is used to search for the best compatible reference block, and / or for example if pixel interpolation is applied, for example half / semi-pel and / or quarter-pei interpolation, or not. In addition to the previous prediction modes, skip mode and / or direct mode can be applied. The inter prediction unit 244 may include a motion estimation unit (ME) and a motion compensation unit (MC) (both not shown in FIGURE 2). The motion estimation unit can be configured to receive or obtain the image block 203 (current image block 203 of the ΜΛ / t / ZUZZ / U / 1Z4Ó current image 17) and a decoded image 231, or at least one or a plurality of previously reconstructed blocks, for example reconstructed blocks of one or a plurality of other / different previously decoded images 231, for motion estimation. For example a video sequence may comprise the current image and previously decoded images 231, or in other words, the current image and previously decoded images 231 may be part of or form a sequence of images that forms a video sequence. The encoder 20, for example, may be configured to select a reference block from a plurality of reference blocks of the same or different images from the plurality of other images and provide a reference image (or reference image index) and / or a displacement (spatial displacement) between the position (x, y coordinates) of the reference block and the position of the current block as Inter prediction parameters for the motion estimation unit. This displacement is also called a motion vector (MV). The motion compensation unit is configured to obtain, for example receive, an inter prediction parameter and to perform inter prediction based on or using the inter prediction parameter to obtain an inter prediction block 265. The motion compensation, performed by The motion compensation unit may involve obtaining or generating the prediction block based on the motion vector / block determined by the motion estimate, possibly performing interpolations with sub-pixel precision. Interpolation filtering can generate additional pixel samples from known pixel samples, thus potentially increasing the number of candidate prediction blocks that can be used to encode an image block. After receiving the motion vector for the PU of the current image block, the motion compensation unit can locate the prediction block to which the motion vector points in one of the reference image lists. The motion compensation unit may also generate syntax elements associated with the video blocks and segments for use by the video decoder 30 in decoding the image block of the video segment. In addition to or as an alternative to segments and respective syntax elements, groups of tiles and / or tiles and respective syntax elements may be generated or used. Entropy coding The entropy coding unit 270 is configured to apply, for example, an entropy coding algorithm or scheme (e.g., a variable length coding (VLC) scheme, a context adaptive VLC scheme VLC, CAVLC), an arithmetic encoding scheme, a binarization, a ΜΛ / t / ZUZZ / U ί 1Z4Ó context adaptive binary arithmetic coding (CABAC), syntaxbased context-adaptive binary arithmetic coding (SBAC), entropy coding interval partitioning entropy (PIPE) or other entropy coding methodology or technique) or derivation (non-compression) in the quantized coefficients 209, inter prediction parameters, intra prediction parameters, loop filter parameters and / or other syntax elements to obtain encoded image data 21 that can be output via output 272, for example in the form of an encoded bit stream 21, so that, for example, the video decoder 30 can receive and use the parameters for decoding. The encoded bitstream 21 may be transmitted to the video decoder 30, or stored in a memory for later transmission or retrieval by the video decoder 30. Other structural variations of the video encoder 20 can be used to encode the video stream. For example, a non-transform-based encoder 20 can quantize the residual signal directly without the transform processing unit 206 for certain blocks or frames. In another implementation, an encoder 20 may have the quantization unit 208 and the inverse quantization unit 210 combined into a single unit. Decoder and decoding method FIGURE 3 shows an example of a video decoder 30 that is configured to implement the techniques of this present application. The video decoder 30 is configured to receive encoded image data 21 (e.g. encoded bitstream 21), e.g. encoded by encoder 20, to obtain a decoded image 331. The encoded image data or bitstream comprises information for decoding the encoded image data, for example data representing image blocks of an encoded video segment (and / or groups of tiles or mosaics) and associated syntax elements. In the example of FIGURE 3, the decoder 30 comprises an entropy decoding unit 304, an inverse quantization unit 310, an inverse transformation processing unit 312, a reconstruction unit 314 (for example an adder 314), a loop filter 320, a decoded picture buffer (DBP) 330, a mode application unit 360, an inter prediction unit 344 and an intra prediction unit 354. The inter prediction unit 344 may be or include a motion compensation unit. The video decoder 30, in some examples, may perform a decoding step generally reciprocal to the encoding step described with respect to the video encoder 100 of FIGURE 2. As explained with respect to the encoder 20, the inverse quantization unit 210, ΜΛ / t / ZUZZ / U / 1Z4Ó the inverse transformation processing unit 212, the reconstruction unit 214 the loop filter 220, the decodedpicture buffer (DPB) 230, the inter prediction unit 344 and The intra prediction unit 354 is also referred to as forming the “embedded decoder” of the video encoder 20. Accordingly, the inverse quantization unit 310 may be identical in function to the inverse quantization unit 110, the transformation processing unit. inverse 312 may be identical in function to the inverse transformation processing unit 212, the reconstruction unit 314 may be identical in function to the reconstruction unit 214, the loop filter 320 may be identical in function to the loop filter 220, and the decoded image buffer 330 may be identical in function to the decoded image buffer 230. Therefore, the explanations provided for the respective units and functions of the video encoder 20 apply accordingly to the respective units and functions of the video decoder 30. Entropy decoding The entropy decoding unit 304 is configured to analyze the bit stream 21 (or generally encoded image data 21) and perform, for example, entropy decoding of the encoded image data 21 to obtain, for example, coefficients quantized 309 and / or decoded encoding parameters (not shown in FIGURE 3), for example any or all of the inter prediction parameters (for example reference image index and motion vector), intra prediction parameter (for example example mode or intra prediction index), transform parameters, quantization parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 may be configured to apply decoding algorithms or schemes corresponding to the encoding schemes as described with respect to the entropy encoding unit 270 of the encoder 20. The entropy decoding unit 304 further may be configured to provide inter prediction parameters, intra prediction parameter and / or other syntax elements to the mode application unit 360 and other parameters to other units of the decoder 30. The video decoder 30 may receive the syntax elements at the video segment level and / or the video block level. In addition to or as an alternative to the respective segments and syntax elements, groups of tiles and / or respective tiles and syntax elements may be received and / or used. Inverse quantization The inverse quantization unit 310 may be configured to receive quantization parameters (QP) (or generally information related to inverse quantization) and the quantized coefficients of the encoded image data 21 (for example when analyzing and / or decoding , for example by the entropy decoding unit ΜΛ / t / ZUZZ / U / 1Z4Ó 304) and to apply based on the quantization parameters an inverse quantization on the decoded quantized coefficients 309 to obtain dequantized coefficients 311, which may also be called transformation coefficients 311. The inverse quantization process may include the use of a quantization parameter determined by the video encoder 20 for each video block in the video segment (or tile or tile group) to determine a degree of quantization and, likewise, a degree of inverse quantization to be applied. Inverse transform The inverse transformation processing unit 312 may be configured to receive dequantized coefficients 311, also known as transformation coefficients 311, and to apply a transform to the dequantized coefficients 311 in order to obtain reconstructed residual blocks 213 in the sample domain. The reconstructed residual blocks 213 may also be referred to as transform blocks 313. The transform may be an inverse transform, for example, an inverse DOT, an inverse DST, an inverse integer transform, or a conceptually similar inverse transform process. The inverse transform processing unit 312 may further be configured to receive transform parameters or corresponding information of the encoded image data 21 (e.g. by parsing and / or decoding, e.g. by entropy decoding unit 304) to determine the transformed that will be applied to the dequantized coefficients 311. Reconstruction The reconstruction unit 314 (e.g., counter or adder 314) may be configured to add the reconstructed residual block 313 to the prediction block 365 to obtain a reconstructed block 315 in the sample domain, for example by adding the sample values of the block. reconstructed residual 313 and the sample values of the prediction block 365. Filtration The loop filter unit 320 (either in the encoding loop or after the encoding loop) is configured to filter the reconstructed block 315 to obtain a filtered block 321, for example to smooth pixel transitions, or otherwise. improve video quality. The loop filter unit 320 may comprise one or more loop filters such as a deblocking filter, a sample adaptive offset (SAO) filter or one or more other filters, for example a bilateral filter, a adaptive loop filter (ALF), sharpening filters, smoothing filters or collaborative filters, or any combination thereof. Although the loop filter unit 320 is shown in FIGURE 3 as a loop filter, in other configurations, the loop filter unit 320 may be implemented as a loop post-filter. Decoded Image Buffer The decoded video blocks 321 of an image are then stored in decoded image buffer 330, which stores the decoded images 331 as reference images for subsequent motion compensation for other images and / or for output display respectively. The decoder 30 is configured to generate the decoded image 311, for example via output 312, for presentation or display to a user. Prediction The inter prediction unit 344 may be identical to the inter prediction unit 244 (in particular the motion compensation unit) and the intra prediction unit 354 may be identical to the intra prediction unit 254 in function, and makes decisions. division or partition and prediction based on the partition and / or prediction parameters or respective information received from the encoded image data 21 (for example when analyzing and / or decoding, for example by entropy decoding unit 304). The mode application unit 360 may be configured to perform prediction (intra or inter prediction) per block based on reconstructed images, blocks or respective samples (filtered or unfiltered) to obtain the prediction block 365. When the video segment is encoded as an intra-coded segment (I), the intra prediction unit 354 of the mode application unit 360 is configured to generate the prediction block 365 for an image block of the current video segment based on to a signaled intra prediction mode and data from previously decoded blocks of the current image. When the video image is encoded as an intercoded segment (i.e., B, or P), inter prediction unit 344 (e.g. motion compensation unit) of mode application unit 360 is configured to produce prediction blocks 365. for a video block of the current video segment based on the motion vectors and other syntax elements received from entropy decoding unit 304. For inter prediction, the prediction blocks can be produced from one of the images reference within one of the reference image lists. The video decoder 30 may construct the reference frame lists, List 0 and List 1, using predetermined construction techniques based on reference images stored in DPB 330. The same or similar may be applied for or by modalities using groups of mosaics (e.g. video tile groups) and / or mosaics (e.g. video tiles) in addition to or alternatively to segments (e.g. video segments), e.g. a video may be encoded using I, P or B tile groups and / or mosaics. The mode application unit 360 is configured to determine the prediction information for a video block of the current video segment by analyzing the motion vectors or related information and other syntax elements, and use the prediction information to produce the blocks. prediction for the current video block being decoded. For example, the mode application unit 360 uses some of the received syntax elements to determine a prediction mode (e.g., intra or inter prediction) used to encode the video blocks of the video segment, a type of video segment. inter prediction (e.g., segment B, segment P, or segment GPB), construction information for one or more of the reference image lists for the segment, motion vectors for each intercoded video block of the segment, prediction state inter for each intercoded video block in the segment, and other information to decode the video blocks in the current video segment. The same or similar may be applied for or per modalities using tile groups (e.g. video tile groups) and / or mosaics (e.g. video tiles) in addition to or alternatively to segments (e.g. video segments), e.g. A video can be encoded using groups of I, P or B tiles and / or tiles. The embodiments of the video decoder 30 as shown in FIGURE 3 can be configured to partition and / or decode the image using segments (also known as video segments), where an image can be partitioned into or decoded using one or more segments (typically non-overlapping), and each segment may comprise one or more blocks (e.g. CTU). Modalities of the video decoder 30 as shown in FIGURE 3 may be configured to split and / or decode the image by using tile groups (also known as video tile groups) and / or tiles (also known as video tiles). ), where an image may be partitioned into or decoded using one or more tile groups (typically non-overlapping), and each tile group may comprise, for example, one or more blocks (e.g. CTU) or one or more tiles, wherein each tile, for example may be rectangular in shape and may comprise one or more blocks (for example CTU), for example complete or fractional blocks. Other variations of the video decoder 30 can be used to decode the encoded image data 21. For example, the decoder 30 can produce the output video stream without the loop filter unit 320. For example, a non-based decoder in transform 30 can inversely quantize the residual signal directly without the inverse transform processing unit 312 for certain blocks or frames. In another implementation, the video decoder 30 may have the inverse quantization unit 310 and the inverse transformation processing unit 312 combined into a single unit. ΜΛ / t / ZUZZ / U í Ί Z4Ó It should be understood that, in the encoder 20 and the decoder 30, a processing result of a current stage may be further processed and then sent to the next stage. For example, after interpolation filtering, motion vector derivation, or loop filtering, an additional operation, such as Trim or Shift, can be performed on the processing result of interpolation filtration, motion vector derivation. movement or loop filtration. It should be noted that additional operations can be applied to the motion vectors derived from the current block (including but not limited to affine mode control point motion vectors, sub-block motion vectors in affine modes, planes, ATMVP , temporal motion vectors, etc.). For example, the motion vector value is restricted to a predefined range according to its representation bit. If the bit representing the motion vector is bitDepth, then the interval is 2A(bitDepth-1) - 2A(bitDepth-1 )-1, where “Λ” means exponentiation. For example, if bitDepth is set equal to 16, the range is -32768 - 32767; if bitDepth is set equal to 18, the range is -131072-131071. For example, the value of the derived motion vector (e.g. the MVs of four 4x4 sub-blocks within an 8x8 block) is restricted such that the maximum difference between the integer parts of the four MVs of 4x4 sub-blocks is no more of N pixels, such as no more than 1 pixel. Here two methods are provided to constrain the motion vector according to bitDepth. Method 1: Remove overflow MSB (most significant bit) by stream operations ux=(mvx+2bitDePth) % 2bitDepthmvx=(ux>=2bitDepth·1) ? (ux-2bi,Depth):ux uy=(mvy+2bitDePth) % 2bitDePthmvy=(uy>=2bitDePth‘1) ? (uy — 2bitDePth):uy (1) (2) (3) (4) where mvx is a horizontal component of a motion vector of an image block or a sub-block, mvy is a vertical component of a motion vector movement of an image block or a sub-block, and ux and uy indicate an intermediate value; For example, if the value of mvx is -32769, after applying formulas (1) and (2), the resulting value is 32767. In computer system, decimal numbers are stored as two's complement. The two's complement of -32769 is 1.0111,1111,1111,1111 (17 bits), then the MSB is discarded, so the resulting two's complement is 0111,1111,1111,1111 (decimal number is 32767 ), which is the same as the output when applying formulas (1) and (2). ux=(mvpx+mvdx +2bitDePth) % 2bitD®Pthmvx=(ux>=2bitD®Pth-1) ? (ux-2bitDepth): ux uy=(mvpy+mvdy +2bitDePth) % 2bitDePth(5) (6) (7) mvy=(uy>=2bi,Depth‘1) ? (uy-2bi,DePth): oops (8) The operations can be applied during the addition of mvp and mvd, as shown in formulas (5) to (8). Method 2: Remove the overflow MSB by clipping the value vx=Clip3(-2bilDepth'1, 2bitDepth'1-1, vx) vy=Clip3(-2bilDePth·1, 2bitDepth'1-1, vy) where vx is a horizontal component of a motion vector of an image block or a sub-block, v and is a vertical component of a motion vector of an image block or a sub-block; x, y, and z respectively correspond to three input values of the MV clipping process, and the definition of the Clip3 function is as follows: x ; z < x Clip3( x, y, z) = y ; z>y ^2 ;otherwise FIGURE 4 is a schematic diagram of a video encoding device 400 according to one embodiment of the description. The video encoding device 400 is suitable for implementing the described embodiments as described herein. In one embodiment, the video encoding device 400 may be a decoder such as video decoder 30 of FIGURE 1A or an encoder such as video encoder 20 of FIGURE 1A. The video encoding device 400 comprises input ports 410 (or input ports 410) and receiver units (Rx) 420 for receiving data; a processor, logical unit, or central processing unit (CPU) 430 for processing the data; transmitter units (Tx) 440 and egress ports 450 (or egress ports 450) for transmitting the data; and a memory 460 to store the data. The video encoding device 400 may also comprise optical-to-electrical (OE) and electrical-to-optical (EO) components coupled to input ports 410, receiver units 420, the transmitter units 440, and the egress ports 450 for the egress or entry of optical or electrical signals. The 430 processor is implemented by hardware and software. The processor 430 may be implemented as one or more CPU chips, cores (e.g., as a multicore processor), FPGA, ASIC, and DSP. The processor 430 is in communication with the input ports 410, receiver units 420, transmitter units 440, output ports 450, and memory 460. The processor 430 comprises an encoding module 470. The encoding module 470 implements the embodiments described above. . For example, the encoding module 470 implements, processes, prepares, or provides the various encoding operations. The inclusion of the encoding module 470 therefore provides a substantial improvement to the functionality of the video encoding device 400 and effects a transformation of the video encoding device 400 to a different state. Alternatively, the encoding module 470 is implemented as instructions stored in memory 460 and executed by processor 430. Memory 460 may comprise one or more disks, tape drives, and solid state drives and may be used as an overflow data storage device, to store programs when such programs are selected for execution, and to store instructions and data that are read during program execution. Memory 460 may be, for example, volatile and / or non-volatile and may be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory ( temary content-addressable memory, TCAM), and / or static random-access memory (SRAM). FIGURE 5 is a simplified block diagram of an apparatus 500 that can be used as one or both of the source device 12 and the destination device 14 of FIGURE 1A according to an exemplary embodiment. A processor 502 in the apparatus 500 may be a central processing unit. Alternatively, processor 502 may be any other type of device, or multiple devices, capable of manipulating or processing information existing now or developed in the future. Although the implementations described can be practiced with a single processor as shown, for example, processor 502, advantages in speed and efficiency can be achieved by using more than one processor. A memory 504 in the apparatus 500 may be a read-only memory (ROM) device or a random access memory (RAM) device in one implementation. Any other suitable type of storage device can be used as the memory 504. The memory 504 can include code and data 506 that are accessed by the processor 502 using a bus 512. The memory 504 can further include an operating system 508 and programs application 510, application programs 510 including at least one program that enables processor 502 to perform the methods described herein. For example, application programs 510 may include applications 1 to N, which further include a video encoding application that performs the methods described herein. The apparatus 500 may also include one or more output devices, such as a display 518. The display 518 may be, in an example, a touch-sensitive display that combines a display with a touch-sensitive element that is operated to detect input. tactile. The display 518 may be coupled to the processor 502 via the bus 512. Although represented here as a single bus, bus 512 of apparatus 500 may be composed of multiple buses. Additionally, the secondary storage 514 may be directly coupled to the other components of the device 500 or may be accessed over a network and may comprise a single integrated unit such as a memory card or multiple units such as multiple memory cards. The apparatus 500 can therefore be implemented in a wide variety of configurations. Triangular partitioning mode (TPM) and geometric motion partitioning (GEO), also known as triangular fusion mode and geometric fusion mode, respectively, are partitioning techniques that allow non-horizontal boundaries and non-horizontal boundaries. verticals between prediction partitions, where the prediction unit PU1 and the prediction unit PU1 are combined in a region using a weighted averaging procedure of subsets of their samples related to different color components. TPM allows boundaries between prediction partitions along the diagonals of a rectangular block, while boundaries according to GEO can be placed at arbitrary positions. In a region to which a weighted averaging procedure is applied, integers within the boxes denote weights IVpui applied to the luma component of prediction unit PU1. In an example, the H / pu2 weights applied to the luma component of prediction unit PU2 are calculated as follows: Wpu2 = 8 — H / pui. Weights applied to chroma components of corresponding prediction units may differ from weights applied to luma components of corresponding prediction units. The details of the TPM syntax are presented in Table 1, where 4 syntax elements are used to point out information about TPM: MergeTriangleFlag is a label that identifies whether TPM is selected or not (“0” means TPM is not selected, otherwise TPM is chosen); merge_triangle_split_d¡r is a split direction label for TPM (“0” means the split direction from top left corner to bottom right corner; otherwise, the split direction is from top right corner to bottom left corner ); merge_triangle_idxO and merge_triangle_idx1 are indices of merge candidates 0 and 1 used for TPM. ΜΛ / t / ZUZZ / U / Ί Z4Ó M A / IZ / ¿U¿¿ / U í 1 Table 1. Fusion data syntax including syntax for TPM merge_data(xO, yO, cbWidth, cbHeight) {Descriptor if (CuPredMode[xO][yO] == MODE_IBC ) {if(MaxNumMergeCand > 1) merge_idx[xO][yO] ae(v)} else {if( sps_mmvd_enabled_flag | | cbWidth * cbHeight != 32 ) regular_merge_flag[xO][yO] ae(v) if (regular_merge_flag[xO][yO] = = 1 ){s¡( MaxNumMergeCand > 1 ) merge_idx[x0][y0] ae (v)} else {s¡( sps_mmvd_enabled_flag && cbWidth * cbHeight != 32 ) mmvd_merge_flag[xO][yO] ae(v) s¡( mmvd_merge_flag[xO][yO] = = 1) {s¡( MaxNumMergeCand > 1 ) mmvd_cand_flag[xO][yO] ae(v) mmvd_distance_idx[xO][yO] ae(v) mmvd_direction_¡dx[xO][yO] ae(v)} else {s¡( MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8 ) mergesubblockflag[xO][yO] ae(v) s¡( merge_subblock_flag[xO][yO] = = 1 ) {s¡( MaxNumSubblockMergeCand > 1 ) merge_subblock_idx[xO][yO] ae(v)} else {s¡( sps_ciip_enabled_flag && cu_skip_flag[xO][yO] = = 0 && (cbWidth * cbHeight) >= 64 && cbWidth < 128 && cbHeight < 128 ){ciip_flag[xO][yO] ae(v) s¡( ciip_flag[xO][yO] && MaxNumMergeCand >1 ) merge_¡dx[x0][y0] ae(v)} s¡( MergeTriangleFlag[xO][yO]) {merge_triangle_spl¡t_dir[x0][y0] ae(v) merge_triangle_idxO[xO][yO] ae(v) merge_trianglejdx1 [xO][yO] ae(v)}}}}}} In an example, TPM is described in the following proposal: R-L. Liao and C.S. Lim “CE10.3.1.b: Triangular prediction unit mode,” contribution JVET-L0124 to the 12thJVET meeting, Macau, China, October 2018. GEO is explained in the following article: S. Esenlik, H. Gao, A. Filippov, V. Rufitskiy, A. M. Kotra, B. Wang, E. Alshina, M. Bláser, and J. Sauer, “Non-CE4: Geometric! partitioning for inter blocks, contribution JVET-O0489 to the 1fihJVET meeting, Gothenburg, Sweden, July 2019. A described way to harmonize TPM and / or GEO with WP is to disable them when WP is applied. The first implementation is shown in Table 2, it checks if the value of the weightedPredFlag variable is equal to 0 for an encoding unit. The weightedPredFlag variable is derived as follows: - If slice_type is equal to P, weightedPredFlag is set equal to pps_weighted_pred_flag. Otherwise (slice_type equals B), weightedPredFlag is set equal to pps_weighted_bipred_flag. The weighted prediction process can be changed at the image level and segment level, using pps_weighted_pred_flag and sps_weighted_pred_flag syntax elements, respectively. As described above, the variable weightedPredFlag indicates whether segment-level weighted prediction should be used, when obtaining inter-segment predicted samples. ΜΛ / t / ZUZZ / U í Ί Z4Ó Table 2. The merge data syntax described for harmonizing TPM with WP merge_data(xO, yO, cbWidth, cbHeight, chType) {Descriptor if ( CuPredMode[chType][xO][yO] = = MODEJBC ) {s¡( MaxNumlbcMergeCand > 1 ) merge_idx[xO][yO] ae(v)} else {s¡( MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8 ) mergesubblockflag[xO][yO] ae(v) s¡( merge_subblock_flag[xO][yO] = = 1 ) {if( MaxNumSubblockMergeCand > 1 ) merge_subblock_idx[xO][yO] ae(v)} else {s¡( (cbWidth * cbHeight) >= 64 && ( (sps_ciip_enabled_flag && cu_skip_flag[xO][yO] = = 0 && cbWidth <128 && cbHeight < 128) | | (sps_triangle_enabled_flag && MaxNumTriangleMergeCand > 1 && slice_type = = B ))) regular_merge_flag[xO][yO] ae(v) if (regular_mergeJlag[xO][yO] = = 1 ){yes¡( sps_mmvd_enabled_flag) m m vd_merge_f lag [xO] [yO] ae(v) s¡( mmvd_merge_flag[xO][yO] = = 1 ) {s¡( MaxNumMergeCand > 1 ) mmvd_cand_flag[xO][yO] ae(v) mmvd_distance_idx[xO] [yO] ae(v) mmvd_direction_idx[xO][yO] ae(v)} else {s¡( MaxNumMergeCand > 1 ) merge_idx[xO][yO] ae(v)}} otherwise { s¡( sps_ciip_enabled_flag && sps_triangle_enabled_flag && MaxNumTriangleMergeCand > 1 && weightedPredFlag = = 0 && slice_type = = B && cu_skip_flag[xO][yO] = = 0 && (cbWidth*cbHeight) >= 64 && cbWidth < 128 && cbHeight < 128 ) {ciip_flag[xO][yO] ae(v) s¡( ciip_flag[xO][yO] && MaxNumMergeCand > 1 ) merge_¡dx[x0][y0] ae(v) s¡( !ciip_flag[xO][yO] && MaxNumTriangleMergeCand > 1 ) {merge_trianglesplit_dir[x0][y0] ae(v) merge_triangle_idxO[ xO ][ yO ] ae(v) mergetriangleidxlj xO ][ yO ] ae(v)}}}}} ΜΛ / t / ZUZZ / U í 1Z4Ó ciip_flag[xO][yO] specifies whether combined inter-photo fusion and intra-photo prediction is applied for the current encoding unit. The set indices xO, yO specify the location (xO, yO) of the upper left luma sample of the considered encoding block relative to the upper left luma sample of the image. When ciip_flag[xO][yO] is not present, it is inferred as follows: - If all of the following conditions are true, ciip_flag[xO][yO] is inferred to be equal to 1: - sps_ciip_enabled_flag is equal to 1. - general_merge_flag[xO][yO] is equal to 1. - merge_subblock_flag[xO][yO] is equal to 0. - regular_merge_flag[xO][yO] is equal to 0. - cbWidth is less than 128. - cbHeight is less than 128. - cbWidth*cbHeight is greater than or equal to 64. - Otherwise, ciip_flag[xO][yO] is inferred to be equal to 0. When ciip_flag[xO][yO] is equal to 1, the variable lntraPredModeY[ x ][ y ] with x = x0..x0 + cbWidth - 1 y, y = yO..yO + cbHeight - 1 is set to be equal to INTRA_PLANAR. The variable MergeTriangleFlag[ xO ][ yO ], which specifies whether triangular-based motion compensation is used to generate the prediction samples of the current coding unit when decoding to segment B, is derived as follows :- If all of the following conditions are true, MergeTriangleFlag[xO ][ yO ] is set equal to 1: - sps_triangle_enabled_flag is equal to 1. - slice_type is equal to B. - general_merge_flag[ xO ][ yO ] is equal to 1. - MaxNumTriangleMergeCand is greater than or equal to 2. - cbWidth * cbHeight is greater than or equal to 64. - regular_merge_flag[ xO ][ yO ] is equal to 0. - merge_subblock_flag[ xO ][ yO ] is equal to 0. - ciip flag[ xO ][ yO ] is equal to 0. - weightedPredFlag is equal to 0. - Otherwise, MergeTriangleFlag[ xO ][ yO ] is set equal to 0. The 2nd implementation is presented in Table 3. If weightedPredFlag is equal to 1, the syntax element max_num_merge_cand_minus_max_num_triangle_cand is not present and is inferred with a value so that MaxNumTriangleMergeCand becomes less than 2. Table 3. The general segment header syntax described for harmonizing TPM with WP slice_header() {Descriptor slice_pic_parameter_set_id ue(v) if( rect_slice_flag | | NumBricksInPic > 1 ) sliceaddress u(v) if( !rect_slice_flag && !s¡ngle_br¡ck_per_slice_flag ) num_bricks_in_slice_m¡nus1 ue(v) non_reference_picture_flag u( 1) slice_type u (v) s¡( separate_colour_plane_flag = = 1 ) colour_plane_id u(2) slice_pic_order_cnt_lsb u(v) s¡( nal_unit_type = = GDR_NUT ) recovery_poc_cnt ue(v) s¡( nalunittype = = IDR W RADL | | nal_unit_type = = IDRNLP nal_unit_type = = CRA NUT | | NalUnitType = = GDR_NUT no_output_of_prior_pics _flag u(1) s¡( outputjlag_present_flag) pic_output_flag u(1) if( (nal_unit_type != IDRWRADL && nal unit type != IDR N LP ) sps_idr_rpl_present_flag ) {for (i = 0; i < 2; i++ ) {s¡( num_ref_picj¡sts_in_sps[ i ] > 0 && !pps_ref_pic_list_spsjdc[ i ] && ( == o II (i = = 1 && rpl1Jdx_present_flag ))) ref_pic_l¡st_sps_flag[ i ] u(1) s¡( ref_pic_list_sps_flag[ i ]) {s¡( num_ref_picjistsjn_sps[ i ] > 1 && ( == 0 | | (i = = 1 && rpl1_idx_present_flag ))) ref_pic_l¡st_¡dx[ i ] u(v)} else ref_pic_l¡st_struct( i, num_ref_p ¡c_lists_¡n_sps[ i ]) for (j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {if( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) slice_poc_lsb_lt[ i ][ j ] u(v) delta_poc_msb_present_flag[ i ][ j ] u(1) s¡( delta_poc_msb_present_flag[ i ][ j ]) delta_poc_msb_cycle_lt[ i ][ j ] ue(v) }} s¡( ( slice_type != I && num_ref_entries[ 0 ][ Rplsldx[ 0 ] ] > 1 ) ( slice_type = = B && num_ref_entries[ 1 ][ Rplsldx[ 1 ] ] > 1 )) {num_ref_idx_act¡ve_overr¡de_flag u(1) s¡( num_ref_idx_active_overr¡of_flag) for (i = 0; i < ( slice_type = = B ? 2:1 ); i++ ) s¡( num_ref_entries[ i ][ Rplsldx[ i ] ] > 1 ) num_ref_idx_active_minus1[ i ] ue(v)}} s¡( partition_constraints_overr¡de_enabled_flag) {partition_constraints_override_flag ue(v) s¡( partition_constraints_overr¡de_flag ) {si ice_log2_d if f_m i nqtrn in_cb_l urn ue(v) sl¡ce_max_mtt_hierarchy_depth_ luma ue(v) s¡( slice_max_mtt_h¡erarchy_depth_luma != 0 ) slice_log2_diff_max_bt_min_qt_luma ue(v) slice_log2_diff_max_tt_min_qt_luma ue(v)} s¡( slice_type = = I && qtbtt_dual_tree_intra_flag ) {slice_log2_diff_m¡ n_qt_min¡n_cb_chroma ue(v) slice_max_mtt_hierarchy_depth_chroma ue(v) s¡( slice_max_mtt_hierarchy_depth_chroma != 0 ) slice_log2_diff_max_bt_min_qt_chroma ue(v) if ice_log2_d ¡1 fmaxttm i n_qt_ch roma ue(v)}}}} if ( slice_type != 1) { ΜΛ / t / ZUZZ / U ί Ί Z4Ó s¡( sps_temporal_mvp_enabled_flag && !pps_temporal_mvp_enabled_idc ) slice_temporal_mvp_enabled_flag u(1) s¡( slice_type = = B && !pps_mvd_l1_zero_idc) mvd_l1_zero_flag u(1) s¡( cabac_init_present_flag ) cabac _init_flag u(1) s¡( slice_temporal_mvp_enabled_flag) {s¡( slice_type = = B && !pps_collocated_from_IO_idc ) collocated_from_IO_flag u(1) s¡( ( collocated_from_IO_flag && NumRefldxActive[ 0 ] > i) II (!collocated_from_IO_flag && NumRefldxActive[ 1 ] > 1 )) collocated_ref_idx ue(v)} s¡( ( pps_weighted_pred_flag && slice_type = = P ) 11 ( pps_weighted_bipred_flag && slice_type = = B )) pred_weight_table() s¡( !pps_six_minus_max_num_merge_cand_plus1 ) sixminusmaxnummergecand ue(v) s¡( sps_affine_enabled_flag && ! pps_f i ve_m i n u s_m ax_n u m_s u bb lockm e rg e_can d _p I u s 1 ) five_minus_max_num_subblock_merge_cand ue(v) s¡( sps_fpel_mmvd_enabled_flag) slice_fpel_mmvd_enabled_flag u(1) s¡( sps_bdof_dmvr_slicej>resent_flag) slice_disable_bdof_dmvr_flag u(1) s¡( sps _triangle_enabled_flag && MaxNumMergeCand >= 2 && slice_type = = B && IweightedPredFlag && !pps_max_num_merge_cand_m nus_max_num_triangle_carid_minus1 ) ΜΛ / t / ZUZZ / U ί Ί Z4Ó max_num_merge_cand_minus_max_num_tr¡angle_cand ue(v)}} si (sps_ibc_enabled_flag ) slice_six_m¡nus_max_num_ibc_merge_cand ue(v) yes¡( spsjoint_cbcr_enabled_flag ) slicejoint_cbcr_sign_flag u(1) slice_qp_delta se(v ) si(pps_sl¡ce_chrOma_qp_offsets_present_flag) {slice_cb_qp_offset se(v) s 1 i ce_c r_q p_of f set se(v) s¡( sps_Joint_cbcr_enabled_flag) slice_joint_cbcr_qp_offset se(v)} s¡( sps_sao_enabled_flag) {slice_sao_luma_flag u(1) s¡( ChromaArrayType != 0 ) slice_sao_chroma_flag u(1)} s¡( sps_alf_enabled_flag) {slice_alf_enabled_flag u(1) s¡( slice_alf_enabled_flag) {slice_nunn_alf_aps_¡ds_luma u(3) for (i = 0; i < sl¡ce_num_alf_apsjds_luma; Í++ ) slice_alf_aps_id_luma[ i ] u(3) s¡( ChromaArrayType != 0 ) slice_alf_chroma_idc u(2) s¡( slice_alf_chromajdc) slice_alf_aps_id_chroma u(3)}} if (!pps_dep_quant_enabled_flag ) dep_quant_enabled_flag u(1) s¡( !dep_quant_enabled_flag) sign_data_hid¡ng_enabled_flag u(1) s¡( deblocking_filter_overr¡de_enabled_flag ) deblocking_filter_override_flag u(1) s¡( deblocking_filter_override_flag ) {slice deblocking filter_disabled_flag u(1) s¡( !slice_deblock ing_f¡lter_d¡sabled_flag) {yes ice_beta_off set_d i v2 se(v) si ice_tc_off set_d i v2 se(v)}} si( sps_lmcs_enabled_flag ) {slice_lmcs_enabled_flag u(1) s¡( slice_lmcs_enabled_flag) {slice_lmcs_aps_id u(2) si( ChromaArrayType != 0 ) slice_chroma_residual_scale_flag u( 1)}} if( sps_scaling_list_enabled_flag ) {slice_scaling_list_present_flag u(1) s¡( slice_scalingj¡st_present_flag ) slice_scalingjist_aps_id u(3)} if( entry_point_offsets_present_flag && NumEntryPoints > 0 ) {offset_len_minus1 ue(v) for ( i = 0; i < NumEntryPoints ; Í++ ) entry_point_offset_minus1[ i ] u(v)} s¡( slice_header_extension_present_flag ) {slice_header_extension_length ue(v) for (i = 0; i < slice_header_extension_length; i++) slice_header_extension_data_byte[ i ] u(8)} byte_alignment()} ΜΛ / t / ZUZZ / U ί 1Z4Ó In particular, the following semantics can be used for the 2nd implementation: max num merge cand minus max num triangle cand specifies the maximum number of triangular merge mode candidates supported in the segment subtracted from MaxNumMergeCand. When max_num_merge_cand_minus_max_num_tr¡angle_cand is not present, and sps_triangle_enabled_flag is equal to 1, slicejype is equal to B, weightedPredFlag is equal to 0, and MaxNumMergeCand greater than or is equal to 2, max_num_merge_cand_minus_max_num_triangle_cand is inferred to be equal to pps_max_num_mer ge_cand_minus_max_num_tr¡angle_cand_minus1 + 1. When max_num_merge_cand_minus_max_num_triangle_cand is not present, and sps_triangle_enabled_flag is equal to 1, slicejype is equal to B, weightedPredFlag is equal to 1, and MaxNumMergeCand greater than or is equal to 2, max_num_merge_cand_minus_max_num_triangle_cand is inferred to be equal to MaxNumMergeCand or Max NumMergeCand-1. The maximum number of triangular merge mode candidates, MaxNumTriangleMergeCand is derived as follows: MaxNumTriangleMergeCand = MaxNumMergeCand max_num_merge_cand_minus_max_num_tr¡angle_cand When max_num_merge_cand_minus_max_num_triangle_cand is present, the value of MaxNumTriangleMergeCand will be in the range 2 up to and including MaxNumMergeCand. When max_num_merge_cand_minus_max_num_tr¡angle_cand is not present, and (sps_triangle_enabled_flag is equal to 0 or MaxNumMergeCand is less than 2), MaxNumTriangleMergeCand is set equal to 0. When MaxNumTriangleMergeCand is equal to 0, triangle merging mode is not allowed for the current segment. The described mechanisms are not only applicable to TPM and GEO, but also to other non-rectangular partitioning and prediction modes such as intra-inter prediction combined with triangular partitions. Since TPM and GEO are only applied in segment B, the weightedPredFlag variable in above-mentioned embodiments can be replaced by the pps_weighted_bipred_flag variable directly. The 3rd implementation is shown in Table 6, it checks if the value of the weightedPredFlag variable is equal to 0 for an encoding unit. The weightedPredFlag variable is derived as follows: If all of the following conditions are true, weightedPredFlag is set to 0 luma_weight_IO_flag[¡] is equal to 0 for i from 0 to NumRefldxActive[ 0 ] luma_weight_H_flag[¡] is equal to 0 for i from 0 to NumRefldxActive[ 1 ] chroma_weight_IO_flag[ ¡] is equal to 0 for i from 0 to NumRefldxActive[ 0 ] chroma_weight_IO_flag[¡] is equal to 0 for i from 0 to NumRefldxActive[ 1 ] Otherwise, weightedPredFlag is set to 1. The derivation process of weightedPredFlag means: so all weighted labels for luma and chroma components, and for all current segment reference indices is 0, weighted prediction is disabled in the current segment; otherwise, weighted prediction can be used for the current segment. As described above, the variable weightedPredFlag indicates whether segment-level weighted prediction should be used when obtaining inter-segment predicted samples. The 4th implementation is shown in Table 2, with weightedPredFlag being replaced by slice_weighted_pred_flag, which is noted in the slice header as shown in Table 4. As described above, the slice_weighted_pred_flag syntax indicates whether slice-level weighted prediction should be used when obtaining inter-slice predicted samples. Table 4. The general segment header syntax described for signaling segment-level weighted prediction label slice_header() {Descriptor slice_pic_parameter_set_id ue(v) s¡( rect_slice_flag | | NumBricksInPic > 1 ) sliceaddress u(v) si( !rect_slice_flag && !s¡ngle_br¡ck_per_slice_flag ) num_bricks_in_slice_minus1 ue(v) non_reference_picture_flag u( 1) slice_type ue( v) s¡( separate_colour_plane_flag = = 1 ) colour_plane_id u(2) slice_pic_order_cnt_lsb u(v) s¡( nal_unit_type = = GDR_NUT ) recovery_poc_cnt ue(v) s¡( nalunittype = = IDRWRADL | | nal_unit_type = = IDRNLP nal_unit_type = = CRANUT | | NalUnitType = = GDR_NUT no_output_of_prior_pics_ flag u(1 ) s¡( output_flag_present_flag) pic_output_flag u(1) s¡( (nal_unit_type != IDR W RADL && nal unit type != IDR N LP) sps_idr_rpl_present_flag ) {for (i = 0; i < 2; i++ ) {s¡( num_ref_picj¡sts_in_sps[ i ] > 0 && !pps_ref_pic_l¡st_sps_idc[ i ] && (i == 0 II (i = = 1 && rpl1Jdx_present_flag ))) ref_pic_list_sps_flag[ i ] u(1) yes( ref_pic_list_sps_flag[ i ]) {yes ( num_ref_picjistsjn_sps[ i ] > 1 && ( == 0 | | (i = = 1 && rpl1_idx_present_flag ))) ref_pic_l¡st_¡dx[ i ] u(v)} otherwise ref_pic_list_struct( i, num_ref_p¡c_lists_¡n_sps [ i ]) for (j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {if( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) slice_poc_lsb_lt[ i ][ j ] u(v) delta_poc_msb_present_flag[ i ][j ] u(1) s¡( delta_poc_msb_present_flag[ i ][ j ]) delta_poc_msb_cycle_lt[ i ][ j ] ue(v) ΜΛ / t / ZUZZ / U ί 1 }} s¡( ( slice_type != I && num_ref_entries[ 0 ][ Rplsldx[ 0 ] ] > 1 ) ( slice_type = = B && num_ref_entries[ 1 ][ Rplsldx[ 1 ] ] > 1 )) {num_ref_idx_act¡ve_overr¡de_flag u(1) s¡( num_ref_idx_active_overr¡de_flag) for (i = 0; i < ( slice_type = = B ? 2:1 ); Í++ ) s¡( num_ref_entries[ i ][ Rplsldx[ i ] ] > 1 ) num_ref_idx_active_minus1[ i ] ue(v)}} s¡( partition_constra¡nts_overr¡de_enabled_flag) {partition_constraints_override_flag ue(v) s¡( partition_constra¡nts_override_flag ) {si ice_log2_d if f_m i nqtrn in_cb_l urn ue(v) sl¡ce_ max_mtt_hierarchy_depth_luma ue( v) s¡( slice_max_mtt_h¡erarchy_depth_luma != 0 ) s I ice_l og2_d iffmaxbtm i n_q t_l u m a ue(v) slice_log2_diff_max_tt_min_qt_luma ue(v)} s¡( slice_type = = I && qtbtt_dual_tree_intra_flag ) {slice_log2_d¡ff_min_qt_min_cb_chroma ue(v) slice_max_mtt_hierarchy_depth_chroma ue(v) s¡( slice_max_mtt_hierarchy_depth_chroma != 0 ) s I ice_log2_d iff_max_bt_mi n_qt_ch roma ue(v) si ice_log2_d ¡1 fmaxttm i n_qt_ch roma ue(v)}}}} if ( slice_type != 1) { ΜΛ / t / ZUZZ / U ί Ί Z4Ó s¡( sps_temporal_mvp_enabled_flag && !pps_temporal_mvp_enabled_idc ) slice_temporal_mvp_enabled_flag u(1) s¡( slice_type = = B && !pps_mvd_l1_zero_idc) mvd_l1_zero_flag u(1) s¡( cabacjnit_present_flag ) cabac _init_flag u(1) s¡( slice_temporal_mvp_enabled_flag) {s¡( slice_type = = B && !pps_collocated_from_IO_idc ) collocated_from_IO_flag u(1) s¡( ( collocated_from_IO_flag && NumRefldxActive[ 0 ] > i) II (!collocated_from_IO_flag && NumRefldxActive[ 1 ] > 1 )) collocated_ref_idx ue(v)} s¡( ( pps_weighted_pred_flag && slice_type = = P ) 11 ( pps_weighted_bipred_flag && slice_type = = B )) slice_weighted_pred_flag u(1) if (slice_weighted_pred_flag) pred_weight_table() s¡( !pps_six_minus_max_num_merge_cand_plus1 ) sixminusmaxnummergecand ue(v) s¡( sps_affine_enable d_flag && !pps_f¡ve_m¡nus_rriax_num_subblock_rrierge_cand_plus1 ) five_minus_max_num_subblock_merge_cand ue(v) s¡( spsjpel_mmvd_enabled_flag) slice_fpel_mmvd_enabled_flag u(1) s¡( sps_bdof_dmvr_slice_present_flag ) slice_disable_bdof_dmvr_flag u(1) s¡( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 && ! pps_max_num_merge_cand_minus_max_num_triangle_cand_minus1 ) ΜΛ / t / ZUZZ / U ί Ί Z4Ó {max_num_merge_cand_minus_max_num_triangle_cand ue(v)}} if (sps_ibc_enabled_flag ) slice_s¡x_minus_max_num_¡bc_merge_cand ue(v) yes¡( sps_joint_cbcr_enabled_flag ) slicejoint_cbcr_sign_flag u(1) slice_qp_delta se( v) s¡( pps_slice_chiOma_qp_offsets_present_flag ) {slice_cb_qp_offset se(v) s 1 i ce_c r_q p_of f set se(v) s¡( spsjoint_cbcr_enabled_flag) slicejoint_cbcr_qp_offset se(v)} s¡( sps_sao_enabled_flag ) {slice_sao_luma_flag u(1) s¡( ChromaArrayType != 0 ) slice_sao_chroma_flag u(1)} s¡( sps_alf_enabled_flag) {slice_alf_enabled_flag u(1) s¡( slice_alf_enabled_flag ) {slice_num_alf_aps_ids_luma u(3) for (i = 0; i < sl¡ce_num_alf_aps_ids_luma; i++ ) slice_alf_aps_id_luma[ i ] u(3) s¡( ChromaArrayType != 0 ) slice_alf_chroma_idc u( 2) s¡( slice_alf_chroma_idc) slice_alf_aps_id_chroma u(3)}} if (!pps_dep_quant_enabled_flag ) ΜΛ / t / ZUZZ / U ί 1 dep_quant_enabled_flag u(1) s¡( !dep_quant_enabled_flag ) sign_data_hiding_enabled_flag u(1) s¡( deblocking_filter_override_enabled_flag ) deblockingfilteroverrideflag u(1) s¡( deblocking_filter_overr¡de_flag ) {slice_deblocking_f¡lter_d¡able d_flag u(1) s¡( !slice_deblocking_f ¡lter_d¡sabled_flag ) {si ice_beta_off set_d i v2 se(v) si ice_tc_off set_d i v2 se(v)}} s¡( sps_lmcs_enabled_flag) {slice_lmcs_enabled_flag u(1) s¡( slice_lmcs_enabled_flag) {slice_lmcs_aps_id u(2 ) yes! ( ChromaArrayType != 0 ) slice_chroma_residual_scale_flag u(1)}} s¡( sps_scaling_list_enabled_flag ) {slice_scaling_list_present_flag u(1) s¡( slice_scal¡ng_list_present_flag ) sl¡ce_scaling_list_aps_¡d u(3)} s¡( entry_point _offsets_present_flag && NumEntryPoints > 0 ) {offset_len_minus1 ue(v) for (i = 0; i < NumEntryPoints; Í++ ) entry_point_offset_minus1[ i ] u(v)} s¡( slice_header_extension_present_flag ) {slice_header_extension_length ue(v) for (i = 0; i < slice_header_extension_length; i++ ) slice_header_extension_data_byte[ i ] u(8) } byte_alignment()} In particular, the following semantics can be used for the 4th implementation: slice_weighted_pred_flag equal to 0 specifies that weighted prediction is not applied to the current slice. slice_weighted_pred_flag equal to 1 specifies that the weighted prediction is applied to the current slice. When not present, the value of slice_weighted_pred_flag is inferred to 0. The 5th implementation is to disable TPM at the block level for compliance restriction. In the case of a TPM encoded block, the weighting factors for the luma and chroma component of the reference images for inter predictor Po710 and Pi 720 (as shown in FIGURE 7) should not be present. For more details, refldxA and predListFIagA specify the reference index and reference image list of the inter predictor P0; refldxB and predListFIagB specify the reference index and reference image list of the inter predictor P1. The lumaWeightedFlag and chromaWeightedFlag variables are derived as follows: lumaWeightedFlagA = predListFIagA ? Iuma_weight_l1_flag[ refldxA ] : luma_weight_IO_flag[ refldxA ] lumaWeightedFlagB = predListFIagB ? Iuma_weight_l1_flag[ refldxB ] : luma_weight_IO_flag[ refldxB ] chromaWeightedFlagA = predListFIagA ? chroma_weight_U_flag[ refldxA ] : chroma weight_IO_flag[ refldxA ] chromaWeightedFlagB = predListFIagB ? chroma_weightJ1_flag[ refldxB ] : chroma weight_IO_flag[ refldxB ] lumaWeightedFlag = lumaWeightedFlagA | | lumaWeightedFlagB chromaWeightedFlag = chromaWeightedFlagA | | chromaWeightedFlagB It is a requirement of bitstream compliance that lumaWeightedFlag and chromaWeightedFlag be equal to 0. The 6th implementation is to disable the combined weighted sample prediction process for the TPM encoded block when explicit weighted prediction is used. FIGURE 7 and FIGURE 8 illustrate the examples for TPM and GEO, respectively. It is noted that the modalities for TPM could also be implemented for the GEO mode. In the case of a TPM encoded block, if the weighting factors for the luma or chroma component of the reference image for inter predictor Po 710 or Pi 720 are present, the weighted process according to the WP parameters (WP 730 parameters {w0, Oo} and WP 740 parameters {wi, Oí} for Po and Pi, respectively) is used to generate the inter predictor block; otherwise, the weighted process according to the weighted mixing parameter is used to generate the inter predictor for block 750. As shown in FIGURE 9, the inter predictor 901 requires two prediction blocks P0 911 and P1 912 that have an overlapping area 921 where non-zero weights are applied to both blocks 911 and 912 to partially combine the predictors P0 911 and P1 912. Blocks neighboring block 901 are denoted as 931, 932, 933, 934, 935, and 936 in FIGURE 9. FIGURE 8 illustrates some differences between TPM and GEO blending modes. In the case of GEO fusion mode, the overlapping area between predictors 851 and 852 may be located not only along the diagonals of the interpredicted block 850. Predictors P0 851 and P1 852 may be received by copying blocks 810 and 820 outside other images with or without applying the weights and displacements {wo, Oo} 830 and {ivi, Oí} 840 to blocks 810 and 820, respectively. In one example, refldxA and predListFIagA specify the reference index and reference image list of the inter predictor P0; refldxB and predListFIagB specify the reference index and reference image list of the inter predictor P1. The lumaWeightedFlag and chromaWeightedFlag variables are derived as follows: lumaWeightedFlagA = predListFIagA ? Iuma_weight_l1_flag[ refldxA ] : luma_weight_IO_flag[ refldxA ] lumaWeightedFlagB = predListFIagB ? Iuma_weight_l1_flag[ refldxB ] : luma_weight_IO_flag[ refldxB ] chromaWeightedFlagA = predListFIagA ? chroma_weightJ1_flag[ refldxA ] : chroma weight_IO_flag[ refldxA ] chromaWeightedFlagB = predListFIagB ? chroma_weightJ1_flag[ refldxB ] : chroma weight_IO_flag[ refldxB ] lumaWeightedFlag = lumaWeightedFlagA | | lumaWeightedFlagB chromaWeightedFlag = chromaWeightedFlagA | | chromaWeightedFlagB Then if lumaWeightedFlag is true, the explicit weighted process is invoked; if lumaWeightedFlag is false, the weighted join process is invoked. Also, the chroma component is decided by chromaWeightedFlag. For an alternative implementation, the weighted label for all components is considered together. If one of lumaWeightedFlag or chromaWeightedFlag is true, the explicit weighted process is invoked; if both lumaWeightedFlag and ΜΛ / t / ZUZZ / U í Ί Z4Ó chromaWeightedFalg are false, the weighted merge process is invoked. The explicit weighting process for a rectangular block predicted using a bi-prediction mechanism is performed as described below. The inputs to this process are: two variables nCbW and nCbH that specify the width and height of the current encoding block, - two sets (nCbW)x(nCbH) predSamplesA and predSamplesB, the labels of the prediction list, predListFIagA and predListFIagB, the reference indices, refldxA and refldxB, the variable cldx that specifies the index of the color component, the depth of sample bits, bitDepth. The output of this process is the set (nCbW)x(nCbH) pbSamples of prediction sample values. The shiftl variable is set equal to Max( 2, 14 - bitDepth ). The variables log2Wd, oO, o1, wO and w1 are derived as follows: If cldx is equal to 0 for luma samples, the following applies: log2Wd = Iuma_log2_weight_denom + shiftl wO = predListFIagA ? LumaWeightL1[ refldxA ] : LumaWeightL0[ refldxA ] w1 = predListFIagB ? LumaWeightL1[ refldxB ] : LumaWeightL0[ refldxB ] oO = ( predListFIagA ? Iuma_offsetj1 [ refldxA ] : luma_offsetJO[ refldxA ]) « ( BitDepthY - 8 ) o1 = ( predListFIagB ? Iuma_offset_l1 [ refldxB ] : luma_offset_IO[ refldxB ]) « ( Bit DepthY - 8 ) Otherwise (cldx is not equal to 0 for chroma samples), the following applies: log2Wd = ChromaLog2WeightDenom + shiftl wO = predListFIagA ? ChromaWeightLI [ refldxA ][ cldx - 1 ] : ChromaWeightLO[ refldxA ][ cldx - 1 ] w1 = predListFIagA ? ChromaWeightLI [ refldxB ][ cldx - 1 ] : ChromaWeightLO[ refldxB ][ cldx - 1 ] oO = ( predListFIagA ? ChromaOffsetL1[ refldxA ][ cldx - 1 ] : ChromaOffsetLO[ refldxA ][ cldx 1 ]) « ( BitDepthc - 8 ) o1 = ( predListFIagB ? ChromaOffsetLI [ refldxB ][ cldx - 1 ] : ChromaOffsetLO[ refldxB ][ cldx 1 ]) « ( BitDepthc - 8 ) The prediction sample pbSamples[ x ][ y ] with x = O..nCbW - 1 y, y = O..nCbH - 1 is derived as follows: pbSamples[ x ][ y ] = Clip3( 0, (1 « bitDepth )-1,( predSamplesA[ x ][ y ] * wO + M A / IZ / ¿U¿¿ / U f1 predSamplesB[ x ][ y ] * w1 +((o0 + ο1 + 1 ) « log2Wd )) » (log2Wd + 1 )) The parameters of the segment-level weighted prediction could be represented as a set of variables, assigned for each element of a reference image list. The element index is further denoted as Γ. These parameters may include: - LumaWeightL0[ / ] - luma_offset_IO[ i] is the additive offset applied to the luma prediction value for list 0 prediction using RefPicList[ 0 ][ i ]. The value of luma_offset_IO[ i ] will be in the range -128 up to and including 127. When luma_weight_IO_flag[ i ] is equal to 0, luma_offset_IO[ i ] is inferred to be equal to 0. The variable LumaWeightL0[ i ] is derived to be equal to (1 « Iuma_log2_weight_denom ) + delta_luma_weight_IO[ i ]. When luma_weight_IO_flag[ i ] is equal to 1, the value of delta_luma_weight_IO[ i ] will be in the range -128 up to and including 127. When luma_weight_IO_flag[ i ] is equal to 0, LumaWe¡ghtL0[ i ] is inferred to be equal to 2luma-l092-wei9ht-der'0,1,1. The weighted combination process for a rectangular block predicted using b¡-prediction mechanism, the following process is performed as described below. The inputs to this process are: two variables nCbW and nCbH that specify the width and height of the current encoding block, two sets (nCbW)x(nCbH) predSamplesLA and predSamplesLB, a variable triangleDir that specifies the address of the partition, a variable cldx that specifies the index of color component. The output of this process is the set (nCbW)x(nCbH) pbSamples of prediction sample values. The variable nCbR is derived as follows: nCbR = ( nCbW > nCbH ) ? (nCbW / nCbH): (nCbH / nCbW) The bitDepth variable is derived as follows: - If cldx is equal to 0, bitDepth is set equal to BitDepthy. - Otherwise, bitDepth is set equal to BitDepthc. The shiftl and offsetl variables are derived as follows: - The shiftl variable is set equal to Max( 5, 17 - bitDepth). - The variable offsetl is set equal to 1 « (shiftl - 1 ). Depending on the values of triangleDir, wS and cldx, the prediction samples pbSamples[ x ][ y ] with x = 0..nCbW - 1 y, y = 0..nCbH - 1 are derived as follows: - The variable wldx is derived as follows: - If cldx is equal to 0 and triangleDir is equal to 0, the following applies: wldx = ( nCbW > nCbH ) ? ( Clip3( 0, 8, ( x / nCbR - y ) + 4 )) : ( Clip3( 0, 8, ( x - y / nCbR )+4)) Otherwise, if cldx is equal to 0 and triangleDir is equal to 1, the following applies: wldx = (nCbW > nCbH)? ( Clip3( 0, 8, (nCbH - 1 - x / nCbR - y) + 4 ) ) ( Clip3( 0, 8, ( nCbW - 1 - x - y / nCbR ) + 4)) Otherwise, if cldx is greater than 0 and triangleDir is equal to 0, the following applies: wldx = (nCbW > nCbH)? ( Clip3( 0, 4, ( x / nCbR - y) + 2 ) ) : ( Clip3( 0, 4, ( x - y / nCbR ) + 2)) Otherwise (if cldx is greater than 0 and triangleDir is equal to 1), the following applies: wldx = ( nCbW > nCbH ) ? ( Clip3( 0, 4, (nCbH -1 - x / nCbR - y) + 2 ) ) ( Clip3( 0, 4, ( nCbW - 1 - x - y / nCbR ) + 2)) - The variable wValue that specifies the weight of the prediction sample is derived using wldx and cldx as follows: wValue = (cldx = = 0)? Clip3( 0, 8, wldx ) : Clip3( 0, 8, wldx * 2 ) - Prediction sample values are derived as follows: pbSamples[ x ][ y ] = Clip3( 0, (1 « bitDepth )-1, ( predSamplesLA[ x ][ y ]* wValue + predSamplesLB[ x ][ y ] * ( 8 - wValue ) + offsetl ) » shiftl ) For the geometric mode, the weighted combination process for a rectangular block predicted using the bi-prediction mechanism, the following process is performed as described below. The inputs to this process are: two variables nCbW and nCbH that specify the width and height of the current encoding block, two sets (nCbW)x(nCbH) predSamplesLA and predSamplesLB, a variable angleldx that specifies the angle index of the geometric partition, a variable distanceldx that specifies the idx distance of the geometric partition, a cldx variable that specifies the color component index. The results of this process are the set (nCbW)x(nCbH) pbSamples of prediction sample values and the variable partldx. The bitDepth variable is derived as follows: - If cldx is equal to 0, bitDepth is set equal to BitDepthY. - Otherwise, bitDepth is set equal to BitDepthc. The shiftl and offsetl variables are derived as follows: - The shiftl variable is set equal to Max( 5, 17 - bitDepth). - The variable offsetl is set equal to 1 « (shiftl -1 ). ΜΛ / t / ZUZZ / U í Ί Z4Ó The set of weights sampleWeightJ x ][ y ] for luma and sampleWeightc[ x ][ y ] for chroma with x = O..nCbW - 1 y, y = O..nCbH - 1 are derived as follows: The value of the following variables is set: hwRatio is set to nCbH / nCbW displacementX is set to angleldx displacementY is set to (displacementX + 8)%32 - partldx is set to angleldx >=13 && angleldx <=27 ? 1 : 0 rho is set to the following value using the lookup tables denoted as Dis, specified in Table 8-12: rho = (Dis[displacementX]« 8) + (Dis[displacementY] « 8) If one of the following conditions is true, the shiftHor variable is set equal to 0: angleldx % 16 is equal to 8, angleldx % 16 is not equal to 0 and hwRatio > 1 Otherwise, shiftHor is set equal to 1. If shiftHor is equal to 0, offsetX and offsetY are derived as follows: offsetX-( 256 - nCbW ) » 1, offsetY = ( 256 - nCbH ) » 1 + angleldx < 16 ? (distanceldx * nCbH) » 3 : -((distanceldx * nCbH) » 3) Otherwise, if shiftHor is equal to 1, offsetX and offsetY are derived as follows: offsetX = ( 256 - nCbW ) » 1 + angleldx < 16 ? (distanceldx * nCbW) » 3 : -((distanceldx * nCbW) » 3) offsetY = ( 256 - nCbH ) » 1 The variables weightldx and weightldxAbs are calculated using the lookup table Table 9 with x = 0..nCbW - 1 and y = 0..nCbH - 1 as follows: weightldx = (((x + offsetX)«1) + 1)*Dis[displacementX] + (((y + offsetY )«1) + 1 ))*Dis[displacementY] - rho. weightldxAbs = Clip3(0, 26, abs(weightldx)). The value of sampleWeightT x ][ y ] with x = 0..nCbW - 1 y, y = O..nCbH - 1 is set according to Table 10 denoted as GeoFilter: sampleWeightL[ x ][ y ] = weightldx <= 0 ? GeoFilter[weightldxAbs] : 8 - GeoFilter[weightldxAbs] The value sampleWeightc[ x ][ y ] with x = 0..nCbW - 1 y, y = 0..nCbH - 1 is set as follows: sampleWeightc[ x ][ y ] = sampleWeightL[ (x« (SubWidthC - 1)) ][ (y« (SubHeightC - 1)) ] NOTE - The sample value sampleWeightfl x ][ y ] can also be derived from ΜΛ / t / ZUZZ / U / 1Z4Ó sampleWeightL[ x -shiftX][ y-shiftY ]. If the angleldx is greater than 4 and less than 12, or angleldx is greater than 20 and less than 24, shiftX is the tangent of the divided angle and shiftY is 1, otherwise shiftX is 1 of the divided angle and shiftY is the cotangent of the split angle. If the value of the tangent (resp. cotangent) is infinite, shiftX is 1 (resp. 0) or shiftY is 0 (reps. 1). Prediction sample values are derived as follows with X denoted as L or C with cldx equal to 0 or not equal to 0: pbSamples[ x ][ y ] = partldx ? Clip3( 0, (1 « bitDepth ) - 1, ( predSamplesLA[ x ][ y ] * ( 8 - sampleWeightx[ x ][ y ]) + predSamplesLB[ x ][ y ] * sampleWeightx [ x ][ y ] + offsetl ) » shiftl ) : Clip3( 0,(1 « bitDepth )-1,( predSamplesLA[ x ][ y ] * sampleWeightx [ x ][ y ] + predSamplesLB[ x ][ y ] * ( 8 - sampleWeightx[ x ][ y ]) + offsetl ) » shiftl ) Table 5 - Dis lookup table for derivation of geometric partition distance. idx 0 1 2 4 6 7 8 9 10 12 14 15 Dis[idx] 8 8 8 8 4 2 0 -2 -4 -8 -8 -8 idx 16 17 18 20 22 23 24 25 26 28 30 31 Dis[idx ] -8 -8 -8 -8 -4 -2 0 2 4 8 8 8 Table 6 - GeoFilter filter weight lookup table for derivation of geometric partition filter weights. idx 0 1 2 3 4 5 6 7 8 9 10 11 12 13 GeoFilter[ idx] 4 4 4 4 5 5 5 5 5 5 5 6 6 6 idx 14 15 16 17 18 19 20 21 22 23 24 25 26 GeoFilter[ idx ] 6 6 6 6 7 7 7 7 7 7 7 7 8 In the VVC Specification Draft 7 (document JVET-P2001-vE: B. Bross, J. Chen, S. Liu, Y.- K. Wang, “Versatile Video Coding (Draft 7), output document JVET-P2001 of the 16 JVET meeting, Geneva, Switzerland; this document is located in the JVET-P2001v14 archive: http: / / phenix.it-sudparis.eu / jvet / doc_end_user / documents / 16_Geneva / wg11 / JVET-P2001v14.zip), the Picture header (PH) concept was introduced by moving a portion of the syntax elements out of the segment header (SH) to PH to reduce the signaling overhead caused by assigning equal or similar values to the same frame elements. syntax in each SH associated with the PH. As presented in Table 7, syntax elements to control the maximum number of fusion candidates for the TPM fusion mode are noted in PH, while the weighted prediction parameters are still in SH as shown in Table 8 and Table 10. The semantics of the syntax elements used in Table 8 and Table 9 are described below. Table 7 - Image Header RBSP Syntax picture_header_rbsp() {Descriptor non_reference_picture_flag u(1) gdr_pic_flag u(1) no_output_of_prior_pics_flag u(1) s¡( gdr_pic_flag ) recovery_poc_cnt ue(v) ph_pic_parameter_setjd ue(v) s¡( sps_poc_msb_flag) {ph_poc_m sb_present_flag u(1) s¡( ph_poc_msb_present_flag ) poc_msb_val u(v)} s¡( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 && !pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 ) pic_max_num_merge_cand_minus_max_num_triangle_cand ue(v) rbsp_trailing_b¡ts()} RBSP Image Header Semantics The PH contains information that is common to all segments of the encoded image associated with the PH. non_reference_picture_flag equal to 1 specifies that the image associated with the PH is never used as a reference image. non_reference_picture_flag equal to 0 specifies that the image associated with the PH may or may not be used as a reference image. gdr_pic_flag equal to 1 specifies that the image associated with the PH is a gradual decoding refresh (GDR) image. The gdr_pic_flag equal to 0 specifies that the image associated with the PH is not a GDR image. no_output_of_prior_p¡cs_flag affects the output of previously decoded images in the decoded picture buffer (DPB) after decoding a coded layer video sequence start (CLVSS) image that It is not the first image in the bitstream. recovery_poc_cnt specifies the recovery point for decoded images in output order. If the current image is a GDR image that is associated with the PH and there exists a picA image that follows the current GDR image in decoding order in the coded layer video sequence (CLVS) and has PicOrderCntVal is equal to the PicOrderCntVal of the current GDR image plus the recovery_poc_cnt value, the picA image is called the recovery point image. Otherwise, the first image in the output order that has PicOrderCntVal greater than the PicOrderCntVal of the current image plus the value of recovery_poc_cnt is called the recovery point image. The recovery point image will not precede the current GDR image in decoding order. The value of recovery_poc_cnt will be in the range 0 to MaxPicOrderCntLsb - 1, inclusive. NOTE 1 – When gdr_enabled_flag is equal to 1 and PicOrderCntVal of the current image is greater than or equal to RpPicOrderCntVal of the associated GDR image, the current and subsequent decoded images in output order exactly match the corresponding images produced when starting the process decoding of the previous intra random access point (IRAP) image, when present, preceding the associated GDR image in decoding order. ph_pic_parameter_set_id specifies the value of pps_pic_parameter_set_id for the PPS in use. The value of ph_pic_parameter_set_id will be in the range 0 to 63, inclusive. It is a bitstream compliance requirement that the Temporalld value of the PH be greater than or equal to the Temporalld value of the Picture Parameter Set (PPS) that has pps_pic_parameter_set_id equal to ph_pic_parameter_set_id. sps_poc_msb_flag equal to 1 specifies that the ph_poc_msb_cycle_present_flag syntax element is present in PHs that refer to the Sequence Parameter Set (SPS). sps_poc_msb_flag equal to 0 specifies that the ph_poc_msb_cycle_present_flag syntax element is not present in PHs that refer to the SPS. ph_poc_msb_present_flag equal to 1 specifies that the poc_msb_val syntax element is present in the PH. ph_poc_msb_present_flag equal to 0 specifies that the poc_msb_val syntax element is not present in the PH. When vps_independentjayer_flag[ GeneralLayerldx[ nuhjayerjd ] ] is equal to 0 and an image exists in the current Access Unit (AU) in a reference layer of the current layer, the value of ph_poc_msb_present_flag must be equal to 0. poc_msb_val specifies the most significant bit (MSB) value of the picture order count (POC) of the current image. The length of the poc_msb_val syntax element is poc_msb_len_minus1 + 1 bits. sps_triangle_enabled_flag specifies whether triangular-based motion compensation can be used for interprediction. sps_triangle_enabled_flag equal to 0 specifies that the syntax will be restricted such that no triangle-based motion compensation is used in the coded layer video sequence (CLVS), and merge_triangle_split_d¡r, merge_triangle_idxO, and merge_triangle_idx1 will not They are present in the syntax of the CLVS coding unit. sps_triangle_enabled_flag equal to 1 specifies that triangular-based motion compensation can be used in the CLVS. pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 equal to 0 specifies that p¡c_max_num_merge_cand_minus_max_num_tr¡angle_cand is present in the PHs of segments that refer to the Picture Parameter Set (PPS). pps_max_num_merge_cand_minus_max_num_tr¡angle_cand_plus1 greater than 0 specifies that pic_max_num_merge_cand_minus_max_num_tr¡angle_cand is not present in PHs referring to the PPS. The value of pps_max_num_merge_cand_minus_max_num_triangle_candj3lus1 will be in the range 0 to MaxNumMergeCand - 1. pps_max_num_merge_cand_minus_max_num_tr¡angle_cand_plus1 equal to 0 specifies that pic_max_num_merge_cand_minus_max_num_tr¡angle_cand is present in the PHs of segments that refer to the PPS. pps_max_num_merge_cand_minus_max_num_tr¡angle_cand_plus1 greater than 0 specifies that pic_max_num_merge_cand_minus_max_num_triangle_cand is not present in PHs referring to the PPS. The value of pps_max_num_merge_cand_minus_max_num_triangle_cand_plus1 will be in the range 0 to MaxNumMergeCand - 1. pic_six_minus_max_num_merge_cand specifies the maximum number of merger motion vector prediction (MVP) candidates supported in the associated segments with the PH subtracted from 6. The maximum number of merger MVP candidates, MaxNumMergeCand is derived from the following manner: MaxNumMergeCand = 6 - picsix_minus_max_num_merge_cand The value of MaxNumMergeCand will be in the range 1 to 6, inclusive. When not present, the value of pic_six_minus_max_num_merge_cand is inferred to be equal to pps_six_minus_max_num_merge_cand_plus1 - 1. ΜΛ / t / ZUZZ / U ί 1Z4Ó ΜΛ / t / ZUZZ / U ί 1Z4Ó Table 8 - General Segment Header Syntax slice_header() {Descriptor slice_pic_order_cnt_lsb u(v) s¡( subpics_present_flag) slice_subpic_id u(v) s¡( rectsliceflag | | NumTilesInPic > 1 ) slice_address u(v) s¡( !rect_slice_flag && NumTilesInPic > 1 ) num_tiles_in_slice_minus1 ue(v) slice_type ue(v) s¡( 'picrplpresentf lag &&( ( nal_unit_type != IDR_W_RADL && nal_unit_type != IDR N LP ) | | sps_idr_rpl_present_flag )) {for (i = 0; i < 2; i++ ) {s¡( num_ref_p¡ c_l¡sts_in_sps[ i ] > 0 && !pps_ref_picjist_spsjdc[ i ] && (==0||(¡==1 && rpl1Jdx_present_flag ))) slice_rpl_sps_flag[ i ] u(1) s¡( slice_rpl_sps_flag[ i ]) {s ¡( num_ref_pic_lists_¡n_sps[ i ] > 1 && (==0||(¡==1 && rpl1Jdx_present_flag ))) slice_rpl_idx[ i ] u(v)} otherwise ref_pic_list_struct( i, num_ref_pic_l¡sts_¡n_sps[ i ]) for (j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {s¡( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) slice_poc_lsb_lt[ i ][ j ] u(v) slice_delta_poc_msb_present_flag[ i ][j ] u(1) s¡( slice_delta_poc_msb_present_flag[ i ][ j ]) slice_delta_poc_msb_cycle_lt[ i ][ j ] ue(v)} }} s¡( pic_rpl_present_flag | | (( nal_unit_type != IDR_W_RADL && nal_unit_type != IDR_N_LP ) | | sps_idr_rpl_present_flag )) {s¡( ( slice_type != I && num_ref_entries[ 0 ][ Rplsldx[ 0 ] ] > 1 )( slice_type = = B && num_ref_entries[ 1 ][ Rplsldx[ 1 ] ] > 1 )) {num_ref_idx_active_override_flag u(1) if( num_ref_idx_act¡ve_override_flag) for (i = 0; i < ( slice_type = = B ? 2:1 ); i++ ) if( num_ref_entries[ i ][ Rplsldx[ i ] ] > 1 ) num_ref_ldx_active_m¡nus1[ i ] ue(v)}} s¡( slice_type != I) {... if( ( pps_weighted_pred_flag && slice_type = = P ) 11 ( pps_weighted_bipred_flag && slicejype = = B)) pred_weight_table()} byte_alignment()} General segment header semantics When present, the value of the slice_pic_order_cnt_lsb slice header syntax element will be the same across all slice headers in an encoded image. The variable CuQpDeltaVal, which specifies the difference between a luma quantization parameter for the coding unit containing cu_qp_delta_abs and its prediction, is set equal to 0. The variables CuQpOffsetcb, CuQpOffsetcr, and CuQpOffsetcbCr, which specify the values to be used when determine the respective values of the ΜΛ / t / ZUZZ / U ί Ί Z4Ó quantization parameters Qp'cb, Qp'cr, and Qp'cbcr for the coding unit containing cu_chroma_qp_offset_flag are all set equal to 0. sl¡ce_pic_order_cnt_lsb specifies the image order counting module MaxPicOrderCntLsb for the current image. The length of the slice_p¡c_order_cnt_lsb syntax element is Iog2_max_pic_order_cnt_lsb_minus4 + 4 bits. The value of the slice_pic_order_cnt_lsb will be in the range 0 to MaxPicOrderCntLsb - 1, inclusive. When the current image is a GDR image, the RpPicOrderCntVal variable is derived as follows: RpPicOrderCntVal = PicOrderCntVal + recovery_poc_cnt. slice_subpic_id specifies the subpic ID of the subpic containing the slice. If slice_subpic_id is present, the value of the SubPicIdx variable is derived to be such that SubpicldList[ SubPicIdx ] is equal to slice_subpic_id. Otherwise (slice_subpic_id is not present), the variable SubPicIdx is derived to be equal to 0. The length of slice_subpic_id, in bits, is derived as follows: - If sps subpic id signaling present flag is equal to 1, the length of slice_subpic_id is equal to sps_subpic_id_len_minus1 +1. - Otherwise, if ph_subp¡cjd_signall¡ng_present_flag is equal to 1, the length of slice_subpicjd is equal to ph_subp¡cjd_len_minus1 + 1. - Otherwise, if pps_subp¡cjd_signalling_present_flag is equal to 1, the length of slice_subpicjd is equal to pps_subpicjdjen_minus1 + 1. - Otherwise, the length of slice_subpic_id is equal to Ceil( Log2 (sps_num_subpics_minus1 + 1 )). slice_address specifies the slice address of the slice. When not present, the value of slice_address is inferred to be equal to 0. If rect_slice_flag is equal to 0, the following applies: - The segment address is the raster scan tile index. - The length of slice_address is Ceil( Log2 ( NumTilesInPic)) bits. - The value of slice_address will be in the range 0 to NumTilesInPic - 1, inclusive. Otherwise (rect_slice_flag is equal to 1), the following applies: - The segment address is the segment index of the segment within the SubPicIdx-th subpic. - The length of slice_address is Ceil( Log2( NumSlíceslnSubpic[ SubPicIdx ])) bits. - The value of slice_address will be in the range 0 to NumSliceslnSubpic[ SubPicIdx ] - 1, inclusive. It is a requirement of bitstream compliance that the following apply: ΜΛ / í 1 or restrictions: - If rect_slice_flag is equal to 0 or subpics_present_flag is equal to 0, the value of slice_address will not be equal to the value of slice_address of any other Network Abstraction Layer (NAL) encoded segment unit of the same encoded image . - Otherwise, the slice_subpic_¡d and slice_address value pair will not be equal to the slice_subpicjd and slice_address value pair of any other coded segment NAL unit of the same coded image. - When rect_slice_flag is equal to 0, the slices of an image will be in increasing order of their slice_address values. - The shapes of the segments of an image will be such that each Coding Tree Unit (CTU), when decoded, will have its entire left boundary and its entire upper boundary consisting of an image boundary or consisting in previously decoded CTU limits. num_t¡les_in_slice_minus1 plus 1, when present, specifies the number of tiles in the slice. The value of num_tilesjn_slice_minus1 will be in the range 0 to NumTilesInPic - 1, inclusive. The variable NumCtuInCurrSIice, which specifies the number of CTUs in the current slice, and the list CtbAddrlnCurrSlice[ i ], for i that ranges from 0 to NumCtuInCurrSIice - 1, inclusive, specifying the image frame scan address of the ith Coding Tree Block (CTB) within the segment, is derived as follows: s¡( rect_slice_flag) {picLevelSliceldx = SlicesubpicToP¡cldx[ SubPicIdx ][ slice_address ] NumCtuInCurrSIice = NumCtulnSlice[ picLevelSliceldx ] for (i = 0; i < NumCtuInCurrSIice; I++ ) CtbAddrlnCurrSlice[ i ] = CtbAddrlnSlice[ picLevelSliceldx ][ i ]} else { NumCtuInCurrSIice = 0 for (tileldx = slice_address; tileldx <= slice_address + num_tiles_in_sl¡ce_minus1[ i ]; tileldx++ ) {tileX = tileldx % NumTileColumns tileY = tileldx / NumTileColumns for ( ctbY = tileRowBd[ tileY ]; ctbY < tileRowBd[ tileY + 1 ]; ctbY++ ) {for ( ctbX = tileColBd[ tileX ]; ctbX < tileColBd[ tileX + 1 ]; ctbX++) {CtbAddrlnCurrSlice[ NumCtuInCurrSIice ] = ctbY * PicWidthlnCtb + ctbX NumCtu lnCurrSlice++} }} } The variables SubPicLeftBoundaryPos, SubPicTopBoundaryPos, SubPicRightBoundaryPos, and SubPicBotBoundaryPos are derived as follows: s!( subpic_treated_as_pic_flag[ SubPicIdx ]) { SubPicLeftBoundaryPos = subpic_ctu_topjeft_x[ SubPicIdx ] * CtbSizeY SubPicRightBoundaryPos = Min( p¡c_width_maxjn_luma_samples - 1, ( subpic_ctu_top_left_x[ SubPicIdx ] + subpic_w¡dth_minus1 [ SubPicIdx ] + 1 ) * CtbSiz eY - 1) SubPicTopBoundaryPos = subpic_ctu_top_left_y[ SubPicIdx ] *CtbSizeY SubPicBotBoundaryPos = Min( pic_height_max_¡n_luma_samples - 1, (subpic_ctu_top_left_y[ SubPicIdx ] + subpic_height_minus1 [ SubPicIdx ] + 1 ) - 1)} slice_type specifies the encoding type of the slice according to Table 9. Table 9 - Association of names to slice_type slice type Name of slice type 0 B (segment B) 1 P (segment P) 2 I (segment I) slice_rpl_sps_flag[ i ] equal to 1 specifies that the reference image list i of the current slice is derived based on one of the syntax structures ref_picJist_struct( listldx, rplsldx ) with listldx equals i in the SPS. slice_rpl_sps_flag[ i ] equal to 0 specifies that the reference image list i of the current segment is derived based on the syntax structure ref_pic_list_struct( listldx, rplsldx) with listldx equals i being included directly in the header of the slices the current image. When slice_rpl_sps_flag[ i ] is not present, the following applies: - If pic_rpl_present_flag is equal to 1, the value of slice_rpl_sps_flag[ i ] is inferred to be equal to pic_rpl_sps_flag[ i ]. - Otherwise, if num_ref_picj_sps_flag[ i ] is equal to 0, the value of ref_picj¡st_sps_flag[ i ] is inferred to be equal to 0. - Otherwise, if num_ref_pic_listsjn_sps[ i ] is greater than 0 and if rpH_¡dx_present_flag is equal to 0, the value of slice_rpl_sps_flag[ 1 ] is inferred to be equal to slice_rpl_sps_flag[ 0 ]. slice_rpl_idx[ i ] specifies the index, in the list of syntax structures ref_pic_list_struct( listldx, rplsldx ) with listldx equals i included in the SPS, of the syntax structure ref_pic_list_struct( listldx, rplsldx ) with listldx equals i that is used for derivation of reference image list i from the current image. The syntax element slice_rpl_idx[ i ] is represented by Ceil( Log2( num_ref_pic_lists_¡n_sps[ i ])) bits. When not present, the value of slice_rpl_idx[ i ] is inferred to be equal to 0. The value of slice_rpl_idx[ i ] will be in the range 0 to num_ref_picjistsjn_sps[ i ] - 1, inclusive. When slice_rpl_sps_flag[ i ] is equal to 1 and num_ref_p¡c_l¡stsjn_sps[ i ] is equal to 1, the value of slice_rpl_idx[ i ] is inferred to be equal to 0. When slice_rpl_sps_flag[ i ] is equal to 1 and rpl1_idx_present_flag is equal to 0, the value of slice_rpl_idx[ 1 ] is inferred to be equal to slice_rpl_idx[ 0 ]. The variable Rplsldx[ i ] is derived as follows: yes( pic_rpl_present_flag ) Rplsldx[ i ] = PicRplsldx[ i ] otherwise Rplsldx[ i ] = slice_rpl_sps_flag[ i ] ? slice_rpl_idx[ i ] : num_ref_p¡c_lists_in_sps[ i ] slice_poc_lsb_lt[ i ][ j ] specifies the value of the image order counting module MaxPicOrderCntLsb of the jth LTRP entry in the ith reference image list. The length of the slice_poc_lsb_lt[ i ][ j ] syntax element is Iog2_max_pic_order_cnt_lsb_minus4 + 4 bits. The variable PocLsbLt[ i ][ j ] is derived as follows: yes( pic_rpl_present_flag ) PocLsbLt[ i ][ j ] = PicPocLsbLt[ i ][ j ] otherwise PocLsbLt[ i ][ j ] = ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ] ? slice_poc_lsb_lt[ i ][ j ] : rpls_poc_lsb_lt[ listldx ][ Rplsldx[ i ] ][ j ] slice_delta_poc_msb_present_flag[ i ][ j ] equal to 1 specifies that slice_delta_poc_msb_cycle_lt[ i ][ j ] is present. slice_delta_poc_msb_present_flag[ i ][ j ] equal to 0 specifies that slice_delta_poc_msb_cycle_lt[ i ][ j ] is not present. Let prevTidOPic be the previous image in the decoding order that has nuh layer id the same as the current image, has Temporalld equal to 0, and is not a Random Access Decodable Main (RADL) or Random Access Decodable Main (RADL) image. ). Let setOfPrevPocVals be a set consisting of the following: - the PicOrderCntVal of prevTidOPic, ΜΛ / t / ZUZZ / U ί Ί Z4Ó the PicOrderCntVal of each image referenced in the entries of RefPicList[ 0 ] or RefPicList] 1 ] of prevTidOPíc and has nuhjayerjd the same as the current image, the PicOrderCntVal of each image which follows prevTidOPíc in decoding order, has nuhjayerjd the same as the current image, and precedes the current image in decoding order. When pic_rpl_presentjlag is equal to 0 and there is more than one value in setOfPrevPocVals for which the value modulo MaxPicOrderCntLsb is equal to PocLsbLt[ i ][ j ], the value of slice_delta_poc_msb_presentjlag[ i ][ j ] must be equal to 1. slice_delta_poc_msb_cyclejt[ i ][ j ] specifies the value of the variable FullPocLt[ i ][ j ] as follows: yes( pic_rpl_presentjlag ) FullPocLt[ i ][ j ] = PicFullPocLt[ i ][ j ] else {s¡( j == 0) DeltaPocMsbCycleLt[ i ][ j ] = delta_poc_msb_cyclejt[ i ][ j ] else DeltaPocMsbCycleLt[ i ][ j ] = delta_poc_msb_cyclejt[ i ][ j ] + DeltaPocMsbCycleLt[ i ][ j - 1 ] FullPocLt[ i ][ j ] = PicOrderCntVal - DeltaPocMsbCycleLt[ i ][ j ] * MaxPicOrderCntLsb -( PicOrderCntVal & ( MaxPicOrderCntLsb - 1 )) + PocLsbLt[ i ][ j ]} The value of slice_delta_poc_msb_cyclejt[ i ][ j ] will be in the range 0 to 2(32-iog2_maxj3ic_order_cnt_isb_minus4-4), inclusive. When not present, the value of slice_delta_poc_msb_cyclelt[ i ][ j ] is inferred to be equal to 0. num_refjdx_active_override_flag equal to 1 specifies that the syntax element num_refjdx_active_minus1 [ 0 ] is present for segments P and B and that the syntax element num_refjdx_active_minus1 [ 1 ] is present for segments B. num_refjdx_active_overridejlag equal to 0 specifies that the syntax elements num_refjdx_ active_minus1 [ 0 ] and numrefidxactiveminusl [ 1 ] are not present. When not present, the value of num_refjdx_active_override flag is inferred to be equal to 1. num_refjdx_active_minus1[ i ] is used for the derivation of the variable NumRefldxActive[ i ] as specified by Equation 145. The value of num_refjdx_active_minus1 [ i ] will be in the range 0 to 14, inclusive. For i is equal to 0 or 1, when the current segment is a segment B, num_refjdx_active_overr¡dejlag is equal to 1, and num_refjdx_active_minus1[ i ] is not ΜΛ / t / ZUZZ / U í Ί Z4Ó luma_weight_IO_flag[ i ] u(1) s¡( ChromaArrayType != 0 ) for (i = 0; i < NumRefldxActive[ 0 ]; Í++ ) chroma_weight_IO_flag[ i ] u(1) for (i = 0; i < NumRefldxActive [ 0 ]; i++ ) {s¡( luma_weight_IO_flag[ i ]) {delta_luma_weight_IO[ i ] se(v) luma_offset_IO[ i ] se(v)} s¡( chroma_weight_IO_flag[ i ]) for (j = 0; j < 2 ; j++ ) {delta_chroma_weight_IO[ i ][ j ] se(v) delta_chroma_offset_IO[ i ][ j ] se(v)}} s¡( slice_type = = B ) {for (i = 0; i < NumRefldxActive[ 1 ]; Í++ ) Iuma_weight_l1_flag[ i ] u(1) s¡( ChromaArrayType != 0 ) for (i = 0; i < NumRefldxActive[ 1 ]; i++ ) chroma_weight_l1_flag[ i ] u(1) for (i = 0; i < NumRefldxActive[ 1 ]; Í++ ) {s¡( luma_weight_H_flag[ i ]) {delta_luma_weight_l1[ i ] se(v) Iuma_offset_l1 [ i ] se(v)} s¡( chroma_weightJ1_flag[ i ]) for (j = 0 ; j < 2; j++ ) {delta_chroma_weightJ1[ i ][ j ] se(v) delta_chroma_offset_l1 [ i ][ j ] se(v)}}}} ΜΛ / ΙΖ / ZUZZ / U ί Ί Z4Ó Semantics of weighted prediction parameters Iuma_log2_weight_denom is the base 2 logarithm of the denominator for all luma weighting factors. The value of Iuma_log2_weight_denom will be in the Range 0 to 7, inclusive. delta_chroma_log2_weight_denom is the difference of the base 2 logarithm of the denominator for all chroma weighting factors. When delta_chroma_log2_weight_denom is not present, it is inferred to be equal to 0. The variable ChromaLog2WeightDenom is derived to be equal to Iuma_log2_weight_denom + delta_chroma_log2_weight_denom and the value will be in the range 0 to 7, inclusive. luma_weight_IO_flag[ i ] equal to 1 specifies that the weighting factors for the luma component of predicting list 0 using RefPicList[ 0 ][ i ] are present. luma_weight_IO_flag[ i ] equal to 0 specifies that these weighting factors are not present. chroma_weight_IO_flag[ i ] equal to 1 specifies that the weighting factors for the chroma prediction values of list 0 prediction using RefPicList[ 0 ][ i ] are present. chroma_weight_IO_flag[ i ] equal to 0 specifies that these weighting factors are not present. When chroma_weight_IO_flag[ i ] is not present, it is inferred to be equal to 0. delta_luma_weight_IO[ i ] is the difference of the weighting factor applied to the luma prediction value for the prediction of list 0 using RefPicList[ 0 ][ i ]. The variable LumaWeightL0[ i ] is derived which is equal to (1 « Iuma_log2_weight_denom ) + delta_luma_weight_IO[ i ]. When luma_weight_IO_flag[ i ] is equal to 1, the value of delta_luma_weight_IO[ i ] will be in the range -128 to 127, inclusive. When luma_weight_IO_flag[ i ] is equal to 0, LumaWeightL0[ i ] is inferred to be equal to 2luma_log2_weight_denom. luma_offset_IO[ i ] is the additive offset applied to the luma prediction value for list 0 prediction using RefPicList[ 0 ][ i ]. The value of luma_offset_IO[ i ] will be in the range -128 to 127, inclusive. When luma_weight_IO_flag[ i ] is equal to 0, luma_offset_IO[ i ] is inferred to be equal to 0. delta_chroma_weight_IO[ i ][ j ] is the difference of the weighting factor applied to the chroma prediction values for list 0 prediction using RefPicList[ 0 ][ i ] with j equals 0 for Cb j equals 1 for Cr. The variable ChromaWeightL0[ i ][ j ] is derived which is equal to (1 « ChromaLog2WeightDenom ) + delta_chroma_weight_IO[ i ][ j ]. When chroma_weight_IO_flag[ i ] is equal to 1, the value of delta_chroma_weight_IO[ i ][ j ] will be in the ΜΛ / t / ZUZZ / U ί 1Z4Ó range from -128 to 127, inclusive. When chroma_weight_IO_flag[ i ] is equal to 0, ChromaWeightLO[ i ][ j ] is inferred to be equal to 2ChromaLog2WeightDenom. delta_chroma_offset_IO[ i ][ j ] is the difference in additive offset applied to the chroma prediction values for list 0 prediction using RefPicList[ 0 ][ i ] with j equals 0 for Cb and j equals 1 for Cr . The ChromaOffsetLO[ i ][ j ] variable is derived as follows: ChromaOffsetLO[ i ][ j ] = Clip3( -128, 127, (128 + delta_chroma_offset_IO[ i ][ j ] ((128 * ChromaWeightLO[ i ][ j ]) » ChromaLog2WeightDenom ))) The value of delta_chroma_offsetJO[ i ][j ] will be in the range -4 * 128 to 4 * 127, inclusive. When chroma_weight_IO_flag[ i ] is equal to 0, ChromaOffsetLO[ i ][ j ] is inferred to be equal to 0. Iuma_weight_l1_flag[ i ], chroma_weight_l1_flag[ i ], delta_luma_weight_l1 [ i ], Iuma_offset_l1 [ i ], delta_chroma_weight_l1 [ i ][ j ], and delta_chroma_offset_l1 [ i ][ j ] have the same semantics as luma_weight_IO_flag[ i ], chroma_weight_IO_flag[ i ] , delta_luma_weight_IO[ i ], luma_offset_IO[ i ], delta_chroma_weight_IO[ i ][ j ] and delta_chroma_offset_IO[ i ][j ], respectively, with I0, LO, list 0 and Ready replaced by 11, L1, list 1 and Listl, respectively . The variable sumWeightLOFIags is derived to be equal to the sum of luma_welghtJ0_flag[ i ] + 2 * chroma_weight_IO_flag[ i ], for i = O..NumRefldxActive[ 0 ] - 1. When slice_type is equal to B, the variable sumWeightLI Flags is derived to be equal to the sum of Iuma_weight_l1_flag[ i ] + 2 * chroma_weight_l1_flag[ i ], for i O..NumRefldxActive[ 1 ] - 1. It is a requirement of bitstream compliance that when slice type is equal to P, sumWeightLOFIags shall be less than or equal to 24 and when slice type is equal to B, the sum of sumWeightLOFIags and sumWeightLI Flags shall be less than or equal to 24. Semantics of the reference image list structure The syntax structure ref_pic_list_struct( listldx, rplsldx ) can be present in an SPS or in a segment header. Depending on whether the syntax structure is included in a segment header or an SPS, the following applies: - If present in a segment header, the ref_pic_list_struct( listldx, rplsldx) syntax structure specifies the reference image list listldx of the current image (the image containing the segment). - Otherwise (present in an SPS), the syntax structure ref_pic_list_struct( listldx, rplsldx ) specifies a candidate for the reference image list listldx, and the term current image in the semantics specified in the rest of this clause is refers to each ΜΛ / t / ZUZZ / U / Ί Z4Ó image that 1) has one or more segments containing ref_pic_list_¡dx[ listldx ] is equal to an index in the list of syntactic structures ref_pic_list_struct( listldx, rplsldx ) included in the SPS, and 2) is in a Coded Video Sequence (CVS) that refers to the SPS. num_ref_entries[ listldx ][ rplsldx ] specifies the number of entries in the ref_pic_list_struct( listldx, rplsldx) syntax structure. The value of num_ref_entries[ listldx ][ rplsldx ] will be in the range 0 to MaxDecPicBuffMinusI + 14, inclusive. Itrp_in_slice_header_flag[ listldx ][ rplsldx ] equal to 0 specifies that the LSB POCs of the LTRP entries in the ref_picjist_struct( listldx, rplsldx) syntax structure are present in the ref_pic_list_struct( listldx, rplsldx) syntax structure. Itrp_in_slice_header_flag[ listldx ][ rplsldx ] equal to 1 specifies that the LSB POCs of the Long-Term Reference Picture (LTRP) entries in the ref_pic_list_struct( listldx, rplsldx) syntax structure are not present in the syntax structure ref_pic_list_struct( listldx, rplsldx ). inter_layer_ref_pic_flag[ listldx ][ rplsldx ][ i ] equal to 1 specifies that the ith entry in the syntax structure ref_pic_list_struct( listldx, rplsldx) is an Inter Layer Reference (ILRP) image entry. inter_layer_ref_pic_flag[ listldx ][ rplsldx ][ i ] equal to 0 specifies that the ith entry in the ref_pic_list_struct( listldx, rplsldx ) syntax structure is not an ILRP entry. When not present, the value of ¡inter_layer_ref_pic_flag[ listldx ][ rplsldx ][ i ] is inferred to be equal to 0. st_ref_pic_flag[ listldx ][ rplsldx ][ i ] equal to 1 specifies that the ith entry in the ref_pic_list_struct( listldx, rplsldx) syntax structure is a STRP entry. st_ref_pic_flag[ listldx ][ rplsldx ][ i ] equal to 0 specifies that the ith entry in the ref_pic_list_struct( listldx, rplsldx) syntax structure is an LTRP entry. When inter_layer_ref_pic_flag[ listldx ][ rplsldx ][ i ] is equal to 0 and st_ref_pic_flag[ listldx ][ rplsldx ][ i ] is not present, the value of st_ref_pic_flag[ listldx ][ rplsldx ][ i ] is inferred to be equal to 1 . The variable NumLtrpEntries[ listldx ][ rplsldx ] is derived as follows: for (i = 0, NumLtrpEntries[ listldx ][ rplsldx ] = 0; i < num_ref_entries[ listldx ][ rplsldx ]; Í++ ) s¡( !nter_layer_ref_pic_flag[ listldx ][ rplsldx ][ i ] && !st_ref_pic_flag[ listldx ][ rplsldx ][ i ]) NumLtrpEntries[ listldx ][ rplsldx ]++ abs_delta_poc_st[ listldx ][ rplsldx ][ i ] specifies the value of the variable AbsDeltaPocSt[ listldx ][ rplsldx ][ i ] as follows: s¡( sps_weighted_pred_flag | | sps_weighted_bipred_flag ) ΜΛ / í 1 or AbsDeltaPocSt[ listldx ][ rplsldx ][ i ] = abs_delta_poc_st[ listldx ][ rplsldx ][ i ] else AbsDeltaPocSt[ listldx ][ rplsldx ][ i ] = abs_delta_poc_st[ listldx ][ rplsldx ][ i ] + 1 The value of abs_delta_poc_st[ listldx ][ rplsldx ][ i ] will be in the range 0 to 215-1, inclusive. strp_entry_sign_flag[ listldx ][ rplsldx ][ i ] equal to 1 specifies that the ith entry in the syntax structure ref_pic_list_struct( listldx, rplsldx) has a value greater than or equal to 0. strp_entry_sign_flag[ listldx ][ rplsldx ][ i ] equal to 0 specifies that the ith entry in the ref_picjist_struct( listldx, rplsldx) syntax structure has a value less than 0. When not present, the value of strp_entry_sign_flag[ listldx ][ rplsldx ][ i ] is inferred which is equal to 1. The list DeltaPocValSt[ listldx ][ rplsldx ] is derived as follows: for ( i = 0; i < num_ref_entries[ listldx ][ rplsldx ]; i++ ) if( !¡nter_layer_ref_pic_flag[ listldx ][ rplsldx ][ i ] && st_ref_pic_flag[ listldx ][ rplsldx ][ i ]) DeltaPocValSt[ listldx ][ rplsldx ][ i ] = ( strp_entry_sign_flag[ listldx ][ rplsldx ][ i ] ) ? AbsDeltaPocSt[ listldx ][ rplsldx ][ i ] : 0 - AbsDeltaPocSt[ listldx ][ rplsldx ][ i ] rpls_poc_lsb_lt[ listldx ][ rplsldx ][ i ] specifies the value of the image order counting module MaxPicOrderCntLsb of the image referred to by the ith entry in the syntax structure ref_pic_list_struct( listldx, rplsldx). The length of the rpls_poc_lsb_lt[ listldx ][ rplsldx ][ i ] syntax element is Iog2_max_pic_order_cnt_lsb_minus4 + 4 bits. ilrp_idx[ listldx ][ rplsldx ][ i ] specifies the index, to the list of direct reference layers, of the ILRP of the ith entry in the syntax structure ref_pic_list_struct( listldx, rplsldx ). The value of ilrp_idx[ listldx ][ rplsldx ][ i ] will be in the range 0 to NumDirectRefLayers[ GeneralLayerldx[ nuh layerjd ] ] - 1, inclusive. Therefore, different mechanisms can be used to allow control of the GEO / TPM fusion modes depending on whether WP is applied to the reference images where the reference blocks P0 and P1 are taken, namely: Move the WP parameters listed in Table 14 from SH to PH; Move GEO / TPM parameters from PH to SH; Change the semantics of MaxNumTriangleMergeCand, this is by setting MaxNumTriangleMergeCand equal to 0 or 1 for such segments when reference images with WP can be used (for example, where at least one of the lumaWeightedFlag or tags is equal to true). For the TPM fusion mode, the exemplary reference blocks P0 and P1 are denoted by 710 and 720 in FIGURE 7, respectively. For the GEO fusion mode, the exemplary reference blocks PO and P1 are denoted by 810 and 820 in FIGURE 8, respectively. Thus, different mechanisms can be used to allow control of the GEO / TPM fusion modes depending on whether WP is applied to the reference images where the reference blocks P0 and P1 are taken from, namely: Move the WP parameters listed in Table 14 from SH to PH; Move GEO / TPM parameters from PH to SH; Change the semantics of MaxNumTriangleMergeCand, this is by setting MaxNumTriangleMergeCand equal to 0 or 1 for such segments when reference images with WP can be used (for example, where at least one of the lumaWeightedFlag or tags is equal to true). For the TPM fusion mode, the exemplary reference blocks P0 and P1 are denoted by 710 and 720 in FIGURE 7, respectively. For the GEO fusion mode, the exemplary reference blocks P0 and P1 are denoted by 810 and 820 in FIGURE 8, respectively. In one embodiment, when WP parameters and enabling non-rectangular modes (e.g. GEO and TPM) are noted in the image header, the following syntax can be used, as shown in the table below: Image Header RBSP Syntax Table picture_header_rbsp() {Descriptor non_reference_picture_flag u(1) gdr_pic_flag u(1) no_output_of_prior_pics_flag u(1) si( gdr_pic_flag ) recovery_poc_cnt ue(v) ph_pic_parameter_set_id ue(v) s¡( sps_poc_msb_flag) {ph_poc_msb _present_flag u(1) s¡( ph_poc_msb_present_flag ) poc_msb_val u(v)} pic_rpl_present_flag u(1) s¡( pic_rpl_present_flag ) {for (i = 0; i < 2; i++ ) { s¡( num_ref_p¡c_lists_in_sps[ i ] > 0 && !pps_ref_p¡c_l¡st_sps_ídc[ i ] && (==0||(¡==1 && rpl1Jdx_present_flag ))) pic_rpl_sps_flag[ i ] u(1) s¡( pic_rpl_sps_flag[ i ]) {if( num_ref_p¡c_listsjn_sps[ i ] > 1 && (==0||(¡==1 && rpl1_idx_present_flag ))) pic_rpl_idx[ i ] u(v)} otherwise ref_p¡c_l¡ st_struct( i, num_ref_p¡c_lists_¡n_sps[ i ]) for (j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {s¡( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) pic_poc_lsb_lt [ i ][ j ] u(v) pic_delta_poc_msb_present_flag[ i ][ j ] u(1) si( pic_deltaj3oc_msb_present_flag[ i ][j ]) pic_delta_poc_msb_cycle_lt[ i ][ j ] ue(v)}}} s¡( ( pps_weighted_pred_flag && slice_type = = P ) | | ( pps_weighted_bipred_flag && slice_type = = B )) pred_weight_table() s¡( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 && !pps_max_num_merge_cand_minus_max_num_tr¡angle_cand_plus1 && WPDisabled) pic_max_num_merge_ cand_minus_max_num_tr¡angle_cand ue(v) rbsp_trailing_bits()} ΜΛ / t / ZUZZ / U ί 1Z4Ó The variable WPDisabled is set equal to 1 when all values of luma_weight_IO_flag[ i ], chroma_weight_IO_flag[ i ], Iuma_weight_l1_flag[ j ] and chroma_weight_H_flag[ j ] are set to zero, the value of i =0 .. NumRefldxActive[ 0 ]; and the value of j=0.. NumRefldxActive[ 1 ]; otherwise, the value of WPDisabled is set equal to 0. When the WPDisabled variable is set equal to 0, the value of pic_max_num_merge_cand_minus_max_num_triangle_cand is set equal to MaxNumMergeCand. In one example, signaling WP parameters and enabling non-rectangular modes (e.g. GEO and TPM) is done in the segment header. An example syntax is provided in the table below: slice_header() {Descriptor slice_p¡c_parameter_set_id ue(v) s¡( rect_slice_flag | | NumBricksInPic > 1 ) slice_address u(v) s¡( !rect_slicejlag && !single_brick_per_slice_flag ) num_bricks_¡n_sl¡ce_m¡nus1 ue(v) non_reference_ picture_flag u( 1) slice_type ue(v) s¡( separate_colour_plane_flag = = 1 ) colour_plane_id u(2) slice_pic_order_cnt_lsb u(v) s¡( nal_unit_type = = GDR_NUT ) recovery_poc_cnt ue(v) s¡( nal_unit_type = = IDR_W_RADL | | nal_unit_type = = IDR_N_LP nal_unit_type = = CRA NUT | | NalUnitType = = GDR NUT no_output_of_prior_p¡cs_flag u(1) s¡( output_flag_present_flag) pic_output_flag u(1) s¡( (nal_unit_type != IDR_W_RADL && nal_unit_type != IDR_N_LP) spsjdr_rpl_presentjlag ) {for (i = 0; i < 2; i++ ) {if( numjef_picjistsjn_sps[ i ] > 0 && !pps_ref_p¡c_list_spsjdc[ i ] && (i == 0 II (i = = 1 && rpl1Jdx_present_flag ))) ref_pic_list_sps_flag [ i ] u(1) if( ref_picjist_spsjlag[ i ]) {if( num_ref_pic_listsjn_sps[ i ] > 1 && ( == 0 | | (i = = 1 && rpl1_idx_present_flag ))) ref_picjistjdx[ i ] u(v)} else ref_pic_l¡st_struct( i, num_ref_picjistsjn_sps[ i ]) for (j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {if( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) slice_poc_lsb_lt [ i ][ j ] u(v) delta_poc_msb_present_flag[ i ][j ] u(1) si( delta_poc_msb_present_flag[ i ][ j ]) delta_poc_msb_cycle_lt[ i ][ j ] ue(v)}} s( ( slice_type ! = I && num_ref_entries[ 0 ][ Rplsldx[ 0 ] ] > 1 ) ( slicejype = = B && num_ref_entries[ 1 ][ Rplsldx[ 1 ] ] > 1 )) {num_ref_idx_active_override_flag u(1) s¡( num_refjdx_activej)verr¡dejlag ) for (i = 0; i < ( slicejype = = B ? 2 J ); i++ ) s¡( num jef_entries[ i ][ Rplsldx[ i ] ] > 1 ) num_refjdx_active_minus1[ i ] ue(v)} ΜΛ / t / ZUZZ / U ί 1 } s¡( partit¡on_constraints_overr¡de_enabled_flag) {partition_constraints_override_flag ue(v) s¡( partition_constraints_overr¡de_flag ) {si ice_log2_d if f_m i nqtrn incbl urn ue(v) slice_max_mtt_hierarchy_depthjuma ue(v) s¡( slice_max _mtt_herarchy_depth_luma ! = 0 ) s 1 i ce_l og2_d iffmaxbtm i n_q t_l u m a ue(v) slice_log2_diff_max_tt_min_qt_luma ue(v)} s¡( slice_type = = 1 && qtbtt_dual_tree_intra_flag ) slice {slice_log2_diff_m¡n_qt_m¡n_cb_chrom a ue(v) slice_max_mtt_hierarchy_depth_chroma ue(v) yes! ( slice_max_mtt_hierarchy_depth_chroma != 0 ) s 1 ice_log2_d iff_max_bt_mi n_qt_ch roma ue(v) if ice_log2_d if fmaxttm i n_qt_ch roma ue(v)}}}} if ( slice_type != 1) {s¡( sps_temporal_mvp_enabled _flag && !pps_temporal_mvp_enabled_idc ) slice_temporal_mvp_enabled_flag u( 1) s¡( slice_type = = B && !pps_mvd_l1_zero_idc) mvdHzeroflag u(1) s¡( cabacjnit-presentjlag) cabac_init_flag u(1) s¡( slice_temporaLmvp enabled-flag ) {s¡( slice_type = = B && !pps_collocated_from_IOJdc ) collocated_from_IO_flag u(1) s¡( ( collocatedJrom_IO_flag && NumRefldxActive[ 0 ] > Dll (!collocated_from_IO_flag && NumRefldxActive[ 1 ] > 1 )) collocated_ref_idx ue(v)} s¡( ( pps_weighted_pred_flag && slice_type = = P ) | | ( pps_weighted_bipred_flag && slice_type = = B )) slice_weighted_pred_flag u(1) if (slice_weight ed_pred_flag) pred_weight_table () s¡( !pps_six_minus_max_num_merge_cand_plus1 ) six minus maxnum merge cand ue(v) s¡( sps_affine_enabled_flag && !pps_five_minus_rriax_num_subblock_rrierge_cand_plus1 ) five_minus_max_num_subblock_merge_cand ue(v) s¡( sps_fpel _mmvd_enabled_flag) slice_fpel_mmvd_enabled_flag u(1) s¡( sps_bdof_dmvr_slice_present_flag ) slice_disable_bdof_dmvr_flag u(1) s¡( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 && !pps_max_num_merge_cand_minus_max_num_triangle_cand_m¡nus1 && WPDisabled) {max_num_merge_cand_minus_max_num_triangle_cand ue(v)}} if (sps_ibc_enabled_flag) slice_s ¡x_m¡nus_max_num_¡bc_merge_cand ue(v) s¡( spsjoint_cbcr_enabled_flag ) slicejoint_cbcr_sign_flag u(1) slice_qp_delta se(v) s¡( pps_sl¡ce_chroma_qp_offsets_present_flag) {slice_cb_qp_offset se(v) s I i ce_c r_q p_of f set se(v) s¡( spsjoint_cbcr_enabled_flag) slicejoint_cbcr_qp_offset se(v)} s¡( sps_sao_enabled_flag ) {slice_saojuma_flag u(1) s¡( ChromaArrayType != 0 ) slice_sao_chroma_flag u(1)} yes! ( sps_alf_enabled_flag) {slice_alf_enabled_flag u(1) s¡( slice_alf_enabled_flag ) {slice_num_alf_aps_ids_luma u(3) for (i = 0; i < slice_num_alf_aps_¡ds_luma; i++ ) slice_alf_aps_id_luma[ i ] u(3) s¡( Chrom aArrayType != 0 ) slice_alf_chroma_idc u(2) s¡( slice_alf_chromajdc) slice_alf_aps_id_chroma u(3)}} if (!pps_dep_quant_enabled_flag) dep_quant_enabled_flag u(1) s¡( !dep_quant_enabled_flag) sign_data_hiding_enabled_flag u(1) s¡( deblock ing_filter_override_flag ) deblocking_filter_override_flag u( 1) s¡( deblocking_f¡lter_override_flag ) {slice_deblocking_filter_disabled_flag u(1) s¡( !slice_deblock¡ng_filter_d¡sabled_flag ) {if ice_beta_offset_d i v2 se(v) if ice_tc_off set_d i v2 se(v)}} ΜΛ / t / ZUZZ / U ί Ί Z4Ó s¡( sps_lmcs_enabled_flag) {slice_lmcs_enabled_flag u(1) s¡( slice_lmcs_enabled_flag) {slice_lmcs_aps_id u(2) s¡( ChromaArrayType != 0 ) slice_chroma_residual_scale_flag u(1)}} s¡( sps_scaling_list_ enabled_flag ) {slice_scaling_list_present_flag u(1) yes! ( slice_scal¡ng_l¡st_present_flag ) slice_scal¡ng_l¡st_aps_¡d u(3)} if( entry_point_offsets_present_flag && NumEntryPoints > 0 ) {offset_len_minus1 ue(v) for (i = 0; i < NumEntryPoints; Í++ ) entry_point_offset_minus1[ i ] u(v)} s¡( slice_header_extension_present_flag) {slice_header_extension_length ue(v) for (i = 0; i < slice_header_extension_length; i++) slice_header_extension_data_byte[ i ] u(8)} byte_alignment()} The variable WPDisabled is set equal to 1 when all values of luma_weightJO_flag[ i ], chroma_weight_IO_flag[ i ], luma_weightJ1_flag[ j ] and chroma_weight_H_flag[ j ] are set to zero, the value of i =0 .. NumRefldxActive[ 0 ]; and the value of j=0.. NumRefldxActive[ 1 ]; otherwise, the value of WPDisabled is set equal to 0. When the variable WPDisabled is set equal to 0, the value of max_num_merge_cand_minus_max_num_tr¡angle_cand is set equal to MaxNumMergeCand In the embodiment described above the weighted prediction parameters may be noted in either an image header or a segment header. In one example, the determination of whether a TPM or GEO is enabled is made with consideration of the reference image lists that a block can use for non-rectangular weighted prediction. When a blend list for a block contains elements from only a reference image list k, a WPDisabled[k] variable value determines whether this blend mode is enabled or not. In one example, the fusion list for the inter-non-rectangular prediction mode is constructed in such a way that it contains only elements for which weighted prediction is not enabled. The following part of the specification exemplifies this example: The inputs to this process are: a luma location ( xCb, yCb ) of the top-left sampler of the current luma encoding block relative to the top-left luma sampler of the current image, a variable cbWidth that specifies the width of the current encoding block in luma samples, a variable cbHeight that specifies the height of the current encoding block in luma samples. The results of this process are as follows, with X being 0 or 1: the availability labels availableFlagAo, availableFlagAi, availableFlagBo, availableFlagBi and availableFlagB2 of the neighboring coding units, the reference indices refldxLXAo, refldxLXAi, refldxLXBo, refldxLXBi and refldxLXB2 of the neighboring coding units, the utilization labels of the prediction list predFlagLXAo, predFlagLXAi, predFlagLXBo, predFlagLXBi and predFlagLXB2of the neighboring coding units, the motion vectors with a fractional sample precision of 1 / 16 mvLXAo, mvLXAi, mvLXBo, mvLXBi and mvLXB2of the neighboring coding units, the mean interpolation filter indices shows hpelIfldxAo, hpelIfldxAi, hpelIfldxBo, hpelIfldxBi, and hpellfldxB2, the bi-prediction weight indices bcwldxAo, bcwldxAi, bcwldxBo, bcwldxBi, and bcwldxB2. For the derivation of availableFlagBi, refldxLXBi, predFlagLXBi, mvLXBi, hpelIfldxBi and bcwldxBi the following applies: The luma location (xNbBi,yNbBi) within the neighboring luma encoding block is set equal to (xCb + cbWidth - 1, yCb - 1). The bypass process for neighbor block availability as specified in clause 6.4.4 is invoked with the current luma location (xCurr, yCurr) equal to (xCb, yCb), ΜΛ / t / ZUZZ / U ί 1Z4Ó the neighboring luma location (xNbBi, yNbBi ), checkPredModeY equal to TRUE, and cldx equal to 0 as inputs, and the output is assigned to the block availability flag availableBi. The variables availableFlagBi, refldxLXBi, predFlagLXBi, mvLXBi, hpelIfldxBi, and bcwldxBi are derived as follows: - If availableBi equals FALSE, availableFlagBi is set equal to 0, both components of mvLXBi are set equal to 0, refldxLXBi is set equal to -1, and predFlagLXBi is set equal to 0, with set equal to 0, and bcwldxBi is set equal to 0. - Otherwise, availableFlagBi is set equal to 1 and the following are performed ΜΛ / í 1 or assignments: mvLXBi = MvLX[ xNbBi ][ yNbBi ](501) refldxLXBi = RefldxLX[ xNbBi ][ yNbB! ](502) predFlagLXBi = PredFlagLX[ xNbBi ][ yNbBi ](503) hpellfIdxBi = Hpellfldx[ xNbBi ][ yNbBi ](504) bcwldxBi = Bcwldx[ xNbBi ][ yNbBi ](505) For the derivation of availableFlagAi, refldxLXAi, predFlagLXAi, mvLXAi, hpellfldxAi and bcwldxAi the following applies: The luma location (xNbAi,yNbAi ) within the neighboring luma encoding block is set equal to ( xCb - 1, yCb + cbHeight - 1 ). The bypass process for neighbor block availability as specified in clause 6.4.4 is invoked with the current luma location ( xCurr, yCurr) set equal to ( xCb, yCb ). the neighboring luma location ( xNbAi, yNbAi ), checkPredModeY set equal to TRUE, and cldx set equal to 0 as inputs, and the output is mapped to the block availability flag availableAi. The variables availableFlagAi, refldxLXAi, predFlagLXAi, mvLXAi, hpelIfldxAi and bcwldxAi are derived as follows: - If one or more of the following conditions are true, availableFlagAi is set equal to 0, both components of mvLXAi are set equal to 0, refldxLXAi is set equal to -1, and predFlagLXAi is set equal to 0, with X being 0 or 1 , hpelIfldxAi is set equal to 0, and bcwldxAi is set equal to 0: - availableAi is equal to FALSE. - availableBi is equal to TRUE and the luma locations (xNbAi, yNbAi ) and ( xNbBi, yNbBi ) have the same motion vectors and reference indices. - WPDisabledX[ RefldxLX[ xNbAi ][ yNbAi ] ] is set to 0 and the blending mode is not rectangular (e.g. triangular label is set equal to 1 for the block at the current luma location ( xCurr, yCurr)) - WPDisabledX[ RefldxLX[ xNbBi ][ yNbBi ] ] is set to 0 and the blending mode is not rectangular (e.g. triangular label is set equal to 1 for the block at the current luma location (xCurr, yCurr)) - Otherwise, availableFlagAi is set equal to 1 and the following assignments are made: mvLXAi = MvLX[ xNbAi ][ yNbAi ](506) refldxLXAl = RefldxLX[ xNbAi ][ yNbAi ](507) predFlagLXAi = PredFlagLX[ xNbAi ][ yNbAi ](508) hpellfIdxAi = Hpellfldx[ xNbAi ][ yNbA! ](509) bcwldxAi = Bcwldx[ xNbAi ][ yNbAi ](510) For the derivation of availableFlagBo, refldxLXBo, predFlagLXBo, mvLXBo, hpelIfldxBo and bcwldxBo the following applies: The luma location (xNbBo, yNbBo) within the neighboring luma encoding block is set equal to ( xCb + cbWidth, yCb - 1 ). The derivation process for neighbor block availability as specified in clause 6.4.4 is invoked with the current luma location (xCurr, yCurr) set equal to (xCb, yCb), the neighbor luma location (xNbBo, yNbBo), checkPredModeY set equal to TRUE, and cldx set equal to 0 as inputs, and the output is assigned to the block availability flag availableBo. The variables availableFlagBo, refldxLXBo, predFlagLXBo, mvLXBo, hpelIfldxBo, and bcwldxBo are derived as follows: - If one or more of the following conditions are true, availableFlagBo is set equal to 0, both components of mvLXBo are set equal to 0, refldxLXBo is set equal to -1, and predFlagLXBo is set equal to 0, with X being 0 or 1, hpelIfldxBo is set equal to 0, and bcwldxBo is set equal to 0: - availableBo is equal to FALSE. - availableBi is equal to TRUE and the luma locations (xNbBi, yNbBi ) and ( xNbBo, yNbBo ) have the same motion vectors and reference indices. - WPDisabledX[ RefldxLX[ xNbBo ][ yNbBo ] ] is set to 0 and the blending mode is not rectangular (e.g. triangular label is set equal to 1 for the block at the current luma location ( xCurr, yCurr)) WPDisabledX[ RefldxLX[ xNbBi ][ yNbBi ] ] is set to 0 and the blend mode is not rectangular (e.g. triangular label is set equal to 1 for the block at the current luma location ( xCurr, yCurr)) - Otherwise, availableFlagBo is set equal to 1 and the following assignments are made: mvLXBo = MvLX[ xNbBo ][ yNbB0 ] (511) refldxLXBo = RefldxLX[ xNbBo ][ yNbBo ] (512) predFlagLXBo = PredFlagLX[ xNbBo ][ yNbBo ] (513) hpelIfIdxBo = Hpellfldx[ xNbBo ][ yNbBo ] (514) bcwldxBo = Bcwldx[ xNbBo ][ yNbBo ] (515) For the derivation of availableFlagAo, refldxLXAo, predFlagLXAo, mvLXAo, hpelIfIdxAo and bcwldxAo the following applies: The luma location (xNbAo, yNbAo) within the neighboring luma encoding block is set equal to (xCb - 1, yCb + cbWidth). The bypass process for neighbor block availability as specified in clause 6.4.4 is invoked with the current luma location ( xCurr, yCurr) set equal to ( xCb, yCb ). the neighboring luma location ( xNbAo, yNbAo), checkPredModeY set equal to TRUE, and cldx set equal to 0 as inputs, and the output is mapped to the block availability flag availableAo. The variables availableFlagAo, refldxLXAo, predFlagLXAo, mvLXAo, hpelIfIdxAo and bcwldxAo are derived as follows: - If one or more of the following conditions are true, availableFlagAo is set equal to 0, both components of mvLXAo are set equal to 0, refldxLXAo is set equal to -1, and predFlagLXAo is set equal to 0, with X being 0 or 1, hpelifldxAo is set equal to 0, and bcwldxAo is set equal to 0: - availableAo is equal to FALSE. - availableAi is equal to TRUE and the luma locations (xNbAi, yNbAi ) and ( xNbAo, yNbAo ) have the same motion vectors and reference indices. - WPDisabledX[ RefldxLX[ xNbAo ][ yNbAo ] ] is set to 0 and the blending mode is not rectangular (e.g. triangular label is set equal to 1 for the block at the current luma location ( xCurr, yCurr)) - WPDisabledX[ RefldxLX[ xNbAi ][ yNbAi ] ] is set to 0 and the blending mode is not rectangular (e.g. triangular label is set equal to 1 for the block at the current luma location ( xCurr, yCurr)) - Otherwise, availableFlagAo is set equal to 1 and the following assignments are made: bc wldxAo = Bcwldx[ xNbAo ][ yNbAo ](520) For the derivation of availableFlagB2, refldxLXB2, predFlagLXB2, mvl_XB2, hpelIfldxB2 and bcwldxB2 the following applies: The luma location (xNbB2, yNbB2) within the neighboring luma encoding block is set equal to (xCb - 1, yCb - 1). The derivation process for neighbor block availability as specified in clause 6.4.4 is invoked with the current luma location (xCurr, yCurr) set equal to (xCb, yCb), the neighbor luma location (xNbB2, yNbB2), checkPredModeY set equal to TRUE, and cldx set equal to 0 as inputs, and the output is assigned to the block availability flag availableB2. The variables availableFlagB2, refldxLXB2, predFlagLXB2, mvLXB2, hpelIfldxB2, and bcwldxB2 are derived as follows: - If one or more of the following conditions are true, availableFlagB2 is set equal to 0, both components of mvLXB2 are set equal to 0, refldxLXB2 is set equal to -1, and predFlagLXB2 is set equal to 0, with X being 0 or 1, hpellfldxB2 is set equal to 0, and bcwldxB2 is set equal to 0: - availableB2 is equal to FALSE. - availableAi is equal to TRUE and the luma locations (xNbAi, yNbAi ) and ( xNbB2, yNbB2 ) have the same motion vectors and reference indices. - availableBi is equal to TRUE and the luma locations (xNbBi, yNbBi) and (xNbB2, yNbB2) have the same motion vectors and reference indices. - availableFlagAo + availableFlagAi + availableFlagBo + availableFlagBi is equal to 4. - WPDisabledX[ RefldxLX[ xNbBi ][ yNbBi ] ] is set to 0 and the blend mode is not rectangular (e.g. triangle label is set equal to 1 for the block at the current luma location ( xCurr, yCurr)) - WPDisabledX[ RefldxLX[ xNbB2][ yNbB2] ] is set to 0 and the blend mode is not rectangular (e.g. triangle label is set equal to 1 for the block at the current luma location ( xCurr, yCurr)) - Otherwise, availableFlagB2 is set equal to 1 and the following assignments are made: mvLXB2= MvLX[ xNbB2][ yNbB2] (521) refldxLXB2= RefldxLX[ xNbB2][ yNbB2] (522) ΜΛ / t / ZUZZ / U ί 1Z4Ó predFlagLXB2= PredFlagLX[ xNbB2][ yNbB2](523) hpellfldxB2= Hpellfldx[ xNbB2][ yNbB2](524) bcwldxB2= Bcwldx[ xNbB2][ yNbB2](525) In the examples described above the following variable definition is used: The variable WPDisabledO[i] is set equal to 1 when all values of luma_weight_IO_flag[ i ] and chroma_weight_IO_flag[ i ] are set to zero, the value of i =0 .. NumRefldxActive[ 0]. Otherwise, the value of WPDisabled0[¡] is set equal to 0. The variable WPDisabled1[¡] is set equal to 1 when all values of Iuma_weight_l1_flag[ i ] and chroma_weightJ1_flag[ i ] are set to zero, the value of i =0 .. NumRefldxActive[ 1]. Otherwise, the value of WPDisabledl[1] is set equal to 0. In another example, the SliceMaxNumTriangleMergeCand variable is defined in the slice header according to one of the following: SliceMaxNumTriangleMergeCand = (lumaWeightedFlag || chromaWeightedFlag) ? 0 : MaxNumTriangleMergeCand ; SliceMaxNumTriangleMergeCand = (lumaWeightedFlag || chromaWeightedFlag) ? 1 : MaxNumTriangleMergeCand ; SliceMaxNumTriangleMergeCand = slice_weighted_pred_flag ? 0: MaxNumTriangleMergeCand ; either SliceMaxNumTriangleMergeCand = slice_weighted_pred_flag ? 1 MaxNumTriangleMergeCand M A / IZ / ¿U¿¿ / U í 1 The value of SliceMaxNumTriangleMergeCand is additionally used in the analysis of merge information at the block level. An example syntax is provided in the table below: merge_data( xO, yO, cbWidth, cbHeight, chType ) {Descriptor if ( CuPredMode[ chType ][ xO ][ yO ] == MODEJBC ) {s¡( MaxNumlbcMergeCand > 1 ) merge_idx[ xO ][ yO ] ae(v)} else {s¡( MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8 ) mergesubblockflag[ xO ][ yO ] ae(v) s¡( merge_subblock_flag[ xO ][ yO ] = = 1 ) {s¡( MaxNumSubblockMergeCand > 1 ) merge_subblock_idx[ xO ][ yO ] ae(v) } else {s¡( ( cbWidth * cbHeight) >= 64 && ( (sps_ciip_enabled_flag && cu_skip_flag[ xO ][ yO ] = = 0 && cbWidth < 128 && cbHeight < 128) | | (sps_triangle_enabled_flag && SliceMaxNumTriangleMergeCand > 1 && slice _type = = B ))) regular_merge_flag[ xO ][ yO ] ae(v) if (regular_merge_flag[ xO ][ yO ] = = 1 ){s¡( sps_mmvd_enabled_flag) mmvd_merge_flag[ xO ][ yO ] ae(v) if( mmvd_merge_flag [ xO ][ yO ] = = 1 ) {s¡( MaxNumMergeCand > 1 ) mmvd_cand_flag[ xO ][ yO ] ae(v) mmvd_distance_idx[ xO ][ yO ] ae(v) mmvd_direction_idx[ xO ][ yO ] ae(v )} else {s¡( MaxNumMergeCand > 1 ) merge_idx[ xO ][ yO ] ae(v)}} otherwise {s¡( sps_ciip_enabled_flag && sps_triangle_enabled_flag && SliceMaxNumTriangleMergeCand > 1 && weightedPredFlag = = 0 && slicejype = = B && cu_skip_flag[ xO ][ yO ] = = 0 && (cbWidth * cbHeight) >= 64 && cbWidth < 128 && cbHeight < 128) {ciip_flag[ xO ][ yO ] ae(v) s¡( cüpjlag[ xO ][ yO ] && MaxNumMergeCand > 1 ) merge_idx[ xO ][ yO ] ae(v) s¡( !ciip_flag[ xO ][ yO ] && SliceMaxNumTriangleMergeCand > 1 ) {mergetrianglesplitdirj xO ][ yO ] ae(v) mergetriangleidxOj xO ][ yO ] ae(v) merge_triangle_idx1 [ xO ][ yO ] ae(v)}}}}} ΜΛ / t / ZUZZ / U ί 1Z4Ó For cases where the inter-non-rectangular prediction mode is a GEO mode, the following examples are further described. Different mechanisms can be used to allow control of the GEO / TPM fusion modes, depending on whether WP is applied to the reference images where the reference blocks PO and P1 are taken from, namely: Move the WP parameters listed in Table 14 from SH to PH; Move GEO parameters from PH to SH; Change the semantics of MaxNumGeoMergeCand, for example by setting MaxNumGeoMergeCand equal to 0 or 1 for such segments when reference images with WP can be used (for example, where at least one of the lumaWeightedFlag or tags is equal to true). For the GEO fusion mode, the exemplary reference blocks PO and P1 are denoted by 810 and 820 in FIGURE 8, respectively. In an example, when WP parameters and enabling non-rectangular modes (e.g. GEO and TPM) are noted in the image header, the following syntax can be used, as shown in the table below: Table - Image Header RBSP Syntax picture_header_rbsp() {Descriptor non_reference_picture_flag u(1) gdr_pic_flag u(1) no_output_of_prior_pics_flag u(1) s¡( gdr_pic_flag ) recovery_poc_cnt ue(v) ph_pic_parameter_set_¡d ue(v) s¡( sps_poc_msb_flag ) {ph_poc_msb_present_flag u(1) s¡( ph_poc_msb_present_flag ) poc_msb_val u(v)} pic_rpl_present_flag u(1) s¡( pic_rpl_present_flag ) {for (i = 0; i < 2; i++ ) {s¡( num_ref_p¡c_l¡sts_in_sps[ i ] > 0 && !pps_ref_pic_l¡st_spsjdc[ i ] && (==0||(¡==1 && rpl1_idx_present_flag ))) pic_rpl_sps_flag[ i ] u(1) s¡( pic_rpl_sps_flag[ i ]) {if( num_ref_pic_listsjn_sps[ i ] > 1 && (==0||(¡==1 && rpl1Jdx_present_flag ))) pic_rpl_idx[ i ] u(v)} else ref_picjist_struct( i , num_ref_p¡c_listsjn_sps[ i ]) for( j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {if( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) pic_poc_lsb_lt[ i ][ j ] u(v) pic_delta_poc_msb_present_flag[ i ][ j ] u(1) si( pic_delta_poc_msb_presentjlag[ i ][j ]) pic_delta_poc_msb_cycle_lt[ i ][ j ] ue(v)}}} s¡( ( pps_weighted_pred_flag && slice_type = = P ) eleven ΜΛ / t / ZUZZ / U ί Ί Z4Ó ( pps_weighted_bipred_flag && slice_type = = B )) pred_weight_table() s¡( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 && !pps_max_num_merge_cand_minus_max_num_tr¡angle_cand_plus1 && WPDisabled) pic_max_num_merge_cand_minus_max_num_triangle _cand ue(v) rbsp_trailing_bits()} ΜΛ / t / ZUZZ / U í Ί Z4Ó The variable WPDisabled is set equal to 1 when all values of luma_weight_IO_flag[ i ], chroma_weight_IO_flag[ i ], Iuma_weight_l1_flag[ j ] and chroma_weightJ1 Jlag[ j ] are set to zero, the value of i =0 .. NumRefldxActive[ 0 ] ; and the value of j=0.. NumRefldxActive[ 1 ]; otherwise, the value of WPDisabled is set equal to 0. When the WPDisabled variable is set equal to 0, the value of pic_max_num_merge_cand_minus_max_num_geo_cand is set equal to MaxNumMergeCand. In another example, pic_max_num_merge_cand_minus_max_num_geo_cand is set equal to MaxNumMergeCand - 1. In one example, signaling WP parameters and enabling non-rectangular modes (e.g. GEO and TPM) is done in the segment header. An example syntax is provided in the table below: slice_header() {Descriptor slice_pic_order_cnt_lsb u(v) s¡( subpics_present_flag) slice_subpic_id u(v) s¡( rect slice flag | | NumTilesInPic > 1 ) slice_address u(v) s¡( !rect_slice_flag && NumTilesInPic > 1 ) num_tiles_in_slice_minus1 ue ( v) slice_type ue(v) s¡( !pic_rpl_present_flag &&( ( nal_unit_type != IDR_W_RADL && nal_unit_type != IDR_N_LP ) | | sps_idr_rpl_present_flag )) {for (i = 0; i < 2; i++ ) {s¡( num_ref_p¡c_listsjn_sps[ i ] > 0 && ! pps_ref_pic_list_spsjdc[ i ] && (i == 0 1 1 (i = = 1 && rpl1_idx_present_flag ))) slice_rpl_sps_flag[ i ] u(1) s¡( slice_rpl_sps_flag[ i ]) {si( num_ref_pic_listsjn_sps[ i ] > 1 && ( == 0 | | (i = = 1 && rpl1_idx_present_flag ))) slice_rpl_idx[ i ] u(v)} otherwise ref_pic_list_struct( i, num_ref_p¡c_listsjn_sps[ i ]) for( j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {s¡( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) slice_poc_lsb_lt[ i ][ j ] u(v) slice_delta_poc_msb_present_flag[ i ][j ] u(1) if( slice_delta_poc_msb_present_flag[ i ][ j ]) slice_delta_poc_msb_cycle_lt[ i ][ j ] ue(v)}}} s¡( pic_rpl_present_flag | | (( nal_unit_type != IDR_W_RADL && nal_unit_type != IDR_N_LP ) | | sps_idr_rpl_present_flag )) {s¡( ( slice_type != I && num_ref_entries[ 0 ][ Rplsldx[ 0 ] ] > 1 ) ( slicejype = = B && num_ref_entries[ 1 ][ Rplsldx[ 1 ] ] > 1 )) {num_ref_idx_active_override_flag u(1) s¡( num_refjdx_active_overr¡of_flag ) for( i = 0; i < (slice_type = = B ? 2:1 ); Í++ ) s¡( num_ref_entries[ i ][ Rplsldx[ i ] ] > 1 ) num_ref_idx_active_minus1[ i ] ue(v)}} s¡( slice_type != I) {s¡( cabac_init_present_flag) cabac_init_flag u(1) s¡( pic_temporal_mvp_enabled_flag ) {s¡( slice_type = = B && !pps_collocated_from_IOJdc ) collocated_from_IO_flag u(1) s¡( ( collocatedJrom_IO_flag && NumRefldxActive[ 0 ] > 1)11 (!collocated_from_IO_flag && NumRefldxActive[ 1 ] > 1 )) collocated_ref_idx ue(v)} if (slice_weighted_pred_flag) pred_weight_table() s¡( !pps_six_minus_max_num_ merge_cand_plus1 ) sixminusmaxnummergecand ue(v) s¡( sps_affine_enabled_flag && !pps_five_minus_max_num_subblock_merge_cand_plus1 ) five_minus_max_num_subblock_merge_cand ue(v) s¡( sps_fpel_mmvd_enabled_flag) slice_fpel_mmvd_enabled_flag u(1) s¡( sps_bdof_dmvr_slice_ present_flag) slice_disable_bdof_dmvr_flag u(1) s¡( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 && !pps_max_num_merge_cand_minus_max_nunn_tr¡angle_cand_m¡nus1 && WPDisabled) { maxnummergecandminusmaxnumgeocand ue(v)}} slice_qp_delta se(v) s¡( pps_slice_chroma_qp_offsets_present_flag ) {slice_cb_qp_offset se(v) s I i ce_c r_q p_of f set se(v) s¡( sps_joint_cbcr_enabled_flag) slicejoint_cbcr _qp_offset se(v)} s¡( pps_cu_chroma_qp_offset_list_enabled_flag ) cu_chroma_qp_offset_enabled_flag u(1) s¡( sps_sao_enabled_flag && !pic_sao_enabled_present_flag ) {slice_sao_luma_flag u(1) s¡( ChromaArrayType != 0 ) slice_sao_chroma_flag u(1)} s¡( sps_alf_enabled_flag && !pic_alf_enabled_present_flag ) {slice_alf_enabled_flag u(1) s! ( slice_alf_enabled_flag) {slice_num_alf_aps_ids_luma u(3) for (i = 0; i < sl¡ce_num_alf_apsjds_luma; i++ ) slice_alf_aps_id_luma[ i ] u(3) s¡( ChromaArrayType != 0 ) slice_alf_chroma_idc u(2) s¡( slice_ alf_chroma_idc) slice_alf_aps_id_chroma u(3)}} s¡( deblocking_f¡lter_override_enabled_flag && !pic_deblocking_f¡lter_overr¡de_present_flag ) slice_deblocking_filter_override_flag u(D ΜΛ / t / ZUZZ / U ί Ί Z4Ó s¡( sl¡ce_deblock¡ng_filter_overr¡de_flag ) {slice_deblocking_f¡lter_d¡sabled_flag u(1) s¡( !slice_deblocking_f¡lter_d¡sabled_flag) {if ice_beta_offset_d i v2 se(v) if ice_tc_off set_d i v2 se(v)}} s¡( entry_point_offsets_present_flag && NumEntryPoints > 0 ) {offset_len_minus1 ue(v) for (i = 0; i < NumEntryPoints; Í++ ) entry_point_offset_minus1[ i ] u(v)} s¡( slice_header_extension_present_flag) {slice_header_extension_length ue(v) for (i = 0; i < slice_header_extension_length; i++) slice_header_extension_data_byte[ i ] u(8)} byte_alignment()} ΜΛ / t / ZUZZ / U í Ί Z4Ó The variable WPDisabled is set equal to 1 when all values of luma_weightJO_flag[ i ], chroma_weight_IO_flag[ i ], luma_weightJ1_flag[ j ] and chroma_weight_H_flag[ j ] are set to zero, the value of i =0 .. NumRefldxActive[ 0 ]; and the value of j=0.. NumRefldxActive[ 1 ]; otherwise, the value of WPDisabled is set equal to 0. When the WPDisabled variable is set equal to 0, the value of max_num_merge_cand_minus_max_num_geo_cand is set equal to MaxNumMergeCand. In another embodiment, when the WPDisabled variable is set equal to 0, the value of max_num_merge_cand_minus_max_num_geo_cand is set equal to MaxNumMergeCand -1. In the examples above, the weighted prediction parameters can be noted in either the image header or a segment header. In other embodiments, the SliceMaxNumGeoMergeCand variable is defined in the slice header according to one of the following: SliceMaxNumGeoMergeCand = (lumaWeightedFlag || chromaWeightedFlag) ? 0: MaxNumGeoMergeCand ; SliceMaxNumGeoMergeCand = (lumaWeightedFlag || chromaWeightedFlag) ? 1 : MaxNumGeoMergeCand ; SliceMaxNumGeoMergeCand = slice_weighted_pred_flag ? 0 : MaxNumGeoMergeCand ; or SliceMaxNumGeoMergeCand = slice_weighted_pred_flag ? 1 : MaxNumGeoMergeCand Different modalities use different cases listed above. The value of the SliceMaxNumGeoMergeCand variable is additionally used in the analysis of merge information at the block level. An example syntax is provided in the table below: ΜΛ / t / ZUZZ / U í 1Z4Ó 7.3.9.7 Fusion Data Syntax merge_data( xO, yO, cbWidth, cbHeight, chType ) {Descriptor s¡( CuPredMode[ chType ][ xO ][ yO ] == MODE_IBC) {s¡( MaxNumlbcMergeCand > 1 ) mergejdx[ xO ][ yO ] ae(v)} else {s¡( MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8) mergesubblockflag[ xO ][ yO ] ae(v) s¡( merge_subblock_flag[ xO ][ yO ] = = 1 ) {s¡ ( MaxNumSubblockMergeCand > 1 ) merge_subblockjdx[ xO ][ yO ] ae(v)} else {if( (sps_ciip_enabled_flag && cu_skip_flag[ xO ][ yO ] = = 0 && (cbWidth * cbHeight) >= 64 && cbWidth < 128 && cbHeight < 128) | | (sps_geo_enabled_flag && SliceMaxNumGeoMergeCand > 1 && cbWidth>=8 && cbHeight >=8 && slicejype = = B regular_mergejlag[ xO ][ yO ] ae(v) s¡( regular_mergejlag[ xO ][ yO ] = = 1 ) {s¡( sps_mmvd_enabledjlag) mmvd_mergejlag[ xO ][ yO ] ae(v) 100 if( mmvd_merge_flag[ xO ][ yO ] = = 1 ) {s¡( MaxNumMergeCand > 1 ) mmvd_cand_flag[ xO ][ yO ] ae(v) mmvd_distance_idx[ xO ][ yO ] ae(v) mmvd_direction_idx[ xO ][ yO ] ae(v)} else if( MaxNumMergeCand > 1 ) mergeidx[ xO ][ yO ] ae(v)} else {s¡( sps_ciip_enabled_flag && sps_geo_enabled_flag && SliceMaxNumGeoMergeCand > 1 && slice_type = = B && cu_skip_flag[ xO ] [ yO ] = = 0 && cbWidth >= 8 && cbHeight >= 8 && cbWidth < 128 && cbHeight < 128) ciip_flag[ xO ][ yO ] ae(v) s¡( ciip_flag[ xO ][ yO ] && MaxNumMergeCand > 1 mergeidx[ xO ][ yO ] ae(v) s¡( !ciip_flag[ xO ][ yO ] && SliceMaxNumGeoMergeCand > 1 ) {merge_geo_partition_idx[ xO ][ yO ] ae(v) mergegeoidxO[ xO ][ yO ] ae(v) s¡( SliceMaxNumGeoMergeCand > 2 ) mergegeoidxl [ xO ][ yO ] ae(v)}}}}} The semantics of the related image header are as follows: pic_max_num_merge_cand_minus_max_num_geo_cand specifies the maximum number of geo merge mode candidates supported in segments associated with the image header subtracted from MaxNumMergeCand. ΜΛ / t / ZUZZ / U ί 1Z4Ó 101 When pic_max_num_merge_cand_minus_max_num_geo_cand is not present, and sps_geo_enabled_flag is equal to 1 and maxnummercand greater than or equal to 2, pic_max_num_merge_cand_minus_max_num_geo_cand it is inferred that it is equal to pps_max_num_num_merge um_geo_cand_plus1 - 1. The maximum number of geo merge mode candidates, MaxNumGeoMergeCand is derived as follows: MaxNumGeoMergeCand = MaxNumMergeCand p¡c_max_num_merge_cand_minus_max_num_geo_cand When pic_max_num_merge_cand_minus_max_num_geo_cand is present, the value of MaxNumGeoMergeCand will be in the range 2 to MaxNumMergeCand, inclusive. When pic_max_num_merge_cand_minus_max_num_geo_cand is not present, and (sps_geo_enabled_flag is equal to 0 or MaxNumMergeCand is less than 2), MaxNumGeoMergeCand is set equal to 0. When MaxNumGeoMergeCand is equal to 0, geo merge mode is not allowed for segments associated with the PH. In the following examples, various aspects related to signaling are considered. Namely, these aspects are as follows: Syntax elements related to the number of merge mode candidates () are noted in the sequence parameter set (SPS), making it possible for particular implementations to derive the number of merge mode candidates non- rectangular (MaxNumGeoMergeCand) at SPS level; The PH could be noted in SH, when an image comprises only one segment; Define a PH / SH parameter override mechanism with the following: PPS tags that specify whether a syntax element from a related coding tool is present in either PH or SH (but not both). Particularly, the reference image list and the weighted prediction table could use this mechanism the prediction weight table, a fifth type of data that can be noted in the PH or SH (such as ALF, unlock, RPL, and SAO) ; when weighted prediction is enabled for an image, all image segments will be required to have the same reference image lists; Inter- and intra-related syntax elements are conditionally flagged if only certain types of segments are used in the image associated with the PH. In particular, two tags, pic_inter_sl¡ce_present_flag and picjntra_slice_present_flag are introduced. In one example, syntax elements related to the number of candidates for the ΜΛ / t / ZUZZ / U ί 1Z4Ó 102 merge mode () are noted in the sequence parameter set (SPS), making it possible for particular implementations to derive the number of non-rectangular mode merge candidates (MaxNumGeoMergeCand) at the SPS level. This aspect could be implemented by encoding or decoding process based on the following syntax. 7.3.2.3 RBSP Stream Parameter Set Syntax seq_parameter_set_rbsp() {Descriptor sps_decoding_parameter_set_id u(4) sps_video_parameter_set_id u(4) sps_max_sublayers_minus1 u(3) sps_reserved_zero_4bits u(4) sps_ptl_dpb_hrd_params_present_flag u(1) s¡( sps_ptl_dpb_hrd_ params_present_flag) profile_tier_level( 1, sps_max_sublayers_minus1 ) gdr_enabled_flag u(1) sps_seq_parameter_set_id u(4 ) sps_sbt_enabled_flag u(1) sps_affine_enabled_flag u(1) s¡( sps_affine_enabled_flag) {sps_aff i ne_type_f lag u(1) sps_affine_amvr_enabled_flag u(1) sps_aff i ne_prof_enabled_f lag u(1) s¡( sps_affine_prof _enabled_flag ) sps_prof_pic_present_flag u(1)} s ( chromajormatjdc = = 3 ) {sps_palette_enabled_flag u(1) sps_act_enabled_flag u(1)} sps_bcw_enabled_flag u(1) sps_ibc_enabled_flag u(1) sps_ciip_enabled_flag u(1) 103 s¡( sps_mmvd_enabled_flag) sps_fpel_mmvd_enabled_flag u(1) sps_geo_enabled_flag u(1) sps_six_minus_max_num_merge_cand_plus1 ue(v) yes (sps_geo_enabled_flag) sps_max_num_merge_cand_minus_max_num_geo_cand_plus1 ue (v) sps_lmcs_enabled_flag u(1) sps_lfnst_enabled_flag u(1) sps_ladf_enabled_flag u(1) ΜΛ / t / ZUZZ / U ί Ί Z4Ó The syntax described above has the following semantics. sps_six_minus_max_num_merge_cand_plus1 equal to 0 specifies that pic_six_minus_max_num_merge_cand is present in the PHs that refer to the PPS. sps_six_minus_max_num_merge_cand_plus1 greater than 0 specifies that pic_six_minus_max_num_merge_cand is not present in PHs referring to the PPS. The value of sps_six_minus_max_num_merge_cand_plus1 will be in the range 0 to 6, inclusive. sps_max_num_merge_cand_minus_max_num_geo_cand_plus1 equal to 0 specifies that pic_max_num_merge_cand_minus_max_num_geo_cand is present in the PHs of segments that refer to the PPS. sps_max_num_merge_cand_minus_max_num_geo_cand_plus1 greater than 0 specifies that pic_max_num_merge_cand_minus_max_num_geo_cand is not present in PHs referring to the PPS. The value of sps_max_num_merge_cand_minus_max_num_geo_cand_plus1 will be in the range 0 to MaxNumMergeCand - 1. The semantics of the corresponding PH elements are as follows: pic_s¡x_m¡nus_max_num_merge_cand specifies the maximum number of merge motion vector prediction (MVP) candidates supported in the associated segments with the PH subtracted from 6. The maximum number of merge MVP candidates, MaxNumMergeCand is derives as follows: MaxNumMergeCand = 6 - pic_s¡x_m¡nus_max_num_merge_cand The value of MaxNumMergeCand will be in the range 1 to 6, inclusive. When not present, the value of pic_six_minus_max_num_merge_cand is inferred to be equal to sps_six_minus_max_num_merge_cand_plus1 - 1. p¡c_max_num_merge_cand_minus_max_num_geo_cand specifies the maximum number of geo merge mode candidates supported in the segments associated with the 104 image header subtracted from MaxNumMergeCand. When sps_max_num_merge_cand_minus_max_num_geo_cand is not present, and sps_geo_enabled_flag is equal to 1 and MaxNumMergeCand greater than or is equal to 2, pic_max_num_merge_cand_minus_max_num_geo_cand is inferred to be equal to sps_max_num_merge_cand_minus_max_num_geo_candj3lus1 - 1. The maximum number of geo merge mode candidates, MaxNumGeoMergeCand is derived as follows: MaxNumGeoMergeCand = MaxNumMergeCand pic_max_num_merge_cand_minus_max_num_geo_cand When pic_max_num_merge_cand_minus_max_num_geo_cand is present, the value of MaxNumGeoMergeCand will be in the range 2 to MaxNumMergeCand, inclusive. When pic_max_num_merge_cand_minus_max_num_geo_cand is not present, and (sps_geo_enabled_flag is equal to 0 or MaxNumMergeCand is less than 2), MaxNumGeoMergeCand is set equal to 0. When MaxNumGeoMergeCand is equal to 0, geo merge mode is not allowed for segments associated with the PH. Alternatively max num merqe cand minus max num geo cand specifies the maximum number of GEO merge mode candidates supported in the SPS subtracted from MaxNumMergeCand. When sps_geo_enabled_flag is equal to 1 and MaxNumMergeCand is greater than or equal to 3, the maximum number of GEO blend mode candidates, MaxNumGeoMergeCand is derived as follows: MaxNumGeoMergeCand = MaxNumMergeCand max_num_merge_cand_minus_max_num_geo_cand If the value of sps geo enabled flag is equal to 1, the value of MaxNumGeoMergeCand will be in the range 2 to MaxNumMergeCand, inclusive. Otherwise when sps_geo_enabled_flag is equal to 1 and MaxNumMergeCand is equal to 2, MaxNumGeoMergeCand is set equal to 2. ΜΛ / í 1 or Otherwise, MaxNumGeoMergeCand is set equal to 0. The alternative syntax and semantics for this example are as follows: sps_geo_enabled_flag u(1) sps_six_minus_max_num_merge_cand ue(v) yes (sps_geo_enabled_flag) sps max num merge cand minus max num geo cand ue(v) 105 sps_six_minus_max_num_merge_cand specifies the maximum number of merger motion vector prediction (MVP) candidates supported in the associated segments with the PH subtracted from 6. The maximum number of merger MVP candidates, MaxNumMergeCand, is derived from the following manner: MaxNumMergeCand = 6 - sps_six_minus_max_num_merge_cand The value of MaxNumMergeCand will be in the range 1 to 6, inclusive. sps max num merge cand minus max num geo cand specifies the maximum number of geo merge mode candidates supported in segments associated with the image header subtracted from MaxNumMergeCand. The maximum number of geo merge mode candidates, MaxNumGeoMergeCand is derived as follows: MaxNumGeoMergeCand = MaxNumMergeCand sps_max_num_merge_cand_minus_max_num_geo_cand When sps_max_num_merge_cand_minus_max_num_geo_cand is present, the value of MaxNumGeoMergeCand will be in the range 2 to MaxNumMergeCand, inclusive. When sps_max_num_merge_cand_minus_max_num_geo_cand is not present, and (sps_geo_enabled_flag is equal to 0 or MaxNumMergeCand is less than 2), MaxNumGeoMergeCand is set equal to 0. When MaxNumGeoMergeCand is equal to 0, geo merge mode is not allowed. For the examples described above and for both alternative syntax definitions, a check is performed to see if weighted prediction is enabled. This check affects the derivation of the MaxNumGeoMergeCand variable, and the value of MaxNumGeoMergeCand is set to zero in one of the following cases: when for the value of i = 0 .. NumRefldxActive[ 0 ] and the value of j = 0 .. NumRefldxActivej 1 ] all the values of luma_weight_IO_flag[ i ], chroma_weight_IO_flag[ i ], Iuma_weight_l1_flag[ j ] and chroma_weight_l1_flag[ j ] are set to zero or not present; when a label in SPS or PPS indicates the presence of weighted bipred flag (pps weighted bipred flag); when the presence of bidirectional weighted prediction is indicated in a picture header (PH) or a slice header (SH). An SPS level label indicating the presence of weighted prediction parameters could be denoted as follows: sps_bcw_enabled_flag u(1) 106 sps_ibc_enabled_flag u(1) sps_ciip_enabled_flag u(1) yes¡( sps_mmvd_enabled_flag) sps_fpel_mmvd_enabled_flag u(1) sps_wp_enabled_flag yes (!sps_wp enabled_flag) sps_geo_enabled_flag u(1) sps_six_minus_max_num _merge_cand_plus1 ue(v) yes (sps_geo_enabled_flag) sps_max_num_merge_cand_minus_max_num_geo_cand_plus1 ue(v) sps_lmcs_enabled_flag u(1 ) sps_lfnst_enabled_flag u(1) sps_ladf_enabled_flag u(1) ΜΛ / t / ZUZZ / U ί 1Z4Ó The “spswpenabledflag” syntax element determines whether weighted prediction could be enabled at a lower level (PPS, PH, or SH). The exemplary implementation is provided below: s¡( pps_cu_chroma_qp_offset_list_enabled_flag ) {chroma_qp_offset_list_len_minus1 ue(v) for( i = 0; i <= chroma_qp_offset_list_len_minus1; i++) {cb_qp_offset_list[ i ] se(v) cr_qp_offset_list[ i ] se(v) s¡( pp sjoint_cbcr_qp_offset_present_flag ) joint_cbcr_qp_offset_list[ i ] se(v)}} if (sps_wp_enabled_flag) {pps_weighted_pred_flag u(1) pps_weighted_bipred_flag u(1) 1 In the table above, pps_weighted_pred_flag and pps_weighted_bipred_flag are labels in the bitstream that indicate whether weighted prediction is enabled for uni and bipredicted blocks. 107 In an example, where weighted prediction labels are specified in an image header, for example as pic_weighted_pred_flag and pic_weighted_b¡pred_flag, the following dependency on sps_wp_enabled_flag may be specified in bitstream syntax: if (sps_wp_enabled_flag) {pic_weighted_pred_flag pic_weighted_b¡pred_flag In an example, where weighted prediction labels are specified in a segment header, for example as weighted_pred_flag and weighted_bipred_flag, the following dependency on sps_wp_enabled_flag may be specified in bitstream syntax: if (sps_wp_enabled_flag) {weighted_pred_flag weighted_bipred_flag In one example, reference image lists may be indicated in PPS or in PH or SH (but not both). In some examples, the signaling of a reference image list depends on syntax elements that indicate the presence of the weighted prediction (for example pps_weighted_pred_flag and pps_weighted_bipred_flag). Therefore, depending on whether the reference image list is indicated in PPS, PH or SH, the weighted prediction parameters are indicated before the reference image list accordingly in PPS, PH or SH. The following syntax could be specified for this modality: Image Parameter Set Syntax pic_parameter_set_rbsp() {Descriptor rpl_present_in_ph_flag u(1) sao_present_i n_ph_f lag u(1) 108 alf_present_in_ph_flag u(1) pps_weighted_pred_flag u(1) pps_weighted_bipred_flag u(1) s¡( pps_weighted_pred_flag || pps_weighted_bipred_flag || rpl_present_in_ph_flag ) weighted_pred_table_present_in_ph_flag u(1) unblocking_filter_control_present _flag u(1) s¡( deblocking_filter_control_present_flag ) {deblocking_filter_override_enabled_flag u(1) s¡( desblocking_f¡lter_override_enabled_flag ) desblocking_filter_override_present_in_ph_flag u(1) pps_desblocking_filter_d¡sabled_flag u(1) s¡( !pps_desblocking_filter_d¡sabled_flag) {pps_beta_off set_d i v2 se(v) pps_tc_off set_d i v2 se (v)}} constant_slice_header_params_enabled_flag u(1)} M A / IZ / ¿U¿¿ / U í 1 rpl_present_in_ph_flag equal to 1 specifies that the reference picture list signaling is not present in the header of the segments that refer to the PPS but may be present in the PHs that refer to the PPS. refer to the PPS. rpl_present_in_ph_flag equal to 0 specifies that reference picture list flagging is not present in PHs referring to the PPS but may be present in the header of segments referring to the PPS. sao_present_in_ph_flag equal to 1 specifies that the syntax elements to enable the use of SAO are not present in the header of segments that refer to the PPS but may be present in the PHs that refer to the PPS. sao_present_in_ph_flag equal to 0 specifies that syntax elements to enable the use of SAO are not present in PHs that refer to the PPS but may be present in the header of segments that refer to the PPS. alf_present_in_ph_flag equal to 1 specifies which syntax elements to enable 109 the use of ALF are not present in the header of the segments that refer to the PPS but may be present in the PH that refer to the PPS. alf_present_in_ph_flag equal to 0 specifies that syntax elements to enable the use of ALF are not present in PHs that refer to the PPS but may be present in the header of segments that refer to the PPS. weighted_pred_table_present_in_ph_flag equal to 1 specifies that the weighted prediction table is not present in the header of segments referring to the PPS but may be present in the PHs referring to the PPS. weighted_pred_table_presentjn_ph_flag equal to 0 specifies that the weighted prediction table is not present in PHs that refer to the PPS but may be present in the header of segments that refer to the PPS. When not present, the value of weighted_pred_table_present_in_ph_flag is inferred to be equal to 0. desblocking_filter_override_enabled_flag equal to 1 specifies that deblocking filter override can be present in PHs or segment headers that refer to the PPS. desblocking_filter_override_enabled_flag equal to 0 specifies that unblocking filter override is not present in PHs or segment headers that refer to the PPS. When not present, the value of desblocking_filter_overr¡de_enabled_flag is inferred to be equal to 0. desblocking_filter_overr¡de_present_¡n_ph_flag equal to 1 specifies that the unblocking filter override is not present in the header of segments referring to the PPS but may be present in the PHs referring to the PPS. unblocking_filter_override_present_in_ph_flag equal to 0 specifies that unblocking filter override is not present in PHs referring to the PPS but may be present in segment headers referring to the PPS. picture_header_rbsp() {Descriptor s¡( ( pps_weighted_pred_flag pps_weighted_bipred_flag ) && weighted_pred_table_present_in_ph_flag ) pred_weight_table() s¡( rpl_present_in_ph_flag) { 110 for( i = 0; i < 2; Í++ ) {s¡( num_ref_p¡c_l¡stsjn_sps[ i ] > 0 && !pps_ref_pic_l¡st_sps_¡dc[ i ] && (==0||(¡== 1 && rpH Jdx_present_flag ))) pic_rpl_sps_flag[ i ] u(1) s¡( pic_rpl_sps_flag[ i ]) {s¡( num_ref_pic_l¡sts_¡n_sps[ i ] > 1 && (j==0||(i==1 && rpl1Jdx_present_flag ))) pic_rpl_idx[ i ] u(v)} otherwise ref_p¡c_list_struct( i, num_ref_p¡c_listsjn_sps[ i ]) for( j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {s¡( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) pic_poc_lsb_lt[ i ][ j ] u(v) pic_delta_poc_msb_present_flag[ i ][ j ] u(1) s¡( pic_deltaj3oc_msb_present_flag[ i ][j ]) pic_delta_poc_msb_cycle_ lt [ i ][ j ] ue(v)}}} s¡( sps_sao_enabled_flag && sao_present_in_ph_flag ) {pic_sao_luma_enabled_flag u(1) if(ChromaArrayType != 0 ) pic_sao_chroma_enabled_flag u(1)}} s¡( sps_alf_enabled_flag && al f_present_in_ph_flag ) {pic_alf_enabled_flag u (1) s¡( pic_alf_enabled_flag) {pic_num_alf_aps_¡ds_luma u(3) for( i = 0; i < pic_num_alf_aps_¡ds_luma; i++ ) pic_alf_aps_id_luma[ i ] u(3) 111 s¡( ChromaArrayType != 0 ) pic_alf_chroma_idc u(2) s¡( pic_alf_chroma_idc) pic_alf_aps_id_chroma u(3)}} s¡( desblocking_f¡lter_overr¡de_enabled_flag && deblocking_f¡lter_override_present_in_ph_flag ) pic_desblocking_filter _override_flag u(1) i( pic_unblocking_filter_override_flag ) {pic_desblocking_filter_disabled_flag u(1) s¡( !pic_desblocking_f¡lter_d¡sabled_flag ) {pic_beta_offset_div2 se(v) pic_tc_offset_div2 se(v)}}} slice_header() {Descriptor s¡( !rpl_present_in_ph_flag &&( ( nal_unit_type != IDR_W_RADL && nal_unit_type != IDRNLP ) | | sps_idr_rpl_present_flag )) {for( i = 0; i < 2; Í++ ) {if( num_ref_picj¡stsjn_sps[ i ] > 0 && !pps_ref_p¡c_list_spsjdc[ i ] && (i == 0 II (i = = 1 && rpl1Jdx_present_flag ))) slice_rpl_sps_flag[ i ] u(1) s¡( slice_rpl_sps_flag[ i ]) {s¡( num_ref_picjists_ ¡n_sps[ i ] > 1 && 112 ( == 0 I I (ί = = 1 && rpl1_idx_present_flag ))) slice_rpl_idx[ i ] u(v)} otherwise ref_p¡c_l¡st_struct( i, num_ref_p¡c_listsjn_sps[ i ]) for( j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {s¡( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) slice_poc_lsb_lt[ i ][ j ] u(v) slice_delta_poc_msb_present_flag[ i ][j ] u(1 ) s¡( slice_delta_poc_msb_present_flag[ i ][ j ]) slice_delta_poc_msb_cycle_lt[ i ][j ] ue(v)}}} s¡( rpl_present_in_ph_flag | (( nal_unit_type != IDR_W_RADL && nal_unit_type != IDR_N_LP ) | | sps_idr _rpl_present_flag )) {s ( ( slice_type != I && num_ref_entries[ 0 ][ Rplsldx[ 0 ] ] > 1 ) ( slice_type = = B && num_ref_entries[ 1 ][ Rplsldx[ 1 ] ] >1 )){num_ref_idx_active_overr¡of_flag u(1) s ¡( num_ref_idx_active_overr¡of_flag) for( i = 0; i < ( slice_type = = B ? 2:1 ); Í++ ) s¡( num_ref_entries[ i ][ Rplsldx[ i ] ] > 1 ) num_ref_idx_act¡ve_minus1 [ i ] ue(v)}} s( slice_type != I) { ΜΛ / t / ZUZZ / U ί Ί Z4Ó 113 if( (( pps_weighted_pred_flag && slicejype = = P ) 11 (pps_weighted_bipredjlag && slicejype = = B)) && Iweightedj3redjable_presentjn_phjlag ) pred_weightjable()} s¡( sps_sao_enabledjlag && !saojoresentjn_phflag ) {slice_saojumajlag u(1) s( ChromaArrayType != 0 ) slice_sao_chromajlag u(1)} s¡( sps_alf_enabledjlag && !alt_presentjn_phjlag ) {slice_alf_enabledjlag u(1) s¡( slice_alf_enabledjlag) {slice_num_alf_apsjdsjuma u(3) for( i = 0; i < slice_num_alf_apsjdsjuma; i++ ) slice_alf_apsjdjuma[ i ] u(3 ) s¡( ChromaArrayType != 0 ) slice_alf_chroma_idc u(2) s¡( slice_alf_chromajdc) slice_alf_apsjd_chroma u(3)}} s¡( unblocking f¡lter_overr¡de_enabledjlag && !desblockingJ¡lter_override_presentJnj)hJlag ) slice_desblockingj¡lter_ overr¡dejlag u( 1) s¡( slice_desblockingj¡lter_overr¡dejlag ) {slice_desblockingjilter_disabledjlag u(1) s¡( !slice_desblock¡ngj¡lter_d¡sabledjlag) {if ice_beta_of f set_d i v2 se(v) if ¡ce Jc_of fset_d i v2 se(v )}} ΜΛ / t / ZUZZ / U ί 1 114 } ΜΛ / t / ZUZZ / U ί 1Z4Ó An alternative syntax for the image header is as follows: picture_header_rbsp() {Descriptor s¡( rpl_present_in_ph_flag ) {for( i = 0; i < 2; i++ ) {s¡( num_ref_picjistsjn_sps[ i ] > 0 && !pps_ref_pic_list_sps_¡dc[ i ] && (==0||( ¡==1 && rpHJdx_present_flag ))) pic_rpl_sps_flag[ i ] u(1) s¡( pic_rpl_sps_flag[ i ]) {s¡( num_ref_pic_l¡sts_¡n_sps[ i ] > 1 && (j==0||(Í= =1 && rpl1Jdx_present_flag ))) pic_rpUdx[ i ] u(v)} else ref_pic_list_struct( i, num_ref_p¡c_listsjn_sps[ i ]) for( j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {s¡( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) pic_poc_lsb_lt[ i ][ j ] u(v) pic_delta_poc_msb_present_flag[ i ][ j ] u(1) s¡( pic_deltaj3oc_msbj3resent_flag[ i ][j ]) pic_delta_poc_msb_ cycle_lt [ i ][ j ] ue(v)}}} s¡( ( pps_weighted_pred_flag pps_weighted_bipred_flag ) && weighted_pred_table_present_in_ph_flag ) pred_weight_table() s¡( sps_sao_enabled_flag && sao_present_in_ph_flag ) { 115 pic_sao_luma_enabled_flag u(1) if(ChromaArrayType != 0 ) pic_sao_chroma_enabled_flag u(1)}} s¡( sps_alf_enabled_flag && alf_present_in_ph_flag ) {pic_alf_enabled_flag u(1) s¡( pic_alf_enabled_flag) {pic_num_ alf_aps_ids_luma u(3) for( i = 0; i < p¡c_num_alf_aps_ids_luma; i++ ) pic_alf_aps_id_luma[ i ] u(3) if( ChromaArrayType != 0 ) pic_alf_chroma_idc u(2) s¡( pic_alf_chroma_idc) pic_alf_aps_id_chroma u(3)}} s¡( unblocking_filter_overr¡de _enabled_flag && deblocking_f¡lter_overr¡ de_present_in_ph_flag ) pic_desblocking_filter_override_flag u(1) s¡( pic_desblocking_f¡lter_overr¡de_flag) {pic_desblocking_filter_disabled_flag u(1) s¡( !pic_desblock¡ng_f¡lter_d¡sabled_flag ) {pic_beta_offset_div2 se(v) pic_tc_offset_ div2 se(v)}}} In another example, the signaling of image header and segment header elements could be combined into a simple process. This example presents a tag (“picture_headerjn_slice_header_flag”) that indicates whether the headers of an image and a slice are combined. The syntax for a bitstream ΜΛ / t / ZUZZ / U í Ί Z4Ó 116 according to this example is as follows: Image Header RBSP Syntax picture_header_rbsp() {Descriptor picture_header_structure()} Image structure syntax header picture_header_structure() {Descriptor non_reference_picture_flag u(1) gdr_pic_flag u(1) no_output_of_prior_pics_flag u(1) s¡( gdr_pic_flag ) recovery_poc_cnt ue(v) ph_pic_parameter_set_id ue(v)} General Segment Header Syntax slice_header() {Descriptor picture_header_in_sl¡ce_header_flag u(1) if(picture_header_¡n_sl¡ce_header_flag) picture_header_structure() s¡( subpics_present_flag) slice_subpic_id u(v) s¡( rect_slice_flag | | NumTilesInPic > 1 ) slice_address u(v) s¡ ( !rect_slice_flag && NumTilesInPic > 1 ) num_tiles_in_sl¡ce_m¡nus1 ue(v) slice_type ue(v) s¡( !p¡c_rpl_present_flag &&( ( nal_unit_type != IDR_W_RADL && nal_unit_type != IDR_N_LP ) | | sps_idr_rpl _present_flag )) {for( i = 0; i < 2; Í++ ) { 117 s¡( num_ref_p¡c_l¡sts_¡n_sps[ i ] > 0 && !pps_ref_pic_l¡st_spsjdc[ i ] && (==0||(¡==1 && rpl1Jdx_present_flag ))) slice_rpl_sps_flag[ i ] u(1)} ΜΛ / t / ZUZZ / U ί 1Z4Ó The semantics of picture_header_in_slice_header_flag and related bitstream restrictions are as follows: picture_header_in_slice_header_flag equal to 1 specifies that the picture header syntax structure is present in the slice header. picture_header_in_slice_header_flag equal to 0 specifies that the picture header syntax structure is not present in the slice header. It is a requirement of bitstream compliance that the value of picture_headerjn_slice_header_flag is the same across all slices of a CLVS. When picture_headerjn_slice_header_flag is equal to 1, it is a bitstream compliance requirement that no NAL unit with a NAL unit type equal to PHNUT be present in the CLVS. When picture_headerjn_slice_header_flag is equal to 0, it is a bitstream compliance requirement that a NAL unit with a NAL unit type equal to PH_NUT be present in the PU, which precedes the first VCL NAL unit of the PU. A combination of aspects of these examples is as follows. When p¡cture_headerjn_slice_header_flag is equal to 0, tags that specify whether a syntax element of a related encoding tool is present in PH or SH (but not both); Otherwise (when picture_header_in_sl¡ce_header_flag is equal to 1), these labels are inferred to 0 indicating tool parameter flagging at the slice level. An alternative combination is as follows: When picture_headerjn_sl¡ce_header_flag is equal to 0, tags that specify whether a syntax element of a related encoding tool is present in PH or SH (but not both); Otherwise (when picture_header_in_sl¡ce_header_flag is equal to 1), these labels are inferred to 0 indicating tool parameter flagging at the level 118 image header. ΜΛ / t / ZUZZ / U ί Ί Z4Ó This combination has the following syntax: Image Parameter Set Syntax pic_parameter_set_rbsp() {Descriptor picture_header_in_slice_header_flag u(1) if (picture_header_in_slice_header_flag) {rpl_present_in_ph_flag u(1) sao_present_i n_ph_f lag u(1) alt_present_in_ph_flag u(1)} pps_weighted_pred_flag u(1) pps _weighted_bipred_flag u(1) s¡( pps_weighted_pred_flag || pps_weighted_bipred_flag || rpl_present_in_ph_flag ) weighted_pred_table_present_in_ph_flag u(1) desblocking_filter_control_present_flag u(1) s¡( desblocking_filter_control_present_flag ) {desblocking_tilter_override_enabled_flag u(1) s¡( desblock¡ng_f¡lter_overhde_enabledjlag) des blocking_filter_override_present_in_ph_flag u(1) pps_desblocking_filter_disabled_flag u(1) yes( !pps_desblocking_filter_d¡sabled_flag ) {pps_beta_offset_div2 se(v) pps_tc_off set_d i v2 se(v)}} constant_slice_header_params_enabled_flag u(1)} In this example, checking whether a weighted prediction is enabled is done by indicating the number of entries in a reference image list to which 119 reference with weighted prediction. ΜΛ / t / ZUZZ / U ί 1Z4Ó The syntax and semantics in this example are defined as follows: Pred_weight_able () {descriptor iuma_log2_weight_denom ue (v) s i ++) luma_weight_io_flag [i] u (1) yes ( ChromaArrayType != 0) for( i = 0; i < NumRefldxActive[ 0 ]; i++ ) chroma_weight_IO_flag[ i ] u(1) for( i = 0; i < NumRefldxActive[ 0 ]; i++ ) {s¡( luma_weight_IO_flag[ i ]) {delta_luma_weight_IO[ i ] se(v) luma_offset_IO[ i ] se(v)} s¡( chroma_weight_IO_flag[ i ]) for(j = 0;j<2;j++){delta_chroma_weight_IO[ i ][ j ] se( v) delta_chroma_offset_IO[ i ][ j ] se(v)}} n u m_l 1 _wei g hted_ref_pics ue(v) for( i = 0; i < num_l1_weighted_ref_p¡cs; i++ ) Iuma_weight_l1_flag[ i ] u(1) if( ChromaArrayType != 0) for( i = 0; i < NumRefldxActive[ 1 ]; i++ ) chroma_weight_l1_flag[ i ] u(D for( i = 0; i < NumRefldxActive[ 1 ]; i++ ) {if( luma_weight_H_flag[ i ]) {delta_luma_weight_l1 [ i ] se(v) Iuma_offset_l1[ i ] se(v)} 120 s¡( chroma_we¡ght_H_flag[ i ]) for( j = 0; j < 2; j++) {delta_chroma_weight_!1[ i ][ j ] se(v) delta_chroma_offset_l1[ i ][ j ] se(v)}}} ΜΛ / t / ZUZZ / U í Ί Z4Ó num_IO_weighted_ref_pics specifies the number of reference images in the reference image 0 list that are weighted. The value of num_IO_weighted_ref_pics will range from 0 to MaxDecPicBuffMinusI + 14, inclusive. It is a requirement of bitstream compliance that when present, the value of num_IO_weighted_ref_p¡cs shall not be less than the number of active reference images for LO of any segment in the image associated with the image header. num_l1_weighted_ref_pics specifies the number of reference images in the reference image 1 list to be weighted. The value of numJ1_weighted_ref joics will range from 0 to MaxDecPicBuffMinusI + 14, inclusive. It is a requirement of bitstream compliance that when present, the value of num_l1_weighted_ref_p¡cs shall not be less than the number of active reference images for L1 of any segment in the image associated with the image header. MaxNumGeoMergeCand is set to zero when num_IO_weighted_ref_pics or numJ1_weighted_ref_pics is non-zero. The following syntax is an example of how this dependency could be used: s¡( sps_prof_pic_present_flag) pic_disable_prof_flag u(1) s¡( sps_geo_enabled_flag && MaxNumMergeCand >= 2 && Ipps_max_num_merge_cand_minus_max_num_geo_cand_plus1 && num_IO_weighted_ref_pics==O && num_l1_weighted_ref_pics= =0) picmaxnummergecandminusmaxnumgeocand ue(v) if (sps_ibc_enabled_flag) pic_s¡x_m¡nus_max_num_¡bc_merge_cand ue( v) yes( spsjoint_cbcr_enabled_flag) 121 The semantics of pic_max_num_merge_cand_minus_max_num_geo_cand in this mode are the same as for the previous modes. In one example, inter- and intra-related syntax elements are conditionally signaled if only certain types of segments are used in the image associated with the PH. Syntax for this example is provided below: picture_header_rbsp() {Descriptor pic_inter_slice_present_flag u(1) s¡( pic_inter_sl¡ce_present_flag) pic_intra_slice_present_flag u(1) non_reference_picture_flag u(1) gdr_pic_flag u(1) no_output_of_prior_pics_flag u(1) s¡( gdr_pic_flag) recovery_po c_cnt ue(v) ph_pic_parameter_set_id ue( v) s¡( sps_poc_msb_flag) {ph_poc_msb_present_flag u(1) si( ph_poc_msb_present_flag ) poc_msb_val u(v)} s¡( sps_subpic_id_present_flag && !sps_subpicjd_signalling_flag ) {ph_subpic_id_s¡gnalling_present_flag u(1) s¡( ph_subp¡csjd_signall¡ng_present_flag ) {ph_subpic_id_len_m nus1 ue(v) for( i = 0; i <= sps_num_subpics_minus1; Í++) ph_subpic_id[ i ] u(v)}} s¡( !sps_virtual_boundaries_present_flag ) {ph_virtual_boundañes_present_flag u(1) if( ph_virtual_boundaries_present_flag) {ph_num_ver_virtual_boundaries u (2) for( i = 0; i < ph_num_ver_virtual_boundaries; Í++ ) 122 ph_virtual_boundaries_pos_x[ i ] u(13) ph_num_hor_virtual_bo Lindarles u(2) for( i = 0; i < ph_num_hor_virtual_boundaries; i++ ) ph_virtual_boundaries_pos_y[ i ] u(13)}} if( separate_colour_plane_flag = = 1 ) color_plane_id u(2) if( output_flag_present_flag) pic_output_flag u(1) pic_rpl_present_flag u(1) if( pic_rpl_present_flag ) {for( i = 0; i < 2; I++ ) {if( num_ref_pic_l¡stsjn_sps[ i ] > 0 && !pps_ref_pic_l¡st_sps_¡dc[ i ] && (==0||(¡==1 && rpHJdx_present_flag ))) pic_rpl_sps_flag[ i ] u(1) if( pic_rpl_sps_flag[ i ]) {if( num_ref_pic_lists_in_sps[ i ] > 1 && (==0 ||(¡==1 && rpl1Jdx_present_flag ))) pic_rpl_idx[ i ] u(v)} otherwise ref_pic_list_strLict( i, num_ref_p¡c_lists_in_sps[ i ]) for( j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++) {si( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) pic_poc_lsbjt[ i ][ j ] u(v) pic_delta_poc_msb_present_flag[ i ][ j ] u(1) si( pic_delta_poc_msb_present_flag[ i ][j ]) pic_delta_poc_msb_cycle_lt[ i ][j ] ue(v)}}} 123 s¡( partition_constraints_overr¡de_enabled_flag ) {partition_constraints_override_flag u(1) s¡( pic_intra_sl¡ce_present_flag) {s¡( partition_constraints_override_flag ) {p iclog 2d if f_m i nqtrn i n_cb_i n after 1 i ce_l u ma ue(v) pic _max_mtt_hierarchy_depth_intra_slice_luma ue( v) s¡( p¡c_max_mtt_h¡erarchy_depth_¡ntra_sl¡ce_luma != 0 ) {p¡c_log2_d¡ff_max_bt_min_qt_¡ntra_sl¡ce_luma ue(v) p ic_l og 2d i ffmaxttm i n_qt _i nt ra_s 1 ice_l u ma ue(v )} if( qtbtt_dual_tree_intra_flag ) {p¡c_log2_d¡ff_min_qt_min_cb_intra_sl¡ce_chroma ue(v) p¡c_max_mtt_hierarchy_depth_intra_slice_chroma ue(v) if( pic_max_mtt_hierarchy_depthjntra_sl¡ce_chroma != 0 ) {p¡c_log2_diff_max_bt_min_qt_¡ntra_sl¡ce_chroma ue(v) pic_log2_diff_max_tt_min_qt_intra_slice_chroma ue(v )}}}} s¡( cu_qp_delta_enabled_flag) {pic_cu_qp_delta_subdiv_intra_slice ue(v) s¡( pps_cu_chroma_qp_offsetjist_enabled_flag ) pic_cu_chroma_qp_offset_subdiv_intra_slice ue(v)} s¡( picjnter_slice_present _flag) {s¡( partition_constraints_overr¡of_flag ) {pic_log2_diff_min_qt_min_cb_inter_slice ue(v) pic_max_mtt_hierarchy_depth_inter_slice ue(v ) 124 s¡( pic_max_mtt_h¡erarchy_depthjnter_slice != 0 ) {p¡c_log2_d¡ff_max_bt_min_qt_¡nter_sl¡ce ue(v) pic_log2_diff_max_tt_min_qt_inter_slice ue(v)}} s¡( cu_qp_delta_enabled_flag ) pic_cu_ qp_delta_subdiv_¡nter_sl¡ce ue(v) s¡( pps_cu_chroma_qp_offset_l¡ st_enabled_flag ) {pic_cu_chroma_qp_offset_subdiv_inter_slice ue(v) s¡( sps_temporal_mvp_enabled_flag ) pic_temporal_mvp_enabled_flag u(1) s¡(!pps_mvdJ1_zero_idc) mvd_l1_zero_flag u(1) s¡( !pps_six _minus_max_num_merge_cand_plus1 ) pic_six_minus_max_num_merge_cand ue(v) s¡( sps_affine_enabled_flag) pic five minus max num subblock merge cand ue(v) s¡( sps_fpel_mmvd_enabled_flag ) pic_fpel_mmvd_enabled_flag u(1) s¡( sps_bdof_pic_present_flag) pic_disable_bdof_flag u(1) s¡( sps_dmvr_pic_present_flag) pic_disable_dmvr_flag u(1) s ¡( sps_prof_pic_present_flag ) pic_disable_prof_flag u(1) s¡( sps_triangle_enabled_flag && MaxNumMergeCand >= 2 && !pps_max_num_merge_cand_in¡nus_max_num_tr¡angle_cand_plus1 ) pic_max_num _merge_cand_m¡nus_max_num_triangle_cand ue(v)} if (sps_ibc_enabled_flag) pic_six_minus_max_num_ ibc_merge_cand ue(v) 125 7.3.7.1 General segment header syntax slice_header() {Descriptor slice_pic_order_cnt_lsb u(v) s¡( subpics_presentjlag) slice_subpicjd u(v) s¡( rect_slicejlag | | NumTilesInPic > 1 ) slice_address u(v) s¡( !rect_slicejlag && NumTilesInPic > 1 ) numjilesjn_slice_m¡nus1 ue( v) s¡( picjnter_slice_presentjlag) slicejype ue(v) 7.4.3.6 RBSP Image Header Semantics pic_inter_slice_present_flag equal to 1 specifies that one or more slices with slicejype equal to 0 (B) or 1 (P) may be present in the image associated with the PH. picjnter_slice_present_flag equal to 0 specifies that no slice with slice_type equal to 0 (B) or 1 (P) can be present in the image associated with the PH. pic_intra_slice_present_flag equal to 1 specifies that one or more slices with slicejype equal to 2 (I) may be present in the image associated with the PH. pic_intra_slice_present_flag equal to 0 specifies that no slice with slice_type equal to 2 (I) can be present in the image associated with the PH. When not present, the value of picjntra_slice_only_flag is inferred to be equal to 1. NOTE-: The values of both picjnterslicejoresentjlag and picjntra_sl¡ce_present_flag are set equal to 1 in the image header associated with the image containing one or more subimages containing intra code segments that can be combined with one or more subimages containing Inter coded segments 7.4.8.1 General semantics of the segment header slice_type specifies the encoding type of the segment according to Table 7-5. Table 7-5 - Association of names to slicejype slicejype slicejype name 0 B (segment B) 1 P (segment P) 2 I (segment I) 126 When nal_unit_type is a value of nal_unit_type in the range of IDR W RADL to CRA_NUT, inclusive, and the current image is the first image on an access unit, slicejype must be equal to 2. When not present, the value of slicejype is inferred to be equal to 2. When picjntra_slice_presentjlag is equal to 0, the value of slicejype will be in the range from 0 to 1, inclusive. This example could be combined with pred_weightjable() signaling in the image header. Signaling pred_weightjable() in an image header is described in the previous examples. ΜΛ / t / ZUZZ / U ί 1Z4Ó An exemplary syntax is as follows: picture_header_rbsp() {Descriptor s¡( (pps_weighted_predjlag | | pps_weighted_bipredjlag ) && weighted_predjable_presentjn_phjlag ) pred_weightjable() When indicating the presence of pred_weightjable() in the image header, the following syntax could be used. picture_header_rbsp() {Descriptor picjnter_slice_presentjlag u(1) if( picjnter_slice_presentjlag) picjntra_slice_presentjlag u(1) s¡( (pps_weighted_predjlag | | pps_weighted_bipredjlag ) && picjnter_slice_presentjlag) pred_weightjable() Alternative examples may use the following syntax: picture_header_rbsp() {Descriptor picjnter_slice_presentjlag u(1) 127 s¡( picjnter_slice_present_flag) pic_intra_slice_present_flag u(1) s¡( (pps_weighted_pred_flag | | pps_weighted_bipred_flag ) && picjnter_slice_present_flag && weig hted_pred_tabIe_prese nt_¡ n_ph_fIag ) pred_weight_table() ΜΛ / t / ZUZZ / U ί Ί Z4Ó Alternative examples may use the following syntax: picture_header_rbsp() {Descriptor pic_¡nter_b¡pred_sl¡ce_present_flag u(1) if (!picjnter_bipred_sl¡ce_present_flag) pic_inter_slice_present_flag u(1) s¡( picjnter_slice_present_flag) pic_intra_slice_present_flag u(1) s¡( (pps_weighted_pred_fla g | | pps_weighted_bipred_flag ) && picjnter_slice_present_flag && weighted_pred_table_present_in_ph_flag ) pred_weight_table() In the above syntax, p¡c_inter_bipred_sl¡ce_present_flag indicates the presence of all segment types, Slices I, B and P that refer to the image header. When p¡cjnter_bipred_sl¡ce_present_flag is 0, the image comprises only type I or B slices. In this case non-rectangular modes are disabled. In one example, a combination of previous examples is described. An exemplary syntax is described as follows: picture_header_rbsp() {Descriptor pic_inter_sl¡ce_present_flag u(1) s¡( picjnter_slice_present_flag) 128 pi cj nt ra_s 1 i ce _p rese nt_f 1 ag u(1) pic_rpl_present_flag s¡( pic_rpl_present_flag ) {s¡( rpl_present_in_ph_flag) {para( i = 0; i < 2; i++ ) {s¡( nijm_ref_p¡c_l¡sts_ ¡n_sps[ i ] > 0 && !pps_ref_pic_l¡st_sps_¡dc[ i ] && (==0||(¡==1 && rpl1_idx_present_flag ))) pic_rpl_sps_flag[ i ] u(1) if( pic_rpl_sps_flag[ i ]) {s¡( num_ref_p¡c_l¡stsjn_sps[ i ] > 1 && (j==0||(¡==1 && rpl1_idx_present_flag ))) pic_rpl_idx[ i ] u(v)} else ref_pic_list_struct( i, num_ref_p¡ c_listsjn_sps[ i ]) for( j = 0; j < NumLtrpEntries[ i ][ Rplsldx[ i ] ]; j++ ) {s¡( ltrp_in_slice_header_flag[ i ][ Rplsldx[ i ] ]) pic_poc_lsb_lt[ i ][ j ] u( v) pic_delta_poc_msb_present_flag[ i ][ j ] u(1) s¡( pic_delta_poc_msb_presentjlag[ i ][j ]) pic_delta_poc_msb_cycle_lt[ i ][ j ] ue(v)}}} s¡( (pps_weighted_pred_flag | | pps_weighted_bipredjlag ) && weighted_ pred_table_present_in_ph_flag && picjnter_sl¡ce_present_flag ) pred_weight_table() s¡( sps_sao_enabled_flag && sao_present_in_ph_flag ) {pic_sao_enabled_present_flag MA / LEFT / ¿U¿¿ / U í 1 129 s¡( pic_sao_enabled_present_flag ) {pic_sao_luma_enabled_flag u(1) if(ChromaArrayType != 0 ) pic_sao_chroma_enabled_flag u(1)}} s¡( sps_alf_enabled_flag && alf_present_in_ph_flag ) {pic_alf_enabled_present_flag uliA ttVT s¡( pic_alf_enabled_present_flag ) {pic_alf_enabled_flag u(1) s¡( pic_alf_enabled_flag) {pic_num_alf_aps_ids_luma u(3) for( i = 0; i < p¡c_num_alf_aps_ids_luma; i++ ) pic_alf_aps_id_luma[ i ] u(3) s¡( ChromaArrayType != 0 ) pic_alf_chroma_idc u(2) if( pic_alf_chroma _idc) pic_alf_aps_id_chroma u( 3)}}} s¡( desblocking_filter_override_enabled_flag && desblocking_filter_overr¡de_present_in_ph_flag ) {pic_desblocking_filter_overr¡de_present_flag u(1) s¡( pic_desblocking_filter_overr¡de_present_flag) {pic_desblocking_filter_overr¡de_flag u\1 / yes( pic_desblocking_filter_overr¡dejlag ) {pic_desblocking_filter_disabled_flag u(1) s¡( !p¡c_desblocking_filter_d¡sabled_flag ) {pic_beta_offset_div2 se(v) pic_tc_offset_div2 se(v)}} ΜΛ / t / ZUZZ / U ί Ί Z4Ó 130 }}} In one example, it is allowed to select the non-rectangular mode (for example GEO) that refers to an image without a weighted prediction factor. In this example, the semantics are defined as follows: 7.4.10.7 Merge data semantics The variable MergeGeoFlag[ xO ][ yO ], which specifies whether geoshape-based motion compensation is used to generate the prediction samples of the current encoding unit, when decoding a segment B, is derived from the Following way: - If all of the following conditions are true, MergeGeoFlag[ xO ][ yO ] is set equal to 1: - sps_geo_enabled_flag is equal to 1. - slice_type is equal to B. - general_merge_flag[ xO ][ yO ] is equal to 1. - MaxNumGeoMergeCand is greater than or equal to 2. - cbWidth is greater than or equal to 8 - cbHeight is greater than or equal to 8 - cbWidth is smaller than 8*cbHeight - cbHeight is smaller than 8*cbWidth - regular_merge_flag[ xO ][ yO ] is equal to 0. - merge_subblock_flag[ xO ][ yO ] is equal to 0. - ciip_flag[ xO ][ yO ] is equal to 0. - Otherwise, MergeGeoFlag[ xO ][ yO ] is set equal to 0. It is a requirement of bitstream compliance that if one of the CU's explicitly luma or chroma weighted tags is true, MergeGeoFlag[ x0][ yO ] must be equal to 0. In an example, a part of the VVC specification is explained as follows: 8.5.7 Decoding process for Inter geo blocks 8.5.7.1 General This process is invoked when decoding an encoding unit with 131 MergeGeoFlag[ xCb ][ yCb ] is equal to 1. The inputs to this process are: a luma location (xCb, yCb) that specifies the top-left sampler of the current encoding block relative to the top-left luma sampler of the current image, a cbWidth variable that specifies the width of the current encoding block in luma samples, a variable cbHeight specifying the height of the current encoding block in luma samples, the luma motion vectors in 1 / 16 fractional sample precision mvA and mvB, the chroma motion vectors mvCA and mvCB, the reference indices refldxA and refldxB, the prediction list labels predListFIagA and predListFIagB. Let predSamplesLAL and predSamplesLBi be. (cbWidth)x(cbHeight) sets of predicted luma sample values and, predSamplesLAcb, predSamplesLBcb, predSamplesLAcr and predSamplesLBcr are (cbWidth / SubWidthC)x(cbHeight / SubHeightC) sets of predicted chroma sample values. The predSamplesL, predSamplescb and predSamplescr are derived by the following ordered steps: 1. For N each being A and B, the following applies: 2. The partition angle and distance of the merge geo mode variable angleldx and distanceldx are set according to the value of merge_geo_partition_idx[ xCb ][ yCb ] as specified in Table 36. 3. The explainWeightedFlag variable is derived as follows: lumaWeightedFlagA = predListFIagA ? Iuma_weight_l1_flag[ refldxA ] : luma_weight_IO_flag[ refldxA ] lumaWeightedFlagB = predListFIagB ? Iuma_weight_l1_flag[ refldxB ] : luma_weight_IO_flag[ refldxB ] chromaWeightedFlagA = predListFIagA ? chroma_weight_l1_flag[ refldxA ] : chroma weight_IO_flag[ refldxA ] chromaWeightedFlagB = predListFIagB ? chroma_weightJ1_flag[ refldxB ] : chroma weight_IO_flag[ refldxB ] weightedFlag = lumaWeightedFlagA | | lumaWeightedFlagB | | chromaWeightedFlagA | | chromaWeightedFlagB 4. The prediction samples within the current luma encoding block, 132 predSamplesi_[ χι_ ][ yi. ] with xl = 0..cbWidth - 1 and yL = 0..cbHeight - 1, are derived by invoking the weighted sample prediction process for the GEO fusion mode specified in clause 8.5.7.2 if weightedFlag is equal to 0 , and the weighted sample prediction process explicit in clause 8.5.6.6.3 if weightedFlag is equal to 1 with the width of the nCbW encoding block set equal to cbWidth, the height of the nCbH encoding block set equal to cbHeight, the sample sets predSamplesLAL and predSamplesLBi., and the variables angleldx and distanceldx, and cldx equal to 0 as inputs. 5. The prediction samples within the Cb encoding block of the current chroma component, predSamplescb[ xc ][ ye ] with xc = 0..cbWidth / SubWidthC - 1 and ye = 0..cbHeight / SubHeightC - 1, are derived by invoke the weighted sample prediction process for the GEO fusion mode specified in clause 8.5.7.2 if weightedFlag is equal to 0, and the explicit weighted sample prediction process in clause 8.5.6.6.3 if weightedFlag is equal to 1 with the width of the nCbW encoding block set equal to cbWidth / SubWidthC, the height of the nCbH encoding block set equal to cbHeight / SubHeightC, the sample sets predSamplesLAcb and predSamplesLBcb, and the variables angleldx and distanceldx, and cldx equal to 1 as inputs. 6. The prediction samples within the Cr encoding block of the current chroma component, predSamplescr[ xc ][ ye ] with xc = 0..cbWidth / SubWidthC - 1 and ye = 0..cbHeight / SubHeightC - 1, are derived by invoke the weighted sample prediction process for the GEO fusion mode specified in clause 8.5.7.2 if weightedFlag is equal to 0, and the explicit weighted sample prediction process in clause 8.5.6.6.3 if weightedFlag is equal to 1 with the width of the nCbW encoding block set equal to cbWidth / SubWidthC, the height of the nCbH encoding block set equal to cbHeight / SubHeightC, the sample sets predSamplesLAcr and predSamplesLBcr, and the variables angleldx and distanceldx, and cldx equal to 2 as inputs. 7. The motion vector storage process for the blend geo mode specified in clause 8.5.7.3 is invoked with the luma encoding block location (xCb, yCb), the luma encoding block width cbWidth, the height of the luma encoding block cbHeight, the partition address angleldx and distanceldx, the luma motion vectors mvA and mvB, the reference indices refldxA and refldxB, and the prediction list labels predListFIagA and predListFIagB as inputs. ΜΛ / t / ZUZZ / U ί 1Z4Ó 133 Table 36 - Specification of angleldx and disfanceldx values based on value ΜΛ / t / ZUZZ / U í Ί Z4Ó merge_geo_partit¡on_¡dx. merge_geo_partition_idx 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 angleldx 0 0 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 distanceldx 1 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 2 merge_geo_partition_idx 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 angleldx 4 6 6 8 8 8 8 9 9 9 9 10 10 10 10 11 11 distanceldx 3 1 3 0 1 2 3 0 1 2 3 0 1 2 3 0 1 merge_geo_partition_idx 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 angleldx 11 11 12 12 13 13 13 14 14 14 15 15 15 16 16 16 18 distanceldx 2 3 1 3 1 2 3 1 2 3 1 2 3 1 2 3 1 merge_geo_partition_idx 51 52 53 54 55 56 57 58 59 60 61 62 63 angleldx 18 20 20 20 21 21 21 22 22 22 23 23 23 distanceldx 3 1 2 3 1 2 3 1 2 3 1 2 3 8.5.6.6.3 Explicit weighted sample prediction process The inputs to this process are: two variables nCbW and nCbH that specify the width and height of the current encoding block, - two (nCbW)x(nCbH) sets predSamplesLO and predSamplesLI, - prediction list usage tags, predFlagLO and predFlagLI, the reference indices, refldxLO and refIdxLI, the cldx variable that specifies the index of the color component, the bit depth of the sample, bitDepth. The output of this process is the (nCbW)x(nCbH) pbSamples set of prediction sample values. The shiftl variable is set equal to Max( 2, 14 - bitDepth ). The variables log2Wd, oO, o1, wO and w1 are derived as follows: - If cldx is equal to 0 for luma samples, the following applies: log2Wd = Iuma_log2_weight_denom + shiftl (1010) wO = LumaWe¡ghtL0[ refldxLO ] (1011) w1 = LumaWeightLI [ refldxLI ] (1012) oO = luma_offset_IO[ refldxLO ] « (bitDepth - 8) (1013) o1 = luma_offset_H[ refldxLI ] « (bitDepth - 8) (1014) Otherwise (cldx is not equal to 0 for chroma samples), the following applies: 134 log2Wd = ChromaLog2WeightDenom + shiftl (1015) wO = ChromaWeightLO[ refldxLO ][ cldx - 1 ] (1016) w1 = ChromaWeightL1[ refldxLI ][ cldx - 1 ] (1017) oO = ChromaOffsetLO[ refldxLO ][ cldx - 1 ] « ( bitDepth - 8) (1018) o1 = ChromaOffsetLI [ refldxLI ][ cldx - 1 ] « (bitDepth - 8 ) (1019) The prediction sample pbSamples[ x ][ y ] with x = 0..nCbW - 1 y, y = O..nCbH - 1 is derived as follows: - If predFlagLO equals 1 and predFlagLI equals 0, the prediction sample values are derived as follows: s¡( log2Wd >= 1 ) pbSamples[ x ][ y ] = Clip3( 0,(1 « bitDepth ) - 1, (( predSamplesLO[ x ][ y ] * wO + 2log2Wd“1) » log2Wd ) + oO ) (1020) otherwise pbSamples[ x ][ y ] = Clip3( 0,(1 « bitDepth ) - 1, predSamplesLO[ x ][ y ] * wO + oO ) Otherwise, if predFlagLO equals 0 and predFlagLI equals 1, the prediction sample values are derived as follows: s¡( log2Wd >= 1 ) pbSamples[ x ][ y ] = Clip3( 0,(1 « bitDepth ) - 1, (( predSamplesLI[x][y ] * w1 + 2log2Wd“1) » log2Wd ) + o1 ) (1021) else pbSamples[ x ][ y ] = Clip3( 0,(1 « bitDepth ) - 1, predSamplesLI [ x ][ y ] * w1 + oí ) Otherwise (predFlagLO equals 1 and predFlagLI equals 1), the prediction sample values are derived as follows: pbSamples[ x ][ y ] = Clip3( 0, ( 1 « bitDepth ) - 1, ( predSamplesL0[ x ][ y ] * wO + predSamplesLI [ x ][ y ] * w1 + (( oO + o1 + 1 ) « log2Wd )) » (log2Wd + 1 )) (1022) In this example, a fusion data parameter syntax is described that comprises a check for a variable that indicates the presence of a non-merger mode. ΜΛ / t / ZUZZ / U ί 1Z4Ó 135 rectangular (for example GEO mode). The syntax example is provided below: merge_data( xO, yO, cbWidth, cbHeight, chType ) {Descriptor s¡( CuPredMode[ chType ][ xO ][ yO ] == MODEJBC) {s¡( MaxNumlbcMergeCand > 1 ) merge_idx[ xO ][ yO ] ae(v)} else {s¡( MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8) mergesubblockflag[ xO ][ yO ] ae(v) s¡( merge_subblock_flag[ xO ][ yO ] = = 1 ) {if( MaxNumSubblockMergeCand > 1 ) merge_subblock_idx[ xO ][ yO ] ae(v)} else {if( cbWidth < 128 && cbHeight < 128 && ( (sps_ciip_enabled_flag && cu_skip_flag[ xO ][ yO ] = = 0 && (cbWidth * cbHeight) >= 64 ) | | (sps_geo_enabled_flag && MaxNumGeoMergeCand > 1 && cbWidth>=8 && cbHeight >=8 && cbWidth < 8*cbHeight && cbHeight < 8*cbWidth && slicejype = = B))) regular_merge_flag[ xO ][ yO ] ae (v) if( regular_merge_flag[ xO ][ yO ] = = 1 ) {s¡( sps_mmvd_enabled_flag) mmvd_merge_flag[ xO ][ yO ] ae(v) s¡( mmvd_merge_flag[ xO ][ yO ] = = 1 ) {s¡ ( MaxNumMergeCand > 1 ) mmvd_cand_flag[ xO ][ yO ] ae(v) mmvd_distance_idx[ xO ][ yO ] ae(v) mmvd_direction_idx[ xO ][ yO ] ae(v)} otherwise s¡( MaxNumMergeCand > 1 ) merge_idx [ xO ][ yO ] ae(v)} otherwise { 136 s¡( sps_cüp_enabled_flag && sps_geo_enabled_flag && MaxNumGeoMergeCand > 1 && slice_type = = B && cu_skip_flag[ xO ][ yO ] = = 0 && cbWidth >= 8 && cbHeight >= 8 && cbWidth < 8*cbHeight && cbHeight < 8*cbW idth && cbWidth <128 && cbHeight < 128) ciip_flag[ xO ][ yO ] ae(v) s¡( cüp_flag[ xO ][ yO ] && MaxNumMergeCand > 1 ) merge_idx[ xO ][ yO ] ae(v) s¡( !ciip_flag[ xO ][ yO ] && MaxNumGeoMergeCand > 1 ) {merge_geo_partition_idx[ xO ][ yO ] ae(v) merge_geo_idxO[ xO ][ yO ] ae(v) s¡( MaxNumGeoMergeCand > 2 ) merge_geo_idx1 [ xO ][ yO ] ae(v )}}}}} The MaxNumGeoMergeCand variable is derived according to any of the previous examples. An alternative SliceMaxNumGeoMergeCand variable that is derived from the MaxNumGeoMergeCand variable can be used. The value of MaxNumGeoMergeCand is obtained at the highest signaling levels (for example PH, PPS or SPS). In one example, SliceMaxNumGeoMergeCand is derived based on the value of MaxNumGeoMergeCand and additional checks that are performed for the slice. For example, SliceMaxNumGeoMergeCand = (num_IO_weighted_ref_p¡cs>O || num_l1_weighted_ref_p¡cs>0) ? 0 : MaxNumGeoMergeCand. In another example, the following expression is used to determine the MaxNumGeoMergeCand value: ΜΛ / t / ZUZZ / U ί Ί Z4Ó 137 SliceMaxNumGeoMergeCand = (!pic_inter_slice_present_flag) ? 0: MaxNumGeoMergeCand. In an example, The following syntax table is defined: picture_header_rbsp() {Descriptor pic_inter_bipred_sl¡ce_present_flag if (!picjnter_bipred_sl¡ce_present_flag) pic_inter_slice_present_flag s¡( picjnter_slice_present_flag) pic_intra_slice_present_flag u(1) s¡( (pps_weighted_pred_flag | | pps_weighted_bipre d_flag ) && picjnter_slice_present_flag && weighted_pred_table_present_in_ph_flag ) pred_weight_table() The MaxNumGeoMergeCand variable is derived as follows: SliceMaxNumGeoMergeCand = (!pic_inter_bipred_slice_present_flag) ? 0: MaxNumGeoMergeCand. A method of indicating the number of fusion candidates for rectangular and non-rectangular modes is described. The numbers of fusion candidates for rectangular and non-rectangular modes are interdependent, and it may not be necessary to indicate the number of fusion candidates for non-rectangular modes in the case where the number of fusion candidates for rectangular modes is indicated as less than a threshold. Particularly for TPM or Geo blend modes, there must be at least two blend mode candidates, since a predicted block using any of these non-rectangular blend modes requires two inter-predictors with different MVs specified by them. In one embodiment, when the number of fusion mode candidates is indicated in the sequence parameter set (SPS), the following syntax could be used: 7.3.2.3 RBSP Stream Parameter Set Syntax seq_parameter_set_rbsp() {Descriptor 138 sps_decoding_parameter_set_id u(4) sps_video_parameter_set_id u(4) sps_max_sublayers_minus1 u(3) s ps_reserved_ze ro_4b its u(4) sps_ptl_dpb_hrd_params_present_flag u(1) s¡( spsj3tl_dpb_hrd_params_present_flag ) profile_tier _level( 1, sps_max_sublayers_minus1 ) gdr_enabled_flag u(1) sps_seq_parameter_set_id u(4) chroma_format_idc u(2) s¡( chromajormatjdc = = 3 ) separate_colour_plane_flag u(1) ref_pic_resampling_enabled_flag u(1) pic_width_max_in_luma_samples ue(v) pic_height_max_in_luma_samples ue(v) sps_log2_ctu_size_minus5 u(2) subpics_present_flag u (1) s¡( subpics_present_flag ) {sps_num_subpics_minus1 u (8) for( i = 0; i <= sps_num_subpics_minus1; i++ ) {subpic_ctu_top_left_x[ i ] u(v) subpic_ctu_top_left_y[ i ] u(v) subpic_width_minus1[ i ] u(v) subpic_height_minus1[ i ] u(v) subpic_treated_as_pic_flag [ i ] u(1) loop_filter_across_subpic_enabled_flag[ i ] u(1)}} sps_subpic_id_present_flag u(1) s¡( sps_subpicjd_present_flag) {sps_subpic_¡d_signalling_present_flag u(1) s¡( sps_subpic_¡d_signall¡ng_present_flag ) {sps_subpic_id _len_minus1 ue(v) for( i = 0; i <= sps_num_subpics_minus1; Í++ ) ΜΛ / t / ZUZZ / U ί Ί Z4Ó 139 sps_subpic_¡d[ i ] u(v)}} bit_depth_minus8 ue(v) min_qp_prime_ts_minus4 ue(v) sps_weighted_pred_flag u(1) sps_weighted_bipred_flag u(1) Iog2_max_pic_order_cnt_lsb_minus4 u(4) sps_poc_msb_flag u(1) s (sps_poc_msb_flag) poc msblenminusl ue (v) s¡( sps_max_sublayers_minus1 > 0 ) sps_sublayer_dpb_params_flag u(1) s¡( sps_ptl_dpb_hrd_params_present_flag ) dpb_parameters( 0, sps_max_sublayers_minus1, sps_sublayer_dpb_params_flag ) long_term_ref_pics _flag u(1) inter_layer_ref_pics_present_flag u(1) sps_idr_rpl_present_flag u(1) rpl1_same_as_rpl0_flag u(1) para( i = 0; i < !rpl1_same_as_rpl0_flag ? 2 :1; i++) {num_ref_pic_lists_in_sps[ i ] ue(v) for( j = 0; j < num_ref_p¡c_listsjn_sps[ i ]; j++) ref_pic_list_struct( i, j)} s¡ ( ChromaArrayType != 0 ) qtbtt_dual_tree_intra_flag u(1) Iog2_min_luma_cod¡f¡cation_block_size_m¡nus2 ue(v) partition_constraints_override_enabled_flag u(1) sps_log2_d iffm i nqtmi n_cb_i ntra_sl ice_lu ma ue(v ) s ps_l og 2d iffm i n_qt_m i n_cb_¡ nte r_sl ¡ce ue(v) sps_max_mtt_hierarchy_depth_¡nter_sl¡ce ue(v) sps_max_mtt_hierarchy_depth_¡ntra_sl¡ce_luma ue(v) s¡( sps_max_mtt_hierarchy_depthjntra_slicejuma != 0 ) { ΜΛ / ΙΖ / ZUZZ / U ί Ί Z4Ó 140 sps_log2_d¡ff_max_bt_min_qt_¡ntra_slice_luma ue(v) sps_log2_d¡ff_max_tt_min_qt_¡ntra_slice_luma ue(v)} if( sps_max_mtt_hierarchy_depthjnter_sl¡ce != 0 ) {sps_log2_diff max bt min qt inter slice ue( v) spsJog2_diff max_tt_min_qt_intersl ice ue(v)} if( qtbtt_dual_tree_intra_flag) {sps_log2_diff_m¡n_qt_min_cb_intra_slice_chroma ue(v) sps_max_mtt_hierarchy_depth_¡ntra_slice_chroma ue(v) s¡( sps_max_mtt_hierarchy_depth_¡ntra_sl¡ce_chroma != 0 ) {sp s_log2_diff_max_bt_min_qt_intra_slice_chroma ue(v) sps_log2_dif fmaxttm i n_qt_i ntra_sl ice_ch roma ue(v)}} sps_max_luma_trans1orm_size_64_flag u (1) spsjoint_cbcr_enabled_flag u(1) i( ChromaArrayType != 0 ) {same_qp_table_for_chroma u(1) numQpTables = same_qp_table_for_chroma ? 1 : ( spsjoint_cbcr_enabled_flag ? 3 : 2 ) for( i = 0; i < numQpTables; i++ ) {qp_table_start_minus26[ i ] se(v) num_points_in_qp_table_minus1[ i ] ue(v) for( j = 0; j <= num_points_in_qp_table_minus1 [ i ]; j++ ) {delta_qp_in_val_minus1[ i ][ j ] ue(v) delta_qp_diff_val[ i ][ j ] ue(v)}}} sps_sao_enabled_flag u(1) sps_alf_enabled_flag u(1) sps_transform_skip_enabled_flag u(1) s¡( sps_transform_skip_enabled_flag ) ΜΛ / t / ZUZZ / U ί Ί Z4Ó 141 sps_bdpcm_enabledjlag u(1) s¡( sps_bdpcm_enabled_flag && chromajormatjdc = = 3 ) sps_bdpcm_chroma_enabled_flag u(1) sps_ref_wraparound_enabled_flag u(1) s¡( sps_ref_wraparound_enabled_flag ) sps_ref_w rap arou n d_off set_m i n u s 1 ue(v) sps_temporal_mvp_enabled_flag u(1) s¡( sps_temporal_mvp_enabled_flag ) sps_sbtmvp_enabled_flag u(1) sps_amvr_enabled_flag u(1) sps_bdof_enabled_flag u(1) s¡( sps_bdof_enabled_flag ) sps_bdof_pic_present_flag u(1) sps_smvd_enabled_flag u(1) sps_dmvr_enabled_ flag u(1) s¡( sps_dmvr_enabled_flag) sps_dmvr_pic_presentjlag u(1) sps_mmvd_enabled_flag u(1 ) sps_isp_enabled_flag u(1) sps_mrl_enabled_flag u(1) sps_mip_enabled_flag u(1) s¡( ChromaArrayType != 0) sps_cclm_enabled_flag u(1) s¡( chromajormatjdc = = 1 ) {sps_chroma_horizontal_collocatedjlag u(1 ) sps_chroma_vertical_collocatedjlag u(1)} sps_mts_enabledjlag u(1) s¡( sps_mts_enabledjlag) {sps_explicit_mtsjntra_enabledjlag u(1) sps_explicit_mtsjnter_enabledjlag u(1)} sps_six_minus_max_num_merge_cand ue(v) sps_sbt_enabledjlag u(1) 142 sps_affine_enabled_flag u(1) s¡( sps_affine_enabled_flag) {sps_five_minus_max_num_subblock_merge_cand ue(v) sps_affine_type_flag u(1) spsaffineamvrenabledflag u(1) sps_affine_prof_enabled_flag u(1) s¡( sps_affine_prof_enabled_ flag) sps_prof_pic_present_flag u(1)} s¡( chromajormatjdc = = 3 ) {sps_act_enabled_flag u(1) sps_palette_enabled_flag u(1)} sps_bcw_enabled_flag u(1) sps_ibc_enabled_flag u(1) yes (sps_ibc_enabled_flag) spssixminus max numibc merge cand ue(v) sps_ciip_enabled_flag u(1) yes¡( sps_mmvd_enabled_flag ) sps_fpel_mmvd_enabled_flag u(1) sps_geo_enabled_flag u(1) if ( sps_geo_enabled_flag && MaxNumMergeCand >= 3 ) spsmaxnummergecandminusmaxnumgeocand ue(v) sps_lmcs_enabled_flag u(1) sps_lfnst_enabled_flag u(1) sps_ladf_enabled_flag u(1) s¡( sps_ ladf_enabled_flag) {sps_num_ladfjntervals_minus2 u(2) sps_ladf_lowest_interval_qp_offset se(v) for( i = 0; i < sps_num_ladf_intervals_minus2 + 1; i++ ) {sps_ladf_qp_offset[ i ] se(v) sps_ladf_delta_threshold_minus1[ i ] ue(v)}} 143 sps_scaling_list_enabled_flag u(1) sps_virtual_boundaries_present_flag u(1) s¡( sps_virtual_boundaries_present_flag ) {sps_num_ver_virtual_boundaries u(2) for( i = 0; i < sps_num_ver_virtual_boundaries; i++ ) sps_virtual_boundaries_pos_x[ i ] u(13) sps_num _hor_virtual_boundaries u(2) for( i = 0; i < sps_num_hor_virtual_bOLindar¡es; i++ ) sps_virtual_boundaries_pos_y[ i ] u(13)} s¡( sps_ptl_dpb_hrd_params_present_flag ) {sps_general_hrd_params_present_flag u(1) s¡( sps_general_hrd_params_present_flag) {general_hrd _parameters() s¡( sps_max_sublayers_minus1 > 0 ) sps_sublayer_cpb_params_present_flag u(1 ) firstSubLayer = sps_sublayer_cpb_params_present_flag ? 0 : sps_max_sublayers_minus1 ols_hrd_parameters( firstSubLayer, sps_max_sublayers_minus1 )}} field_seq_flag u(1) vui_parameters_present_flag u(1) s¡( vui_parameters_present_flag ) vui_parameters() / * Specified in ITU-T H.SEI | ISO / IEC 23002-7 7 sps_extension_flag u(1) s¡( sps_extension_flag ) while( more_rbsp_data()) sps_extension_data_flag u(1) rbsp_trailing_bits()} ΜΛ / t / ZUZZ / U ί 1 144 According to one embodiment of the invention, the following steps are performed to indicate the number of fusion mode candidates in the SPS: Indication of the number of merge mode candidates for regular modes (MaxNumMergeCand); Indication of whether non-rectangular modes are enabled by a non-rectangular merge enable flag (sps_geo_enabled_flag); and In the case where the value of the non-rectangular fusion enable label is non-zero and when the number of fusion mode candidates for regular fusion modes exceeds a first threshold, indication of the number of modes of non-rectangular modes ( sps_max_num_merge_cand_minus_max_num_geo_cand). wherein the indication of the non-rectangular fusion enable label is performed when the number of the fusion mode candidates for regular modes exceeds a second threshold value, for example 1. ΜΛ / t / ZUZZ / U ί Ί Z4Ó In Mode 1, this sequence of steps is shown as the following part of the SPS syntax of the VVC specification: if ( MaxNumMergeCand > 1 ) sps_geo_enabled_flag u(1) if (sps_geo_enabled_flag && MaxNumMergeCand >= 3 ) spsmaxnummergecandminusmaxnumgeocand ue(v) In this mode, two sequential verifications are performed, and the second verification depends on the value of a tag that is flagged or not according to the result of the first verification. Modality 2 performed the second verification differently compared to the process described by Modality 1. Particularly, Modality 1 uses the condition “greater” instead of “greater than or equal.” This sequence of steps is shown as the following part of the SPS syntax of the VVC specification: if ( MaxNumMergeCand > 1 ) sps_geo_enabled_flag u(1) if ( sps_geo_enabled_flag && MaxNumMergeCand > 2 ) spsmaxnummergecandminusmaxnumgeocand ue(v) 145 Mode 3 differs from Mode 1 in that the second check is not performed when the first check results in a false value, the value of the non-rectangular merge enable flag (sps_geo_enabled_flag) is determined after a geo derivation process is completed. MaxNumMergeCand value of sps_six_minus_max_num_merge_cand and the syntax element is a technical benefit, because the value of sps_geo_enabled_flag is not referenced for some MaxNumMergeCand values and could therefore be omitted from manipulation in the parsing process. This sequence of steps performed according to Mode 3 is shown as the following part of the SPS syntax of the VVC specification: ΜΛ / í 1 or if ( MaxNumMergeCand > 1 ) {sps_geo_enabled_flag u(1) if (sps_geo_enabled_flag && MaxNumMergeCand >= 3) sps_max_num_merge_cand_minus_max_num_geo_cand ue(v)} Mode 4 is a combination of aspects of Mode 2 and Mode 3. The sequence of steps performed according to Mode 4 is shown as the following part of the SPS syntax of the VVC specification: if ( MaxNumMergeCand > 1 ) {sps_geo_enabled_flag u(1) if ( sps_geo_enabled_flag && MaxNumMergeCand > 2 ) sps_max_num_merge_cand_minus_max_num_geo_cand ue(v)} Modalities 5-8 describe different formulations of the first and second verification. These modalities can be explained as follows: Modality 5 146 if ( MaxNumMergeCand >= 2 ) sps_geo_enabled_flag u(1) if ( sps_geo_enabled_flag && MaxNumMergeCand >= 3 ) sps_max_num_merge_cand_minus_max_num_geo_cand ue(v) Mode 6 if ( MaxNumMergeCand >= 2 ) sps_geo_enabled_flag u(1) if ( sps_geo_enabled_flag && MaxNumMergeCand > 2 ) spsmaxnummergecandminusmaxnumgeocand ue(v) Mode 7 if ( MaxNumMergeCand >= 2 ) {sps_geo_enabled_flag u(1) if ( sps_geo_enabled_flag && MaxNumMergeCand >= 3 ) sps_max_num_merge_cand_minus_max_num_geo_cand ue(v)} Mode 8 if ( MaxNumMergeCand >= 2 ) {sps_geo_enabled_flag u(1) if ( sps_geo_enabled_flag && MaxNumMergeCand > 2 ) sps_max_num_merge_cand_m¡nus_max_num_geo_cand ue(v)} In an implementation as shown in FIGURE 15, a method for obtaining a 147 maximum number of geometric partition fusion mode candidates for video decoding is described, the method comprises: S1501: Obtain a bitstream for a video stream. The bit stream can be obtained according to the wireless network or the wired network. The bit stream can be transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, microwave, WIFI, Bluetooth, LTE or 5G. In one embodiment, a bitstream is a sequence of bits, in the form of a network abstraction layer (NAL) unit stream or a byte stream, that forms the representation of a sequence of units. access units (AUs) that form one or more coded video sequences (CVSs). In some embodiments, for a decoding process, the decoder side reads a bitstream and obtains decoded images of the bitstream; For an encoding process, the encoder side produces a stream of bits. Typically, a bitstream will comprise syntax elements that are formed by a syntactic structure. syntax element: A data element represented in the bitstream. syntax structure: Zero or more syntax elements present together in the bitstream in a specified order. In a specific example, bitstream formats specify the relationship between the network abstraction layer (NAL) unit stream and the byte stream, either of which is called the bitstream. The bitstream can be in one of two formats: the NAL unit stream format or the byte stream format. The NAL drive stream format is conceptually the most “basic” type. The NAL unit stream format comprises a sequence of syntactic structures called NAL units. This sequence is arranged in decoding order. There are restrictions imposed on the decoding order (and contents) of NAL units in the NAL unit stream. The byte stream format can be constructed from the NAL unit stream format by arranging the NAL units in decoding order and prefixing each NAL unit with a start code prefix and zero or more zero-value bytes to form a byte stream. bytes. The NAL unit stream format can be extracted from the byte stream format by finding the location of the single start code prefix pattern within this byte stream. This clause specifies the relationship between the source and the decoded images that are provided via the bitstream. ΜΛ / t / ZUZZ / U ί 1Z4Ó 148 The video source represented by the bitstream is a sequence of images in decoding order. The source and decoded images are each composed of one or more sample sets: - Luma (Y) only (monochrome). - Luma and two chroma (YCbCr or YCgCo). Green, blue, and red (GBR, also known as RGB). Sets representing other unspecified monochromatic or three-stimulus color samples (e.g., YZX, also known as XYZ). The variables and terms associated with these sets are known as luma (or L or Y) and chroma, where the two chroma sets are known as Cb and Cr; regardless of the actual color representation method in use. The actual color rendering method in use may be indicated in the syntax specified in the VUI parameters as specified in ITU-T H.SEI | ISO / IEC 23002-7. S1502: Obtain a value of a first indicator according to the bitstream. The first indicator represents the maximum number of fusion motion vector prediction candidates, MVP. In one example, the first indicator is represented according to a MaxNumMergeCand variable. For example, the maximum number of merge MVP candidates, MaxNumMergeCand, is derived as follows: MaxNumMergeCand = 6 - sps_six_minus_max_num_merge_cand. Where sps_six_minus_max_num_merge_cand specifies the maximum number of motion vector prediction (MVP) candidates supported in the SPS subtracted from 6. The value of sps_six_minus_max_num_merge_cand will be in the range 0 to 5, inclusive. In one example, sps_six_minus_max_num_merge_cand is parsed from the RBSP syntax structure of the Sequence parameter set in the bitstream. S1503: Obtain a value of a second flag according to the bitstream. The second flag represents whether a motion compensation based on geometric partitioning is enabled for the video stream. In one example, the second flag is represented according to sps_geo_enabled_flag (sps_gpm_enabled_flag). sps_geo_enabled_flag equal to 1 specifies that motion compensation based on geometric partitioning is enabled for CLVS and merge_gpm_partitionjdx, merge_gpm_idxO, and merge_gpmjdx1 could be present in the CLVS encoding unit syntax. sps_geo_enabled_flag equal to 149 specifies that motion compensation based on geometric partitioning is disabled for CLVS and merge_gpm_partition_idx, merge_gpm_idxO, and merge_gpm_idx1 are not present in the CLVS encoding unit syntax. When not present, the value of sps_geo_enabled_flag is inferred to be equal to 0. In one implementation, the step of obtaining a value of a second indicator is performed after the step of obtaining a value of a first indicator. In one implementation, the value of the second flag is obtained from the sequence parameter set, SPS, of the bitstream. In one implementation, the value of the second flag is parsed from the sequence parameter set, SPS, of the bitstream, when the value of the first flag is greater than or equal to the threshold. The threshold is an integer value, in an example the threshold is 2. For example, the value of the second flag sps_gpm_enabled_flag is obtained according to, RBSP Sequence Parameter Set Syntax ΜΛ / t / ZUZZ / U ί Ί Z4Ó s!(MaxNumMergeCand >= 2) {sps qpm enabled flaq u(1) S1504: Parse a value of a third flag in the bitstream. In one implementation, parsing a value of a third flag of the bitstream, when the value of the first flag is greater than a threshold and when the value of the second flag is equal to a preset value, wherein the third flag represents the maximum number of geometric partition merge mode candidates subtracted from the value of the first indicator. Threshold is an integer value, preset value is an integer value. In an example, the threshold is 2. In an example, the default value is 1. In one example, the value of the third flag is obtained from the sequence parameter set, SPS, of the bitstream In one example, the third indicator is represented according to sps_max_num_merge_cand_minus_max_num_geo_cand (sps_max_num_merge_cand_minus_max_num_gprn_cand). For example, the value of the third flag sps_max_num_merge_cand_minus_max_num_gpm_cand is obtained according to, RBSP Sequence Parameter Set Syntax s¡( MaxNumMergeCand >= 2) {sps_gpm_enabled_flag u(1) s¡( sps_gpm_enabled_flag && MaxNumMergeCand >= 3 ) 150 spsmaxnummergecandminusmaxnumgpmcand ue(v)} ΜΛ / t / ZUZZ / U ί 1Z4Ó In an implementation, wherein the method further comprises: setting the value of the maximum number of candidates for the geometric partition merge mode to 2, when the value of the first indicator is equal to the threshold and when the value of the second indicator is equal to the value preset. In an implementation, wherein the method further comprises: setting the value of the maximum number of candidates for the geometric partition merge mode to 0, when the value of the first indicator is less than the threshold or when the value of the second indicator is not equal to the preset value. In an example, sps_max_num_merge_cand_minus_max_num_gpm_cand specifies the maximum number of geometric partition merge mode candidates supported in the SPS subtracted from MaxNumMergeCand. The value of sps_max_num_merge_cand_minus_max_num_gpm_cand will be in the range 0 to MaxNumMergeCand - 2, inclusive. The maximum number of geometric partition merge mode candidates, MaxNumGpmMergeCand (MaxNumGeoMergeCand), is derived as follows: s¡( sps_gpm_enabled_flag && MaxNumMergeCand >= 3) MaxNumGpmMergeCand = MaxNumMergeCand sps_max_num_merge_cand_minus_max_num_gpm_cand otherwise yes( sps_gpm_enabled_flag && MaxNumMergeCand = =2 ) MaxNumGpmMergeCand =2 else MaxNumGpmMergeCand = 0. In an implementation as shown in FIGURE 16, a video decoding apparatus 1600 is described, the video decoding apparatus comprises: a receiver module 1601, which is configured to obtain a bit stream for a video sequence; a obtaining module 1602, which is configured to obtain a value of a first indicator according to the bit stream, wherein the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; the obtaining module 1602 being configured to obtain a value of a second indicator according to the bit stream, wherein the second indicator represents whether a motion compensation based on the geometric partition is enabled for the video sequence; a 151 analysis module 1603, which is configured to analyze a value of a third indicator of the bit stream, when the value of the first indicator is greater than a threshold and when the value of the second indicator is equal to a preset value, wherein the The third flag represents the maximum number of geometric partition merge mode candidates subtracted from the value of the first flag. In one implementation, the get module 1602 is configured to set the value of the maximum number of geometric partition merge mode candidates to 2, when the value of the first flag is equal to the threshold and when the value of the second flag is equal to preset value. In one implementation, the get module 1602 is configured to set the value of the maximum number of geometric partition merge mode candidates to 0, when the value of the first flag is less than the threshold or when the value of the second flag is not equal to the preset value. In one implementation, the threshold is 2. In one implementation, the default value is 1. In one implementation, the step of obtaining a value of a second indicator is performed after the step of obtaining a value of a first indicator. In one implementation, the value of the second flag is parsed from the sequence parameter set, SPS, of the bitstream, when the value of the first flag is greater than or equal to the threshold. In one implementation, the value of the second flag is obtained from the sequence parameter set, SPS, of the bitstream. In one implementation, the value of the third flag is obtained from the sequence parameter set, SPS, of the bitstream. Additional details for the receiver module 1601, obtain module 1602 and analysis module 1603 could refer to the examples and implementations of the previous method. Example 1. The video coding method comprising signaling the number of fusion mode candidates, the method comprising: Indication of the number of merge mode candidates for regular modes (MaxNumMergeCand); Indication of whether non-rectangular modes are enabled by a non-rectangular merge enable flag (sps_geo_enabled_flag); and In the case that the value of the non-rectangular fusion enable label is not zero and when the number of fusion mode candidates for regular fusion modes exceeds a first threshold, the indication of the number of modes of non-rectangular fusion modes 152 rectangular (sps_max_num_merge_cand_minus_max_num_geo_cand), where the indication of the non-rectangular merge enable label is performed when the number of the merge mode candidates for regular modes exceeds a second threshold value (1). Example 2. The method of Example 1, where the value of the non-rectangular merge enable tag is determined after a process of deriving the MaxNumMergeCand value of the sps_six_minus_max_num_merge_cand syntax element is completed. Example 3. The method of any of the previous examples wherein the threshold check is a comparison of whether the number of blend mode candidates for regular blend modes is greater than 2. Example 4. The method of Example 1 or Example 2, wherein the first threshold check is a comparison of whether the number of blend mode candidates for regular blend modes is greater than or equal to 3. In one example, an Inter prediction method is described, comprising: determining whether a non-rectangular Inter prediction mode is allowed for a group of blocks; obtaining one or more inter prediction mode parameters and weighted prediction parameters for the block group; and obtaining prediction value of a current block based on one or more inter prediction mode parameters and weighted prediction parameters, wherein one of the inter prediction mode parameters indicates reference image information for the current block, and where the block group comprises the current block. In one example, the reference image information comprises whether weighted prediction is enabled for a reference image index, and wherein the inter-non-rectangular prediction mode is disabled in the case that weighted prediction is enabled. In a feasible implementation, the inter-non-rectangular prediction mode is enabled in the case where weighted prediction is disabled. In an example, determining the inter-non-rectangular prediction mode is allowed, which comprises: indicating the maximum number of triangular merge candidates (MaxNumTriangleMergeCand) is greater than 1. In one example, the block group consists of an image, and where weighted prediction parameters and indication information for determining the inter-non-rectangular prediction mode are allowed are in an image header of the image. In one example, the block group consists of a segment, and where weighted prediction parameters and indication information to determine the inter-non-rectangular prediction mode are allowed are in a segment header of the segment. ΜΛ / t / ZUZZ / U í Ί Z4Ó 153 In one example, the inter-non-rectangular prediction mode is a triangular partition mode. In one example, the inter-non-rectangular prediction mode is a geometric (GEO) partitioning mode. In one example, weighted prediction parameters are used for segment-level luminance compensation. In one example, weighted prediction parameters are used for block-level luminance compensation. In one example, the weighted prediction parameters comprise: labels indicating whether the weighted prediction is applied to luma and / or chroma components of a prediction block; and linear model parameters that specify a linear transformation of a value of the prediction block. In one example, an apparatus for inter prediction is described, comprising: a non-transitory memory having processor-executable instructions stored therein; and a processor, coupled to memory, configured to execute the processor-executable instructions to facilitate any of the example methods. In one example, a bitstream for inter prediction is described, comprising: indicating information to determine whether a non-rectangular inter prediction mode is allowed for a group of blocks; and one or more inter prediction mode parameters and weighted prediction parameters for the group of blocks, wherein the prediction value of a current block is obtained based on one or more inter prediction mode parameters and weighted prediction parameters , wherein one of the inter prediction mode parameters indicates reference image information for the current block, and wherein the group of blocks comprises the current block. In one example, the reference image information comprises whether weighted prediction is enabled for a reference image index, and wherein the inter-non-rectangular prediction mode is disabled in the case that weighted prediction is enabled. In one example, the inter-non-rectangular prediction mode is enabled in the case where weighted prediction is disabled. In one example, the indicator information comprises the maximum number of merge triangular candidates (MaxNumTriangleMergeCand) is greater than 1. In one example, the block group consists of an image, and wherein the weighted prediction parameters and indicator information are in an image header of the image. In one example, the block group consists of a segment, and where the parameters 154 weighted prediction and indicator information are in a segment header of the segment. In one example, the inter-non-rectangular prediction mode is a triangular partition mode. In one example, the inter-non-rectangular prediction mode is a geometric (GEO) partitioning mode. In one example, weighted prediction parameters are used for segment-level luminance compensation. In one example, weighted prediction parameters are used for block-level luminance compensation. In one example, the weighted prediction parameters comprise: labels indicating whether the weighted prediction is applied to luma and / or chroma components of a prediction block; and linear model parameters that specify a linear transformation of a value of the prediction block. In one example, an inter prediction apparatus is described, comprising: a determination module, configured to determine whether a non-rectangular inter prediction mode is allowed for a group of blocks; a get module, configured to get one or more inter prediction mode parameters and weighted prediction parameters for the group of blocks; and a prediction module, configured to obtain prediction value of a current block based on one or more inter prediction mode parameters and weighted prediction parameters, wherein one of the inter prediction mode parameters indicates image information of reference for the current block, and where the group of blocks comprises the current block. In one example, the reference image information comprises whether weighted prediction is enabled for a reference image index, and wherein the inter-non-rectangular prediction mode is disabled in the case that weighted prediction is enabled. In one example, the inter-non-rectangular prediction mode is enabled in the case where weighted prediction is disabled. In one example, the determination module is specifically configured to: indicate the maximum number of merge triangle candidates (MaxNumTriangleMergeCand) is greater than 1. In one example, the block group consists of an image, and where weighted prediction parameters and indication information for determining the inter-non-rectangular prediction mode are allowed are in an image header of the image. In one example, the group of blocks consists of a segment, and where allowed 155 the weighted prediction parameters and indication information for determining the inter-non-rectangular prediction mode are in a segment header of the segment. In one example, the inter-non-rectangular prediction mode is a triangular partition mode. In one example, the inter-non-rectangular prediction mode is a geometric partitioning (GEO) mode. In one example, weighted prediction parameters are used for segment-level luminance compensation. In one example, weighted prediction parameters are used for block-level luminance compensation. In one example, the weighted prediction parameters comprise: labels indicating whether the weighted prediction is applied to luma and / or chroma components of a prediction block; and linear model parameters that specify a linear transformation of a value of the prediction block. The embodiments provide efficient encoding and / or decoding using signal-related information in segment headers only for segments that allow or enable inter-bidirectional prediction, for example in bidirectional prediction (B) segments, also called B segments. Below is an explanation of the applications of the encoding method as well as the decoding method as shown in the above-mentioned modalities, and a system that uses them. FIGURE 10 is a block diagram showing a content delivery system 3100 for performing content distribution service. This content delivery system 3100 includes a capture device 3102, terminal device 3106, and optionally includes a display 3126. The capture device 3102 communicates with the terminal device 3106 over the communication link 3104. The communication link may include the communication channel 13 described above. Communication link 3104 includes but is not limited to WIFI, Ethernet, Cable, wireless (3G / 4G / 5G), USB, or any combination thereof, or the like. The capture device 3102 generates data, and may encode the data by the encoding method as shown in the above embodiments. Alternatively, the capture device 3102 may distribute the data to a transmission server (not shown in the figures), and the server encrypts the data and transmits the encrypted data to the terminal device 3106. The capture device 3102 includes but is not limited to camera, smartphone or Pad, computer or laptop, conferencing system, PDA, vehicle-mounted device, or a combination of any of them, or the like. For example, the device M A / LH / ¿U¿¿ / U f1 Capture device 156 3102 may include source device 12 as described above. When the data includes video, the video encoder 20 included in the capture device 3102 can currently perform video encoding processing. When the data includes audio (i.e., voice), an audio encoder included in the capture device 3102 may currently perform audio encoding processing. For some practical scenarios, the capture device 3102 distributes the encoded video and audio data by multiplexing them together. For other practical scenarios, for example in the video conferencing system, the encoded audio data and the encoded video data are not multiplexed. The capture device 3102 distributes the encoded audio data and the encoded video data to the terminal device 3106 separately. In the content delivery system 3100, the terminal device 310 receives and plays the encrypted data. The terminal device 3106 could be a device with data reception and retrieval capability, such as smartphone or Pad 3108, computer or laptop 3110, network video recorder (NVR) / digital video recorder (digital video recorder, DVR) 3112, TV 3114, set top box (STB) 3116, conference system 3118, video surveillance system 3120, personal digital assistant (PDA) 3122, vehicle-mounted device 3124, or a combination of any of them, or similar capable of decoding the encrypted data mentioned above. For example, the terminal device 3106 may include the destination device 14 as described above. When the encoded data includes video, the video decoder 30 included in the terminal device is prioritized to perform video decoding. When the encoded data includes audio, an audio decoder included in the terminal device is prioritized to perform audio decoding processing. For a terminal device with its display, for example, smartphone or Pad 3108, computer or laptop 3110, network video recorder (NVR) / digital video recorder (DVR) 3112, TV 3114, personal digital assistant (PDA) 3122, or vehicle-mounted device 3124, the terminal device may feed the decoded data to its display. For a terminal device equipped without a display, for example, STB 3116, conference system 3118, or video surveillance system 3120, an external display 3126 is contacted to receive and display the decoded data. When each device in this system performs encoding or decoding, the image encoding device or the image decoding device, as shown in the above-mentioned embodiments, can be used. FIGURE 11 is a diagram showing a structure of an example of the device ΜΛ / t / ZUZZ / U / Ί Z4Ó 157 terminal 3106. After the terminal device 3106 receives the stream from the capture device 3102, the protocol processing unit 3202 analyzes the transmission protocol of the stream. The protocol includes but is not limited to Real Time Streaming Protocol (RTSP), Hyper Text Transfer Protocol (HTTP), HTTP Live streaming protocol (HLS) , MPEG-DASH, Real-time Transport Protocol (RTP), Real Time Messaging Protocol (RTMP), or any kind of combination thereof, or similar. After the protocol processing unit 3202 processes the stream, the stream file is generated. The file is sent to a demultiplexing unit 3204. The demultiplexing unit 3204 can separate the multiplexed data into encoded audio data and encoded video data. As described above, for some practical scenarios, for example in the video conferencing system, the encoded audio data and the encoded video data are not multiplexed. In this situation, the encoded data is transmitted to the video decoder 3206 and the audio decoder 3208 without passing through the demultiplexing unit 3204. Through demultiplexing processing, elementary video streams (ES), ES audio, and optionally subtitles are generated. The video decoder 3206, including the video decoder 30 as explained in the aforementioned embodiments, decodes the video ES by the decoding method as shown in the aforementioned embodiments to generate video frames, and feeds this data to the synchronous unit 3212. The audio decoder 3208 decodes the ES audio to generate an audio frame, and feeds this data to the synchronous unit 3212. Alternatively, the video frame may be stored in a buffer (not shown in the FIGURE 11) before sending it to the synchronous unit 3212. Similarly, the audio frame can be stored in a buffer (not shown in FIGURE 11) before sending it to the synchronous unit 3212. The synchronous unit 3212 synchronizes the video frame and the audio frame, and supplies the video / audio to a video / audio display 3214. For example, the synchronous unit 3212 synchronizes the presentation of video and audio information. Information may be encoded in the syntax using timestamps related to the presentation of encoded audio and visual data and timestamps related to the delivery of the data stream itself. If subtitles are included in the stream, the subtitle decoder 3210 decodes the subtitles, synchronizes it with the video frame and the audio frame, and supplies the video / audio / subtitles to a video / audio / subtitle display 3216. ΜΛ / t / ZUZZ / U / 1Z4Ó 158 The present invention is not limited to the above-mentioned system, and either of the image encoding device or the image decoding device in the above-mentioned embodiments can be incorporated into another system, for example, a car system. Mathematical Operators The mathematical operators used in this application are similar to those used in the C programming language. However, the results of integer division and arithmetic change operations are defined more precisely, and additional operations are defined, such as exponentiation and division of real values. Numbering and counting conventions generally start from 0, for example, the first is equivalent to the 0th, the second is equivalent to the 1st, etc. Arithmetic operators The following arithmetic operators are defined as follows: + Addition Subtraction (as a two-argument operator) or negation (as a unitary prefix operator) * Multiplication, which includes matrix multiplication Exponentiation. Specify x to the power of y. In other contexts, such xy notation is used for superscripts that are not intended for interpretation as exponentiation. Z Division of integers with truncation of the result towards zero. For example, 7 / 4 and -7 / -4 are truncated at 1 and -7 / 4 and 7 / -4 are truncated at -1. Used to denote divisions in mathematical equations where truncation or rounding is not intended. x Used to denote divisions in mathematical equations where neither truncation nor rounding is intended. Λ. The sum of f(¡) with i taking all integer values from x to y that > f( i ) . . zL-j includes and. Module. Remainder of x divided by y, defined only for integers x y, y with x x%y >= 0 and, y > 0. Logical operators The following logical operators are defined as follows: x && y Boolean logic y of x and y x 11 y Boolean logic o of x and y ΜΛ / t / ZUZZ / U ί 1Z4Ó 159 ! Boolean logic not x ? y : z If x is true or not equal to 0, it evaluates to the value of y; otherwise, it is evaluated as the value of z. Relational operators The following relational operators are defined as follows: > Greater than >= Greater than or equal to < Less than <= Less than or equal to = = Equals != Not equal to When a relational operator is applied to a syntax element or variable that has been assigned the value na (not applicable), the value na is treated as a distinct value for the syntax element or variable. The value na is considered not equal to any other value. Bitwise operators The following bitwise operators are defined as follows; & Bit by bit and. When you operate on integer arguments, you operate on a two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by adding more significant bits equal to 0. | Bit by bit or. When operating on integer arguments, it operates on a two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by adding more significant bits equal to 0. ΛExclusive bitwise or. When operating on integer arguments, it operates on a two's complement representation of the integer value. When operating on a binary argument that contains fewer bits than another argument, the shorter argument is extended by adding more significant bits equal to 0. x » y Arithmetic shift to the right of a two's complement integer representation of x by y binary digits. This function is defined only for non-negative integer values of y. The bits shifted to the most significant bits (MSBs) as a result of the right shift have a value equal to the MSB of x before the shift operation. x « y Arithmetic shift to the left of a two's complement integer representation of x by y binary digits. This function is defined only for non-negative integer values of y. The bits shifted to the most significant bits (LSBs) 160 as a result of shifting to the right have a value equal to 0. Assignment Operators The following arithmetic operators are defined as follows: = Assignment operator + + Increment, that is, x+ + is equivalent to x = x + 1; when used in a set index, it evaluates to the value of the variable before the increment operation. Decrement, that is, x- - is equivalent to x = x- 1; when used in a set index, it evaluates to the value of the variable before the decrement operation. += Increase by specified amount, that is, x += 3 is equivalent to x = x + 3, and x += (-3) is equivalent to x = x + (-3). Decrement by specified quantity, that is, x -= 3 is equivalent to x = x 3, and x -= (-3) is equivalent to x = x - (-3). Interval notation The following notation is used to specify a range of values; x = y..zx takes integer values starting from y up to and including z, with x, y, and z being integers and z being greater than y. Mathematical functions The following mathematical functions are defined: Abs <x>= U : x<0 Asin(x) the inverse sine trigonometric function, which operates on an argument x that is in the range -1.0 up to and including 1.0, with an output value in the range -π-2 up to and including π-2, in units of radians Atan( x) the trigonometric function of the inverse tangent, which operates on an argument x, with an output value in the interval -π-^2 up to and including π^-2, in units of radians x>0 x < 0 && y >= 0 x < 0 && y < 0 x = = 0 && y >= 0 otherwise Ceil( x ) the smallest integer greater than or equal to x. CliplY( x ) = Clip3( 0,(1 « BitDepthY) - 1, x ) Atan2( y, x ) = < 161 Cliplc( x ) = Clip3( 0,(1 « BitDepthc ) - 1, x ) x ; z < x Clip3( x, y, z ) = y ; z>y Cos( χ ) ; otherwise the trigonometric function of the cosine that operates on an argument x in units of radians. Floor( x ) the largest integer less than or equal to x. (c + d ; b — a >= d / 2 GetCurrMsb( a, b, c, d ) = j c - d ; a-b > d / 2 (c; eotherwise Ln( x ) the natural logarithm of x (the logarithm to the base e, where e is the constant to the base of the natural logarithm 2.718 281 828...). Log2( x ) the base 2 logarithm of x. Log10(x) the base 10 logarithm of x. ..., . r x ;x<=y Min( x, y ) = [y. .. / s rχ;x>=y Max( x, y ) = [y.x<yy Round( x ) = Sign( x ) * Floor( Abs( x ) + 0.5 ) Sign(x) = Sin( x) of radians ' 1 ; x>0 ; x == 0 -1 ; x < 0 the trigonometric sine function that operates on an argument x in units Sqrt(x) = 'X Swap(x, y) = (y, x) Tan( x ) the trigonometric function of the tangent that operates on an argument x in units of radians Order of precedence of the operation When an order of precedence in an expression is not explicitly indicated by the use of parentheses, the following rules apply: Operations of higher precedence are evaluated before any operations of lower precedence. - Operations of the same precedence are evaluated sequentially from left to right. The table below specifies the precedence of operations from highest to lowest; a higher position in the table indicates a higher precedence. For those operators that are also used in the C programming language, the order of precedence used in this Specification is the same as used in the C programming language. 162 C programming. Table: Precedence of operations from highest (at the top of the table) to lowest (at the bottom of the table) operations (with operands x, y, and z) x++, X-- !x, - x (as a unitary prefix operator) Ίσ x * y, x / y, x + y,x % y x + y, x - y (as a two-argument operator),i=xx « y, x » y x < y, x <= y, x > y, x >= y X = = y, X != y x & y X | y x && y x | | and x? and Z x..y x = y, x += y, x -= y Text description of logical operations In the text, a statement of logical operations as will be described mathematically as follows: s¡( condition 0) statement 0 otherwise s¡( condition 1 ) statement 1 otherwise / * informative comment about the remaining state 7 statement n can be described as follows: ...as follows / ... the following applies: - If condition 0, statement 0 Otherwise, if condition 1, statement 1 Otherwise (informative comment on remaining status), statement n. Each If... Else, If... Else,... statement in the text is introduced 163 with ... as follows or ... the following applies followed immediately by If ... . The last condition of If...Else, if...Else,... is always an Interleaved If...Else, if...Else ,... statements can be identified by matching... as follows or ... the following applies with the ending Otherwise, .... In the text, a statement of logical operations such as will be described mathematically as follows: if(condition 0a && condition 0b) statement 0 else if(condition 1 to 11 condition 1b) statement 1 else statement n may be described as follows: ... as follows / ... the following applies: - If all of the following conditions are true, statement 0: - condition 0a - condition 0b - Otherwise, if one or more of the following conditions are true, statement 1: - condition 1a - condition 1b - Otherwise, statement n In the text, a statement of logical operations such as will be described mathematically in the following way: if(condition 0) statement 0 if(condition 1) statement 1 may be described as follows: When condition 0, statement 0 When condition 1, statement 1. The embodiments, for example of the encoder 20 and the decoder 30, and the functions described herein, for example with reference to the encoder 20 and the decoder 30, are ΜΛ / ί 1 or 164 can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, functions may be stored on a computer-readable medium or transmitted over communication media as one or more instructions or code and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to a tangible medium such as data storage media, or communication media, which includes any medium that facilitates the transfer of a computer program from one location to another. , for example, according to a communication protocol. Thus, computer-readable media can generally correspond to (1) tangible computer-readable storage medium that is not transient or (2) a communication medium such as a signal or a carrier wave. Data storage media may be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, code and / or data structures for the implementation of the techniques described in this description. A computer program product may include a computer-readable medium. By way of example, and without limitation, such computer-readable storage media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage, or other magnetic storage devices, flash memory, or any other medium that can be used to store the desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, any connection is correctly called a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared , radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. It should be understood, however, that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but rather are directed to non-transitory tangible storage media. Disc and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc, where the discs generally play data magnetically, while discs reproduce data optically with lasers. Combinations of the above must also be included within the scope of computer-readable media. Instructions may be executed by one or more processors, such as one or 165 more digital signal processors (DSPs), general-purpose microprocessors, application specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other circuits discrete logic or equivalent integrated. Accordingly, the term "processor" as used herein may refer to any of the above structures or any other structure suitable for the implementation of the techniques described herein. Additionally, in some aspects, the functionality described herein present may be provided within dedicated hardware and / or software modules configured to encode and decode, or incorporated into a combined codec.Also, the techniques could be implemented entirely in one or more circuits or logic elements. The techniques of this disclosure can be implemented in a wide variety of devices or apparatus, including a wireless telephone, an integrated circuit (IC), or a set of ICs (e.g., a chipset). Various components, modules, or units are described in this description to emphasize the functional aspects of devices configured to perform the described techniques, but do not necessarily require implementation by different hardware units. Rather, as described above, various units may be combined into a codec hardware unit or provided by a collection of interoperable hardware units, including one or more processors as described above, in conjunction with software and / or firmware. suitable. Additional embodiments of the present invention are provided below. It should be noted that the numbering used in the following section does not necessarily have to comply with the numbering used in the previous sections. Modality 1: A method of inter prediction of a block of an image, wherein signaling weighted prediction parameters and enabling non-rectangular inter prediction is performed for a group of predicted blocks, the method comprises: obtaining mode parameters inter prediction for a block, wherein obtaining comprises checking whether a non-rectangular inter prediction mode is enabled for the group of blocks comprising the predicted block; and obtaining weighted prediction parameters associated with the block and inter prediction mode parameters for a block with respect to the reference image indicated for the block and weighted prediction parameters specified for the group of blocks. Mode 2: A mode 1 method, wherein enabling inter-non-rectangular prediction is done by indicating the maximum number of triangular merge candidates (MaxNumTriangleMergeCand) that is greater than 1. Mode 3: A mode 1 or 2 method, where the inter-rectangular prediction ΜΛ / t / ZUZZ / U / 1Z4Ó 166 is inferred to be disabled when the weighted prediction parameters specify weighted prediction enabled for at least one benchmark. Mode 4: A method of any of modes 1 through 3, wherein a group of blocks is an image and both the weighted prediction parameters and the interprediction enabling non-rectangular mode parameters are indicated in the image header. Mode 5: A method of any of modes 1 through 4, wherein a group of blocks is a segment and both the weighted prediction parameters and the inter-prediction enabling non-rectangular mode parameters are indicated in the segment header. Mode 6: A method of any of embodiments 1 through 5, wherein the inter prediction mode parameters comprise reference index used to determine the reference image and motion vector information used to determine the position of the reference block in the reference image. Mode 7: A method of any of modes 1 through 6, where the non-rectangular fusion mode is a triangular partition mode. Mode 8: A method of any of modes 1 through 7, where the non-rectangular fusion mode is a GEO mode. Mode 9: A method of any of modes 1 through 8, wherein the weighted prediction is a segment-level luminance compensation mechanism (such as global weighted prediction). Mode 10: A method of any of modes 1 through 9, wherein the weighted prediction is a block-level luminance compensation mechanism, such as local illumination compensation (LIC). Mode 11: A method of any of embodiments 1 through 10, wherein the weighted prediction parameters comprise: a set of labels that indicate whether the weighted prediction is applied to luma and chroma components of the predicted block; Linear model parameters\alpha and \beta that specify the linear transformation of the predicted block values. In a first aspect of the present application, as shown in FIGURE 12, an inter prediction method 1200 is described, comprising: S1201: determining whether a non-rectangular inter prediction mode is allowed for a group of blocks; S1202: obtain one or more inter prediction mode parameters and weighted prediction parameters for the block group; and S1203: obtain prediction value of a current block based on one or more inter prediction mode parameters and weighted prediction parameters, wherein one of the inter prediction mode parameters indicates reference image information for ΜΛ / t / ZUZZ / U / Ί Z4Ó 167 the current block, and where the group of blocks comprises the current block. In a feasible implementation, the reference image information comprises whether weighted prediction is enabled for a reference image index, and wherein the inter-non-rectangular prediction mode is disabled in the case that weighted prediction is enabled. In a feasible implementation, the inter-non-rectangular prediction mode is enabled in the case where weighted prediction is disabled. In a feasible implementation, it is allowed to determine the inter-non-rectangular prediction mode, which comprises: indicating the maximum number of triangular fusion candidates (MaxNumTriangleMergeCand) is greater than 1. In a feasible implementation, the block group consists of an image, and where weighted prediction parameters and indication information for determining the inter-non-rectangular prediction mode are allowed are in an image header of the image. In a feasible implementation, the block group consists of a segment, and where weighted prediction parameters and indication information to determine the inter-non-rectangular prediction mode are allowed are in a segment header of the segment. In a feasible implementation, the inter-non-rectangular prediction mode is a triangular partition mode. In a feasible implementation, the inter-non-rectangular prediction mode is a geometric (GEO) partitioning mode. In a feasible implementation, the weighted prediction parameters are used for segment-level luminance compensation. In a feasible implementation, weighted prediction parameters are used for block-level luminance compensation. In a feasible implementation, the weighted prediction parameters comprise: labels that indicate whether the weighted prediction is applied to luma and / or chroma components of a prediction block; and linear model parameters that specify a linear transformation of a value of the prediction block. In a second aspect of the present application, an apparatus 1300 for inter prediction, as shown in FIGURE 13, comprising: a non-transitory memory 1301 having processor-executable instructions stored therein; and a processor 1302, coupled to memory 1301 configured to execute the processor-executable instructions to facilitate any of the implementations feasible in the first aspect of the present application. ΜΛ / t / ZUZZ / U / Ί Z4Ó 168 In a third aspect of the present application, a bit stream for inter prediction, comprising: indicator information to determine whether a non-rectangular inter prediction mode is allowed for a group of blocks; and one or more inter prediction mode parameters and weighted prediction parameters for the group of blocks, wherein the prediction value of a current block is obtained based on one or more inter prediction mode parameters and weighted prediction parameters , wherein one of the inter prediction mode parameters indicates reference image information for the current block, and wherein the group of blocks comprises the current block. In a feasible implementation, the reference image information comprises whether weighted prediction is enabled for a reference image index, and wherein the inter-non-rectangular prediction mode is disabled in the case that weighted prediction is enabled. In a feasible implementation, the inter-non-rectangular prediction mode is enabled in the case where weighted prediction is disabled. In a feasible implementation, the indicator information comprises the maximum number of merge triangular candidates (MaxNumTriangleMergeCand) is greater than 1. In a feasible implementation, the block group consists of an image, and where the weighted prediction parameters and indicator information are in an image header of the image. In a feasible implementation, the block group consists of a segment, and where the weighted prediction parameters and indicator information are in a segment header of the segment. In a feasible implementation, the inter-non-rect...
Claims
1. A method for obtaining a maximum number of candidates for the geometric partitioning merging mode for video decoding, characterized in that the method comprises: obtaining a bitstream for a video sequence; obtaining a value of a first indicator according to the bitstream, wherein the first indicator represents the maximum number of merging motion vector prediction candidates, MVP; obtaining a value of a second indicator according to the bitstream, wherein the second indicator represents whether a motion compensation based on geometric partitioning is enabled for the video sequence;and analyze a value of a third bitstream indicator, when the value of the first indicator is greater than a threshold and when the value of the second indicator is equal to a preset value, wherein the third indicator represents the maximum number of candidates for the geometric partition merge mode subtracted from the value of the first indicator.; 2. The method according to claim 1, characterized in that the threshold is 2.
3. The method according to claim 1 or 2, characterized in that the method further comprises: setting the value of the maximum number of candidates for the geometric partition merge mode to 2, when the value of the first indicator is equal to the threshold and when the value of the second indicator is equal to the preset value.
4. The method according to any of claims 1 to 3, characterized in that the method further comprises: setting the value of the maximum number of candidates for the geometric partition merge mode to 0, when the value of the first indicator is less than the threshold or when the value of the second indicator is not equal to the preset value.
5. The method in accordance with any of claims 1 to 4, characterized in that the preset value is 1.
6. The method according to any of claims 1 to 5, characterized in that the step of obtaining the value of the second indicator is performed after the step of obtaining the value of the first indicator.
7. The method according to claim 6, characterized in that the value of the second indicator is analyzed from a set of sequence parameters, SPS, of the bit stream, when the value of the first indicator is greater than or equal to the threshold.
8. The method according to any of claims 1 to 7, characterized in that the value of the second indicator is obtained from a set of sequence parameters, SPS, of the bit stream.
9. The method according to any of claims 1 to 8, characterized in that the value of the third indicator is obtained from a set of sequence parameters, SPS, of the bit stream.
10. A video decoding apparatus, characterized in that the video decoding apparatus comprises: a receiver module, which is configured to obtain a bitstream for a video sequence; a obtain module, which is configured to obtain a value of a first indicator according to the bitstream, wherein the first indicator represents the maximum number of fusion motion vector prediction candidates, MVP; and wherein the obtain module is configured to obtain a value of a second indicator according to the bitstream, wherein the second indicator represents whether motion compensation based on geometric partitioning is enabled for the video sequence;an analysis module, which is configured to analyze a value of a third bitstream indicator, when the value of the first indicator is greater than a threshold and when the value of the second indicator is equal to a preset value, wherein the third indicator represents the maximum number of candidates for the geometric partition merge mode subtracted from the value of the first indicator.; 11. The video decoding apparatus according to claim 10, characterized in that the acquisition module is configured to set the value of the maximum number of candidates for the geometric partitioning merging mode to 2, when the value of the first indicator is equal to the threshold and when the value of the second indicator is equal to the preset value.
12. The video decoding apparatus according to claim 10 or 11, characterized in that the acquisition module is configured to set the value of the maximum number of candidates for the geometric partitioning merging mode to 0, when the value of the first indicator is less than the threshold or when the value of the second indicator is not equal to the preset value.
13. The video decoding apparatus according to any of claims 10 to 12, characterized in that the threshold is 2.
14. The video decoding apparatus in accordance with any of claims 10 to 13, characterized in that the preset value is 1.
15. The video decoding apparatus according to any of claims 10 to 14, characterized in that the step of obtaining the value of the second indicator is performed after the step of obtaining the value of the first indicator.
16. The video decoding apparatus according to claim 15, characterized in that the value of the second indicator is analyzed from a set of sequence parameters, SPS, of the bit stream, when the value of the first indicator is greater than or equal to the threshold.
17. The video decoding apparatus according to any of claims 10 to 16, characterized in that the value of the second indicator is obtained from a set of sequence parameters, SPS, of the bit stream.
18. The video decoding apparatus according to any of claims 10 to 17, characterized in that the value of the third indicator is obtained from a set of sequence parameters, SPS, of the bit stream.
19. A computer program product characterized in that it comprises program code for performing the method according to any of claims 1 to 9 when executed on a computer or processor.
20. A decoder, characterized in that it comprises: one or more processors; and a non-transient, computer-readable storage medium coupled to the processors and storing the programming for execution by the processors, wherein the programming, when executed by the processors, configures the decoder to carry out the method according to any one of claims 1 to 9.
21. A non-transient computer-readable medium characterized in that it comprises a bitstream for a video sequence decoded by performing the method according to any of claims 1 to 9.