Signaling of triangle merge mode index in video codec

By signaling notifying the maximum number of triangle merge candidates and optimizing the syntax element processing in the bitstream, the problem of insufficient efficiency and complexity of the merge mode in the prior art is solved, and more efficient video encoding and codec performance is achieved.

CN113508594BActive Publication Date: 2025-05-02QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080017296.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-03-05
Filing Date
2020-03-06
Publication Date
2025-05-02
Estimated Expiration
2040-03-06

AI Technical Summary

Technical Problem

Existing video codec techniques have shortcomings in efficiency and complexity in merge modes, especially when dealing with multiple merge modes and motion compensation candidates.

Method used

A method is proposed to notify the maximum number of triangle merge candidates by signaling, and omit unnecessary triangle merge index syntax elements in the bitstream, and perform detailed processing only if the maximum number of merge candidates is greater than 2. The method includes generating a prediction block of the codec unit, performing inter prediction using the motion information of the triangle merge candidates, and reconstructing the CU based on the prediction block and residual data of the CU.

Benefits of technology

By optimizing the processing method of triangle merging mode, the complexity and bit rate in the encoding and decoding process are reduced, and the efficiency and performance of video encoding and decoding are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113508594B_ABST
    Figure CN113508594B_ABST
Patent Text Reader

Abstract

The video decoder obtains a first triangle merge candidate index syntax element that specifies a first triangle merge candidate index. The first triangle merge candidate index indicates a first triangle merge candidate of a triangle shape-based motion compensation candidate list. The video decoder may determine whether the maximum number of triangle merge candidates is greater than 2. Based on the maximum number of triangle merge candidates being not greater than 2, the video decoder may infer that a second triangle merge candidate index indicates a second triangle merge candidate of a triangle shape-based motion compensation candidate list without obtaining any syntax element that specifies the second triangle merge candidate index from a bitstream, the second triangle merge candidate being different from the first triangle merge candidate.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of U.S. Patent Application No. 16 / 809,774, filed on March 5, 2020, U.S. Provisional Patent Application No. 62 / 814,492, filed on March 6, 2019, and U.S. Provisional Patent Application No. 62 / 816,837, filed on March 11, 2019, each of which is incorporated by reference in its entirety. Technical Field

[0003] The present disclosure relates to video encoding and video decoding. Background Art

[0004] Digital video capabilities may be incorporated into a variety of devices, including digital televisions, digital live broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, tablet computers, e-book readers, digital video cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite wireless telephones, so-called "smart phones", video teleconferencing devices, video streaming devices, etc. Digital video devices implement video codec technologies, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10, Advanced Video Codec (AVC), ITU-T H.265 / High Efficiency Video Codec (HEVC), and extensions of such standards. Video devices may more efficiently send, receive, encode, decode, and / or store digital video information by implementing such video codec technologies.

[0005] Video coding techniques include spatial (intra-picture) prediction and / or temporal (inter-picture) prediction to reduce or eliminate redundancy inherent in video sequences. For block-based video coding, a video slice (e.g., a video picture or a portion of a video picture) may be partitioned into video blocks, which may also be referred to as codec tree units (CTUs), codec units (CUs), and / or codec nodes. Video blocks in an intra-coded (I) slice of a picture are encoded using spatial predictions about reference samples in neighboring blocks in the same picture. Video blocks in an inter-coded (P or B) slice of a picture may use spatial predictions about reference samples in neighboring blocks in the same picture or temporal predictions about reference samples in other reference pictures. Pictures may be referred to as frames, and reference pictures may be referred to as reference frames. Summary of the invention

[0006] In general, the present disclosure describes techniques for video codecs. More specifically, the present disclosure describes techniques that can improve the syntax of merge modes, which can include normal merge mode, merge with motion vector difference (MVD), triangle merge mode, and combined intra-frame inter-frame mode. The techniques of the present disclosure can be used with the Versatile Video Codec (VVC) standard under development and other future video codec standards.

[0007] In one example, the present disclosure describes a method for decoding video data, the method comprising: determining a maximum number of triangle merge candidates based on a first syntax element signaled in a bitstream including an encoded representation of the video data; obtaining a first triangle merge index syntax element from the bitstream, the first triangle merge index syntax element specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate in a triangle shape-based motion compensation candidate list; determining whether the maximum number of triangle merge candidates is greater than 2; inferring that a second triangle merge candidate index indicates a second triangle merge candidate in a triangle shape-based motion compensation candidate list based on the maximum number of triangle merge candidates is not greater than 2, without obtaining any syntax element specifying the second triangle merge candidate index from the bitstream, the second triangle merge candidate being different from the first triangle merge candidate; generating a prediction block of a codec unit (CU), wherein generating the prediction block of the CU comprises: using motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU; and using motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU; and reconstructing the CU based on the prediction block of the CU and residual data of the CU.

[0008] In another example, the present disclosure describes a method for encoding video data, the method comprising: determining a maximum number of triangle merge candidates; signaling a first triangle merge index syntax element in a bitstream, the first triangle merge index specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate in a motion compensation candidate list based on a triangle shape; determining whether the maximum number of triangle merge candidates is greater than 2; based on the maximum number of triangle merge candidates being not greater than 2, omitting a second triangle merge index syntax element indicating a second triangle merge candidate index from the bitstream, the second triangle merge candidate index indicating a second triangle merge candidate in the motion compensation candidate list based on a triangle shape, the second triangle merge candidate being different from the first triangle merge candidate; generating a prediction block of a codec unit (CU), wherein generating the prediction block of the CU comprises: using motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU; and using motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU; and generating residual data of the CU based on the prediction block of the CU and samples of the CU.

[0009] In another example, the present disclosure describes a device for decoding video data, the device comprising: a memory for storing video data; and one or more processors implemented in a circuit, the one or more processors being configured to: determine a maximum number of triangle merge candidates based on a first syntax element signaled in a bitstream including an encoded representation of the video data; obtain a first triangle merge index syntax element from the bitstream, the first triangle merge index specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate in a motion compensation candidate list based on a triangle shape; determine whether the maximum number of triangle merge candidates is greater than 2; based on the maximum number of triangle merge candidates not being greater than 2, is greater than 2, inferring that the second triangle merge candidate index indicates a second triangle merge candidate in the motion compensation candidate list based on the triangle shape, without obtaining any syntax element specifying the second triangle merge candidate index from the bitstream, and the second triangle merge candidate is different from the first triangle merge candidate; generating a prediction block of a codec unit (CU), wherein as part of generating the prediction block of the CU, the one or more processors are configured to enable the one or more processors to: use motion information of the first triangle merge candidate to inter-frame predict a first triangle partition of the CU; and use motion information of the second triangle merge candidate to inter-frame predict a second triangle partition of the CU; and reconstruct the CU based on the prediction block of the CU and the residual data of the CU.

[0010] In another example, the present disclosure describes a device for encoding video data, the device comprising: a memory for storing video data; and one or more processors implemented in a circuit, the one or more processors configured to: determine a maximum number of triangle merge candidates; signal a first triangle merge index syntax element in a bitstream, the first triangle merge index specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate in a triangle shape-based motion compensation candidate list; determine whether the maximum number of triangle merge candidates is greater than 2; based on the maximum number of triangle merge candidates being not greater than 2, omit from the bitstream a second triangle merge index syntax element specifying a second triangle merge candidate index, the second triangle merge candidate index indicating a second triangle merge candidate in the triangle shape-based motion compensation candidate list, the second triangle merge candidate being different from the first triangle merge candidate; generate a prediction block for a codec unit (CU), wherein as part of generating the prediction block for the CU, the one or more processors are configured such that the one or more processors: use motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU; and use motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU; and generate residual data for the CU based on the prediction block of the CU and samples of the CU.

[0011] In one example, the present disclosure describes an apparatus for decoding video data, the apparatus comprising: a component for determining a maximum number of triangle merge candidates based on a first syntax element signaled in a bitstream comprising an encoded representation of the video data; a component for obtaining a first triangle merge index syntax element from the bitstream, the first triangle merge index specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate of a motion compensation candidate list based on a triangle shape; a component for determining whether the maximum number of triangle merge candidates is greater than 2; and a component for inferring a second triangle merge candidate based on the maximum number of triangle merge candidates being not greater than 2. A component for selecting an index indicating a second triangle merge candidate from a motion compensation candidate list based on a triangle shape without obtaining any syntax element specifying the second triangle merge candidate index from a bitstream, the second triangle merge candidate being different from the first triangle merge candidate; a component for generating a prediction block of a coding unit (CU), wherein the component for generating the prediction block of the CU includes: a component for inter-predicting a first triangle partition of the CU using motion information of the first triangle merge candidate; and a component for inter-predicting a second triangle partition of the CU using motion information of the second triangle merge candidate; and a component for reconstructing the CU based on the prediction block of the CU and residual data of the CU.

[0012] In another example, the present disclosure describes an apparatus for encoding video data, the apparatus comprising: a component for determining a maximum number of triangle merge candidates; a component for signaling a first triangle merge index syntax element in a bitstream, the first triangle merge index specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate of a triangle shape-based motion compensation candidate list; a component for determining whether the maximum number of triangle merge candidates is greater than 2; a component for omitting a second triangle merge index syntax element specifying a second triangle merge candidate index from the bitstream based on the maximum number of triangle merge candidates being not greater than 2, the second triangle merge candidate index indicating a second triangle merge candidate of the triangle shape-based motion compensation candidate list, the second triangle merge candidate being different from the first triangle merge candidate; a component for generating a prediction block of a codec unit (CU), wherein the component for generating the prediction block of the CU comprises: a component for inter-predicting a first triangle partition of the CU using motion information of the first triangle merge candidate; and a component for inter-predicting a second triangle partition of the CU using motion information of the second triangle merge candidate; and a component for generating residual data of the CU based on the prediction block of the CU and samples of the CU.

[0013] In another example, the present disclosure describes a computer-readable data storage medium having instructions stored thereon, which, when executed, causes one or more processors to: determine a maximum number of triangle merge candidates based on a first syntax element signaled in a bitstream of an encoded representation of video data; obtain a first triangle merge index syntax element from the bitstream, the first triangle merge index syntax element specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate in a triangle shape-based motion compensation candidate list; determine whether the maximum number of triangle merge candidates is greater than 2; infer, based on the maximum number of triangle merge candidates being not greater than 2, that a second triangle merge candidate index indicates a second triangle merge candidate in the triangle shape-based motion compensation candidate list, without obtaining any syntax element specifying a second triangle merge candidate index from the bitstream, the second triangle merge candidate being different from the first triangle merge candidate; generate a prediction block for a codec unit (CU), wherein generating the prediction block for the CU includes: using motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU; and using motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU; and reconstructing the CU based on the prediction block of the CU and residual data of the CU.

[0014] In another example, the present disclosure describes a computer-readable data storage medium having instructions stored thereon, which, when executed, causes one or more processors to: determine a maximum number of triangle merge candidates; signal a first triangle merge index syntax element in a bitstream, the first triangle merge index specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate in a motion compensation candidate list based on a triangle shape; determine whether the maximum number of triangle merge candidates is greater than 2; based on the maximum number of triangle merge candidates being not greater than 2, omit from the bitstream a second triangle merge index syntax element specifying a second triangle merge candidate index, the second triangle merge candidate index indicating a second triangle merge candidate in a motion compensation candidate list based on a triangle shape, the second triangle merge candidate being different from the first triangle merge candidate; generate a prediction block of a codec unit (CU), wherein generating the prediction block of the CU includes: using motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU; and using motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU; and generating residual data of the CU based on the prediction block of the CU and samples of the CU.

[0015] The details of one or more examples 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

[0016] Figure 1 is a block diagram illustrating an example video encoding and decoding system that may perform the techniques of this disclosure.

[0017] Figure 2 is a conceptual diagram showing a merge mode with a motion vector difference search point.

[0018] Figure 3 is a conceptual diagram showing the position of the inherited affine motion predictor.

[0019] Figure 4 is a conceptual diagram showing inheritance of control point motion vectors.

[0020] Figure 5 is a conceptual diagram showing the positions of candidates for constructing an affine merge pattern.

[0021] Figure 6 is a conceptual diagram showing inter-frame prediction based on triangle partitioning.

[0022] Figure 7 is a conceptual diagram showing spatial and temporal neighboring blocks used to construct a unidirectional prediction candidate list.

[0023] Fig. 8A and Figure 8B is a conceptual diagram illustrating an example quadtree binary tree (QTBT) structure and a corresponding codec tree unit (CTU).

[0024] Fig. 9 is a block diagram illustrating an example video encoder that may perform the techniques of this disclosure.

[0025] Fig.10 is a block diagram illustrating an example video decoder that may perform the techniques of this disclosure.

[0026] Fig.11 is a flow chart illustrating an example encoding method.

[0027] Fig.12 is a flow chart illustrating an example decoding method.

[0028] Fig.13 is a flowchart illustrating an example encoding method in accordance with one or more techniques of this disclosure.

[0029] Fig.14 is a flow chart illustrating an example decoding method in accordance with one or more techniques of this disclosure. DETAILED DESCRIPTION

[0030] Versatile Video Codec (VVC) includes a triangular partitioning mode. When using the triangular partitioning mode, the codec unit (CU) can be diagonally divided into two triangular shaped partitions using diagonal partitioning or anti-diagonal partitioning. In some examples, the CU can be divided diagonally into two partitions of unequal size instead. Inter-frame prediction is performed for each triangular partition in the CU using separate motion parameters. For each partition, only unidirectional prediction is allowed in VVC. That is, each partition has a motion vector and a reference index. The constraint that unidirectional prediction is required is applied to ensure that only two motion compensated prediction operations are required for each CU. Performing three or more motion compensated prediction operations on a CU can significantly increase the complexity. The video codec can derive the unidirectional prediction motion parameters for each partition from a unidirectional prediction candidate list called a merge candidate list.

[0031] If the CU level flag indicates that the current CU is encoded and decoded using the triangle partitioning mode, an index (i.e., triangle partitioning index) is further signaled for each triangle partitioning. For each triangle partitioning, the video decoder can use the triangle partitioning index of the triangle partitioning to determine the merge candidate of the triangle partitioning in the merge candidate list. The video decoder can use the motion information of the merge candidate of the triangle partitioning to generate prediction data for the triangle partitioning.

[0032] After predicting each triangle partition, a blending process with adaptive weights is used to adjust the sample values ​​along the diagonal or anti-diagonal edges. The resulting prediction for the triangle partition after applying the blending process is the prediction signal for the entire CU, and the video codec applies the transform and quantization process to the entire CU as in other prediction modes.

[0033] The video encoder may signal a tile level syntax element (e.g., five_minus_max_num_triangle_merge_cand) that the video decoder may use to determine the maximum number of merge candidates that may be used in a merge candidate list for a CU encoded using a triangle partitioning mode. In some examples, the video decoder may determine, based on the syntax element, that the maximum number of merge candidates that may be used in a merge candidate list for a CU encoded using a triangle partitioning mode is less than or equal to 2.

[0034] In the case where the maximum number of such merge candidates is less than or equal to 2, there is no need to signal the triangle partitioning indices of the second triangle partitioning of the CU. This is because if both triangle partitions of the CU use the same merge candidate, it would be more efficient to not use the triangle partitioning mode at all and instead use a single set of motion parameters for the entire CU. Therefore, in the presence of 2 merge candidates, if the first triangle partitioning of the CU uses one of the merge candidates, the video decoder can infer that the second triangle partitioning of the CU uses the other of the merge candidates. Therefore, it is more efficient to signal the triangle partitioning indices of two triangle partitions only when the maximum number of merge candidates is greater than 2.

[0035] Therefore, according to the techniques of this disclosure, the video encoding process includes signaling the triangle partitioning index of the second triangle partitioning of the CU only when the maximum number of merge candidates is greater than 2. Similarly, the video decoding process includes resolving the triangle partitioning index of the second triangle partitioning of the CU only when the maximum number of merge candidates is greater than 2.

[0036] Furthermore, according to the techniques of this disclosure, the signaling of a tile-level syntax element (e.g., five_minus_max_num_triangle_merge_cand) used by a video decoder to determine the maximum number of merge candidates that can be used in a merge candidate list of a CU encoded using triangle partitioning mode may depend on a higher-level syntax element indicating whether triangle merge mode is enabled. Thus, a video decoder may determine whether to signal a picture-level syntax element in a bitstream based on the higher-level syntax element indicating whether triangle merge mode is enabled.

[0037] Figure 11 is a block diagram illustrating an example video encoding and decoding system 100 that can perform the techniques of the present disclosure. The techniques of the present disclosure are generally directed to encoding and decoding (encoding and / or decoding) video data. Generally, video data includes any data used to process video. Therefore, video data can include original, unencoded video, encoded video, decoded (e.g., reconstructed) video, and video metadata such as signaling data.

[0038] like Figure 1 As shown, in this example, system 100 includes a source device 102 that provides encoded video data to be decoded and displayed by a destination device 116. Specifically, source device 102 provides the video data to destination device 116 via computer-readable medium 110. Source device 102 and destination device 116 may include any of a variety of devices, including desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as smartphones, televisions, cameras, display devices, digital media players, video game consoles, video streaming devices, etc. In some cases, source device 102 and destination device 116 may be equipped for wireless communication and, therefore, may be referred to as wireless communication devices.

[0039] exist Figure 1 In the example of , source device 102 includes video source 104, memory 106, video encoder 200 and output interface 108. Destination device 116 includes input interface 122, video decoder 300, memory 120 and display device 118. According to the present disclosure, the video encoder 200 of source device 102 and the video decoder 300 of destination device 116 can be configured to apply video coding and decoding technology. Therefore, source device 102 represents an example of a video encoding device, and destination device 116 represents an example of a video decoding device. In other examples, the source device and the destination device may include other components or arrangements. For example, source device 102 can receive video data from an external video source (e.g., an external camera). Similarly, destination device 116 can interface with an external display device instead of including an integrated display device.

[0040] like Figure 1The system 100 shown is only an example. In general, any digital video encoding and / or decoding device can perform techniques for video encoding and decoding. The source device 102 and the destination device 116 are only examples of such encoding and decoding devices, wherein the source device 102 generates encoded and decoded video data to send to the destination device 116. The present disclosure refers to a "codec" device as a device that performs data encoding and decoding (encoding and / or decoding). Therefore, the video encoder 200 and the video decoder 300 represent examples of codec devices, specifically, video encoders and video decoders, respectively. In some examples, the devices 102 and 116 can operate in a substantially symmetrical manner so that each of the devices 102 and 116 includes a video encoding and decoding component. Therefore, the system 100 can support one-way or two-way video transmission between the source device 102 and the destination device 116, for example, for video streaming, video playback, video broadcasting, or video telephony.

[0041] Typically, the video source 104 represents the source of video data (i.e., the original, unencoded video data), and provides a continuous series of pictures (also referred to as "frames") of the video data to the video encoder 200, which encodes the data of the pictures. The video source 104 of the source device 102 may include a video capture device, such as a camera, a video archive containing previously captured original video, and / or a video feed interface that receives video from a video content provider. As a further alternative, the video source 104 may generate computer graphics-based data as the source video, or a combination of real-time video, archived video, and computer-generated video. In each case, the video encoder 200 encodes the captured, pre-captured, or computer-generated video data. The video encoder 200 may rearrange the pictures from the received order (sometimes referred to as the "display order") into a codec order for encoding and decoding. The video encoder 200 may generate a bitstream comprising encoded video data. Source device 102 may then output the encoded video data onto computer-readable medium 110 via output interface 108 for receipt and / or retrieval by, for example, input interface 122 of destination device 116 .

[0042] The memory 106 of the source device 102 and the memory 120 of the destination device 116 represent general purpose memories. In some examples, the memories 106, 120 can store raw video data, for example, raw video from the video source 104 and raw, decoded video data from the video decoder 300. Additionally or alternatively, the memories 106, 120 can store software instructions that can be executed by, for example, the video encoder 200 and the video decoder 300, respectively. Although in this example, the memory 106 and the memory 120 are shown separately from the video encoder 200 and the video decoder 300, it should be understood that the video encoder 200 and the video decoder 300 can also include internal memories for functionally similar or equivalent purposes. In addition, the memories 106, 120 can store, for example, encoded video data output from the video encoder 200 and input to the video decoder 300. In some examples, portions of the memories 106, 120 can be allocated as one or more video buffers, for example, for storing raw, decoded and / or encoded video data.

[0043] The computer-readable medium 110 may represent any type of medium or device capable of transmitting the encoded video data from the source device 102 to the destination device 116. In one example, the computer-readable medium 110 represents a communication medium that enables the source device 102 to transmit the encoded video data directly to the destination device 116 in real time, for example, via a radio frequency network or a computer-based network. The output interface 108 may modulate a transmission signal including the encoded video data, and the input interface 122 may demodulate the received transmission signal according to a communication standard such as a wireless communication protocol. The communication medium may include any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines. The communication medium may form part of a packet-based network, such as a local area network, a wide area network, or a global network such as the Internet. The communication medium may include a router, a switch, a base station, or any other device that can be used to facilitate communication from the source device 102 to the destination device 116.

[0044] In some examples, computer-readable medium 110 may include storage device 112. Source device 102 may output the encoded data from output interface 108 to storage device 112. Similarly, destination device 116 may access the encoded data from storage device 112 via input interface 122. Storage device 112 may include any of a variety of distributed or locally accessed data storage media, such as a hard drive, Blu-ray disc, DVD, CD-ROM, flash memory, volatile or non-volatile memory, or any other suitable digital storage medium for storing encoded video data.

[0045] In some examples, the computer-readable medium 110 may include a file server 114 or another intermediate storage device that may store the encoded video data generated by the source device 102. The source device 102 may output the encoded video data to the file server 114 or another intermediate storage device that stores the encoded video generated by the source device 102. The destination device 116 may access the stored video data from the file server 114 via streaming or downloading. The file server 114 may be any type of server device capable of storing the encoded video data and sending the encoded video data to the destination device 116. The file server 114 may represent a web server (e.g., for a website), a file transfer protocol (FTP) server, a content delivery network device, or a network attached storage (NAS) device. The destination device 116 may access the encoded video data from the file server 114 via any standard data connection including an Internet connection. This may include a wireless channel (e.g., a Wi-Fi connection), a wired connection (e.g., a digital subscriber line (DSL), a cable modem, etc.), or a combination of both, which is suitable for accessing the encoded video data stored on the file server 114. The file server 114 and the input interface 122 may be configured to operate according to a streaming transfer protocol, a download transfer protocol, or a combination thereof.

[0046] Output interface 108 and input interface 122 may represent wireless transmitters / receivers, modems, wired network components (e.g., Ethernet cards), wireless communication components that operate according to any of the various IEEE 802.11 standards, or other physical components. In examples where output interface 108 and input interface 122 include wireless components, output interface 108 and input interface 122 may be configured to transmit data, such as encoded video data, according to a cellular communication standard (e.g., 4G, 4G-LTE (Long Term Evolution), LTE Advanced, 5G, etc.). In some examples where output interface 108 includes a wireless transmitter, output interface 108 and input interface 122 may be configured to transmit data, such as encoded video data, according to other wireless standards (e.g., IEEE 802.11 specifications, IEEE 802.15 specifications (e.g., ZigBee 5G), etc.). TM ),Bluetooth TM Standards, etc.) to transmit data such as encoded video data. In some examples, source device 102 and / or destination device 116 may include corresponding system-on-chip (SoC) devices. For example, source device 102 may include a SoC device for performing functions attributed to video encoder 200 and / or output interface 108, and destination device 116 may include a SoC device for performing functions attributed to video decoder 300 and / or input interface 122.

[0047] The techniques of the present disclosure may be applied to video encoding and decoding to support any of a variety of multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, Internet streaming video transmission such as Dynamic Adaptive Streaming over HTTP (DASH), digital video encoded onto a data storage medium, decoding of digital video stored on a data storage medium, or other applications.

[0048] The input interface 122 of the destination device 116 receives the encoded video bitstream from the computer-readable medium 110 (e.g., a communication medium, a storage device 112, a file server 114, etc.). The encoded video bitstream may include signaling information defined by the video encoder 200 (e.g., syntax elements with values ​​describing characteristics and / or processing of video blocks or other codec units (e.g., slices, pictures, groups of pictures, sequences, etc.) and used by the video decoder 300. The display device 118 displays decoded pictures of the decoded video data to a user. The display device 118 may represent any of a variety of display devices, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device.

[0049] Despite Figure 1 2, but in some examples, the video encoder 200 and the video decoder 300 may each be integrated with an audio encoder and / or an audio decoder, and may include appropriate MUX-DEMUX units, or other hardware and / or software, to process a multiplexed stream including both audio and video in a common data stream. If applicable, the MUX-DEMUX unit may conform to the ITU H.223 multiplexer protocol or other protocols such as the User Datagram Protocol (UDP).

[0050] The video encoder 200 and the video decoder 300 can each be implemented as any of a variety of suitable encoder and / or decoder circuits, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware, or any combination thereof. When these techniques are partially implemented in software, the device can store instructions for the software in an appropriate non-transitory computer-readable medium and execute the instructions in hardware using one or more processors to perform the techniques of the present disclosure. Each of the video encoder 200 and the video decoder 300 can be included in one or more encoders or decoders, any of which can be integrated into the corresponding device as part of a combined encoder / decoder (codec (CODEC)). The device including the video encoder 200 and / or the video decoder 300 may include an integrated circuit, a microprocessor, and / or a wireless communication device such as a cellular phone.

[0051] The video encoder 200 and the video decoder 300 may operate in accordance with a video codec standard (e.g., ITU-T H.265, also known as High Efficiency Video Codec (HEVC)) or an extension thereof (e.g., a multi-view and / or scalable video codec extension). Alternatively, the video encoder 200 and the video decoder 300 may operate in accordance with other proprietary or industry standards, such as the Joint Exploration Test Model (JEM) or ITU-T H.266, also known as Versatile Video Codec (VVC). The latest draft of the VVC standard is described in Bross et al., “Versatile Video Coding (Draft 4)”, Joint Video Experts Group (JVET) of ITU-T SG 16WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 13th Meeting: Massachusetts, MA, January 9-18, 2019, JVET-M1001-v5 (hereinafter referred to as “VVC Draft 4”). However, the techniques of this disclosure are not limited to any particular codec standard.

[0052] Typically, the video encoder 200 and the video decoder 300 can perform block-based picture encoding and decoding. The term "block" generally refers to a structure that includes data to be processed (e.g., encoded, decoded, or otherwise used for encoding and / or decoding processes). For example, a block may include a two-dimensional matrix of samples of luminance and / or chrominance data. Typically, the video encoder 200 and the video decoder 300 can encode and decode video data represented in a YUV (e.g., Y, Cb, Cr) format. That is, the video encoder 200 and the video decoder 300 can encode and decode luminance and chrominance components instead of encoding and decoding red, green, and blue (RGB) data for samples of a picture, where the chrominance components may include red-toned and blue-toned chrominance components. In some examples, the video encoder 200 converts the received RGB format data into a YUV representation before encoding, and the video decoder 300 converts the YUV representation into an RGB format. Alternatively, a pre-processing unit and a post-processing unit (not shown) can perform these conversions.

[0053] The present disclosure may generally relate to encoding and decoding (e.g., encoding and decoding) a picture to include the process of encoding or decoding the data of the picture. Similarly, the present disclosure may relate to encoding and decoding a block of a picture to include the process of encoding or decoding the data of the block, such as prediction and / or residual encoding and decoding. The encoded video bitstream typically includes a series of values ​​of syntax elements that represent codec decisions (e.g., codec modes) and the partitioning of the picture into blocks. Therefore, references to encoding and decoding a picture or a block should generally be understood as encoding and decoding the values ​​of the syntax elements that form the picture or block.

[0054] HEVC defines various blocks, including codec units (CUs), prediction units (PUs), and transform units (TUs). According to HEVC, a video encoder (e.g., video encoder 200) partitions a codec tree unit (CTU) into CUs according to a quadtree structure. That is, the video codec partitions the CTU and CU into four equal, non-overlapping squares, and each node of the quadtree has zero or four child nodes. A node without child nodes may be referred to as a "leaf node", and the CU of such a leaf node may include one or more PUs, and / or one or more TUs. The video codec may further partition the PU and TU. For example, in HEVC, the residual quadtree (RQT) represents the partitioning of a TU. In HEVC, PU represents inter-frame prediction data, and TU represents residual data. The intra-predicted CU includes intra-frame prediction information such as an intra-frame mode indication.

[0055] As another example, the video encoder 200 and the video decoder 300 may be configured to operate according to JEM or VVC. According to JEM or VVC, a video codec (e.g., the video encoder 200) partitions a picture into a plurality of codec tree units (CTUs). The video encoder 200 may partition the CTU according to a tree structure (e.g., a quadtree binary tree (QTBT) structure or a multi-type tree (MTT) structure). The QTBT structure removes the concept of multiple partition types (e.g., the partitioning of CU, PU, ​​and TU of HEVC). The QTBT structure includes two levels: a first level for partitioning according to quadtree partitioning, and a second level for partitioning according to binary tree partitioning. The root node of the QTBT structure corresponds to the CTU. The leaf nodes of the binary tree correspond to codec units (CUs).

[0056] In the MTT partitioning structure, blocks can be partitioned using quadtree (QT) partitioning, binary tree (BT) partitioning, and one or more types of ternary tree (TT) partitioning. A ternary tree partitioning is a partitioning in which a block is partitioned into three sub-blocks. In some examples, the ternary tree partitioning divides a block into three sub-blocks without dividing the original block by the center. The partitioning types in MTT (e.g., QT, BT, and TT) can be symmetric or asymmetric.

[0057] In some examples, the video encoder 200 and the video decoder 300 may use a single QTBT or MTT structure to represent each of the luma and chroma components, while in other examples, the video encoder 200 and the video decoder 300 may use two or more QTBT or MTT structures, such as one QTBT / MTT structure for the luma component and another QTBT / MTT structure for the two chroma components (or two QTBT / MTT structures for the corresponding chroma components).

[0058] The video encoder 200 and the video decoder 300 may be configured to use quadtree segmentation, QTBT segmentation, MTT segmentation, or other segmentation structures in accordance with HEVC. For purposes of explanation, the description of the disclosed technology is presented with respect to QTBT segmentation. However, it should be understood that the disclosed technology may also be applied to a video codec configured to use quadtree segmentation or other types of segmentation.

[0059] This disclosure may use "N×N" and "N by N" interchangeably to refer to the sample dimensions of a block (e.g., a CU or other video block) in the vertical and horizontal directions, for example, 16×16 samples or 16 by 16 samples. In general, a 16×16 CU will have 16 samples in the vertical direction (y=16) and 16 samples in the horizontal direction (x=16). Similarly, an N×N CU typically has N samples in the vertical direction and N samples in the horizontal direction, where N represents a non-negative integer value. The samples in a CU may be arranged in rows and columns. In addition, a CU does not necessarily have the same number of samples in the horizontal direction as in the vertical direction. For example, a CU may include N×M samples, where M is not necessarily equal to N.

[0060] The video encoder 200 encodes the video data of the CU representing the prediction and / or residual information and other information. The prediction information indicates how to predict the CU, thereby forming a prediction block of the CU. The residual information generally indicates the sample-by-sample difference between the sample of the CU before encoding and the prediction block.

[0061] In order to predict a CU, the video encoder 200 may typically form a prediction block for the CU by inter-frame prediction or intra-frame prediction. Inter-frame prediction typically refers to predicting a CU from data of a previously decoded picture, while intra-frame prediction typically refers to predicting a CU from previously decoded data of the same picture. In order to perform inter-frame prediction, the video encoder 200 may use one or more motion vectors to generate a prediction block. The video encoder 200 may typically perform a motion search to identify a reference block that closely matches the CU, for example, in terms of the difference between the CU and the reference block. The video encoder 200 may calculate a difference metric using the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), and other such difference calculations to determine whether the reference block closely matches the current CU. In some examples, the video encoder 200 may use unidirectional prediction or bidirectional prediction to predict the current CU.

[0062] Some examples of JEM and VVC also provide an affine motion compensation mode, which can be considered an inter-frame prediction mode. In the affine motion compensation mode, the video encoder 200 can determine two or more motion vectors representing non-translational motion (e.g., zooming in or out, rotation, perspective motion, or other irregular motion types).

[0063] To perform intra prediction, the video encoder 200 can select an intra prediction mode to generate a prediction block. Some examples of JEM and VVC provide sixty-seven intra prediction modes, including various directional modes, as well as a plane mode and a DC mode. Typically, the video encoder 200 selects an intra prediction mode that describes a neighboring sample to a current block (e.g., a block of a CU) to predict the sample of the current block from the neighboring sample. Assuming that the video encoder 200 encodes and decodes CTUs and CUs in a raster scan order (from left to right, from top to bottom), such samples can typically be above, above left, or to the left of the current block in the same picture as the current block.

[0064] The video encoder 200 encodes data representing the prediction mode of the current block. For example, for inter-frame prediction mode, the video encoder 200 may encode data indicating which of the various available inter-frame prediction modes is used and the motion information for the corresponding mode. For example, for unidirectional or bidirectional inter-frame prediction, the video encoder 200 may encode the motion vector using advanced motion vector prediction (AMVP) or merge mode. The video encoder 200 may use a similar mode to encode the motion vector for affine motion compensation mode.

[0065] The video encoder 200 may signal the motion parameters of the block in various ways. Such motion parameters may include motion vectors, reference indexes, reference picture list indicators, and / or other data related to the motion. In some examples, the video encoder 200 and the video decoder 300 may use motion prediction to reduce the amount of data used to signal the motion parameters. Motion prediction may include determining the motion parameters of a block (e.g., PU, ​​CU, etc.) based on the motion parameters of one or more other blocks. There are various types of motion prediction. For example, merge mode and advanced motion vector prediction (AMVP) mode are two types of motion prediction.

[0066] In merge mode, the video encoder 200 generates a candidate list. The candidate list includes a candidate set indicating motion parameters of one or more source blocks. The source block may be adjacent to the current block in the spatial domain or in the temporal domain. In addition, in merge mode, the video encoder 200 may select a candidate from the candidate list, and may use the motion parameters indicated by the selected candidate as the motion parameters of the current block. The video encoder 200 may signal the position of the selected candidate in the candidate list. The video decoder 300 may determine an index into the candidate list based on information obtained from the bitstream. In addition, the video decoder 300 may generate the same candidate list, and may determine the selected candidate based on the index. The video decoder 300 may then use the motion parameters of the selected candidate to generate a predictor block for the current block.

[0067] The skip mode is similar to the merge mode. In the skip mode, the video encoder 200 and the video decoder 300 generate and use the candidate list in the same manner as the video encoder 200 and the video decoder 300 use the candidate list in the merge mode. However, when the video encoder 200 uses the skip mode to signal the motion parameters of the current block, the video encoder 200 does not signal any residual data of the current block. Therefore, the video decoder 300 can determine the predictor block of the current block based on one or more reference blocks indicated by the motion parameters of the selected candidate in the candidate list. The video decoder 300 can then reconstruct the samples in the codec block of the current block so that the reconstructed samples are equal to the corresponding samples in the predictor block of the current block.

[0068] The AMVP mode is similar to the merge mode in that the video encoder 200 can generate a candidate list for the current block and can select a candidate from the candidate list. However, for each corresponding reference block used to determine the predictor block of the current block, the video encoder 200 can signal a corresponding motion vector difference (MVD) for the current block, a corresponding reference index for the current block, and a corresponding candidate index indicating the selected candidate in the candidate list. The MVD of the block may indicate the difference between the motion vector of the block and the motion vector of the selected candidate. The reference index of the current block indicates the reference picture from which the reference block is determined.

[0069] In addition, when the AMVP mode is used, for each corresponding reference block used to determine the predictor block of the current block, the video decoder 300 can determine the MVD of the current block, the reference index of the current block, and the candidate index and motion vector prediction (MVP) flag. The video decoder 300 can generate the same candidate list and can determine the selected candidate in the candidate list based on the candidate index. As described above, the candidate list can include motion vectors of neighboring blocks associated with the same reference index and a temporal motion vector predictor derived based on motion parameters of neighboring blocks of the co-located block in the temporal reference picture. The video decoder 300 can restore the motion vector of the current block by adding the MVD to the motion vector indicated by the selected AMVP candidate. That is, the video decoder 300 can determine the motion vector of the current block based on the motion vector indicated by the selected AMVP candidate and the MVD. The video decoder 300 can then use the restored motion vector or the motion vector of the current block to generate the predictor block of the current block.

[0070] When a video codec (e.g., video encoder 200 or video decoder 300) generates an AMVP candidate list for a current block, the video codec may derive one or more AMVP candidates based on motion parameters of reference blocks (e.g., spatially neighboring blocks) containing locations that are spatially adjacent to the current PU, and derive one or more AMVP candidates based on motion parameters of PUs that are temporally adjacent to the current PU. The candidate list may include motion vectors of reference blocks associated with the same reference index and a temporal motion vector predictor derived based on motion parameters of neighboring blocks of the co-located block in a temporal reference picture. Candidates in a merge candidate list or an AMVP candidate list are based on motion parameters of reference blocks that are temporally adjacent to the current block. The present disclosure may use the term "temporal motion vector predictor" to refer to a block that is in a temporal instance different from the current block and is used for motion vector prediction.

[0071] After a prediction, such as intra prediction or inter prediction of a block, the video encoder 200 may calculate residual data for the block. The residual data, such as a residual block, represents the sample-by-sample difference between the block and a prediction block formed using a corresponding prediction mode for the block. The video encoder 200 may apply one or more transforms to the residual block to generate transformed data in a transform domain rather than a sample domain. For example, the video encoder 200 may apply a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video data. In addition, the video encoder 200 may apply a secondary transform after the primary transform, such as a mode-dependent non-separable secondary transform (MDNSST), a signal-dependent transform, a Karhun-Loeve transform (KLT), etc. The video encoder 200 generates transform coefficients after applying one or more transforms.

[0072] As described above, after any transform used to generate transform coefficients, the video encoder 200 can perform quantization of the transform coefficients. Quantization generally refers to the process of quantizing the transform coefficients to reduce as much as possible the amount of data used to represent the transform coefficients, thereby providing further compression. By performing the quantization process, the video encoder 200 can reduce the bit depth associated with some or all transform coefficients. For example, the video encoder 200 can round down an n-bit value to an m-bit value during quantization, where n is greater than m. In some examples, to perform quantization, the video encoder 200 can perform a bitwise right shift on the value to be quantized.

[0073] After quantization, the video encoder 200 can scan the transform coefficients to generate a one-dimensional vector from a two-dimensional matrix including the quantized transform coefficients. The scan can be designed to place coefficients with higher energy (and therefore lower frequency) in front of the vector and transform coefficients with lower energy (and therefore higher frequency) in the back of the vector. In some examples, the video encoder 200 can scan the quantized transform coefficients using a predefined scan order to generate a serialized vector, and then entropy encode the quantized transform coefficients of the vector. In other examples, the video encoder 200 can perform adaptive scanning. After scanning the quantized transform coefficients to form a one-dimensional vector, the video encoder 200 can entropy encode the one-dimensional vector, for example according to context-adaptive binary arithmetic coding (CABAC). The video encoder 200 can also entropy encode the values ​​of the syntax elements describing the metadata associated with the encoded video data for use by the video decoder 300 in decoding the video data.

[0074] To perform CABAC, the video encoder 200 may assign context within a context model to a symbol to be transmitted. The context may relate to, for example, whether the neighboring values ​​of the symbol are zero values. The probability determination may be based on the context assigned to the symbol.

[0075] The video encoder 200 may also generate syntax data, such as block-based syntax data, picture-based syntax data, and sequence-based syntax data or other syntax data, such as a sequence parameter set (SPS), a picture parameter set (PPS), or a video parameter set (VPS), to the video decoder 300, such as in a picture header, a block header, a slice header. The video decoder 300 may similarly decode such syntax data to determine how to decode the corresponding video data.

[0076] A slice of a picture may include an integer number of picture blocks. For example, a slice of a picture may include an integer number of CTUs of a picture. The CTUs of a slice may be arranged consecutively in a scan order (e.g., a raster scan order). Tile scanning is a specific order of CTUs that partition a picture, where CTUs are arranged consecutively in a CTU raster scan of tiles, and tiles in a picture are arranged consecutively in a raster scan of tiles of a picture. A tile is a rectangular area of ​​a CTU within a specific tile column and a specific tile row in a picture.

[0077] In this way, the video encoder 200 can generate a bitstream including encoded video data, such as syntax elements describing the partitioning of a picture into blocks (eg, CUs) and prediction and / or residual information of the blocks. Finally, the video decoder 300 can receive the bitstream and decode the encoded video data.

[0078] In general, the video decoder 300 performs a process that is the reverse of the process performed by the video encoder 200 to decode the encoded video data of the bitstream. For example, the video decoder 300 can decode the values ​​of the syntax elements of the bitstream using CABAC in a manner substantially similar to but reverse to the CABAC encoding process of the video encoder 200. The syntax elements can define partitioning information for partitioning a picture into CTUs and partitioning each CTU according to a corresponding partitioning structure such as a QTBT structure to define a CU of the CTU. The syntax elements can also define prediction and residual information for a block (e.g., a CU) of video data.

[0079] The residual information may be represented by, for example, quantized transform coefficients. The video decoder 300 may inverse quantize and inverse transform the quantized transform coefficients of the block to reproduce a residual block for the block. The video decoder 300 uses the signaled prediction mode (intra-frame or inter-frame prediction) and related prediction information (e.g., motion information for inter-frame prediction) to form a prediction block for the block. The video decoder 300 may then combine the prediction block and the residual block (on a sample-by-sample basis) to reproduce the original block. The video decoder 300 may perform additional processing (such as performing a deblocking process) to reduce visual artifacts along block boundaries.

[0080] In the next section, video codec techniques and tools related to the technology of this application will be discussed. These video codec techniques and tools include extended merge prediction, merge mode with motion vector difference, affine merge prediction, triangle merge mode, and combined inter-frame and intra-frame prediction (CIIP), which will be discussed below.

[0081] Extended Merger Forecast

[0082] In extended merge prediction, the video encoder 200 and the video decoder 300 may be configured to construct a merge candidate list by sequentially including the following five types of candidates:

[0083] 1) Spatial MVP from spatially adjacent CUs

[0084] 2) Time domain MVP from the same CU

[0085] 3) History-based MVP from a First-In-First-Out (FIFO) table

[0086] 4) Paired Average MVP

[0087] 5) Zero motion vector (multiple MVs).

[0088] The size of the merge candidate list is signaled in the slice header. In some examples, the maximum allowed size of the merge candidate list is 6. For each CU in merge mode, the index of the merge candidate is encoded using truncated unary binarization. The first bin of the merge index is coded using context, bypassing coding for other bins.

[0089] Merge mode with motion vector difference (MMVD)

[0090] In addition to the merge mode (in which the implicitly derived motion information is directly used to generate the prediction samples of the current CU), MMVD is introduced in VVC. The MMVD flag is signaled immediately after the skip flag and merge flag are sent to specify whether the MMVD mode is used for the CU.

[0091] In MMVD, after a merge candidate is selected, the merge candidate is further refined by signaling MVD information. Further information includes a merge candidate flag, an index for specifying the magnitude of motion, and an index for indicating the direction of motion. In MMVD mode, one of the first two candidates in the merge candidate list is selected as the MV reference. The merge candidate flag is signaled to specify which one to use.

[0092] The distance index specifies the motion magnitude information and indicates a predefined offset from the starting point. Figure 2 is a conceptual diagram showing a merge mode with a motion vector difference search point. Figure 2 As shown, an offset is added to the horizontal or vertical component of the starting MV. Figure 2 In the example, the dotted center circle indicates the location of the start MV indication. Figure 2 In the example of , the circles above, below, to the left and to the right of the position indicated by the starting MV indicate the position resulting from adding the offset to the position indicated by the starting MV. The offset may be different for the L0 motion vector and the L1 motion vector of the same block. The relationship between the distance index and the predefined offset is specified in Table 1.

[0093] Table 1 - Relationship between distance index and predefined offsets

[0094]

[0095] The direction index indicates the direction of the MVD relative to the starting point. The direction index can represent one of the four directions shown in Table 2 below. It should be noted that the meaning of the MVD symbol may change depending on the information of the starting MV. When the starting MV includes a unidirectional prediction MV or a bidirectional prediction MV, and both lists point to the same side of the current picture (that is, the picture order counts (POCs) of both references are greater than the POC of the current picture, or are less than the POC of the current picture), the symbols in Table 2 below specify the sign of the MV offset added to the starting MV. When the starting MV includes a bidirectional prediction MV, and the two MVs point to different sides of the current picture (that is, the POC of one reference is greater than the POC of the current picture, and the POC of the other reference is less than the POC of the current picture), the symbols in Table 2 specify the MV offset sign added to the list 0 MV component of the starting MV and specify the symbol for the list 1 MV with the opposite value.

[0096] Table 2 – MV offset symbols specified by direction index

[0097]

[0098]

[0099] Affine Merge Predictions

[0100] Affine merge (AF_MERGE) mode can be applied to CUs with width and height greater than or equal to 8. In this mode, the control point motion vector (CPMV) of the current CU is generated based on the motion information of the spatial neighboring CUs. There can be up to five control point motion vector predictor (CPMVP) candidates. The index is signaled to indicate the candidate for the current CU.

[0101] The following three types of CPMV candidates are used to form the affine merge candidate list:

[0102] 1) Inherited affine merge candidates inferred from the CPMV of neighboring CUs

[0103] 2) Use the translation MV of the adjacent CU to derive the constructed affine merge candidate CPMVP

[0104] 3) Zero MV

[0105] In one example, there are at most two inherited affine candidates, which are derived from the affine motion models of neighboring blocks: one inherited affine candidate from the left neighboring CU and one inherited affine candidate from the upper neighboring CU. Figure 3 shown. Figure 3is a conceptual diagram showing the location of inherited affine motion predictors. The scan order is A0->A1 for the left predictor and B0->B1->B2 for the upper predictor. Only the first inherited candidate from each side is selected. No pruning check is performed between two inherited candidates. When a neighboring affine CU is identified, its control point motion vectors are used to derive the CPMVP candidate in the affine merge candidate list of the current CU.

[0106] Figure 4 is a conceptual diagram showing the inheritance of control point motion vectors. Figure 4 As shown in the figure, if the adjacent lower left block A is encoded and decoded in affine mode, the motion vectors v2, v3 and v4 of the upper left corner, upper right corner and lower left corner of the CU containing block A are obtained. When the 4-parameter affine model is used to encode and decode block A, two CPMVs of the current CU (Cur) are calculated according to v2 and v3. When the 6-parameter affine model is used to encode and decode block A, three CPMVs of the current CU are calculated according to v2, v3 and v4.

[0107] Affine candidates are constructed by combining the adjacent translation motion information of each control point. The motion information of the control point is obtained from Figure 5 The specified spatial and temporal neighborhoods are derived as shown. Figure 5 is a conceptual diagram showing the positions of candidates for constructing an affine merge mode. k (k=1,2,3,4) represents the kth control point. For CPMV1, blocks B2, B3, and A2 are checked in the order B2->B3->A2, and the MV of the first available block is used. For CPMV2, blocks B1 and B0 are checked in the order B1->B0, and for CPMV3, blocks A1, A0 are checked in the order A1->A0. If a temporal motion vector predictor (TMVP) is available, TMVPT is used as CPMV4.

[0108] After obtaining the MVs of the four control points, an affine merge candidate is constructed based on the motion information. The following example combinations of control point MVs are used to construct affine merge candidates in the following order: {CPMV1, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV4}, {CPMV1, CPMV3, CPMV4}, {CPMV2, CPMV3, CPMV4}, {CPMV1, CPMV2}, {CPMV1, CPMV3}

[0109] The combination of 3 CPMVs constitutes a 6-parameter affine merge candidate, and the combination of 2 CPMVs constitutes a 4-parameter affine merge candidate. To avoid the motion scaling process, if the reference index of the control point is different, the relevant combination of control point MVs is discarded.

[0110] After checking inherited affine merge candidates and constructing affine merge candidates, if the list is still not full (eg, less than a predetermined maximum), a zero-MV is inserted at the end of the list. A zero-MV is an MV with zero magnitude.

[0111] Triangle Merge Mode

[0112] Triangle partitioning mode has been introduced for inter prediction. In one example, triangle partitioning mode is only applied to CUs of 8×8 or larger and encoded or decoded in skip or merge mode. For CUs that meet these conditions, a CU-level flag is signaled to indicate whether triangle partitioning mode is applied.

[0113] like Figure 6 As shown, when the triangle merge mode is used, the CU can be evenly partitioned into two triangle partitions using diagonal partitioning or anti-diagonal partitioning. Figure 6 is a conceptual diagram showing inter prediction based on triangle partitioning. Each triangle partition in a CU uses its own motion for inter prediction. In one example, only unidirectional prediction is allowed for each partition. That is, each partition has one motion vector and one reference index. Unidirectional prediction motion constraints are applied to ensure that only two motion compensated predictions are required for each CU, as with traditional bidirectional prediction. The unidirectional prediction motion for each partition is derived from a unidirectional prediction candidate list constructed using the unidirectional prediction candidate list construction process described below.

[0114] If the CU level flag indicates that the current CU is encoded and decoded using triangle partitioning mode, the triangle partitioning index (e.g., in the range of [0,39]) is further signaled. Using this triangle partitioning index, the direction of the triangle partitioning (diagonal or anti-diagonal) and the motion of each partition can be obtained through a lookup table. As with other prediction modes, the transform and quantization process will be applied to the entire CU. For example, in some examples, after predicting each triangle partitioning, a blending process with adaptive weights is used to adjust the sample values ​​along the diagonal or anti-diagonal edges. The prediction of the triangle partitioning after the blending process is the prediction signal for the entire CU, and the transform and quantization process can be applied to the entire CU as in other prediction modes. The motion field of the CU predicted using the triangle partitioning mode can be stored in 4×4 units.

[0115] One-way prediction candidate list construction

[0116] The unidirectional prediction candidate list includes five unidirectional prediction motion vector candidates. Figure 7 1 is a conceptual diagram showing spatial and temporal neighboring blocks used to construct a unidirectional prediction candidate list. The unidirectional prediction candidate list is derived from seven neighboring blocks, including five spatial neighboring blocks ( Figure 7) and two time-domain co-located blocks ( Figure 7 The motion vectors of the seven neighboring blocks are collected and put into the unidirectional prediction candidate list in the following order: first, the motion vectors of the unidirectionally predicted neighboring blocks; then, for the bidirectionally predicted neighboring blocks, the L0 motion vector (i.e., the L0 motion vector part of the bidirectionally predicted MV), the L1 motion vector (i.e., the L1 motion vector part of the bidirectionally predicted MV), and the average motion vector of the L0 and L1 motion vectors of the bidirectionally predicted MV. If the number of candidates is less than five, a zero motion vector is added at the end of the list.

[0117] Combined Inter and Intra Prediction (CIIP)

[0118] When a CU is encoded and decoded in merge mode, if the CU contains at least 64 luma samples (i.e., the CU width multiplied by the CU height is equal to or greater than 64), an additional flag is signaled to indicate whether the combined inter- and intra-prediction (CIIP) mode is applied to the current CU. To form the CIIP prediction, the intra-prediction mode is first derived from two additional syntax elements (e.g., ciip_luma_mpm_flag and ciip_luma_mpm_idx). Up to four possible intra-prediction modes can be used: DC, planar, horizontal, or vertical. Then, the inter-prediction and intra-prediction signals are derived using conventional intra- and inter-decoding processes. Finally, a weighted average is performed on the inter- and intra-prediction signals to obtain the CIIP prediction.

[0119] Intra-frame prediction mode derivation

[0120] Up to four intra prediction modes (including DC, planar, horizontal, and vertical modes) can be used to predict the luma component in CIIP mode. If the CU shape is very wide (i.e., the width is greater than twice the height), the horizontal mode is not allowed. If the CU shape is very narrow (i.e., the height is greater than twice the width), the vertical mode is not allowed. In these cases, only three intra prediction modes are allowed.

[0121] CIIP mode uses three most probable modes (MPMs) for intra prediction. The CIIP MPM candidate list is formed as follows:

[0122] The left and top neighboring blocks are set to A and B respectively. The intra prediction modes of block A and block B are denoted as intraModeA and intraModeB respectively, which are derived as follows:

[0123] a. Let X be A or B

[0124] b. If 1) block X is not available; 2) block X is not predicted using CIIP mode or intra mode; or 3) block B is outside the current CTU, then set intraModeX to DC.

[0125] c. Otherwise, 1) if the intra prediction mode of block X is DC or planar, set intraModeX to DC or planar; or 2) if the intra prediction mode of block X is a "vertical-like" angular mode (greater than 34), set intraModeX to vertical; or 3) if the intra prediction mode of block X is a "horizontal-like" angular mode (less than or equal to 34), set intraModeX to horizontal.

[0126] If intraModeA and intraModeB are the same:

[0127] d. If intraModeA is planar or DC, the three MPMs are set in the order of {PLANAR, DC, VERTICAL}.

[0128] e. Otherwise, the three MPMs are set in the order of {intraModeA, planar, DC}.

[0129] Otherwise (intraModeA and intraModeB are different):

[0130] f. The first two MPMs are set to be in the order of {intraModeA, intraModeB}.

[0131] g. Based on the first two MPM candidate patterns, check the uniqueness of planar, DC, and vertical in that order; once a unique pattern is found, it will be added as the third MPM.

[0132] If the CU shape is very wide or very narrow as defined above, the MPM flag is inferred to be 1 without signaling. Otherwise, the MPM flag is signaled to indicate whether the CIIP intra prediction mode is one of the CIIP MPM candidate modes.

[0133] If the MPM flag is 1 (i.e., the CIIP intra-frame prediction mode is one of the CIIP MPM candidate modes), the MPM index is further signaled to indicate which MPM candidate mode is used in the CIIP intra-frame prediction. Otherwise, if the MPM flag is 0 (i.e., the CIIP intra-frame prediction mode is not one of the CIIP MPM candidate modes), the intra-frame prediction mode is set to the "missing" mode in the MPM candidate list. For example, if the planar mode is not in the MPM candidate list, plane is the missing mode and the intra-frame prediction mode is set to plane. Since four possible intra-frame prediction modes are allowed in CIIP and the MPM candidate list only contains three intra-frame prediction modes, one of the four possible modes must be the missing mode.

[0134] For chroma components, the direct mode (DM) mode is always applied without additional signaling. That is, chroma uses the same prediction mode as luma. The intra prediction mode of a CIIP-coded CU can be saved and used in the intra mode coding of future neighboring CUs.

[0135] Combining inter- and intra-prediction signals

[0136] CIIP Mode P inter The inter prediction signal in is derived using the same inter prediction process applied to the normal merge mode, and the intra prediction signal P intra is derived using the CIIP intra prediction mode after the regular intra prediction process. The intra and inter prediction signals can then be combined using a weighted average, where the weight values ​​depend on the intra prediction mode and the position of the sample in the codec block, as shown below:

[0137] - If the intra prediction mode is DC or planar mode, or if the block width or height is less than 4, equal weights are applied to the intra prediction and inter prediction signals.

[0138] -Otherwise, the weights are determined based on the intra prediction mode (horizontal mode or vertical mode in this case) and the sample position in the block. Take the horizontal prediction mode as an example (the weights for the vertical mode are derived similarly, but in an orthogonal direction). W represents the width of the block and H represents the height of the block. The codec block is first divided into four equal parts, each with a dimension of (W / 4)×H. Starting from the part closest to the intra prediction reference sample and ending at the part farthest from the intra prediction reference sample, the weight wt of each of the four regions is set to 6, 5, 3, and 2, respectively. The final CIIP prediction signal is derived using the following equation:

[0139] P CIIP =((8-wt)*P inter +wt*P intra +4)>>3

[0140] Syntax for merging data

[0141] The following table shows the syntax of merge data in VVC Draft 4, which includes extended merge data, MMVD data, affine merge data, triangle merge data and CIIP data.

[0142] VVC draft 4 section 7.3.2.1

[0143]

[0144] VVC draft 4 section 7.3.3.1

[0145]

[0146]

[0147] VVC draft 4 section 7.3.4.1

[0148]

[0149]

[0150] VVC draft 4 section 7.3.4.8

[0151]

[0152]

[0153] VVC draft 4 section 7.3.6.8

[0154]

[0155]

[0156]

[0157] The semantics of merging data is as follows:

[0158] sps_temporal_mvp_enabled_flag equal to 1 specifies that tile_group_temporal_mvp_enabled_flag is present in the tile group headers of tile groups with tile_group_type not equal to 1 in the coded video sequence (CVS).

[0159] sps_temporal_mvp_enabled_flag equal to 0 specifies that tile_group_temporal_mvp_enabled_flag is not present in the tile group header and the temporal motion vector predictor is not used in the CVS.

[0160] sps_sbtmvp_enabled_flag equal to 1 specifies that the subblock based temporal motion vector predictor can be used for decoding pictures of all tile groups in the CVS with tile_group_type not equal to 1. sps_sbtmvp_enabled_flag equal to 0 specifies that the subblock based temporal motion vector predictor is not used in the CVS. When sps_sbtmvp_enabled_flag is not present, sps_sbtmvp_enabled_flag is inferred to be equal to 0.

[0161] sps_ibc_enabled_flag equal to 1 specifies that the current picture reference can be used to decode pictures in the CVS. sps_ibc_enabled_flag equal to 0 specifies that the current picture reference is not used in the CVS. When sps_ibc_enabled_flag is not present, sps_ibc_enabled_flag is inferred to be equal to 0.

[0162] sps_ciip_enabled_flag specifies that ciip_flag may be present in the codec unit syntax of an inter codec unit. sps_ciip_enabled_flag equal to 0 specifies that ciip_flag is not present in the codec unit syntax of an inter codec unit.

[0163] sps_fpel_mmvd_enabled_flag equal to 1 specifies that merge mode with motion vector difference uses integer sample precision. sps_fpel_mmvd_enabled_flag equal to 0 specifies that merge mode with motion vector difference can use fractional sample precision.

[0164] sps_triangle_enabled_flag specifies whether triangle-based motion compensation can be used for inter prediction. sps_triangle_enabled_flag equal to 0 specifies that the syntax should be constrained so that triangle-based motion compensation is not used in CVS, and merge_triangle_flag, merge_triangle_split_dir, merge_triangle_idx0, and merge_triangle_idx1 are not present in the codec unit syntax of CVS. sps_triangle_enabled_flag equal to 1 specifies that triangle-based motion compensation can be used in CVS.

[0165] tile_group_temporal_mvp_enabled_flag specifies whether the temporal motion vector predictor can be used for inter prediction. If tile_group_temporal_mvp_enabled_flag is equal to 0, the syntax elements of the current picture should be constrained so that the temporal motion vector predictor is not used in the decoding of the current picture. Otherwise (tile_group_temporal_mvp_enabled_flag is equal to 1), the temporal motion vector predictor can be used in the decoding of the current picture. When tile_group_temporal_mvp_enabled_flag is not present, the value of tile_group_temporal_mvp_enabled_flag is inferred to be equal to 0.

[0166] mvd_l1_zero_flag equal to 1 indicates that the mvd_coding(x0, y0, 1) syntax structure was not parsed and for compIdx=0..1, MvdL1[x0][y0][compIdx] is set equal to 0. mvd_l1_zero_flag equal to 0 indicates that the mvd_coding(x0, y0, 1) syntax structure was parsed.

[0167] collocated_from_l0_flag equal to 1 specifies that the co-located picture used for temporal motion vector prediction is derived from reference picture list 0. collocated_from_l0_flag equal to 0 specifies that the co-located picture used for temporal motion vector prediction is derived from reference picture list 1. collocated_from_l0_flag is inferred to be equal to 1 when collocated_from_l0_flag is not present.

[0168] six_minus_max_num_merge_cand specifies that the maximum number of merge motion vector prediction (MVP) candidates supported in a tile group is subtracted from 6. The maximum number of merge MVP candidates MaxNumMergeCand is derived as follows:

[0169] MaxNumMergeCand=6-six_minus_max_num_merge_cand

[0170] The value of MaxNumMergeCand should be in the range of 1 to 6, inclusive.

[0171] five_minus_max_num_subblock_merge_cand specifies the maximum number of subblock-based merge motion vector prediction (MVP) candidates supported in a tile group subtracted from 5. When five_minus_max_num_subblock_merge_cand is not present, five_minus_max_num_subblock_merge_cand is inferred to be equal to 5-sps_sbtmvp_enabled_flag. The maximum number of subblock-based merge MVP candidates MaxNumSubblockMergeCand is derived as follows:

[0172] MaxNumSubblockMergeCand=5-five_minus_max_num_subblock_merge_cand

[0173] The value of MaxNumSubBlockMergeCnd should be in the range of 0 to 5, inclusive.

[0174] tile_group_fpel_mmvd_enabled_flag equal to 1 specifies that merge mode with motion vector differences uses integer sample precision in the current tile group. tile_group_fpel_mmvd_enabled_flag equal to 0 specifies that merge mode with motion vector differences may use fractional sample precision in the current tile group. When tile_group_fpel_mmvd_enabled_flag is not present, the value of tile_group_fpel_mmvd_enabled_flag is inferred to be 0.

[0175] mmvd_flag[x0][y0] equal to 1 specifies that merge mode with motion vector difference is used to generate inter prediction parameters for the current codec unit. Array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. When mmvd_flag[x0][y0] is not present, mmvd_flag[x0][y0] is inferred to be equal to 0.

[0176] mmvd_merge_flag[x0][y0] specifies that the first (0) candidate or the second (1) candidate in the merge candidate list is used with the motion vector difference derived from mmvd_distance_idx[x0][y0] and mmvd_direction_idx[x0][y0]. The array index x0, y0 specifies the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture.

[0177] mmvd_distance_idx[x0][y0] specifies the index used to derive MmvdDistance[x0][y0] as specified in Table 4. The array index x0, y0 specifies the position (x0, y0) of the top left luma sample of the considered codec block relative to the top left luma sample of the picture.

[0178] Table 4 - Specification of MmvdDistance[x0][y0] based on mmvd_distance_idx[x0][y0].

[0179] mmvd_distance_idx[x0][y0] MmvdDistance[x0][y0] 0 1 1 2 2 4 3 8 4 16 5 32 6 64 7 128

[0180] Another version of Table 4 is shown below:

[0181]

[0182] mmvd_direction_idx[x0][y0] specifies the index used to derive MmvdSign[x0][y0] as specified in Table 5. The array index x0, y0 specifies the position (x0, y0) of the top left luma sample of the considered codec block relative to the top left luma sample of the picture.

[0183] Table 5 – Specification of MmvdSign[x0][y0] based on mmvd_direction_idx[x0][y0]

[0184] mmvd_direction_idx[x0][y0] MmvdSign[x0][y0][0] MmvdSign[x0][y0][1] 0 +1 0 1 -1 0 2 0 +1 3 0 -1

[0185] The derivation of the two components of the combined MVD offset MmvdOffset[x0][y0] is as follows:

[0186] MmvdOffset[x0][y0][0]=(MmvdDistance[x0][y0]<<2)×MmvdSign[x0][y0][0]

[0187] MmvdOffset[x0][y0][1]=(MmvdDistance[x0][y0]<<2)×MmvdSign[x0][y0][1]

[0188] merge_subblock_flag[x0][y0] specifies whether to infer subblock-based inter prediction parameters for the current codec unit from neighboring blocks. Array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. When merge_subblock_flag[x0][y0] is not present, merge_subblock_flag[x0][y0] is inferred to be equal to 0.

[0189] merge_subblock_idx[x0][y0] specifies the merge candidate index of the subblock-based merge candidate list, where x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. When merge_subblock_idx[x0][y0] does not exist, merge_subblock_idx[x0][y0] is inferred to be equal to 0.

[0190] ciip_flag[x0][y0] specifies whether combined inter-picture merging and intra-picture prediction are applied for the current codec unit. The array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. When ciip_flag[x0][y0] is not present, ciip_flag[x0][y0] is inferred to be equal to 0.

[0191] The syntax elements ciip_luma_mpm_flag[x0][y0] and ciip_luma_mpm_idx[x0][y0] specify the intra prediction mode for luma samples used in combined inter-picture merging and intra-picture prediction. The array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. The intra prediction modes are derived according to VVC draft 4 clause 8.4.5.

[0192] When ciip_luma_mpm_flag[x0][y0] is not present, ciip_luma_mpm_flag[x0][y0] is inferred as follows:

[0193] - If cbWidth is greater than 2×cbHeight or cbHeight is greater than 2×cbWidth, ciip_luma_mpm_flag[x0][y0] is inferred to be equal to 1.

[0194] Otherwise, ciip_luma_mpm_flag[x0][y0] is inferred to be equal to 0.

[0195] merge_triangle_flag[x0][y0] equal to 1 specifies that for the current codec unit, triangle-based motion compensation is used to generate prediction samples for the current codec unit when decoding B-tile groups. merge_triangle_flag[x0][y0] equal to 0 specifies that the codec unit is not predicted by triangle-based motion compensation. When merge_triangle_flag[x0][y0] is not present, merge_triangle_flag[x0][y0] is inferred to be equal to 0.

[0196] merge_triangle_split_dir[x0][y0] specifies the split direction for merge triangle mode. Array indices x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. When merge_triangle_split_dir[x0][y0] is not present, merge_triangle_split_dir[x0][y0] is inferred to be equal to 0.

[0197] merge_triangle_idx0[x0][y0] specifies the first triangle merge candidate index of the triangle shape based motion compensation candidate list, where x0, y0 specify the position (x0, y0) of the top left luma sample of the considered codec block relative to the top left luma sample of the picture. When merge_triangle_idx0[x0][y0] is not present, merge_triangle_idx0[x0][y0] is inferred to be equal to 0.

[0198] merge_triangle_idx1[x0][y0] specifies the second merge candidate index of the triangle-shaped motion compensation candidate list, where x0, y0 specify the position (x0, y0) of the top-left luma sample of the considered codec block relative to the top-left luma sample of the picture. When merge_triangle_idx1[x0][y0] does not exist, merge_triangle_idx1[x0][y0] is inferred to be equal to 0.

[0199]

[0200] merge_idx[x0][y0] specifies the merge candidate index of the merge candidate list, where x0, y0 specify the position (x0, y0) of the upper left luma sample of the considered codec block relative to the upper left luma sample of the picture.

[0201] When merge_idx[x0][y0] does not exist, merge_idx[x0][y0] is inferred as follows:

[0202] – If mmvd_flag[x0][y0] is equal to 1, merge_idx[x0][y0] is inferred to be equal to mmvd_merge_flag[x0][y0].

[0203] – Otherwise (merge_idx[x0][y0] is equal to 0), merge_idx[x0][y0] is inferred to be equal to 0.

[0204] The bitstream consistency requirement is that when the reference picture corresponding to ref_idx_l0[x0][y0] of the current codec unit is the currently decoded picture, mmvd_flag[x0][y0], merge_subblock_flag[x0][y0], ciip_flag[x0][y0] and merge_triangle_flag[x0][y0] should all be equal to 0.

[0205] The video encoder 200 and the video decoder 300 may be configured to perform techniques for improving the syntax of the merge mode described in the present disclosure. For example, the video encoder 200 and the video decoder 300 may be configured to encode and decode a tile level syntax element (e.g., minus_max_num_triange_merge_cand) indicating the maximum number of triangle merge candidates, construct a triangle merge candidate list according to the maximum number of triangle merge candidates, and encode and decode video data using the triangle merge candidate list and the triangle merge mode.

[0206] For example, in some examples of the present disclosure, the video encoder 200 may determine the maximum number of triangle merge candidates. In addition, the video encoder 200 may signal a first triangle merge index syntax element in the bitstream. The first triangle merge index syntax element specifies a first triangle merge candidate index. The first triangle merge candidate index indicates a first triangle merge candidate of a motion compensation candidate list based on a triangle shape. In addition, the video encoder 200 determines whether the maximum number of triangle merge candidates is greater than 2. Based on the maximum number of triangle merge candidates being greater than 2, the video encoder 200 may signal a second triangle merge index in the bitstream. The second triangle merge index specifies a second triangle merge candidate of a motion compensation candidate list based on a triangle shape. However, based on the maximum number of triangle merge candidates being not greater than 2, the video encoder 200 may omit the second triangle merge index syntax element from the bitstream. However, the video decoder 300 may still be able to determine the value of the second triangle merge index because the second triangle merge candidate must be different from the first triangle merge candidate. In either case, the video encoder 200 may generate a prediction block for the CU. As part of generating the prediction block for the CU, the video encoder 200 may use motion information of the first triangle merge candidate to inter-predict the first triangle partition of the CU. In addition, the video encoder 200 may inter-predict the second triangle partition of the CU using the motion information of the second triangle merging candidate. The video encoder 200 may generate residual data of the CU based on the prediction block of the CU and the samples of the CU.

[0207] Similarly, according to one or more examples of the present disclosure, the video decoder 300 may determine the maximum number of triangle merge candidates based on a first syntax element signaled in a bitstream including an encoded representation of video data. The video decoder 300 may also obtain a first triangle merge index syntax element from the bitstream. The first triangle merge index syntax element specifies a first triangle merge candidate index. The first triangle merge candidate index indicates a first triangle merge candidate of a triangle shape-based motion compensation candidate list. In addition, the video decoder 300 may determine whether the maximum number of triangle merge candidates is greater than 2. Based on the maximum number of triangle merge candidates being greater than 2, the video decoder 300 may obtain a second triangle merge index from the bitstream. The second triangle merge index specifies a second triangle merge candidate of a triangle shape-based motion compensation candidate list. However, based on the maximum number of triangle merge candidates being not greater than 2, the video decoder 300 may infer that the second triangle merge candidate index indicates a second triangle merge candidate of a triangle shape-based motion compensation candidate list without obtaining any syntax element specifying the second triangle merge candidate index from the bitstream. This is because the second triangle merge candidate must be different from the first triangle merge candidate, and the maximum number of triangle candidates is not greater than 2. In addition, in this example, the video decoder 300 may generate a prediction block for the CU. As part of generating the prediction block of the CU, the video decoder 300 may use the motion information of the first triangle merge candidate to inter-predict the first triangle partition of the CU. Additionally, the video decoder 300 may use the motion information of the second triangle merge candidate to inter-predict the second triangle partition of the CU. The video decoder 300 may reconstruct the CU based on the prediction block of the CU and the residual data of the CU.

[0208] The present disclosure may generally refer to "signaling" certain information, such as syntax elements. The term "signaling" may generally refer to the communication of values ​​of syntax elements and / or other data used to decode encoded video data. That is, the video encoder 200 may signal the values ​​of syntax elements in a bitstream. Generally, signaling refers to generating values ​​in a bitstream. As described above, the source device 102 may transmit the bitstream to the destination device 116 in substantially real time, or transmit the bitstream to the destination device 116 in non-real time, such as may occur when storing syntax elements to the storage device 112 for later retrieval by the destination device 116.

[0209] Fig. 8A and Figure 8Bis a conceptual diagram showing an example quadtree binary tree (QTBT) structure 130 and a corresponding codec tree unit (CTU) 132. Solid lines represent quadtree partitions, and dashed lines indicate binary tree partitions. In each partition (i.e., non-leaf) node of the binary tree, a flag is signaled to indicate which partition type (i.e., horizontal or vertical) is used, where 0 indicates horizontal partitioning and 1 indicates vertical partitioning in this example. For quadtree partitioning, since the quadtree node divides the block horizontally and vertically into 4 sub-blocks of equal size, there is no need to indicate the partition type. Therefore, the video encoder 200 and the video decoder 300 can encode and decode the syntax elements (e.g., partition information) for the regional tree level (i.e., the first level) (i.e., the solid line) of the QTBT structure 130 and the syntax elements (e.g., partition information) for the prediction tree level (i.e., the second level) (i.e., the dashed line) of the QTBT structure 130, respectively. The video encoder 200 and the video decoder 300 may respectively encode and decode video data (such as prediction and transform data) for a CU represented by a terminal leaf node of the QTBT structure 130 .

[0210] generally, Figure 8B The CTU 132 may be associated with parameters that define the size of blocks corresponding to nodes of the QTBT structure 130 at the first and second levels. These parameters may include a CTU size (indicating the size of the CTU 132 in samples), a minimum quadtree size (MinQTSize, indicating the minimum allowed quadtree leaf node size), a maximum binary tree size (MaxBTSize, indicating the maximum allowed binary tree root node size), a maximum binary tree depth (MaxBTDepth, indicating the maximum allowed binary tree depth), and a minimum binary tree size (MinBTSize, indicating the minimum allowed binary tree leaf node size).

[0211] The root node of the QTBT structure corresponding to the CTU may have four child nodes at the first level of the QTBT structure, each of which may be segmented according to a quadtree segmentation. That is, the nodes at the first level are either leaf nodes (without child nodes) or have four child nodes. The example of the QTBT structure 130 represents such a node, which includes a parent node and a child node with a solid line for branching. If the node at the first level is not larger than the maximum allowed binary tree root node size (MaxBTSize), the nodes may be further segmented by the corresponding binary tree. The binary tree partitioning of a node may be iterated until the node generated by the partitioning reaches the minimum allowed binary tree leaf node size (MinBTSize) or the maximum allowed binary tree depth (MaxBTDepth). The example of the QTBT structure 130 represents such a node as having a dotted line for branching. The binary tree leaf node is called a codec unit (CU), which is used for prediction (e.g., intra-picture or inter-picture prediction) and transformation without any further segmentation. As described above, a CU may also be referred to as a "video block" or "block".

[0212] In one example of a QTBT partitioning structure, the CTU size is set to 128×128 (luminance sample and two corresponding 64×64 chrominance samples), MinQTSize is set to 16×16, MaxBTSize is set to 64×64, MinBTSize (for both width and height) is set to 4, and MaxBTDepth is set to 4. Quadtree partitioning is first applied to the CTU to generate a quadtree leaf node. The quadtree leaf node can have a size from 16×16 (i.e., MinQTSize) to 128×128 (i.e., CTU size). If the quadtree leaf node is 128×128, the quadtree leaf node will not be further divided by the binary tree because its size exceeds MaxBTSize (i.e., 64×64 in this case). Otherwise, the quadtree leaf node will be further divided by the binary tree. Therefore, the quadtree leaf node is also the root node of the binary tree and has a binary tree depth of 0. When the binary tree depth reaches MaxBTDepth (4 in this example), no further splitting is allowed. When a binary tree node has a width equal to MinBTSize (4 in this example), it means that no further vertical splitting is allowed. Similarly, a binary tree node with a height equal to MinBTSize means that no further horizontal splitting is allowed for the binary tree node. As described above, the leaf nodes of the binary tree are called CUs, and they are further processed according to prediction and transformation without further segmentation.

[0213] Fig. 9 is a block diagram illustrating an example video encoder 200 that may perform the techniques of this disclosure. Fig. 9The present disclosure is provided for the purpose of explanation and should not be considered as limiting the techniques broadly illustrated and described in the present disclosure. For the purpose of explanation, the present disclosure describes the video encoder 200 in the context of video codec standards such as the HEVC video codec standard and the H.266 video codec standard under development. However, the techniques of the present disclosure are not limited to these video codec standards and are generally applicable to video encoding and decoding.

[0214] exist Fig. 9 In the example of , the video encoder 200 includes a video data memory 230, a mode selection unit 202, a residual generation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a filter unit 216, a decoded picture buffer (DPB) 218, and an entropy coding unit 220. Any or all of the video data memory 230, the mode selection unit 202, the residual generation unit 204, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, the inverse transform processing unit 212, the reconstruction unit 214, the filter unit 216, the DPB 218, and the entropy coding unit 220 may be implemented in one or more processors or processing circuits. In addition, the video encoder 200 may include additional or alternative processors or processing circuits to perform these and other functions.

[0215] The video data memory 230 may store video data to be encoded by the components of the video encoder 200. The video encoder 200 may receive video data from, for example, the video source 104 ( Figure 1 ) receives video data stored in video data memory 230. DPB 218 can act as a reference picture memory, which stores reference video data for use when the video encoder 200 predicts subsequent video data. Video data memory 230 and DPB 218 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 (RRAM) or other types of memory devices. Video data memory 230 and DPB218 can be provided by the same memory device or a separate memory device. In various examples, as shown in the figure, video data memory 230 can be on the chip with other components of video encoder 200, or off the chip relative to those components.

[0216] In the present disclosure, references to the video data memory 230 should not be interpreted as limited to memory internal to the video encoder 200, unless specifically described as such, or to memory external to the video encoder 200, unless specifically described as such. Instead, references to the video data memory 230 should be understood as references to memory storing video data received by the video encoder 200 for encoding (e.g., video data for a current block to be encoded). Figure 1 The memory 106 may also provide temporary storage of outputs from the various units of the video encoder 200 .

[0217] Show Fig. 9 The various units of the video encoder 200 are described to help understand the operations performed by the video encoder 200. These units can be implemented as fixed-function circuits, programmable circuits, or a combination thereof. Fixed-function circuits refer to circuits that provide specific functions and are preset on operations that can be performed. Programmable circuits refer to circuits that can be programmed to perform various tasks and provide flexible functions in operations that can be performed. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. Fixed-function circuits can execute software instructions (e.g., receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.

[0218] The video encoder 200 may include an arithmetic logic unit (ALU), an elementary function unit (EFU), a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video encoder 200 is performed using software executed by a programmable circuit, the memory 106 ( Figure 1 ) may store object code for software received and executed by the video encoder 200, or another memory (not shown) within the video encoder 200 may store such instructions.

[0219] The video data memory 230 is configured to store received video data. The video encoder 200 may retrieve pictures of video data from the video data memory 230 and provide the video data to the residual generation unit 204 and the mode selection unit 202. The video data in the video data memory 230 may be original video data to be encoded.

[0220] The mode selection unit 202 includes a motion estimation unit 222, a motion compensation unit 224, and an intra prediction unit 226. The mode selection unit 202 may include additional functional units to perform video prediction according to other prediction modes. As an example, the mode selection unit 202 may include a palette unit, an intra block copy unit (which may be part of the motion estimation unit 222 and / or the motion compensation unit 224), an affine unit, a linear model (LM) unit, etc.

[0221] The mode selection unit 202 generally coordinates multiple encoding processes to test combinations of encoding parameters and rate-distortion values ​​for the results of such combinations. The encoding parameters may include the partitioning of the CU to the CU, the prediction mode of the CU, the transform type of the residual data of the CU, the quantization parameter of the residual data of the CU, etc. The mode selection unit 202 may ultimately select a combination of encoding parameters with a better rate-distortion value than other tested combinations.

[0222] The video encoder 200 may partition the picture retrieved from the video data memory 230 into a series of CTUs and encapsulate one or more CTUs in a slice. The mode selection unit 202 may partition the CTUs of the picture according to a tree structure (e.g., the QTBT structure or quadtree structure of HEVC described above). As described above, the video encoder 200 may form one or more CUs from the partitioned CTUs according to the tree structure. Such CUs may also be generally referred to as "video blocks" or "blocks".

[0223] Typically, the mode selection unit 202 also controls its components (e.g., the motion estimation unit 222, the motion compensation unit 224, and the intra prediction unit 226) to generate a prediction block for the current block (e.g., the current CU, or in HEVC, the overlapping portion of the PU and TU). For inter prediction of the current block, the motion estimation unit 222 can perform a motion search to identify one or more closely matching reference blocks in one or more reference pictures (e.g., one or more previously encoded pictures stored in the DPB 218). Specifically, the motion estimation unit 222 can calculate a value representing the degree of similarity of the potential reference block to the current block, for example, based on the sum of absolute differences (SAD), the sum of squared differences (SSD), the mean absolute difference (MAD), the mean squared difference (MSD), etc. The motion estimation unit 222 can generally perform these calculations using the sample-by-sample difference between the current block and the reference block being considered. The motion estimation unit 222 can identify the reference block having the lowest value obtained from these calculations, which indicates the reference block that most closely matches the current block.

[0224] The motion estimation unit 222 may form one or more motion vectors (MVs) that define the position of a reference block in a reference picture relative to the position of a current block in a current picture. The motion estimation unit 222 may then provide the motion vectors to the motion compensation unit 224. For example, for unidirectional inter prediction, the motion estimation unit 222 may provide a single motion vector, and for bidirectional inter prediction, the motion estimation unit 222 may provide two motion vectors. The motion compensation unit 224 may then use the motion vectors to generate a prediction block. For example, the motion compensation unit 224 may use the motion vectors to retrieve data for the reference block. As another example, if the motion vectors have fractional sample precision, the motion compensation unit 224 may interpolate the values ​​of the prediction block according to one or more interpolation filters. In addition, for bidirectional inter prediction, the motion compensation unit 224 may retrieve data for two reference blocks identified by the corresponding motion vectors and combine the retrieved data, for example, by sample-by-sample averaging or weighted averaging.

[0225] The motion estimation unit 222 and the motion compensation unit 224 may implement a triangle merge mode. Therefore, the motion estimation unit 222 and the motion compensation unit 224 may generate a motion compensation candidate list based on a triangle shape. The motion estimation unit 222 and the motion compensation unit 224 may use the motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU. The motion estimation unit 222 and the motion compensation unit 224 may use the motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU.

[0226] As another example, for intra prediction or intra prediction codec, the intra prediction unit 226 can generate a prediction block from samples adjacent to the current block. For example, for directional mode, the intra prediction unit 226 can generally mathematically combine the values ​​of the adjacent samples and pad these calculated values ​​in a defined direction across the current block to produce a prediction block. As another example, for DC mode, the intra prediction unit 226 can calculate the average value of the adjacent samples to the current block and generate a prediction block to include the resulting average value for each sample of the prediction block.

[0227] The mode selection unit 202 provides the prediction block to the residual generation unit 204. The residual generation unit 204 receives the original, uncoded version of the current block from the video data memory 230 and receives the prediction block from the mode selection unit 202. The residual generation unit 204 calculates the sample-by-sample difference between the current block and the prediction block. The resulting sample-by-sample difference defines a residual block for the current block. In some examples, the residual generation unit 204 may also determine the difference between the sample values ​​in the residual block to generate the residual block using residual differential pulse code modulation (RDPCM). In some examples, the residual generation unit 204 may be formed using one or more subtractor circuits that perform binary subtraction.

[0228] In the example where the mode selection unit 202 partitions the CU into PUs, each PU may be associated with a luma prediction unit and a corresponding chroma prediction unit. The video encoder 200 and the video decoder 300 may support PUs of various sizes. As described above, the size of the CU may refer to the size of the luma codec block of the CU, and the size of the PU may refer to the size of the luma prediction unit of the PU. Assuming that the size of a particular CU is 2N×2N, the video encoder 200 may support PU sizes of 2N×2N or N×N for intra-frame prediction, and symmetric PU sizes of 2N×2N, 2N×N, N×2N, N×N or the like for inter-frame prediction. The video encoder 200 and the video decoder 300 may also support asymmetric partitioning of PU sizes of 2N×nU, 2N×nD, nL×2N, and nR×2N for inter-frame prediction.

[0229] In an example where the mode selection unit does not further partition the CU into PUs, each CU may be associated with a luma codec block and a corresponding chroma codec block. As described above, the size of a CU may refer to the size of the luma codec block of the CU. The video encoder 200 and the video decoder 300 may support a CU size of 2N×2N, 2N×N, or N×2N.

[0230] For other video codec techniques, such as intra-block copy mode codec, affine mode codec, and linear model (LM) mode codec, as a few examples, the mode selection unit 202 generates a prediction block for the block being encoded via a corresponding unit associated with the codec technique. In some examples, such as palette mode codec, the mode selection unit 202 may not generate a prediction block, but instead generate syntax elements that indicate how to reconstruct the block based on the selected palette. In this mode, the mode selection unit 202 may provide these syntax elements to the entropy coding unit 220 for encoding.

[0231] As described above, the residual generation unit 204 receives video data of a current block and a corresponding prediction block. The residual generation unit 204 then generates a residual block for the current block. To generate the residual block, the residual generation unit 204 calculates the sample-by-sample difference between the prediction block and the current block.

[0232] The transform processing unit 206 applies one or more transforms to the residual block to generate a block of transform coefficients (referred to herein as a "transform coefficient block"). The transform processing unit 206 can apply various transforms to the residual block to form a transform coefficient block. For example, the transform processing unit 206 can apply a discrete cosine transform (DCT), a directional transform, a karhun-Loeve transform (KLT), or a conceptually similar transform to the residual block. In some examples, the transform processing unit 206 can perform multiple transforms on the residual block, such as a primary transform and a secondary transform, such as a rotation transform. In some examples, the transform processing unit 206 does not apply a transform to the residual block.

[0233] The quantization unit 208 may quantize the transform coefficients in the transform coefficient block to generate a quantized transform coefficient block. The quantization unit 208 may quantize the transform coefficients of the transform coefficient block according to a quantization parameter (QP) value associated with the current block. The video encoder 200 (e.g., via the mode selection unit 202) may adjust the degree of quantization applied to the transform coefficient block associated with the current block by adjusting the QP value associated with the CU. Quantization may introduce information loss, and therefore, the quantized transform coefficients may have lower precision than the original transform coefficients generated by the transform processing unit 206.

[0234] The inverse quantization unit 210 and the inverse transform processing unit 212 may apply inverse quantization and inverse transform to the quantized transform coefficient block, respectively, to reconstruct a residual block from the transform coefficient block. The reconstruction unit 214 may generate a reconstructed block corresponding to the current block (although it may have a certain degree of distortion) based on the reconstructed residual block and the prediction block generated by the mode selection unit 202. For example, the reconstruction unit 214 may add samples of the reconstructed residual block to corresponding samples of the prediction block generated by the mode selection unit 202 to generate a reconstructed block.

[0235] Filter unit 216 may perform one or more filtering operations on the reconstructed block. For example, filter unit 216 may perform a deblocking operation to reduce blocking artifacts along the edge of the CU. In some examples, the operations of filter unit 216 may be skipped.

[0236] The video encoder 200 stores the reconstructed blocks in the DPB 218. For example, in examples where the operation of the filter unit 216 is not required, the reconstruction unit 214 can store the reconstructed blocks to the DPB 218. In examples where the operation of the filter unit 216 is required, the filter unit 216 can store the filtered reconstructed blocks to the DPB 218. The motion estimation unit 222 and the motion compensation unit 224 can retrieve a reference picture formed by the reconstructed (and potentially filtered) blocks from the DPB 218 to perform inter-frame prediction on blocks of subsequently encoded pictures. In addition, the intra-frame prediction unit 226 can use the reconstructed blocks in the DPB 218 of the current picture to perform intra-frame prediction on other blocks in the current picture.

[0237] In general, the entropy coding unit 220 may entropy encode syntax elements received from other functional components of the video encoder 200. For example, the entropy coding unit 220 may entropy encode the quantized transform coefficient blocks from the quantization unit 208. As another example, the entropy coding unit 220 may entropy encode the prediction syntax elements (e.g., motion information for inter prediction or intra mode information for intra prediction) from the mode selection unit 202. The entropy coding unit 220 may perform one or more entropy coding operations on syntax elements as another example of video data to generate entropy-coded data. For example, the entropy coding unit 220 may perform a context-adaptive variable length coding (CAVLC) operation, a CABAC operation, a variable to variable (V2V) length coding operation, a syntax-based context-adaptive binary arithmetic coding (SBAC) operation, a probability interval partitioning entropy (PIPE) coding operation, an exponential-Golomb coding operation, or another type of entropy coding operation on the data. In some examples, entropy encoding unit 220 may operate in a bypass mode, where syntax elements are not entropy encoded.

[0238] The video encoder 200 may output a bitstream including syntax elements for entropy coding required to reconstruct blocks of a slice or picture. Specifically, the entropy coding unit 220 may output a bitstream. For example, according to the technology of the present disclosure, in the case where a CU is encoded using a triangle merge mode, the video encoder 200 may signal a first triangle merge index syntax element in the bitstream, wherein the first triangle merge index syntax element specifies a first triangle merge candidate index. The first triangle merge candidate index indicates a first triangle merge candidate of a motion compensation candidate list based on a triangle shape. In addition, the video encoder 200 may determine whether the maximum number of triangle merge candidates is greater than 2. Based on the maximum number of triangle merge candidates being not greater than 2, the video encoder 200 may omit a second triangle merge index syntax element specifying a second triangle merge index from the bitstream, the second triangle merge index indicating a second triangle merge candidate of a motion compensation candidate list based on a triangle shape. The second triangle merge candidate is different from the first triangle merge candidate.

[0239] The above operations are described with respect to blocks. Such descriptions should be understood as operations for luma codec blocks and / or chroma codec blocks. As described above, in some examples, the luma codec block and the chroma codec block are the luma and chroma components of a CU. In some examples, the luma codec block and the chroma codec block are the luma and chroma components of a PU.

[0240] In some examples, operations performed on the luma codec block do not need to be repeated for the chroma codec block. As an example, in order to identify the motion vector (MV) and reference picture of the chroma block, the operations for identifying the motion vector (MV) and reference picture of the luma codec block do not need to be repeated. Instead, the MV of the luma codec block can be scaled to determine the MV of the chroma block, and the reference picture can be the same. As another example, the intra prediction process can be the same for the luma codec block and the chroma codec block.

[0241] The video encoder 200 represents an example of a device configured to encode video data, the device including a memory configured to store the video data, and one or more processing units implemented in circuits and configured to perform techniques for improving the syntax of merge modes as described in the present disclosure. For example, the one or more processing units may be configured to encode a tile level syntax element (e.g., minus_max_num_triange_merge_cand) indicating a maximum number of triangle merge candidates, construct a triangle merge candidate list based on the maximum number of triangle merge candidates, and encode the video data using the triangle merge candidate list and the triangle merge mode.

[0242] In some examples, video encoder 200 represents an example of a device configured to encode video data, wherein the device includes a memory configured to store video data, and one or more processing units implemented in a circuit and the one or more processing units are configured to determine a maximum number of triangle merge candidates; signal a first triangle merge index syntax element in a bitstream, the first triangle merge index syntax element specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate in a motion compensation candidate list based on a triangle shape; determine whether the maximum number of triangle merge candidates is greater than 2; based on the maximum number of triangle merge candidates being greater than 2, signal a second triangle merge index in the bitstream, the second triangle merge index specifying a first triangle merge candidate in a motion compensation candidate list based on a triangle shape. A second triangle merge candidate of a motion compensation candidate list based on a triangle shape; based on a maximum number of triangle merge candidates being no greater than 2, omitting a second triangle merge index syntax element from a bitstream, the second triangle merge index syntax element specifying a second triangle merge candidate index indicating a second triangle merge candidate of a motion compensation candidate list based on a triangle shape, the second triangle merge candidate being different from the first triangle merge candidate; generating a prediction block of a codec unit (CU), wherein generating the prediction block of the CU includes: using motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU; and using motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU; and generating residual data of the CU based on the prediction block of the CU and samples of the CU.

[0243] Fig.10 is a block diagram illustrating an example video decoder 300 that may perform the techniques of this disclosure. Fig.10 The present disclosure is provided for the purpose of explanation and does not limit the techniques widely illustrated and described in this disclosure. For the purpose of explanation, this disclosure describes a video decoder 300 according to the techniques of JEM, VVC, and HEVC. However, the techniques of this disclosure may be performed by a video codec device configured to other video codec standards.

[0244] exist Fig.10In the example of , the video decoder 300 includes a coded picture buffer (CPB) memory 320, an entropy decoding unit 302, a prediction processing unit 304, an inverse quantization unit 306, an inverse transform processing unit 308, a reconstruction unit 310, a filter unit 312, and a decoded picture buffer (DPB) 314. Any or all of the CPB memory 320, the entropy decoding unit 302, the prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, the filter unit 312, and the DPB 314 may be implemented in one or more processors or processing circuits. In addition, the video decoder 300 may include additional or alternative processors or processing circuits to perform these and other functions.

[0245] The prediction processing unit 304 includes a motion compensation unit 316 and an intra prediction unit 318. The prediction processing unit 304 may include additional units to perform predictions according to other prediction modes. As an example, the prediction processing unit 304 may include a palette unit, an intra block copy unit (which may form part of the motion compensation unit 316), an affine unit, a linear model (LM) unit, etc. In other examples, the video decoder 300 may include more, fewer, or different functional components.

[0246] The CPB memory 320 may store video data, such as an encoded video bitstream, to be decoded by components of the video decoder 300. The video data stored in the CPB memory 320 may be, for example, received from the computer readable medium 110 ( Figure 1 ). The CPB memory 320 may include a CPB that stores encoded video data (e.g., syntax elements) from an encoded video bitstream. In addition, the CPB memory 320 may store video data other than syntax elements of encoded and decoded pictures, such as temporary data representing outputs from various units of the video decoder 300. The DPB 314 typically stores decoded pictures, and the video decoder 300 may output the decoded pictures and / or use them as reference video data when decoding subsequent data or pictures of the encoded video bitstream. The CPB memory 320 and the DPB 314 may 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 (RRAM), or other types of memory devices. The CPB memory 320 and the DPB 314 may be provided by the same memory device or a separate memory device. In various examples, the CPB memory 320 may be on-chip with other components of the video decoder 300, or off-chip relative to those components.

[0247] Additionally or alternatively, in some examples, video decoder 300 may retrieve the video from memory 120 ( Figure 1 ) retrieves the encoded and decoded video data. That is, memory 120 may store data using CPB memory 320 as discussed above. Likewise, when some or all of the functionality of video decoder 300 is implemented in software to be executed by processing circuitry of video decoder 300, memory 120 may store instructions to be executed by video decoder 300.

[0248] Show Fig.10 The various units shown in the figure are helpful for understanding the operations performed by the video decoder 300. These units may be implemented as fixed function circuits, programmable circuits, or a combination thereof. Fig. 9 Similarly, a fixed-function circuit refers to a circuit that provides a specific function and is preset in the operations that can be performed. A programmable circuit refers to a circuit that can be programmed to perform various tasks and provide flexible functions in the operations that can be performed. For example, a programmable circuit can execute software or firmware so that the programmable circuit operates in a manner defined by the instructions of the software or firmware. A fixed-function circuit can execute software instructions (e.g., receive parameters or output parameters), but the type of operation performed by the fixed-function circuit is generally immutable. In some examples, one or more units may be different circuit blocks (fixed-function or programmable), and in some examples, one or more units may be integrated circuits.

[0249] The video decoder 300 may include an ALU, an EFU, a digital circuit, an analog circuit, and / or a programmable core formed by a programmable circuit. In an example where the operation of the video decoder 300 is performed by software executed on the programmable circuit, an on-chip or off-chip memory may store instructions (e.g., object code) of the software received and executed by the video decoder 300.

[0250] The entropy decoding unit 302 may receive the encoded video data from the CPB and entropy decode the video data to reproduce the syntax elements. The prediction processing unit 304, the inverse quantization unit 306, the inverse transform processing unit 308, the reconstruction unit 310, and the filter unit 312 may generate decoded video data based on the syntax elements extracted from the bitstream.

[0251] Typically, the video decoder 300 reconstructs a picture on a block-by-block basis. The video decoder 300 may perform a reconstruction operation on each block individually (where the block currently being reconstructed (ie, decoded) may be referred to as a "current block").

[0252] The entropy decoding unit 302 may entropy decode syntax elements defining the quantized transform coefficients of the quantized transform coefficient block and transform information such as a quantization parameter (QP) and / or (multiple) transform mode indications. The inverse quantization unit 306 may use the QP associated with the quantized transform coefficient block to determine a degree of quantization, and likewise, determine a degree of inverse quantization for the inverse quantization unit 306 to apply. The inverse quantization unit 306 may, for example, perform a bitwise left shift operation to inverse quantize the quantized transform coefficients. The inverse quantization unit 306 may thereby form a transform coefficient block including the transform coefficients.

[0253] After the inverse quantization unit 306 forms the transform coefficient block, the inverse transform processing unit 308 may apply one or more inverse transforms to the transform coefficient block to generate a residual block associated with the current block. For example, the inverse transform processing unit 308 may apply an inverse DCT, an inverse integer transform, an inverse Karhunen-Loeve transform (KLT), an inverse rotational transform, an inverse directional transform, or another inverse transform to the transform coefficient block.

[0254] In addition, prediction processing unit 304 generates a prediction block based on the prediction information syntax element entropy decoded by entropy decoding unit 302. For example, if the prediction information syntax element indicates that the current block is inter-predicted, motion compensation unit 316 can generate the prediction block. In this case, the prediction information syntax element can indicate a reference picture in DPB 314 from which to retrieve the reference block, and a motion vector identifying the position of the reference block in the reference picture relative to the position of the current block in the current picture. Motion compensation unit 316 can generally generate a prediction block in the same manner as described for motion compensation unit 224 ( Fig. 9 ) is performed in a manner substantially similar to that described herein.

[0255] The motion compensation unit 316 may implement a triangle merge mode. Thus, the motion compensation unit 316 may generate a motion compensation candidate list based on triangle shapes. The motion compensation unit 316 may use the motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU. The motion compensation unit 316 may use the motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU.

[0256] In addition, to support the triangle merge mode, the entropy decoding unit 302 may determine the maximum number of triangle merge candidates based on a first syntax element (e.g., minus_max_num_triangle_merge_cand) signaled in the bitstream. The entropy decoding unit 302 may obtain a first triangle merge index syntax element from the bitstream. The first triangle merge index syntax element specifies a first triangle merge candidate index. The first triangle merge candidate index indicates a first triangle merge candidate of a triangle shape-based motion compensation candidate list. In addition, the entropy decoding unit 302 may determine whether the maximum number of triangle merge candidates is greater than 2. Based on the maximum number of triangle merge candidates being greater than 2, the entropy decoding unit 302 may obtain a second triangle merge index from the bitstream. The second triangle merge index specifies a second triangle merge candidate of a triangle shape-based motion compensation candidate list. Based on the maximum number of triangle merge candidates being not greater than 2, the entropy decoding unit 302 may infer that the second triangle merge candidate index indicates a second triangle merge candidate of a triangle shape-based motion compensation candidate list without obtaining any syntax element specifying the second triangle merge candidate index from the bitstream. The entropy decoding unit 302 may do this because the second triangle merge candidate must be different from the first triangle merge candidate.

[0257] As another example, if the prediction information syntax element indicates that the current block is intra-predicted, the intra-prediction unit 318 may generate a prediction block according to the intra-prediction mode indicated by the prediction information syntax element. Again, the intra-prediction unit 318 may generally generate a prediction block in the same manner as described with respect to the intra-prediction unit 226 ( Fig. 9 The intra prediction unit 318 may retrieve data of neighboring samples of the current block from the DPB 314.

[0258] The reconstruction unit 310 may reconstruct the current block using the prediction block and the residual block. For example, the reconstruction unit 310 may add samples of the residual block to corresponding samples of the prediction block to reconstruct the current block.

[0259] The filter unit 312 may perform one or more filtering operations on the reconstructed block. For example, the filter unit 312 may perform a deblocking operation to reduce blocking artifacts along the edges of the reconstructed block. The operations of the filter unit 312 need not be performed in all examples.

[0260] The video decoder 300 may store the reconstructed block in the DPB 314. For example, in an example where the operation of the filtering unit 312 is not performed, the reconstruction unit 310 may store the reconstructed block to the DPB 314. In an example where the operation of the filtering unit 312 is performed, the filtering unit 312 may store the filtered reconstructed block to the DPB 314. As described above, the DPB 314 may provide reference information to the prediction processing unit 304, such as samples of the current picture for intra-frame prediction and previously decoded pictures for subsequent motion compensation. In addition, the video decoder 300 may output the decoded pictures from the DPB for subsequent display on a display device such as a Figure 1 is presented on a display device 118).

[0261] In this manner, the video decoder 300 represents an example of a video decoding device that includes a memory configured to store video data, and one or more processing units implemented in circuits and configured to perform techniques for improving syntax for merge modes as described in the present disclosure. For example, the one or more processing units may be configured to decode a tile level syntax element (e.g., minus_max_num_triange_merge_cand) indicating a maximum number of triangle merge candidates, construct a triangle merge candidate list based on the maximum number of triangle merge candidates, and decode video data using the triangle merge candidate list and the triangle merge mode.

[0262] In addition, in some examples, the video decoder 300 may represent an example of a video decoding device, which includes a memory configured to store video data and one or more processing units implemented in a circuit, and the one or more processing units are configured to determine a maximum number of triangle merge candidates based on a first syntax element signaled in a bitstream including an encoded representation of the video data; obtain a first triangle merge index syntax element from the bitstream, the first triangle merge index syntax element specifying a first triangle merge candidate index, the first triangle merge candidate index indicating a first triangle merge candidate in a motion compensation candidate list based on a triangle shape; determine whether the maximum number of triangle merge candidates is greater than 2; and based on the maximum number of triangle merge candidates being greater than 2, obtain a second triangle merge candidate from the bitstream. A triangle merge index, wherein the second triangle merge index specifies a second triangle merge candidate in a motion compensation candidate list based on a triangle shape; based on the maximum number of triangle merge candidates being no greater than 2, inferring that the second triangle merge candidate index indicates a second triangle merge candidate in the motion compensation candidate list based on a triangle shape, without obtaining any syntax element specifying the second triangle merge candidate index from a bitstream, the second triangle merge candidate being different from the first triangle merge candidate; generating a prediction block of a CU, wherein generating the prediction block of the CU comprises: using motion information of the first triangle merge candidate to inter-predict a first triangle partition of the CU; and using motion information of the second triangle merge candidate to inter-predict a second triangle partition of the CU; and reconstructing the CU based on the prediction block of the CU and residual data of the CU.

[0263] In the current syntax design of VVC, there is no tile level flag to define the maximum number of triangle merge candidates MaxNumTriangleMergeCand. Note that there are already tile level flags that define the maximum number of normal merge candidates MaxNumMergeCand and the maximum number of sub-block merge candidates MaxNumSubblockMergeCand through the syntax parameters six_minus_max_num_merge_cand and five_minus_max_num_subblock_merge_cand. Note that the smaller the number of MaxNumMergeCand and MaxNumSubblockMergeCand, the lower the complexity on the decoder side. In VVC test model 4, MaxNumTriangleMergeCand is set to 5. However, it may be desirable to flexibly set MaxNumTriangleMergeCand with a higher level of syntax (e.g., tile, picture parameter set (PPS), sequence parameter set (SPS), etc.) to allow a smaller number of MaxNumTriangleMergeCand to be set. These techniques can meet the needs of scenarios that may require lower decoder complexity.

[0264] The present disclosure suggests adding a tile level syntax element minus_max_num_triangle_merge_cand to indicate the maximum number of triangle merge candidates MaxNumTriangleMergeCand. MaxNumTriangleMergeCand can be derived as follows: MaxNumTriangleMergeCand = T-minus_max_num_triangle_merge_cand, where T is a pre-assigned positive integer, and the minimum value of MaxNumTriangleMergeCand can be defined as U. Therefore, minus_max_num_triangle_merge_cand can be in the range of 0 to (TU) (including 0 and TU). One embodiment is to set T to 5 and U to 2. Then, minus_max_num_triangle_merge_cand is in the range of 0 to 3 (including 0 and 3). The corresponding modifications to the syntax and semantics can be marked in the following table <m> …< / m> show:

[0265] VVC draft 4 section 7.3.2.1

[0266] seq_parameter_set_rbsp(){ Descriptors … sps_triangle_enabled_flag u(1) … }

[0267] VVC draft 4 section 7.3.3.1

[0268]

[0269] In some examples, the video encoder 200 does not signal, and the video decoder 300 does not parse, the minus_max_num_triangle_merge_cand following five_minus_max_num_subblock_merge_cand and six_minus_max_num_merge_cand.

[0270] In some examples described above, the video encoder 200 and the video decoder 300 may be configured to encode and decode a tile level syntax element (e.g., minus_max_num_triange_merge_cand) indicating the maximum number of triangle merge candidates, construct a triangle merge candidate list based on the maximum number of triangle merge candidates, and encode and decode video data using the triangle merge candidate list and the triangle merge mode.

[0271] In another example, MaxNumTriangleMergeCand=2. In some examples of VVC, merge_triangle_idx0[x0][y0] and merge_triangle_idx1[x0][y0] are always parsed. When MaxNumTriangleMergeCand=2, the present disclosure suggests skipping parsing merge_triangle_idx1[x0][y0] because merge_triangle_idx1[x0][y0] must be the opposite of merge_triangle_idx0[x0][y0], i.e., when merge_triangle_idx0[x0][y0]=1, merge_triangle_idx1[x0][y0]=0, and when merge_triangle_idx0[x0][y0]=0, merge_triangle_idx1[x0][y0]=1. The corresponding modifications to the syntax and semantics may be shown in the following table (with markers <m> …< / m> Flags):

[0272]

[0273]

[0274] Another example is related to the priorities of different numbers of merge candidate pairs for MaxNumTriangleMergeCand in Tables 8-10. In the current table, because some merge candidate pairs (m, n) are placed after pairs that cannot be used, the binarization efficiency may be low when MaxNumTriangleMergeCand<4. One case is MaxNumTriangleMergeCand=4: when MaxNumTriangleMergeCand=4, (m, n)=(3, 1) is placed after pairs that cannot be used, that is, any pair with m or n=4. The present disclosure describes two techniques for improving table design. The first technique is to change the table by reordering the merge candidate pairs (m, n) based on the following priority: (m, n) = (1, 0) and (0, 1) are the first group put into the table, (m, n) = (2, 0), (2, 1), (0, 2) and (1, 2) are the second group put into the table, then (m, n) = (3, 0), (3, 1), (3, 2), (0, 3), (1, 3) and (2, 3) are the third group put into the table, and (m, n) = (4, 0), (4, 3), (4, 2), (4, 1), (0, 4), (1, 4), (2, 4) and (3, 4) are the last group put into the table. Note that the order of (m, n) in each group may not be limited to the embodiment shown above. Another technique is to use switchable triangle merge tables for different numbers of MaxNumTriangleMergeCand. Each value of MaxNumTriangleMergeCand corresponds to a different triangle merge table. An example is to set T to 5 and U to 2. Then the range of MaxNumTriangleMergeCand is 2 to 5 (inclusive). There are up to 4 different triangle merge tables, each applied to a different MaxNumTriangleMergeCand value.

[0275] Thus, in some examples, the video encoder 200 and the video decoder 300 may generate a triangle shape based motion compensation candidate list based on a table. In some such examples, the entries in the table correspond to different combinations of merge candidate pairs in the merge candidate list. The first and second triangle merge candidate indices specify corresponding entries in the table. The entries are sorted in the table so that, given the maximum number of triangle merge candidates, if the second merge candidate pair cannot be used, the entry corresponding to the first merge candidate pair is not placed after another entry corresponding to the second merge candidate pair.

[0276] In other examples, the video encoder 200 and the video decoder 300 may generate a motion compensation candidate list based on a triangle shape based on a selected table of a plurality of tables. Each of the plurality of tables corresponds to a different maximum number of triangle merge candidates. The selected table corresponds to the maximum number of triangle merge candidates determined based on the first syntax element. The entries in the table correspond to different combinations of merge candidate pairs in the merge candidate list. The first and second triangle merge candidate indices specify corresponding entries in the selected table.

[0277] In the current syntax design of VVC, there is no tile level flag or syntax element to define the maximum number of triangle merge candidates MaxNumTriangleMergeCand and the maximum number of MMVD base MV candidates MaxNumMmvdBaseMergeCand. Note that there are already high-level flags to define the maximum number of normal merge candidates MaxNumMergeCand and the maximum number of sub-block merge candidates MaxNumSubblockMergeCand through the syntax parameters six_minus_max_num_merge_cand and five_minus_max_num_subblock_merge_cand. The fewer the number of merge candidates, the lower the complexity on the encoder and decoder sides. It is desirable to flexibly set MaxNumTriangleMergeCand and MaxNumMmvdBaseMergeCand with a higher level syntax (e.g., tile, PPS, SPS, etc.) to allow a smaller number of MaxNumTriangleMergeCand to be set. A smaller number of merge candidates can meet the needs in scenarios where lower encoder and decoder complexity may be required.

[0278] The present disclosure proposes several variation examples that can improve VVC signaling. A collection of enumerated examples is provided below. The enumerated examples provided below can be used alone or in combination, including in combination with examples provided elsewhere in the present disclosure.

[0279] Example 1: In this example, an SPS level flag sps_mmvd_enabled_flag is added to specify that MMVD can be used to decode pictures in CVS. sps_mmvd_enabled_flag allows VVC to flexibly enable or disable MMVD in CVS. Some lower-level flags related to MMVD can use this sps_mmvd_enabled_flag as a conditional check to reduce signaling overhead. In this example, VVC draft 4 is marked as <!>…< / !> The following has been changed:

[0280]

[0281]

[0282] Example 2: It is proposed to add a tile group level syntax element (e.g., a flag or other type of syntax element) max_num_mmvd_merge_base_cand to specify the maximum number of MMVD base merge candidates supported in a tile group. For example, in some examples, max_num_mmvd_merge_base_cand specifies the maximum number of MMVD base merge candidates supported in a tile group minus 1. The maximum number of MMVD base merge candidates MaxNumMmvdBaseMergeCand can be derived (e.g., by the video encoder 200 and / or the video decoder 300) as follows:

[0283] MaxNumMmvdBaseMergeCand=1+max_num_mmvd_merge_base_cand

[0284] In this example, the value of MaxNumMmvdBaseMergeCand should be in the range of 1 to 2 (inclusive). MaxNumMmvdBaseMergeCand allows VVC to flexibly enable or disable MMVD in a tile group. CU-level flags related to MMVD can be implicitly derived using this max_num_mmvd_merge_base_cand and reduce signaling overhead. In conjunction with Example 1, the SPS flag sps_mmvd_enabled_flag can be added as a conditional check before parsing max_num_mmvd_merge_base_cand to reduce signaling overhead. When MaxNumMmvdBaseMergeCand=2 and MaxNumMergeCand=1, that is, max_num_mmvd_merge_base_cand=1 and six_minus_max_num_merge_cand=5, because the MMVD basic merge candidate directly reuses the first normal merge candidate available for MaxNumMmvdBaseMergeCand, one of the MMVD basic merge candidates is useless. In this case, at least one normal merge candidate is unavailable for the MMVD basic merge candidate. Because the complexity can be greatly reduced without affecting the codec performance when MaxNumMergeCand=1, when six_minus_max_num_merge_cand=5, the VVC codec can further reduce the complexity without affecting the codec performance by setting MaxNumMmvdBaseMergeCand to 1. Therefore, before parsing max_num_mmvd_merge_base_cand, a tile group flag six_minus_max_num_merge_cand<5 can be added as a conditional check to further reduce signaling overhead. When six_minus_max_num_merge_cand=5, max_num_mmvd_merge_base_cand can be inferred to be 0. The following table uses <!>…< / !> The markup shows the proposed changes to VVC Draft 4:

[0285]

[0286] Another example is to use only at least one condition (e.g., sps_mmvd_enabled_flag, six_minus_max_num_merge_cand<5 and other conditions) as a condition check before parsing max_num_mmvd_merge_base_cand to reduce signaling overhead. In some examples, max_num_mmvd_merge_base_cand may be signaled without any condition.

[0287] Example 3: This proposed method is based on Example 2. In Example 3, a conditional check is added to skip parsing mmvd_merge_flag because the number of MMVD base merge candidates is equal to 1, i.e., MaxNumMmvdBaseMergeCand>1. If this syntax is combined with Example 1, a conditional check sps_mmvd_enabled_flag can be added before mmvd_flag to reduce redundant signaling overhead. The following table uses <! >…< / !> The markup shows the proposed changes to VVC Draft 4:

[0288]

[0289]

[0290] Another example is that before parsing mmvd_merge_flag, only one of the conditions (such as MaxNumMmvdBaseMergeCand and MaxNumMergeCand and other conditions) is used as a condition check to reduce signaling overhead.

[0291] Example 4: In this example, a tile group level flag max_num_mmvd_merge_base_cand is added to specify the maximum number of MMVD base merge candidates supported in a tile group. For example, max_num_mmvd_merge_base_cand can specify the maximum number of MMVD base merge candidates supported in a tile group minus 1. The maximum number of MMVD base merge candidates MaxNumMmvdBaseMergeCand is derived as follows:

[0292] MaxNumMmvdBaseMergeCand=1+max_num_mmvd_merge_base_cand

[0293] The value of MaxNumMmvdBaseMergeCand should be in the range of 1 to 2, inclusive. It is recommended to limit the minimum number of six_minus_max_num_merge_cand to 2 because max_num_mmvd_merge_base_cand is true. The proposed change can ensure that at least two normal merge candidates can be created and provided for the number of MMVD base merge candidates of 2. A tile group level flag six_minus_max_num_ibc_merge_cand can be provided to specify the number of merge candidates for intra block copy (IBC) mode, that is, MaxNumIbcMergeCand. This change can avoid ambiguity between MaxNumMergeCand, MaxNumIbcMergeCand, and MaxNumMmvdBaseMergeCand. The following table uses <! >…< / !> The proposed changes to VVC draft 4 are shown in the following table. <d> …< / d> Mark to indicate deletion:

[0294] Section 7.3.4.1

[0295]

[0296]

[0297] six_minus_max_num_merge_cand specifies that the maximum number of merge motion vector prediction (MVP) candidates supported in a tile group is subtracted from 6. The maximum number of merge MVP candidates MaxNumMergeCand is derived as follows:

[0298] MaxNumMergeCand=6-six_minus_max_num_merge_cand

[0299] The value of MaxNumMergeCand should be within <!> max_num_mmvd_merge_base_cand< / !> to 6 (inclusive of max_num_mmvd_merge_base_cand< / !> and 6).

[0300] Another embodiment of MaxNumMergeCand combines the SPS MMVD flags as follows:

[0301] The value of MaxNumMergeCand should be <!> 1 + sps_mmvd_enabled_flag< / !> In the range of 1 to 6 (inclusive) + sps_mmvd_enabled_flag< / !> and 6).

[0302] <!>six_minus_max_num_ibc_merge_cand specifies the maximum number of IBC merge motion vector prediction (MVP) candidates supported in a tile group subtracted from 6. The maximum number of IBC merge MVP candidates MaxNumIbcMergeCand is derived as follows:

[0303] MaxNumIbcMergeCand=6-six_minus_max_num_ibc_merge_cand

[0304] The value of MaxNumIbcMergeCand should be in the range of 1 to 6 (inclusive)< / !> .

[0305] Section 7.3.6.8

[0306]

[0307]

[0308] Example 5: In this example, the minimum number of six_minus_max_num_merge_cand is limited to 2 instead of 1. This proposed change can ensure that at least two normal merge candidates can be created and provided for the number of MMVD basic merge candidates of 2. Since there are two normal merge candidates, there is no need to have a conditional check MaxNumMergeCand>1 before merge_idx. The following table shows the proposed changes to VVC draft 4, with <! >…< / !> Markers indicate changes and <d> …< / d> Marking indicates deletion:

[0309] Section 7.3.4.1

[0310]

[0311] six_minus_max_num_merge_cand specifies that the maximum number of merge motion vector prediction (MVP) candidates supported in a tile group is subtracted from 6. The maximum number of merge MVP candidates MaxNumMergeCand is derived as follows:

[0312] MaxNumMergeCand=6-six_minus_max_num_merge_cand

[0313] The value of MaxNumMergeCand should be <!> 2< / !> In the range of 2 to 6 (including< / !> and 6).

[0314] Section 7.3.6.8

[0315]

[0316]

[0317] Example 6: In the current VVC Test Model (VTM) design, the number of merge candidates in mergeCandList is set to MaxNumMergeCand. In Example 6, it is suggested that if MaxNumMergeCand=1 in this CU and mmvd_flag is enabled, the number of merge candidates in mergeCandList of this CU is inferred to be 2 instead of MaxNumMergeCand. Based on Examples 2 and 4, Example 6 is modified as follows: If MaxNumMergeCand=1, MaxNumMmvdBaseMergeCand=2 in this CU and mmvd_flag is enabled, the number of merge candidates in mergeCandList of this CU is inferred to be 2 instead of MaxNumMergeCand.

[0318] Combinations of Examples 1 to 6 are possible. Then, there are three improved solutions:

[0319] Solution 1: A combination of Example 1, Example 2, and Example 3. When MaxNumMergeCand=1, MaxNumMmvdBaseMergeCand is forced to be 1 at the tile group level or the CU level.

[0320] Solution 2: Combination of Example 1 and Example 4. When MaxNumMmvdBaseMergeCand=2, MaxNumMergeCand is forced to be 2 at the tile group level or the CU level.

[0321] Solution 3: Example 6. When MaxNumMergeCand=1 and MaxNumMmvdBaseMergeCand=2, the number of merge candidates in mergeCandList is inferred to be 2 because mmvd_flag is enabled in this CU.

[0322] Maximum number of triangle merging candidates

[0323] There are several proposed changes to improve VVC signaling:

[0324] Example 7: In this example, a tile level flag five_minus_max_num_triangle_merge_cand is added to indicate the maximum number of triangle merge candidates MaxNumTriangleMergeCand. MaxNumTriangleMergeCand can be derived as follows: MaxNumTriangleMergeCand = T-five_minus_max_num_triangle_merge_cand, where T is a pre-assigned positive integer, and the minimum value of MaxNumTriangleMergeCand can be defined as U. Therefore, five_minus_max_num_triangle_merge_cand can be in the range of 0 to (TU), including 0 and TU. In one example, T is set to 5 and U is set to 2. Then, five_minus_max_num_triangle_merge_cand is in the range of 0 to 3, including 0 and 3. Another example is related to the case of MaxNumTriangleMergeCand = 2. In the design of VVC draft 4, merge_triangle_idx0 and merge_triangle_idx1 are always parsed. When MaxNumTriangleMergeCand=2, it is recommended to skip parsing merge_triangle_idx1, because merge_triangle_idx1 must be the opposite of merge_triangle_idx0, that is, when merge_triangle_idx0=1, merge_triangle_idx1=0 and when merge_triangle_idx0=0, merge_triangle_idx1=1. The following table uses <!>…< / !> The markup shows the proposed changes to VVC Draft 4:

[0325] Section 7.3.4.1

[0326]

[0327]

[0328] five_minus_max_num_triangle_merge_cand specifies the maximum number of triangle merge motion vector prediction (MVP) candidates supported in a tile group subtracted from 5. The maximum number of merge MVP candidates MaxNumTriangleMergeCand is derived as follows:

[0329] MaxNumTriangleMergeCand=5-five_minus_max_num_triangle_merge_cand The value of MaxNumTriangleMergeCand should be in the range of 2 to 5 (including 2 and 5).

[0330] VVC draft 4 section 7.3.6.8

[0331]

[0332]

[0333]

[0334] Fig.11 is a flowchart illustrating an example method for encoding a current block. The flowcharts of the present disclosure are presented as examples. In other examples, the flowcharts may include more, fewer, or different steps, and / or steps that may be performed in a different order or in parallel. Fig.11 , the current block may include the current CU. Although regarding the video encoder 200 ( Figure 1 and Fig. 9 ), but it should be understood that other devices may be configured to perform the same Fig.11 A similar approach to the one used in this paper.

[0335] In this example, the video encoder 200 initially predicts the current block (350). For example, the video encoder 200 may form a prediction block for the current block. According to the technology of the present disclosure, the video encoder 200 may form a prediction block using a triangle merge mode and signal the associated syntax elements. The video encoder 200 may then calculate a residual block for the current block (352). In order to calculate the residual block, the video encoder 200 may calculate the difference between the original, unencoded block and the prediction block of the current block. The video encoder 200 may then transform and quantize the coefficients of the residual block (354). Next, the video encoder 200 may scan the quantized transform coefficients of the residual block (356). During or after the scan, the video encoder 200 may entropy encode the transform coefficients (358). For example, the video encoder 200 may encode the transform coefficients using CAVLC or CABAC. The video encoder 200 may then output the entropy encoded data of the block (360).

[0336] Fig.12 is a flowchart illustrating an example method for decoding a current video data block. The current block may include a current CU. Although with respect to the video decoder 300 ( Figure 1 and Fig.10), but it should be understood that other devices may be configured to perform the same Fig.12 A similar approach to the one used in this paper.

[0337] The video decoder 300 may receive entropy-encoded data of a current block, such as entropy-encoded prediction information and entropy-encoded data corresponding to transform coefficients of a residual block of the current block (370). The video decoder 300 may entropy decode the entropy-encoded data to determine the prediction information of the current block and reproduce the transform coefficients of the residual block (372). The video decoder 300 may predict the current block, for example, using an intra-frame or inter-frame prediction mode indicated by the prediction information of the current block to calculate a prediction block of the current block (374). The video decoder 300 may calculate the prediction block of the current block using a triangle merge mode and decode the associated syntax elements according to one or more techniques of the present disclosure. The video decoder 300 may then scan the reproduced transform coefficients to create a quantized transform coefficient block (376). The video decoder 300 may then inverse quantize and inverse transform the transform coefficients to generate a residual block (378). Finally, the video decoder 300 may decode the current block by combining the prediction block and the residual block (380).

[0338] Fig.13 is a flowchart illustrating an example encoding method according to one or more techniques of this disclosure. Fig.13 In the example of FIG. 4 , video encoder 200 may determine a maximum number of triangle merge candidates (400). For example, video encoder 200 may determine the maximum number of triangle merge candidates based on a configuration input provided to video encoder 200. In some examples, video encoder 200 may try different values ​​of the maximum number of triangle merge candidates to determine an optimal maximum number of triangle merge candidates.

[0339] In some examples, the video encoder 200 may signal a first syntax element (e.g., sps_triangle_enabled_flag) in the bitstream, where the syntax element indicates whether the triangle merge mode is enabled. In such an example, the video encoder 200 may signal a second syntax element (e.g., five_minus_max_num_triangle_merge_cand) based on the syntax element indicating that the triangle merge mode is enabled. For example, the video encoder 200 may determine the value of the second syntax element as T minus the maximum number of triangle merge candidates, where T is a pre-assigned positive integer (e.g., 5). The video encoder 200 may then signal the second syntax element in the bitstream.

[0340] In addition, Fig.13In an example of FIG. 4 , the video encoder 200 may signal a first triangle merge index syntax element (e.g., merge_triangle_idx0) in a bitstream (402). The first triangle merge index syntax element specifies a first triangle merge candidate index. The first triangle merge candidate index indicates a first triangle merge candidate in a triangle shape based motion compensation candidate list. The first triangle merge candidate is not necessarily the first triangle merge candidate in the triangle shape based motion compensation candidate list.

[0341] The video encoder 200 may determine whether the maximum number of triangle merge candidates is greater than 2 (404). In response to determining that the maximum number of triangle merge candidates is greater than 2 (the "yes" branch of 404), the video encoder 200 may signal a second triangle merge index syntax element (e.g., merge_triangle_idx1) in the bitstream (406). The second triangle merge index syntax element specifies a second triangle merge candidate index. The second triangle merge candidate index specifies a second triangle merge candidate in the triangle shape-based motion compensation candidate list. The second triangle merge candidate does not have to be the second triangle merge candidate that appears in the triangle shape-based motion compensation candidate list. Instead, the second triangle merge candidate may be any triangle merge candidate in the triangle shape-based motion compensation candidate list other than the first triangle merge candidate.

[0342] In some examples, the video decoder 300 generates a triangle shape based motion compensation candidate list based on a table. In some such examples, entries in the table correspond to different combinations of merge candidate pairs in the merge candidate list. The first triangle merge candidate index and the second triangle merge candidate index specify corresponding entries in the table. The entries are sorted in the table so that, given the maximum number of triangle merge candidates, if the second merge candidate pair cannot be used, the entry corresponding to the first merge candidate pair is not placed after another entry corresponding to the second merge candidate pair.

[0343] In other examples, the video decoder 300 may generate a motion compensation candidate list based on a triangle shape based on a selected table from a plurality of tables. Each of the plurality of tables corresponds to a different maximum number of triangle merge candidates. The selected table corresponds to the maximum number of triangle merge candidates determined based on the first syntax element. The entries in the table correspond to different combinations of merge candidate pairs in the merge candidate list. The first triangle merge candidate index and the second triangle merge candidate index specify corresponding entries in the selected table.

[0344] In response to determining that the maximum number of triangle merge candidates is not greater than 2 ("No" branch of 404), the video encoder 200 may omit the second triangle merge index syntax element from the bitstream (408). Therefore, the video encoder 200 may omit the triangle merge index syntax element specifying the second triangle merge candidate index from the bitstream, the second triangle merge candidate index indicating a second triangle merge candidate of the triangle shape-based motion compensation candidate list. The second triangle merge candidate is different from the first triangle merge candidate.

[0345] In addition, Fig.13 In the example of , the video encoder 200 can generate a prediction block of the CU (410). To generate the prediction block of the CU, the video encoder 200 can use the motion information of the first triangle merge candidate to inter-predict the first triangle partition of the CU. In addition, the video encoder 200 can use the motion information of the second triangle merge candidate to inter-predict the second triangle partition of the CU.

[0346] The video encoder 200 may generate residual data for the CU based on the prediction block of the CU and the samples of the CU (412). For example, the video encoder 200 may generate residual data for the CU by subtracting the samples of the prediction block from the corresponding samples of the CU.

[0347] Fig.14 is a flowchart illustrating an example decoding method according to one or more techniques of this disclosure. Fig.14 In an example, video decoder 300 may determine the maximum number of triangle merge candidates based on a first syntax element (e.g., minus_max_num_triangle_merge_cand) signaled in a bitstream including an encoded representation of the video data (450). In some examples, to determine the maximum number of triangle merge candidates, video decoder 300 may obtain the first syntax element from the bitstream and determine the maximum number of triangle merge candidates as T minus the value specified by the first syntax element, where T is a pre-assigned positive integer (e.g., 5).

[0348] Furthermore, in some examples, the signaling of the first syntax element in the bitstream may depend on whether another syntax element (e.g., sps_triangle_enabled_flag) indicates that the triangle merge mode is enabled. Thus, in one example, the video decoder 300 may obtain a syntax element (e.g., sps_triangle_enabled_flag) from the bitstream, where the syntax element indicates whether the triangle merge mode is enabled. Furthermore, in this example, the video decoder 300 may obtain the first syntax element (e.g., minus_max_num_triangle_merge_cand) based on the syntax element indicating that the triangle merge mode is enabled.

[0349] In addition, Fig.14 In an example of FIG. 4 , the video decoder 300 may obtain a first triangle merge index syntax element (e.g., merge_triangle_idx0) from the bitstream (452). The first triangle merge index syntax element specifies a first triangle merge candidate index. The first triangle merge candidate index indicates a first triangle merge candidate in the triangle shape based motion compensation candidate list. The first triangle merge candidate is not necessarily the first triangle merge candidate in the triangle shape based motion compensation candidate list.

[0350] In addition, the video decoder 300 may determine whether the maximum number of triangle merge candidates is greater than 2 (454). In response to determining that the maximum number of triangle merge candidates is greater than 2 (the "yes" branch of 454), the video decoder 300 may obtain a second triangle merge index syntax element from the bitstream (456). The second triangle merge index syntax element specifies a second triangle merge candidate index. The second triangle merge candidate index specifies a second triangle merge candidate in the triangle shape based motion compensation candidate list. The second triangle merge candidate does not have to be the second triangle merge candidate that appears in the triangle shape based motion compensation candidate list. Instead, the second triangle merge candidate may be any triangle merge candidate in the triangle shape based motion compensation candidate list other than the first triangle merge candidate.

[0351] In some examples, the video decoder 300 generates a triangle shape based motion compensation candidate list based on a table. In some such examples, entries in the table correspond to different combinations of merge candidate pairs in the merge candidate list. The first triangle merge candidate index and the second triangle merge candidate index specify corresponding entries in the table. The entries are sorted in the table so that, given the maximum number of triangle merge candidates, if the second merge candidate pair cannot be used, the entry corresponding to the first merge candidate pair is not placed after another entry corresponding to the second merge candidate pair.

[0352] In other examples, the video decoder 300 may generate a motion compensation candidate list based on a triangle shape based on a selected table from a plurality of tables. Each of the plurality of tables corresponds to a different maximum number of triangle merge candidates. The selected table corresponds to the maximum number of triangle merge candidates determined based on the first syntax element. The entries in the table correspond to different combinations of merge candidate pairs in the merge candidate list. The first triangle merge candidate index and the second triangle merge candidate index specify corresponding entries in the selected table.

[0353] In response to determining that the maximum number of triangle merge candidates is not greater than 2 ("No" branch of 454), the video decoder 300 may infer that the second triangle merge candidate index indicates a second triangle merge candidate of the triangle shape-based motion compensation candidate list without obtaining any syntax element specifying the second triangle merge candidate index from the bitstream (458). The second triangle merge candidate may be different from the first triangle merge candidate.

[0354] In addition, Fig.14 In the example of , the video decoder 300 can generate a prediction block for the CU (460). As part of generating the prediction block for the CU, the video decoder 300 can use the motion information of the first triangle merge candidate to inter-predict the first triangle partition of the CU. In addition, the video decoder 300 can use the motion information of the second triangle merge candidate to inter-predict the second triangle partition of the CU.

[0355] The video decoder 300 may reconstruct the CU based on the prediction block of the CU and the residual data of the CU (462). For example, the video decoder 300 may add samples of the prediction block of the CU to corresponding samples of the residual data to reconstruct the CU.

[0356] Although the techniques of this disclosure are mainly described with respect to the triangle merging mode in which the CU is diagonally partitioned into two evenly sized partitions, the techniques of this disclosure may also be applicable to the geometric partitioning mode in which the CU is diagonally partitioned into two unevenly sized partitions. For example, the video encoder 200 may determine the maximum number of geometric partitioning mode merge candidates; signal a first geometric partitioning mode merge index syntax element in a bitstream, the first geometric partitioning mode merge index syntax element specifying a first geometric partitioning mode merge candidate index, the first geometric partitioning mode merge candidate index indicating a first geometric partitioning mode merge candidate in a motion compensation candidate list; determine whether the maximum number of geometric partitioning mode merge candidates is greater than 2; based on the maximum number of geometric partitioning mode merge candidates being not greater than 2, omit from the bitstream a second geometric partitioning mode merge index syntax element specifying a second geometric partitioning mode merge candidate index, the second geometric partitioning mode merge candidate index indicating a second geometric partitioning mode merge candidate in a motion compensation candidate list based on a geometric partitioning mode shape, the second geometric partitioning mode merge candidate being different from the first geometric partitioning mode merge candidate; generate a prediction block of a CU, wherein generating the prediction block of the CU includes: using motion information of the first geometric partitioning mode merge candidate to inter-predict a first geometric partitioning mode partition of the CU; and using motion information of the second geometric partitioning mode merge candidate to inter-predict a second geometric partitioning mode partition of the CU; and generating residual data of the CU based on the prediction block of the CU and samples of the CU.

[0357] Similarly, the video decoder 300 can determine the maximum number of geometric partitioning mode merge candidates based on a first syntax element signaled in a bitstream of an encoded representation including video data; obtain a first geometric partitioning mode merge index syntax element from the bitstream, the first geometric partitioning mode merge index syntax element specifying a first geometric partitioning mode merge candidate index, the first geometric partitioning mode merge candidate index indicating a first geometric partitioning mode merge candidate in a triangle shape-based motion compensation candidate list; determine whether the maximum number of geometric partitioning mode merge candidates is greater than 2; and infer a second geometric partitioning mode merge candidate based on the maximum number of geometric partitioning mode merge candidates being not greater than 2. The method comprises the steps of: generating a prediction block of a CU, wherein the prediction block of the CU is generated by: using the motion information of the first geometric partition mode merge candidate to inter-predict the first geometric partition mode partition of the CU; and using the motion information of the second geometric partition mode merge candidate to inter-predict the second geometric partition mode partition of the CU; and reconstructing the CU based on the prediction block of the CU and the residual data of the CU.

[0358] The following paragraphs are a collection of non-limiting examples of techniques according to the present disclosure.

[0359] Example 1A. A method of encoding and decoding video data, the method comprising: encoding and decoding a tile level syntax element indicating a maximum number of triangle merge candidates; constructing a triangle merge candidate list according to the maximum number of triangle merge candidates; and encoding and decoding the video data using the triangle merge candidate list and a triangle merge mode.

[0360] Example 2A The method of Example 1A, further comprising: determining a priority order of the triangle merging candidate list based on a maximum number of triangle merging candidates.

[0361] Example 3A. The method of any of Examples 1A-2A, wherein encoding and decoding includes decoding.

[0362] Example 4A. The method of any of Examples 1A-3A, wherein encoding and decoding includes encoding.

[0363] Example 5A. An apparatus for encoding and decoding video data, the apparatus comprising one or more components for performing the method of any of Examples 1A-4A.

[0364] Example 6A. The device of Example 5A, wherein the one or more components include one or more processors implemented in circuitry.

[0365] Example 7A. The apparatus of any of Examples 5A and 6A, further comprising a memory for storing video data.

[0366] Example 8A. The apparatus of any of Examples 5A-7A, further comprising a display configured to display the decoded video data.

[0367] Example 9A. The device of any of Examples 5A-8A, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0368] Example 10. The device of any of Examples 5A-9A, wherein the device comprises a video decoder.

[0369] Example 11A. The apparatus of any of Examples 5A-10A, wherein the apparatus comprises a video encoder.

[0370] Example 12A. A computer-readable storage medium having instructions stored thereon, which when executed, cause one or more processors to perform the method of any of Examples 1A-4A.

[0371] Example 1B. A method of decoding video data, the method comprising: obtaining a syntax element from a sequence parameter set (SPS) of a bitstream comprising an encoded representation of the video data, the syntax element indicating whether a merge mode with motion vector difference (MMVD) is enabled for a coded video sequence (CVS); and decoding the video data based on the syntax element.

[0372] Example 2B. A method of encoding video data, the method comprising: generating a syntax element in a sequence parameter set (SPS) indicating whether merge mode with motion vector differences (MMVD) is enabled for a coded video sequence (CVS); and including the SPS in a bitstream comprising an encoded representation of the video data.

[0373] Example 3B. A method of decoding video data, the method comprising: obtaining a tile group level syntax element from a bitstream comprising an encoded representation of the video data, the syntax element indicating a maximum number of merge mode with motion vector difference (MMVD) basic merge candidates supported in the tile group; and decoding the video data based on the syntax element.

[0374] Example 4B. The method of Example 3B, further comprising the method of Example 1B.

[0375] Example 5B. A method of encoding video data, the method comprising: signaling, from a bitstream comprising an encoded representation of the video data, a tile group level syntax element indicating a maximum number of merge mode with motion vector difference (MMVD) basic merge candidates supported in the tile group; and encoding a tile of the video data using no more than the maximum number of MMVD basic merge candidates.

[0376] Example 6B. The method of Example 5B, further comprising the method of Example 2B.

[0377] Example 7B. A method for decoding video data, the method comprising: based on a maximum number of merge mode with motion vector difference (MMVD) basic merge candidates supported in a tile group being greater than a threshold number, obtaining an MMVD merge flag syntax element from a bitstream including an encoded representation of the video data, the MMVD merge flag syntax element indicating whether a first candidate or a second candidate in a merge candidate list is used with a motion vector difference derived from an MMVD distance index and an MMVD direction index; and decoding one or more tiles of the video data using the first candidate or the second candidate in the merge candidate list.

[0378] Example 8B The method of Example 7B further includes the method of any one of Examples 3B or 4B.

[0379] Example 9B. A method for encoding video data, the method comprising: based on a maximum number of merge mode with motion vector difference (MMVD) basic merge candidates supported in a tile group being greater than a threshold number, including an MMVD merge flag syntax element in a bitstream comprising an encoded representation of the video data, the MMVD merge flag syntax element indicating whether a first candidate or a second candidate in a merge candidate list is used with a motion vector difference derived from an MMVD distance index and an MMVD direction index; and encoding one or more tiles of the video data using the first candidate or the second candidate in the merge candidate list.

[0380] Example 10B The method of Example 9B further includes the method of any one of Examples 5B or 6B.

[0381] Example 11B. A method of decoding video data, the method comprising: obtaining a first tile group level syntax element from a bitstream comprising an encoded representation of the video data, the first tile group level syntax element indicating a maximum number of merge mode with motion vector difference (MMVD) basic merge candidates supported in the tile group; obtaining a second tile group level syntax element from the bitstream, the second tile group level syntax element indicating a value equal to 6 minus the maximum number of intra block copy merge motion vector prediction (MVP) candidates supported in the tile group; and decoding the video data based on the first syntax element and the second syntax element.

[0382] Example 12B. A method of encoding video data, the method comprising: including in a bitstream comprising an encoded representation of the video data a first tile group level syntax element, the first tile group level syntax element indicating a maximum number of merge mode with motion vector difference (MMVD) basic merge candidates supported in the tile group; including in the bitstream a second tile group level syntax element, the second tile group level syntax element indicating a value equal to 6 minus the maximum number of intra block copy merge motion vector prediction (MVP) candidates supported in the tile group; and encoding the video data based on the first syntax element and the second syntax element.

[0383] Example 13B. A method of decoding video data, the method comprising: obtaining a tile group level syntax element from a bitstream containing an encoded representation of the video data, the tile group level syntax element indicating a value equal to 6 minus a maximum number of merged motion vector prediction (MVP) candidates supported in the tile group, wherein a minimum value of the maximum number of merged MVP candidates supported in the tile group is limited to 2; and decoding the video data based on the syntax element.

[0384] Example 14B. A method of encoding video data, the method comprising: signaling, in a bitstream comprising an encoded representation of the video data, a tile group level syntax element, the tile group level syntax element indicating a value equal to 6 minus a maximum number of merged motion vector prediction (MVP) candidates supported in the tile group, wherein a minimum value of the maximum number of merged MVP candidates supported in the tile group is limited to 2; and encoding a tile of the video data based on the syntax element.

[0385] Example 15B. A method for encoding and decoding video data, the method comprising: inferring that the number of merge candidates in a merge candidate list of a codec unit (CU) is 2 based on a maximum number of merge motion vector prediction (MVP) candidates being equal to 1 and a merge mode with motion vector difference (MMVD) flag indicating that MMVD is enabled for the CU; and encoding and decoding the CU based on the merge candidate list.

[0386] Example 16B. A method of decoding video data, the method comprising: obtaining a syntax element from a bitstream comprising an encoded representation of the video data, the syntax element indicating a maximum number of triangle merged motion vector prediction (MVP) candidates supported in a tile group minus 5; and decoding the video based on the syntax element.

[0387] Example 17B. A method of encoding video data, the method comprising: signaling a syntax element in a bitstream comprising an encoded representation of the video data, the syntax element indicating a maximum number of triangle merged motion vector prediction (MVP) candidates supported in a tile group minus 5; and encoding the video based on the syntax element.

[0388] Example 18B. An apparatus for encoding and decoding video data, the apparatus comprising one or more components for performing the method of any of Examples 1B-17B.

[0389] Example 19B. The device of Example 18B, wherein the one or more components include one or more processors implemented in circuitry.

[0390] Example 20B. The apparatus of any of Examples 18B and 19B, further comprising a memory for storing video data.

[0391] Example 21B. The apparatus of any of Examples 18B-20B, further comprising a display configured to display the decoded video data.

[0392] Example 22B. The device of any of Examples 18B-21B, wherein the device comprises one or more of a camera, a computer, a mobile device, a broadcast receiver device, or a set-top box.

[0393] Example 23B. The device of any of Examples 18B-22B, wherein the device comprises a video decoder.

[0394] Example 24B. The apparatus of any of Examples 18B-23B, wherein the apparatus comprises a video encoder.

[0395] Example 25B. A computer-readable storage medium having instructions stored thereon, which when executed, cause one or more processors to perform the method of any of Examples 1B-17B.

[0396] It should be appreciated that, depending on the examples, certain actions or events of any of the techniques described herein may be performed in a different order, may be added, combined, or excluded entirely (e.g., not all described actions or events are necessary for the practice of the techniques). In addition, in some examples, actions or events may be performed in parallel, such as through multithreading, interrupt processing, or multiple processors, rather than sequentially.

[0397] In one or more examples, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored or transmitted on a computer-readable medium as one or more instructions or codes and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media corresponding to tangible media (e.g., data storage media), or communication media including any media that facilitates the transfer of a computer program from one place to another (e.g., according to a communication protocol). In this manner, computer-readable media may generally correspond to (1) non-temporary tangible computer-readable storage media or (2) communication media such as signals or carrier waves. 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, codes, and / or data structures for implementing the techniques described in the present disclosure. A computer program product may include a computer-readable medium.

[0398] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, disk storage or other magnetic storage devices, flash memory or any other medium that can be used to store the required program code in the form of instructions or data structures and can be accessed by a computer. In addition, any connection is appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology (such as infrared, radio and microwave) is used to send instructions from a website, server or other remote source, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology (such as infrared, radio and microwave) is included in the definition of the medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals or other temporary media, but are directed to non-temporary tangible storage media. The disks and optical disks used herein include compact disks (CDs), laser optical disks, optical disks, digital versatile disks (DVDs), floppy disks and blue-ray disks, wherein the disks usually reproduce data magnetically, while the optical disks reproduce data in a laser optical manner. The above combination should also be included in the scope of computer-readable media.

[0399] Instructions may be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the terms "processor" and "processing circuit" used herein may refer to any of the above structures or any other structure suitable for implementing the techniques described herein. In addition, in some aspects, the functions described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. In addition, these techniques may be fully implemented in one or more circuits or logic elements.

[0400] The techniques of the present disclosure may be implemented in a variety of devices or apparatuses, including wireless handsets, integrated circuits (ICs) or IC collections, such as chip collections. Various components, modules, or units are described in this disclosure to emphasize the functional aspects of devices configured to perform the disclosed techniques, but do not necessarily need to be implemented by different hardware units. Instead, as described above, the various units may be combined in a codec hardware unit, or provided by a collection of interoperable hardware units (including one or more processors as described above) in combination with appropriate software and / or firmware.

[0401] Various examples have been described. These and other examples are within the scope of the following claims.

Claims

1. A method for decoding video data, the method comprising: Retrieving a first syntax element from a bitstream comprising an encoded representation of the video data, the first syntax element specifying whether a merge mode with motion vector differences (MMVD) is enabled for an encoded video sequence of the video data; determining that the first syntax element specifies enabling of MMVD for the coded video sequence; processing, from the bitstream, a second syntax element specifying whether to use MMVD to generate inter prediction parameters for a current coding unit of the coded video sequence based on the first syntax element specifying a determination that MMVD is enabled for the coded video sequence; determining that the second syntax element specifies using the MMVD to generate inter-frame prediction parameters for a current coding unit of the coded video sequence; Determining that a maximum number of merged motion vector prediction candidates in the merge candidate list is greater than 1; Based on a determination that the second syntax element specifies using the MMVD to generate inter prediction parameters for the current coding unit and based on a maximum number of merge motion vector prediction candidates in the merge candidate list being greater than 1, processing a third syntax element from the bitstream, the third syntax element specifying whether a first candidate or a second candidate in the merge candidate list is used with a motion vector difference; as well as The current coding unit of the video data is decoded using the first candidate or the second candidate in the merge candidate list.

2. The method according to claim 1, wherein: Obtaining the first syntax element includes obtaining the first syntax element within a sequence parameter set.

3. The method according to claim 2, further comprising: The second syntax element within a syntax structure associated with the merged data is obtained.

4. The method according to claim 1, further comprising: decoding a fourth syntax element specifying a maximum number of merged motion vector prediction candidates subtracted from 6; as well as A maximum number of merge motion vector prediction candidates is determined according to the fourth syntax element.

5. An apparatus for decoding video data, comprising: Memory; as well as one or more processors coupled to the memory, the one or more processors being configured to cause the apparatus to: Retrieving a first syntax element from a bitstream comprising an encoded representation of the video data, the first syntax element specifying whether a merge mode with motion vector differences (MMVD) is enabled for an encoded video sequence of the video data; determining that the first syntax element specifies enabling of MMVD for the coded video sequence; processing, from the bitstream, a second syntax element specifying whether to use MMVD to generate inter prediction parameters for a current coding unit of the coded video sequence based on the first syntax element specifying a determination that MMVD is enabled for the coded video sequence; determining that the second syntax element specifies using the MMVD to generate inter-frame prediction parameters for a current coding unit of the coded video sequence; Determining that a maximum number of merged motion vector prediction candidates in the merge candidate list is greater than 1; Based on a determination that the second syntax element specifies using the MMVD to generate inter prediction parameters for the current coding unit and based on a maximum number of merge motion vector prediction candidates in the merge candidate list being greater than 1, processing a third syntax element from the bitstream, the third syntax element specifying whether a first candidate or a second candidate in the merge candidate list is used with a motion vector difference; as well as The current coding unit of the video data is decoded using the first candidate or the second candidate in the merge candidate list.

6. The device according to claim 5, wherein: The one or more processors are configured to cause the apparatus to obtain the first syntax element within a sequence parameter set.

7. The device according to claim 6, wherein: The one or more processors are further configured to cause the apparatus to obtain the second syntax element within a syntax structure associated with merged data.

8. The device according to claim 5, wherein: The one or more processors are further configured to cause the apparatus to: decoding a fourth syntax element specifying a maximum number of merged motion vector prediction candidates subtracted from 6; as well as A maximum number of merge motion vector prediction candidates is determined according to the fourth syntax element.

9. An apparatus for decoding video data, the apparatus comprising: Memory; as well as one or more processors coupled to the memory, the one or more processors configured to cause the apparatus to: Obtaining, from a bitstream comprising an encoded representation of the video data, a syntax element at a tile group level, the syntax element at the tile group level indicating a maximum number of merge mode MMVD merge candidates having a motion vector difference; Determine an MMVD merge candidate list for the video data block based on the maximum number of the MMVD merge candidates; as well as Decode video data blocks using the MMVD merge candidate list.

10. The device according to claim 9, wherein: The value of the maximum number of MMVD merge candidates is 1 or 2.

11. The device according to claim 9, wherein: The one or more processors are further configured to cause the apparatus to: The maximum number of MMVD merge candidates is determined based on the value of the syntax element plus 1.

12. The device according to claim 9, wherein: The one or more processors are further configured to cause the apparatus to: The maximum number of MMVD merge candidates is determined based on the fact that 6 minus the maximum number of merge candidates is less than 5.

13. The device according to claim 9, wherein: The one or more processors are further configured to cause the apparatus to: The MMVD merge flag is decoded based on the maximum number of MMVD merge candidates being greater than one.