How to configure the default motion candidate
By introducing default motion candidates and geometric segmentation modes into video encoding and decoding technology, the video encoding and decoding standards are optimized, and the problem of low encoding and decoding efficiency in high-resolution video processing is solved, achieving more efficient video compression and robustness .
Patent Information
- Application Number
- CN201980077114.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-21
- Filing Date
- 2019-11-22
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2039-11-22
AI Technical Summary
Existing video encoding and decoding technologies have problems such as low encoding and decoding efficiency, large data volume, and sensitivity to data loss in high-resolution video processing. Especially in the Internet and digital communication networks with increasing bandwidth demand, it is difficult to effectively optimize video compression. performance.
A method for video processing is proposed, by converting the current block and bitstream representation of the video, to determine and add the default motion candidates to the motion candidate list, including affine Merge candidates, geometric segmentation mode candidates, Intra-block copy candidates, etc., optimize video encoding and codec standards such as HEVC and future video encoding and codec standards.
It improves the compression performance and encoding and encoding efficiency of video encoding and encoding and encoding and encoding and encoding efficiency, reduces data volume, and enhances the robustness of data loss, and is suitable for existing and future video encoding and encoding and encoding standards.
Smart Images

Figure CN113170184B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is intended to promptly claim the priority and benefits of International Patent Application No. PCT / CN2018 / 116886 filed on November 22, 2018, International Patent Application No. PCT / CN2018 / 124639 filed on December 28, 2018, International Patent Application No. PCT / CN2019 / 075856 filed on February 22, 2019, and International Patent Application No. PCT / CN2019 / 079061 filed on March 21, 2019, in accordance with applicable patent laws. The entire disclosures of the above applications are incorporated by reference as part of the disclosure of this application. Technical Field
[0003] This patent document relates to video encoding and decoding technologies, devices and systems. Background Art
[0004] Despite advances in video compression technology, digital video still accounts for the largest use of bandwidth on the Internet and other digital communications networks. As the number of networked user devices capable of receiving and displaying video increases, bandwidth demand for digital video usage is expected to continue to grow. Summary of the invention
[0005] Devices, systems and methods related to digital video codecs, and in particular, to default motion candidates for video codecs are described. The described methods can be applied to existing video codec standards (e.g., High Efficiency Video Coding (HEVC)) and future video codec standards or video codecs.
[0006] In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining that a 6-parameter affine Merge candidate is a default motion candidate to be added to a motion candidate list. In response to the number of candidates in the motion candidate list being less than a maximum allowed, the default motion candidate is added to the motion candidate list. The method also includes performing the conversion based on the determination.
[0007] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining a reference picture index K of a first default motion candidate to be added to a motion candidate list, K being a non-negative integer. In response to the number of candidates in the motion candidate list being less than a maximum allowed, the first default motion candidate is added to the motion candidate list. The method also includes performing the conversion based on the determination.
[0008] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining an affine model type of a default motion candidate to be added to a motion candidate list based on available motion candidates for the current block. In response to the number of candidates in the motion candidate list being less than a maximum allowed, the default motion candidate is added to the motion candidate list. The method also includes performing the conversion based on the determination.
[0009] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining a default motion candidate for a geometric partitioning mode candidate list. The triangle prediction mode partitions the current video block into a plurality of partitions. The method also includes performing the conversion based on the determination.
[0010] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining one or more motion candidates for a geometric partitioning mode using one or more paired average candidates obtained by averaging a pair of candidates in a motion candidate list of the current block. The geometric partitioning mode includes partitioning the current block into a plurality of partitions. The method also includes performing the conversion based on the determination.
[0011] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining motion candidates for a geometric partitioning mode based on a first set of temporal blocks and a second set of temporal blocks. The first set of temporal blocks includes a lower right temporal block and a center temporal block juxtaposed with the current block, and the second set is different from the first set. The geometric partitioning mode includes partitioning the current block into a plurality of partitions. The method also includes performing the conversion based on the determination.
[0012] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining whether a motion candidate is excluded from a candidate list based on whether the motion candidate is associated with a first reference picture in a current picture in which the current block is located. The current block is encoded and decoded with a second reference picture that does not point to the current picture. The method also includes performing the conversion based on the determination.
[0013] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining an insertion order of reference picture list 0 information and reference picture list 1 information of a bidirectional prediction Merge candidate based on an insertion order used in a previously processed block of the video. The method also includes performing the conversion based on the determination.
[0014] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining one or more motion candidates for a geometric partitioning mode based on the size of a conventional Merge list. The geometric partitioning mode includes partitioning the current block into a plurality of partitions. The method also includes performing the conversion based on the determination.
[0015] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for conversion between a block of video and a bitstream representation of the video, determining a weight for a weighted average of prediction samples along edges of two partitions of the block. The two partitions are generated according to a geometric partitioning pattern. The weights are selected from a first set of weighting factors in which at least one of the weights is equal to 0 or 1. The method also includes performing the conversion based on the determination.
[0016] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for conversion between a block of video and a bitstream representation of the video, determining a weight for a weighted average of prediction samples along edges of two partitions of the block. The two partitions are generated according to a geometric partitioning pattern. The weight is selected from a first set of at least two sets of weighting factors based on characteristics of the block. The method also includes performing the conversion based on the determination.
[0017] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video using a geometric partitioning mode, determining whether to apply a redundancy check to a motion candidate based on a codec condition of the current block. The motion candidate is derived from one or more conventional Merge candidates of the geometric partitioning mode. The method also includes performing the conversion based on the determination.
[0018] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a current block of a video and a bitstream representation of the video, determining whether a geometric partitioning mode is enabled based on whether a slice including the current block is a B slice. The geometric partitioning mode includes partitioning the current block into a plurality of partitions. The method also includes performing the conversion based on the determination.
[0019] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a block of a video and a bitstream representation of the video, inserting at least one past motion candidate in a past motion candidate table into a motion candidate list. The past motion candidate table is derived based on a past conversion. The method includes determining that the motion candidate is not added to the motion candidate list after inserting at least one past motion candidate. The motion candidate is derived based on the past motion candidate table. The method also includes performing the conversion based on the motion candidate list.
[0020] In another representative aspect, the disclosed technology can be used to provide a method for video processing, the method comprising performing conversion between a block of a video and a bitstream representation of the video based on motion candidates, and determining whether a past motion candidate table derived based on past conversions is to be updated based on a codec condition of the conversion.
[0021] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for a conversion between a block of a video and a bitstream representation of the video, inserting one or more motion candidates into a candidate list until the candidate list is full. The one or more motion candidates are determined based on a past motion candidate list derived based on a past conversion. The method also includes performing the conversion based on the candidate list.
[0022] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes, for conversion between a block of video and a bitstream representation of the video, determining an intra-block copy (IBC) candidate list based on the size of a conventional Merge list for an inter-coded block. The IBC represents a technique in which a block is reconstructed based on previously coded samples in the same picture of the block. The method also includes performing the conversion based on the determination.
[0023] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes performing conversion between a block of a video and a bitstream representation of the video. The block is encoded and decoded in intra-block copy (IBC) mode, and the bitstream representation includes an indicator indicating the size of an IBC candidate list for the block. The indicator is always less than or equal to P, where P is a positive integer. IBC represents a technique in which a block is reconstructed based on previously encoded and decoded samples in the same picture of the block.
[0024] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes performing conversion between a block of a video and a bitstream representation of the video. The block is encoded and decoded in an intra-block copy (IBC) mode, and the bitstream representation includes an indicator indicating the size of an IBC candidate list for the block. The indicator is always greater than or equal to Q, where Q is a non-negative integer. IBC represents a technique in which a block is reconstructed based on previously encoded and decoded samples in the same picture of the block.
[0025] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes performing a conversion between a block of a video and a bitstream representation of the block. The block is encoded and decoded in an intra-block copy (IBC) mode, and the bitstream representation includes an indicator indicating the size of an IBC candidate list. The indicator includes a difference between the size of the IBC candidate list and an integer value K.
[0026] In another representative aspect, the disclosed technology can be used to provide a method for video processing. The method includes: for a conversion between a block of a video and a bitstream representation of the video, determining whether to reset a motion candidate table derived based on a past conversion based on whether an intra-block copy (IBC) mode is enabled. The IBC represents a technique in which blocks are reconstructed based on previously coded samples in the same picture. The method also includes performing the conversion based on the determination.
[0027] In another representative aspect, the disclosed technology can be used to provide a method for video processing, which includes identifying a Merge candidate as a default motion candidate, adding the Merge candidate to a Merge candidate list based on the identification, and reconstructing a current video block based on the Merge candidate list.
[0028] In another representative aspect, the disclosed technology can be used to provide a method for video processing, the method comprising deriving a triangle prediction mode (TPM) candidate from a conventional motion candidate of a current video block, selectively adding the TPM candidate to a TPM candidate list, and reconstructing the current video block based on the TPM candidate list.
[0029] In another representative aspect, the disclosed technology can be used to provide a method for video processing, wherein the method includes, when determining that the current video block is a TPM codec block, selecting a weighting factor group, and reconstructing the current video block based on the weighting factor group.
[0030] In another representative aspect, the disclosed technology can be used to provide a method for video processing, which includes generating pruned TPM candidates by selectively pruning one or more TPM candidates derived from a plurality of conventional Merge candidates, and reconstructing a current video block based on the pruned TPM candidates.
[0031] In yet another representative aspect, the disclosed technology can be used to provide a method for video processing, the method comprising inserting a first plurality of motion candidates from a first list and a second plurality of motion candidates from a second list into a candidate list based on an insertion order, wherein the insertion order is based on a previous insertion order of a third plurality of motion candidates into the candidate list, and reconstructing a current video block based on the candidate list.
[0032] In another representative aspect, the disclosed technology can be used to provide a method for video processing, the method comprising determining a slice type and a value of a TPM flag in a sequence parameter set (SPS) associated with a current video block, and reconstructing the current video block based on the slice type and the value.
[0033] In another representative aspect, a method of video processing is disclosed. The method includes, during a conversion between a current video block and a bitstream representation of the current video block, controlling the generation of a Merge candidate list for an intra-frame codec mode based on the size of a conventional Merge candidate list; and performing the conversion using the Merge candidate list for the intra-frame codec mode.
[0034] In another example aspect, another method of video processing is disclosed. The method includes performing a reset operation on a history-based motion vector predictor (HMVP) table used for conversion between a current video block and a bitstream representation of the current video block at a boundary of a video region in which an intra-frame codec mode is enabled, wherein the current video block is part of the video region; and
[0035] This conversion is performed using the HMVP table.
[0036] In yet another representative aspect, the above method is embodied in the form of processor executable code and stored in a computer readable program medium.
[0037] In yet another representative aspect, a device configured or operable to perform the above method is disclosed. The device may include a processor programmed to implement the method.
[0038] In yet another representative aspect, a video decoder device may implement the methods described herein.
[0039] The above and other aspects and features of the disclosed technology are described in more detail in the drawings, the description, and the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 An example of constructing a Merge candidate list is shown.
[0041] Figure 2 Examples of locations of spatial candidates are shown.
[0042] Figure 3 An example of a candidate pair for which redundancy check of spatial merge candidates is performed is shown.
[0043] Figure 4A and Figure 4B An example of the position of the second prediction unit (PU) based on the size and shape of the current block is shown.
[0044] Figure 5 An example of motion vector scaling for temporal merge candidates is shown.
[0045] Figure 6 An example of candidate positions of time-domain Merge candidates is shown.
[0046] Figure 7 An example of generating a combined bi-prediction Merge candidate is shown.
[0047] Figure 8 An example of constructing motion vector prediction candidates is shown.
[0048] Fig. 9 An example of motion vector scaling for spatial motion vector candidates is shown.
[0049] Fig.10 An example of motion prediction using an Alternative Temporal Motion Vector Prediction (ATMVP) algorithm for a Coding Unit (CU) is shown.
[0050] Fig.11 An example of a codec unit (CU) with sub-blocks and neighboring blocks used by a Spatial-Temporal Motion Vector Prediction (STMVP) algorithm is shown.
[0051] Fig.12 An example flow chart for encoding with different MV (Motion Vector) precisions is shown.
[0052] Fig.13A and Fig. 13B An example of dividing a coding unit (CU) into two triangular prediction units (PUs) is shown.
[0053] Fig.14 An example of the positions of neighboring blocks is shown.
[0054] Fig.15 An example of a CU to which the first weighting factor group is applied is shown.
[0055] Fig.16 An example of motion vector storage is shown.
[0056] Fig.17 An example of neighboring blocks for context selection in triangular prediction mode (TPM) flag encoding and decoding is shown.
[0057] Fig.18A and Fig.18B Examples of a simplified 4-parameter affine model and a simplified 6-parameter affine model are shown respectively.
[0058] Fig.19 An example of an affine motion vector field (MVF) for each sub-block is shown.
[0059] Fig. 20A and Fig. 20B Examples of a 4-parameter affine model and a 6-parameter affine model are shown respectively.
[0060] Fig.21 An example of motion vector prediction of AF_INTER inheriting affine candidates is shown.
[0061] Fig. 22 An example of motion vector prediction of AF_INTER of constructed affine candidates is shown.
[0062] Fig.23A and Fig. 23B Example candidates for the AF_MERGE affine motion mode are shown.
[0063] Fig.24 An example of candidate positions for the affine merge mode is shown.
[0064] Fig.25 An example of intra picture block copying is shown.
[0065] Fig.26Examples of valid corresponding areas in collocated pictures are shown.
[0066] Fig. 27 An example of the encoding and decoding process of the history-based motion vector prediction (HMVP) candidate is shown.
[0067] Fig.28 An example of a modified Merge list building process is shown.
[0068] Fig.29 A flow chart of an example method for video processing is shown.
[0069] Fig.30 A flow chart of another example method for video processing is shown.
[0070] Fig.31 A flow chart of yet another example method for video processing is shown.
[0071] Fig.32 A flow chart of yet another example method for video processing is shown.
[0072] Fig.33 A flow chart of yet another example method for video processing is shown.
[0073] Fig.34 A flow chart of yet another example method for video processing is shown.
[0074] Fig.35 is a block diagram of an example of a hardware platform for implementing the visual media decoding or visual media encoding techniques described in this document.
[0075] Fig.36 is a block diagram of an example video processing system in which the disclosed technology may be implemented.
[0076] Fig.37 is a flowchart representation of a method for video processing according to the present disclosure.
[0077] Fig.38 is a flowchart representation of another method for video processing according to the present disclosure.
[0078] Fig.39 is a flowchart representation of another method for video processing according to the present disclosure.
[0079] Fig.40 is a flowchart representation of another method for video processing according to the present disclosure.
[0080] Fig.41is a flowchart representation of another method for video processing according to the present disclosure.
[0081] Fig.42 is a flowchart representation of another method for video processing according to the present disclosure.
[0082] Fig.43 is a flowchart representation of another method for video processing according to the present disclosure.
[0083] Fig.44 is a flowchart representation of another method for video processing according to the present disclosure.
[0084] Fig.45 is a flowchart representation of another method for video processing according to the present disclosure.
[0085] Fig.46 is a flowchart representation of another method for video processing according to the present disclosure.
[0086] Fig.47 is a flowchart representation of another method for video processing according to the present disclosure.
[0087] Fig.48 is a flowchart representation of another method for video processing according to the present disclosure.
[0088] Fig.49 is a flowchart representation of another method for video processing according to the present disclosure.
[0089] Fig.50 is a flowchart representation of another method for video processing according to the present disclosure.
[0090] Fig.51 is a flowchart representation of another method for video processing according to the present disclosure.
[0091] Fig.52 is a flowchart representation of another method for video processing according to the present disclosure.
[0092] Fig.53 is a flowchart representation of another method for video processing according to the present disclosure.
[0093] Fig.54 is a flowchart representation of another method for video processing according to the present disclosure.
[0094] Fig.55 is a flowchart representation of another method for video processing according to the present disclosure.
[0095] Fig.56 is a flowchart representation of another method for video processing according to the present disclosure.
[0096] Fig.57 is a flowchart representation of yet another method for video processing according to the present disclosure. DETAILED DESCRIPTION
[0097] Due to the growing demand for high-resolution video, video coding and decoding methods and technologies are ubiquitous in modern technology. Video codecs generally include electronic circuits or software that compress or decompress digital video and are constantly being improved to provide higher codec efficiency. Video codecs convert uncompressed video into a compressed format and vice versa. There is a complex relationship between video quality, the amount of data used to represent the video (determined by the bitrate), the complexity of the encoding and decoding algorithms, sensitivity to data loss and errors, ease of editing, random access, and end-to-end delay (latency). The compression format usually conforms to a standard video compression specification, such as the High Efficiency Video Codec (HEVC) standard (also known as H.265 or MPEG-H Part 2), the to-be-finalized Versatile Video Coding (VVC) standard, or other current and / or future video codec standards.
[0098] Embodiments of the disclosed technology can be applied to existing video codec standards (e.g., HEVC, H.265) and future standards to improve compression performance. Section headings are used in this document to improve the readability of the description and do not in any way limit the discussion or embodiments (and / or implementation methods) to only the individual sections.
[0099] 1. Example of HEVC / H.265 inter-frame prediction
[0100] Video codec standards have improved significantly over the years and now offer, in part, high codec efficiency and support for higher resolutions. Recent standards such as HEVC and H.265 are based on a hybrid video codec structure that utilizes temporal prediction plus transform coding.
[0101] 1.1 Example of prediction mode
[0102] Each inter-frame PU (prediction unit) has motion parameters for one or two reference picture lists. In some embodiments, the motion parameters include motion vectors and reference picture indices. In other embodiments, the use of one of the two reference picture lists can also be notified using inter_pred_idc signaling. In some other embodiments, the motion vector can be explicitly encoded and decoded as a delta relative to the predicted value.
[0103] When a CU is encoded or decoded in skip mode, one PU is associated with the CU and there are no significant residual coefficients, no coded motion vector increments or reference picture indices. A Merge mode is specified, whereby the motion parameters of the current PU are obtained from neighboring PUs, including spatial and temporal candidates. The Merge mode applies not only to skip mode, but also to any inter-prediction PU. An alternative to the Merge mode is the explicit transmission of motion parameters, where the motion vectors, the corresponding reference picture indices for each reference picture list, and the use of the reference picture list are explicitly signaled per PU.
[0104] When signaling indicates that one of the two reference picture lists is to be used, a PU is generated from a block of samples. This is called "unidirectional prediction". Unidirectional prediction is available for P slices and B slices.
[0105] When signaling indicates that both reference picture lists are to be used, a PU is generated from two sample blocks. This is called "bi-prediction". Bi-prediction is only available for B slices.
[0106] Reference Image List
[0107] In HEVC, the term inter prediction is used to refer to predictions derived from data elements (e.g., sample values or motion vectors) of reference pictures other than the currently decoded picture. As in H.264 / AVC, a picture can be predicted from multiple reference pictures. Reference pictures used for inter prediction are organized in one or more reference picture lists. A reference picture index identifies which reference picture in the list should be used to create the prediction signal.
[0108] A single reference picture list (list 0) is used for P slices and two reference picture lists (list 0 and list 1) are used for B slices. It should be noted that the reference pictures included in lists 0 / 1 can be from both past and future pictures in terms of capture / display order.
[0109] 1.1.1 Example of constructing a candidate for Merge mode
[0110] When predicting a PU using Merge mode, an index pointing to an entry in the Merge candidate list is parsed from the bitstream and used to retrieve motion information. The construction of this list can be outlined in the following series of steps:
[0111] Step 1: Initial candidate derivation
[0112] Step 1.1: Spatial Candidate Derivation
[0113] Step 1.2: Redundancy check of spatial candidates
[0114] οStep 1.3: Time Domain Candidate Derivation
[0115] Step 2: Additional candidate insertions
[0116] οStep 2.1: Create bidirectional prediction candidates
[0117] οStep 2.2: Insert zero motion candidates
[0118] Figure 1 An example of constructing a Merge candidate list based on the above series of steps is shown. For spatial Merge candidate derivation, up to four Merge candidates are selected from candidates located at five different positions. For time domain Merge candidate derivation, up to one Merge candidate is selected from two candidates. Since a constant number of candidates for each PU is assumed at the decoder, additional candidates are generated when the number of candidates does not reach the maximum number of Merge candidates (MaxNumMergeCand) signaled in the slice header. Since the number of candidates is constant, the index of the best Merge candidate is encoded using Truncated Unary binarization (TU). If the size of the CU is equal to 8, all PUs of the current CU share a single Merge candidate list, which is the same as the Merge candidate list of the 2N×2N prediction unit.
[0119] 1.1.2 Constructing Spatial Merge Candidates
[0120] In the derivation of spatial merge candidates, Figure 2 Up to four Merge candidates are selected from the candidates at the positions depicted in . The order of derivation is A1, B1, B0, A0, and B2. Position B2 is considered only when any PU at position A1, B1, B0, A0 is unavailable (for example, because it belongs to another strip or slice) or is intra-coded. After adding the candidate at position A1, a redundancy check is performed on the addition of the remaining candidates, which ensures that candidates with the same motion information are excluded from the list, thereby improving coding efficiency.
[0121] In order to reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Instead, only pairs with Figure 3 The arrows in the table link pairs, and candidates are only added to the list if the corresponding candidates for redundancy checking do not have the same motion information. Another source of repeated motion information is a "second PU" associated with a partition other than 2N×2N. As an example, Figure 4A and Figure 4BThe second PU is depicted for the N×2N and 2N×N cases, respectively. When the current PU is partitioned into N×2N, the candidate at position A1 is not considered for list construction. In some embodiments, adding this candidate may result in two prediction units having the same motion information, which is redundant for having only one PU in the codec unit. Similarly, when the current PU is partitioned into 2N×N, position B1 is not considered.
[0122] 1.1.3 Constructing Time Domain Merge Candidates
[0123] In this step, only one candidate is added to the list. Specifically, in the derivation of the temporal Merge candidate, the scaled motion vector is derived based on the co-located PU belonging to the picture with the minimum POC (Picture Order Count) difference with the current picture in a given reference picture list. The reference picture list to be used for the derivation of the co-located PU is explicitly signaled in the slice header.
[0124] Figure 5 An example of the derivation of a scaled motion vector (as dotted line) for a temporal Merge candidate is shown, which is scaled from the motion vector of the collocated PU using the POC distances tb and td, where tb is defined as the POC difference between the reference picture of the current picture and the current picture, and td is defined as the POC difference between the reference picture of the collocated picture and the collocated picture. The reference picture index of the temporal Merge candidate is set equal to zero. For B slices, two motion vectors (one for reference picture list 0 and the other for reference picture list 1) are obtained and combined to generate a bi-directional prediction Merge candidate.
[0125] In the collocated PU(Y) belonging to the reference frame, the position of the temporal candidate is selected between candidates C0 and C1, such as Figure 6 If the PU at position C0 is not available, is intra-coded, or is outside the current CTU (Coding Tree Unit), position C1 is used. Otherwise, position C0 is used in the derivation of the time domain Merge candidate.
[0126] 1.1.4 Constructing additional types of merge candidates
[0127] In addition to the space-time Merge candidates, there are two additional types of Merge candidates: combined bidirectional prediction Merge candidates and zero Merge candidates. Combined bidirectional prediction Merge candidates are generated by utilizing space-time Merge candidates. Combined bidirectional prediction Merge candidates are only used for B slices. Combined bidirectional prediction candidates are generated by combining the first reference picture list motion parameters of an initial candidate with the second reference picture list motion parameters of another initial candidate. If the two tuples provide different motion hypotheses, they will form a new bidirectional prediction candidate.
[0128] Figure 7 An example of this process is shown where two candidates in the original list (710, on the left) (having either mvL0 and refIdxL0 or mvL1 and refIdxL1) are used to create a combined bi-predictive Merge candidate that is added to the final list (720, on the right).
[0129] Zero motion candidates are inserted to fill the remaining entries in the Merge candidate list and thus reach the MaxNumMergeCand capacity. These candidates have zero spatial displacement and a reference picture index that starts at zero and increases each time a new zero motion candidate is added to the list. The number of reference frames used by these candidates is 1 and 2 for unidirectional prediction and bidirectional prediction, respectively. In some embodiments, no redundancy check is performed on these candidates.
[0130] In some embodiments, the following steps are performed in order until the Merge list is full:
[0131] (1) Set the variable numRef to the number of reference pictures associated with list 0 for P slices, or the minimum number of reference pictures in the two lists for B slices;
[0132] (2) Add non-repeating zero motion candidates:
[0133] For variable i being 0...numRef-1, a default motion candidate with MV set to (0,0) and reference picture index set to i is added to list 0 (if it is a P slice) or to both lists (if it is a B slice).
[0134] (3) Add repeated zero motion candidates, where MV is set to (0,0), the reference picture index of list 0 is set to 0 (if it is a P slice), and the reference picture indexes of both lists are set to 0 (if it is a B slice).
[0135] 1.2 Embodiment of Advanced Motion Vector Prediction (AMVP)
[0136] AMVP exploits the spatio-temporal correlation of motion vectors with neighboring PUs, which is used for explicit transmission of motion parameters. A motion vector candidate list is constructed by first checking the availability of neighboring PU positions in the left and top time domains, removing redundant candidates, and adding zero vectors to make the candidate list a constant length. The encoder can then select the best prediction value from the candidate list and send a corresponding index indicating the selected candidate. Similar to Merge index signaling, the index of the best motion vector candidate is encoded using truncated unary. In this case, the maximum value to be encoded is 2 (see Figure 8 ). In the following sections, details about the derivation process of motion vector prediction candidates will be provided.
[0137] 1.2.1 Example of deriving AMVP candidates
[0138] Figure 8 The derivation process of motion vector prediction candidates is outlined and can be implemented for each reference picture list with refidx as input.
[0139] In motion vector prediction, two types of motion vector candidates are considered: spatial motion vector candidates and temporal motion vector candidates. For spatial motion vector candidate derivation, the final Figure 2 Two motion vector candidates are derived from the motion vectors of each PU at the five different positions shown.
[0140] For temporal motion vector candidate derivation, one motion vector candidate is selected from two candidates derived based on two different collocated positions. After generating the first spatio-temporal candidate list, duplicate motion vector candidates in the list are removed. If the number of potential candidates is greater than two, motion vector candidates whose reference picture index within the associated reference picture list is greater than 1 are removed from the list. If the number of spatio-temporal motion vector candidates is less than two, an additional zero motion vector candidate is added to the list.
[0141] 1.2.2 Constructing Spatial Motion Vector Candidates
[0142] In the derivation of spatial motion vector candidates, the Figure 2 Consider up to two candidates out of the five potential candidates for PU derivation at the positions shown, and those positions are the same as the positions of the motion Merge. The derivation order on the left side of the current PU is defined as A0, A1, and scaling A0, scaling A1. The derivation order on the upper side of the current PU is defined as B0, B1, B2, scaling B0, scaling B1, scaling B2. Therefore, for each side, there are four cases that can be used as motion vector candidates, two of which do not require the use of spatial domain scaling, and two use spatial domain scaling. The four different cases are summarized as follows:
[0143] No airspace scaling
[0144] (1) Same reference picture list and same reference picture index (same POC)
[0145] (2) Different reference picture lists, but the same reference picture (same POC)
[0146] Airspace scaling
[0147] (3) Same reference picture list, but different reference pictures (different POC)
[0148] (4) Different reference picture lists and different reference pictures (different POCs)
[0149] First check the non-spatial scaling case, then the case where spatial scaling is allowed. Spatial scaling is considered when the POC is different between the reference pictures of the neighboring PU and the reference pictures of the current PU regardless of the reference picture list. If all PUs of the left candidate are unavailable or are intra-coded, then scaling for the upper motion vector is allowed to help parallel derivation of the left and upper MV candidates. Otherwise, spatial scaling is not allowed for the upper motion vector.
[0150] like Fig. 9 As shown in the example in , for the case of spatial scaling, the motion vectors of neighboring PUs are scaled in a similar way to temporal scaling. One difference is that the reference picture list and the index of the current PU are given as input; the actual scaling process is the same as that of temporal scaling.
[0151] 1.2.3 Constructing temporal motion vector candidates
[0152] Except for the reference picture index derivation, all the processes used to derive the temporal Merge candidate are the same as those used to derive the spatial motion vector candidate (e.g. Figure 6 In some embodiments, the reference picture index is signaled to the decoder.
[0153] 2. Example of Inter Prediction Method in Joint Exploration Model (JEM)
[0154] In some embodiments, a reference software called Joint Exploration Model (JEM) is used to explore future video codec technologies. In JEM, sub-block based prediction is adopted in several codec tools, such as affine prediction, optional temporal motion vector prediction (ATMVP), spatio-temporal motion vector prediction (STMVP), bi-directional optical flow (BIO), frame rate up conversion (FRUC), locally adaptive motion vector resolution (LAMVR), overlapped block motion compensation (OBMC), local illumination compensation (LIC), and decoder side motion vector refinement (DMVR).
[0155] 2.1 Example of motion vector prediction based on sub-CU
[0156] In JEM with quadtrees plus binary trees (QTBT), each CU can have at most one motion parameter set for each prediction direction. In some embodiments, two sub-CU level motion vector prediction methods are considered in the encoder by dividing the large CU into sub-CUs and deriving the motion information of all sub-CUs of the large CU. The optional time domain motion vector prediction (ATMVP) method allows each CU to extract multiple sets of motion information from multiple blocks smaller than the current CU in the collocated reference picture. In the Spatial-Temporal Motion Vector Prediction (STMVP) method, the motion vector of the sub-CU is recursively derived by using the temporal motion vector predictor and the spatial neighboring motion vector. In some embodiments, and in order to maintain a more accurate motion field for sub-CU motion prediction, motion compression of the reference frame can be disabled.
[0157] 2.1.1 Example of Alternative Temporal Motion Vector Prediction (ATMVP)
[0158] In the ATMVP method, the temporal motion vector prediction (TMVP) method is modified by extracting multiple sets of motion information (including motion vectors and reference indices) from blocks smaller than the current CU.
[0159] Fig.10An example of the ATMVP motion prediction process for CU 1000 is shown. The ATMVP method predicts the motion vector of sub-CU 1001 within CU 1000 in two steps. The first step is to identify the corresponding block 1051 in the reference picture 1050 with the time domain vector. The reference picture 1050 is also called the motion source picture. The second step is to divide the current CU 1000 into sub-CUs 1001 and obtain the motion vector and the reference index of each sub-CU from the block corresponding to each sub-CU.
[0160] In the first step, the reference picture 1050 and the corresponding block are determined by the motion information of the spatial neighboring blocks of the current CU 1000. In order to avoid the repeated scanning process of the neighboring blocks, the first Merge candidate in the Merge candidate list of the current CU 1000 is used. The first available motion vector and its associated reference picture index are set to the index of the temporal vector and the motion source picture. In this way, compared with TMVP, the corresponding block can be identified more accurately, where the corresponding block (sometimes called a collocated block) is always in the lower right or center position relative to the current CU.
[0161] In the second step, the corresponding block of the sub-CU 1051 is identified by the time domain vector in the motion source picture 1050 by adding the time domain vector to the coordinates of the current CU. For each sub-CU, the motion information of its corresponding block (e.g., the minimum motion grid covering the center sample point) is used to derive the motion information of the sub-CU. After identifying the motion information of the corresponding N×N block, it is converted into the motion vector and reference index of the current sub-CU in the same way as the TMVP of HEVC, where motion scaling and other processes apply. For example, the decoder checks whether the low latency condition is met (e.g., the POC of all reference pictures of the current picture is less than the POC of the current picture), and may use the motion vector MV x (e.g., the motion vector corresponding to the reference picture list X) is used to predict the motion vector MV of each sub-CU y (eg, where X equals 0 or 1, and Y equals 1-X).
[0162] 2.1.2 Example of Space-Temporal Motion Vector Prediction (STMVP)
[0163] In the STMVP method, the motion vector of a sub-CU is recursively derived in raster scan order. Fig.11 A CU with 4 sub-blocks and neighboring blocks are shown. Consider an 8×8 CU 1100, which includes 4 4×4 sub-CUs: A (1101), B (1102), C (1103), and D (1104). The neighboring 4×4 blocks in the current frame are labeled a (1111), b (1112), c (1113), and d (1114).
[0164] The motion derivation of sub-CU A starts by identifying its two spatial neighbors. The first neighbor is the N×N block above sub-CU A 1101 (block c 1113). If this block c 1113 is not available or is intra-coded, check the other N×N blocks above sub-CU A 1101 (from left to right, starting from block c 1113). The second neighbor is the block on the left of sub-CU A 1101 (block b 1112). If block b 1112 is not available or is intra-coded, check the other blocks on the left of sub-CU A 1101 (from top to bottom, starting from block b 1112). The motion information obtained from the adjacent blocks in each list is scaled to the first reference frame of the given list. Next, the temporal motion vector predictor (TMVP) of sub-block A 1101 is derived by following the same process of TMVP derivation as specified by HEVC. The motion information of the collocated block at block D 1104 is extracted and scaled accordingly. Finally, after retrieving and scaling the motion information, all available motion vectors are averaged individually for each reference list. The average motion vector is assigned as the motion vector of the current sub-CU.
[0165] 2.1.3 Example of Sub-CU Motion Prediction Mode Signaling
[0166] In some embodiments, sub-CU modes are enabled as additional Merge candidates, and no additional syntax elements are required to signal these modes. Two additional Merge candidates are added to the Merge candidate list of each CU to represent the ATMVP mode and the STMVP mode. In other embodiments, if the sequence parameter set indicates that ATMVP and STMVP are enabled, up to seven Merge candidates can be used. The encoding logic of the additional Merge candidates is the same as that of the Merge candidates in the HM, which means that for each CU in a P slice or a B slice, two RD (Rate Distortion) checks may be required for the two additional Merge candidates. In some embodiments, for example, JEM, all binary values of the Merge index are context-coded by CABAC (Context-based Adaptive Binary Arithmetic Coding). In other embodiments, for example, HEVC, only the first binary value is context-coded, and the remaining binary values are context bypass coded.
[0167] 2.2 Example of inter-frame prediction method in VVC
[0168] There are several new codec tools for inter prediction improvements, such as Adaptive Motion Vector difference Resolution (AMVR) for signaling MVD, affine prediction mode, triangle prediction mode (TPM), ATMVP, Generalized Bi-Prediction (GBI), and bidirectional optical flow (BIO).
[0169] 2.2.1 Example of Adaptive Motion Vector Difference Resolution
[0170] In some embodiments, when use_integer_mv_flag in the slice header is equal to 0, the motion vector difference (MVD) (between the motion vector of the PU and the predicted motion vector) is signaled in units of quarter luma samples. In JEM, local adaptive motion vector resolution (LAMVR) is introduced. In JEM, MVD can be encoded and decoded in units of quarter luma samples, integer luma samples, or four luma samples. The MVD resolution is controlled at the codec unit (CU) level, and the MVD resolution flag is conditionally signaled for each CU with at least one non-zero MVD component.
[0171] For a CU with at least one non-zero MVD component, a first flag is signaled to indicate whether quarter luma sample MV precision is used in the CU. When the first flag (equal to 1) indicates that quarter luma sample MV precision is not used, another flag is signaled to indicate whether integer luma sample MV precision or quad luma sample MV precision is used.
[0172] When the first MVD resolution flag of a CU is zero or is not coded for the CU (meaning that all MVDs in the CU are zero), a quarter luma sample MV resolution is used for the CU. When the CU uses integer luma sample MV precision or four luma sample MV precision, the MVP in the AMVP candidate list of the CU is rounded to the corresponding precision.
[0173] In the encoder, the CU-level RD check is used to determine which MVD resolution to use for the CU. That is, for each MVD resolution, three CU-level RD checks are performed. In order to speed up the encoder, the following encoding scheme is applied in JEM:
[0174] -- During the RD check of a CU with normal quarter-luminance sample MVD resolution, store the motion information of the current CU (integer luminance sample accuracy). The stored motion information (after rounding) is used as the starting point for further small-range motion vector refinement during the RD check of the same CU with integer luminance samples and 4-luminance sample MVD resolution, so that the time-consuming motion estimation process is not repeated three times.
[0175] -- Conditionally call the RD check of a CU with 4-luminance sample MVD resolution. For a CU, when the RD cost of integer luminance sample MVD resolution is much greater than the RD cost of quarter-luminance sample MVD resolution, skip the RD check of 4-luminance sample MVD resolution for the CU.
[0176] The encoding process is as Fig.12 shown. First, test the 1 / 4 pixel MV, calculate the RD cost and denote it as RDCost0, then test the integer MV, and the RD cost is denoted as RDCost1. If RDCost1 < th * RDCost0 (where this is a positive threshold), then test the 4 pixel MV; otherwise, skip the 4 pixel MV. Basically, when checking the integer or 4 pixel MV, the motion information and RD cost, etc. are known for the 1 / 4 pixel MV and can be reused to accelerate the encoding process of the integer or 4 pixel MV.
[0177] 2.2.2 Examples of Triangle Prediction Unit Modes
[0178] The concept of the triangle prediction unit mode is to introduce a new triangle partition for motion compensation prediction. As Fig.13A and Fig. 13B shown, the triangle prediction unit mode divides the CU into two triangle prediction units in the diagonal direction or the anti-diagonal direction. Each triangle prediction unit in the CU uses its own unidirectional prediction motion vector and reference frame index for inter-frame prediction, and the unidirectional prediction motion vector and reference frame index are derived from the unidirectional prediction candidate list. After predicting the triangle prediction unit, perform adaptive weighted processing on the diagonal edge. Then, apply the transform and quantization process to the entire CU. Note that this mode is only applicable to the skip and Merge modes.
[0179] TPM's one-way prediction candidate list
[0180] The unidirectional prediction candidate list consists of five unidirectional prediction motion vector candidates. As Fig.14As shown, it is derived from seven adjacent blocks including five spatial adjacent blocks (1 to 5) and two temporal collocated blocks (6 to 7). The motion vectors of the seven adjacent blocks are collected and put into the unidirectional prediction candidate list according to the order of unidirectional prediction motion vector, L0 motion vector of bidirectional prediction motion vector, L1 motion vector of bidirectional prediction motion vector, and average motion vector of L0 and L1 motion vector of bidirectional prediction motion vector. If the number of candidates is less than five, zero motion vector is added to the list. The motion candidate added to the list of TPM is called TPM candidate, and the motion information derived from spatial / temporal blocks is called conventional motion candidate.
[0181] More specifically, the following steps are involved:
[0182] 1) From A1, B1, B0, A0, B2, Col and Col2 (corresponding to Fig.14 Blocks 1-7 in (a) obtain conventional motion candidates, Without No trimming required .
[0183] 2) Set the variable numCurrMergeCand = 0
[0184] 3) For each normal motion candidate derived from A1, B1, B0, A0, B2, Col and Col2 and numCurrMergeCand is less than 5, if the normal motion candidate is unidirectionally predicted (from list 0 or list 1), it is directly added to the Merge list as a TPM candidate, and numCurrMergeCand is increased by 1. Such a TPM candidate is named "initial unidirectionally predicted candidate".
[0185] application Fully trimmed .
[0186] 4) For each motion candidate derived from A1, B1, B0, A0, B2, Col, and Col2 and numCurrMergeCand is less than 5, if the regular motion candidate is bidirectionally predicted, the motion information from list 0 is added to the TPM Merge list as a new TPM candidate (that is, modified to be unidirectionally predicted from list 0), and numCurrMergeCand is increased by 1. This TPM candidate is named "truncated list 0 prediction candidate".
[0187] application Fully trimmed .
[0188] 5) For each motion candidate derived from A1, B1, B0, A0, B2, Col, and Col2 and numCurrMergeCand is less than 5, if the regular motion candidate is bidirectionally predicted, the motion information from list 1 is added to the TPM Merge list (i.e., modified to be unidirectionally predicted from list 1), and numCurrMergeCand is increased by 1. Such a TPM candidate is named "truncated list 1 prediction candidate".
[0189] application Fully trimmed .
[0190] 6) For each motion candidate derived from A1, B1, B0, A0, B2, Col, and Col2 and numCurrMergeCand is less than 5, if the regular motion candidate is bi-directionally predicted, then
[0191] - If the slice QP of list 0 reference picture is less than the slice QP of list 1 reference picture, the motion information of list 1 is first scaled to list 0 reference picture, and the average of two MVs (one from original list 0 and the other is the scaled MV from list 1) is added to the TPM Merge list, such candidate is called average unidirectional prediction from list 0 motion candidate, and numCurrMergeCand is increased by 1.
[0192] Otherwise, first scale the motion information of list 0 to the reference picture of list 1, and add the average of the two MVs (one from the original list 1 and the other is the scaled MV from list 0) to the TPM Merge list. This TPM candidate is called the average unidirectional prediction from list 1 motion candidate, and numCurrMergeCand is increased by 1.
[0193] application Fully trimmed .
[0194] 7) If numCurrMergeCand is less than 5, add a zero motion vector candidate.
[0195] When a candidate is inserted into a list, if the candidate must be compared to all previously added candidates to see if it is the same as one of them, this process is called full pruning.
[0196] Adaptive weighting process
[0197] After predicting each triangle prediction unit, an adaptive weighting process is applied to the diagonal edges between two triangle prediction units to derive the final prediction for the entire CU. The two weighting factor groups are listed below:
[0198] · A first set of weighting factors: {7 / 8, 6 / 8, 4 / 8, 2 / 8, 1 / 8} and {7 / 8, 4 / 8, 1 / 8} for luma and chroma samples respectively; and
[0199] The second weighting factor group: {7 / 8, 6 / 8, 5 / 8, 4 / 8, 3 / 8, 2 / 8, 1 / 8} and {6 / 8, 4 / 8, 2 / 8} are used for luma and chroma samples respectively.
[0200] A weighting factor set is selected based on the comparison of the motion vectors of the two triangle prediction units. When the reference pictures of the two triangle prediction units are different from each other or the difference of their motion vectors is greater than 16 pixels, the second weighting factor set is used. Otherwise, the first weighting factor set is used. Fig.15 An example of applying a first set of weighting factors is shown.
[0201] Motion vector storage
[0202] Motion vector of triangle prediction unit ( Fig.16 Mv1 and Mv2 in CU are stored in 4×4 grids. For each 4×4 grid, a unidirectional prediction or bidirectional prediction motion vector is stored, depending on the position of the 4×4 grid in the CU. Fig.16 As shown, unidirectional prediction motion vectors, Mv1 or Mv2, are stored for 4×4 grids located in non-weighted areas. On the other hand, bidirectional prediction motion vectors are stored for 4×4 grids located in weighted areas. Bidirectional prediction motion vectors are derived from Mv1 and Mv2 according to the following rules:
[0203] 1) In the case where Mv1 and Mv2 have motion vectors from different directions (L0 or L1), Mv1 and Mv2 are simply combined to form a bidirectional prediction motion vector.
[0204] 2) In the case where both Mv1 and Mv2 come from the same L0 (or L1) direction:
[0205] 2a) If the reference picture of Mv2 is the same as a picture in the L1 (or L0) reference picture list, then Mv2 is scaled to that picture. Mv1 and the scaled Mv2 are combined to form a bidirectional prediction motion vector.
[0206] 2b) If the reference picture of Mv1 is the same as a picture in the L1 (or L0) reference picture list, Mv1 is scaled to that picture. The scaled Mv1 and Mv2 are combined to form a bidirectional prediction motion vector.
[0207] 2c) Otherwise, only Mv1 is stored for the weighted region.
[0208] Signaling of Triangle Prediction Mode (TPM)
[0209] A bit flag indicating whether to use TPM may be signaled first. Afterwards, two partitioning mode indications (such as Fig.13A and Fig. 13B ), and the Merge index selected for each of the two partitions.
[0210] TPM Flag Signaling
[0211] The width and height of a luma block are represented by W and H respectively. If W*H<64, triangle prediction mode is disabled.
[0212] When a block is encoded or decoded in affine mode, triangle prediction mode is also disabled.
[0213] When a block is encoded or decoded in Merge mode, a one-bit flag may be signaled to indicate whether triangle prediction mode is enabled or disabled for the block.
[0214] Considering Fig.17 , the flag is encoded and decoded with 3 contexts and is based on the following equation:
[0215] Ctx index = ((block L on the left is available &&L can be encoded and decoded using TPM?) 1:0) + ((block A on the top is available &&A can be encoded and decoded using TPM?) 1:0);
[0216] Signaling two partition modes and an indication of the selected Merge index
[0217] Note that the partitioning mode (such as Fig.13A and Fig. 13B As shown), the Merge indexes of the two partitions are jointly coded and decoded. In some embodiments, the two partitions are restricted from using the same reference picture index. Therefore, there are 2 (partition mode) * N (maximum number of Merge candidates) * (N-1) possibilities, where N is set to 5. An indication is coded and decoded, and the mapping between the partition mode, the two Merge indexes and the coding indication is derived from the array defined below:
[0218] const uint8_t g_TriangleCombination[TRIANGLE_MAX_NUM_CANDS][3]={{0,1,0},{1,0,1},{1,0,2},{0,0,1},{0,2,0},{1 ,0,3},{1,0,4},{1,1,0},{0,3,0},{0,4,0},{0,0,2},{0,1,2},{1,1,2},{0,0,4},{0,0,3},{0,1,3},{0,1,4} ,{1,1,4},{1,1,3},{1,2,1},{1,2,0},{0,2,1},{0,4,3},{1,3,0},{1,3,2},{1,3,4},{1,4,θ},{1,3,1},{1,2 ,3},{1,4,1},{θ,4,1},{0,2,3},{1,4,2},{0,3,2},{1,4,3},{0,3,1},{0,2,4},{1,2,4},{0,4,2},{0,3,4}};
[0219] Division mode (45 degrees or 135 degrees) = g_TriangleCombination [signaling indication] [0];
[0220] Merge index of candidate A = g_TriangleCombination[signaling indication][1];
[0221] Merge index of candidate B = g_TriangleCombination[signaling indication][2];
[0222] Once two motion candidates A and B are derived, the motion information of the two partitions (PU1 and PU2) can be set from A or B. Whether PU1 uses the motion information of Merge candidate A or B depends on the prediction direction of the two motion candidates. Table 1 shows the relationship between the two derived motion candidates A and B and the two partitions.
[0223] Table 1: Motion information of partition derived from two derived Merge candidates (A, B)
[0224] The predicted direction of A The predicted direction of B PU1 motion information PU2 motion information L0 L0 A(L0) B(L0) L1 L1 B(L1) A(L1) L0 L1 A(L0) B(L1) L1 L0 B(L0) A(L1)
[0225] Indicates the entropy codec (indicated by merge_triangle_idx)
[0226] merge_triangle_idx is included in the range of [0,39]. K-order Exponential Golomb (EG) code is used for binarization of merge_triangle_idx, where K is set to 1.
[0227] k-order EG
[0228] To encode larger numbers with fewer bits (at the expense of using more bits to encode smaller numbers), this can be generalized with a non-negative integer parameter k. To encode a non-negative integer x with an exponential Golomb code of order K:
[0229] (1) As mentioned above, using the 0th order exponential Golomb code Encode, then
[0230] (2) Using binary x mod 2 k Encoding
[0231] Table 2: Exponential Golomb-k encoding and decoding examples
[0232]
[0233] 2.2.3 Example of Affine Motion Compensated Prediction
[0234] In HEVC, only the translation motion model is applied to Motion Compensation Prediction (MCP). However, the camera and the object can have a variety of motions, such as zooming in / out, rotation, perspective motion, and / or other irregular motions. In VVC, a simplified affine transformation motion compensation prediction is applied using a 4-parameter affine model and a 6-parameter affine model. Fig.18A and Fig.18B As shown, the affine motion field of the block is described by two (in a 4-parameter affine model using variables a, b, e and f) or three (in a 6-parameter affine model using variables a, b, c, d, e and f) control point motion vectors, respectively.
[0235] The motion vector field (MVF) of the block is described by the following equations using a 4-parameter affine model and a 6-parameter affine model respectively:
[0236]
[0237]
[0238] Here, (mv h 0,mv h 0) is the motion vector of the upper left control point (Control Point, CP), (mv h 1,mv h 1) is the motion vector of the upper right control point, (mv h 2,mv h2) is the motion vector of the lower left control point, and (x, y) represents the coordinates of the representative point in the current block relative to the upper left sample point. The CP motion vector can be signaled (as in the affine AMVP mode) or dynamically derived (as in the affine Merge mode). w and h are the width and height of the current block. In practice, the division is implemented by right shift and rounding operations. In VTM, the representative point is defined as the center position of the sub-block. For example, when the coordinates of the upper left corner of the sub-block relative to the upper left sample point in the current block are (xs, ys), the coordinates of the representative point are defined as (xs+2, ys+2). For each sub-block (for example, 4×4 in VTM), the motion vector of the entire sub-block is derived using the representative point.
[0239] Fig.19 An example of an affine MVF for each sub-block of block 1900 is shown, where a sub-block based affine transform prediction is applied to further simplify motion compensated prediction. To derive the motion vector of each M×N sub-block, the motion vector of the center sample of each sub-block can be calculated according to equations (1) and (2) and rounded to a motion vector fractional precision (e.g., 1 / 16 in JEM). Then, a motion compensated interpolation filter can be applied to generate a prediction of each sub-block with the derived motion vector. The affine mode introduces an interpolation filter of 1 / 16 pixels. After MCP, the high-precision motion vector of each sub-block is rounded and saved to the same precision as the normal motion vector.
[0240] 2.2.4 Example of signaling for affine prediction
[0241] Similar to the translational motion model, there are also two modes for signaling the auxiliary information generated due to affine prediction. They are AFFINE_INTER and AFFINE_MERGE modes.
[0242] 2.2.5 Example of AF_INTER mode
[0243] AF_INTER mode can be applied for CUs with width and height both greater than 8. A CU-level affine flag is signaled in the bitstream to indicate whether AF_INTER mode is used.
[0244] In this mode, for each reference picture list (list 0 or list 1), an affine AMVP candidate list is constructed with three types of affine motion prediction values in the following order, where each candidate includes the estimated CPMV of the current block. Fig. 22The difference between the best CPMV found and the estimated CPMV is signaled. In addition, the index of the affine AMVP candidate is further signaled, from which the estimated CPMV is derived.
[0245] 1) Inheriting affine motion prediction value
[0246] The checking order is similar to the spatial MVP in HEVC AMVP list construction. First, the inherited affine motion prediction value on the left is derived from the first block in {A1, A0}, which is affine coded and has the same reference picture as the current block. Second, the inherited affine motion prediction value is derived from the first block in {B1, B0, B2}, which is affine coded and has the same reference picture as the current block. Fig.21 Five blocks A1, A0, B1, B0, B2 are depicted in FIG.
[0247] Once a neighboring block is found to be coded in affine mode, the CPMV of the codec covering the neighboring block is used to derive the predicted value of the CPMV of the current block. For example, if A1 is coded in non-affine mode and A0 is coded in 4-parameter affine mode, the inherited affine MV prediction value on the left will be derived from A0. In this case, the CPMV of the CU covering A0 (such as Fig. 23B As shown, the CPMV for the upper left is expressed as For the upper right CPMV, it is expressed as ) is used to derive the estimated CPMV of the current block (for the upper left position (coordinate (x0, y0)), upper right position (coordinate (x1, y1)) and lower right position (coordinate (x2, y2)) of the current block) as ).
[0248] 2) Constructed affine motion prediction value
[0249] like Fig. 22 As shown, the constructed affine motion prediction value consists of control point motion vectors (CPMVs) derived from adjacent inter-frame codec blocks with the same reference picture. If the current affine motion model is 4-parameter affine, the number of CPMVs is 2, otherwise if the current affine motion model is 6-parameter affine, the number of CPMVs is 3. is derived from the MV at the first block in group {A,B,C}, which is inter-coded and has the same reference picture as the current block. is derived from the MV at the first block in group {D,E}, which is inter-coded and has the same reference picture as the current block. is derived from the MV at the first block in the group {F, G}, which is inter-coded and has the same reference picture as in the current block.
[0250] -If the current affine motion model is 4-parameter affine, then only when and When both are established, the constructed affine motion prediction value is inserted into the candidate list, that is, and Used as the estimated CPMV of the upper left (coordinate (x0, y0)) and upper right (coordinate (x1, y1)) positions of the current block.
[0251] -If the current affine motion model is 6-parameter affine, then only when and are established, the constructed affine motion prediction value is inserted into the candidate list, that is, and Used as the estimated CPMV for the top left (coordinate (x0, y0)), top right (coordinate (x1, y1)), and bottom right (coordinate (x2, y2)) positions of the current block.
[0252] When inserting the constructed affine motion predictor into the candidate list, no pruning process is applied.
[0253] 3) Normal AMVP motion prediction value
[0254] Before the number of affine motion predictors reaches the maximum value, the following conditions apply.
[0255] 4) By setting all CPMVs equal to (if available), derive affine motion prediction values.
[0256] 5) By setting all CPMVs equal to (if available), derive affine motion prediction values.
[0257] 6) By setting all CPMVs equal to (if available), derive affine motion prediction values.
[0258] 7) Derive affine motion prediction values by setting all CPMVs equal to HEVC TMVP (if available).
[0259] 8) Derive the affine motion prediction value by setting all CPMVs to zero MV.
[0260] Note that the affine motion prediction values already constructed are derived
[0261] In AF_INTER mode, when using the 4 / 6 parameter affine mode, 2 / 3 control points are required, and therefore 2 / 3 MVDs need to be encoded and decoded for these control points, such as Fig. 20A and Fig. 20B In the existing implementation, MV can be derived as follows, for example, it predicts mvd1 and mvd2 from mvd0.
[0262]
[0263]
[0264]
[0265] In this article, mvd i and mv1 are the predicted motion vector, motion vector difference and motion vector of the upper left pixel (i=0), upper right pixel (i=1) or lower left pixel (i=2), respectively. Fig. 20B In some embodiments, the addition of two motion vectors (e.g., mvA(xA, yA) and mvB(xB, yB)) is equal to the sum of the two components. For example, newMV=mvA+mvB means that the two components of newMV are set to (xA+xB) and (yA+yB), respectively.
[0266] 2.2.6 Example of AF_Merge Mode
[0267] When a CU is applied in AF_MERGE mode, it obtains the first block encoded and decoded in affine mode from the valid adjacent reconstructed blocks. And the selection order of candidate blocks is from left, top, top right, bottom left to top left, such as Fig.23A As shown in (in order represented by A, B, C, D, E). For example, if the adjacent lower left block is Fig. 23B As shown in A0, the encoding and decoding is performed in affine mode, and the control point (CP) motion vector mv0 of the upper left corner, upper right corner and lower left corner of the adjacent CU / PU containing block A is obtained. N 、mv1 N and mv2 N . Based on mv0 N 、mv1 N and mv2 N Calculate the motion vector mv0 of the upper left corner / upper right corner / lower left corner of the current CU / PU C 、mv1 C and mv2 C(Only for 6-parameter affine model). It should be noted that in VTM-2.0, if the current block is affine coded, the sub-block located at the upper left corner (e.g., 4×4 block of VTM) stores mv0, and the sub-block located at the upper right corner stores mv1. If the current block is coded with a 6-parameter affine model, the sub-block located at the lower left corner stores mv2; otherwise (in the case of a 4-parameter affine model), LB stores mv2'. The other sub-blocks store MVs for MC.
[0268] After calculating the CPMV of the current CU v0 and v1 according to the affine motion model in equations (1) and (2), the MVF of the current CU can be generated. In order to identify whether the current CU is encoded or decoded in AF_MERGE mode, when at least one neighboring block is encoded or decoded in affine mode, an affine flag can be signaled in the bitstream.
[0269] In some embodiments, the affine merge candidate list can be constructed using the following steps:
[0270] 1) Insert inherited affine candidates
[0271] Inheriting affine candidates means that the candidates are derived from the affine motion models of their valid neighboring affine codec blocks. On a common basis, such as Fig.24 As shown, the scanning order of candidate positions is: A1, B1, B0, A0 and B2.
[0272] After deriving the candidates, a full pruning process is performed to check if the same candidate has been inserted into the list. If there is an identical candidate, the derived candidate is discarded.
[0273] 2) Insert the constructed affine candidate
[0274] If the number of candidates in the affine Merge candidate list is less than MaxNumAffineCand (set to 5 in this contribution), the constructed affine candidate is inserted into the candidate list. Constructing an affine candidate means constructing a candidate by combining the neighboring motion information of each control point.
[0275] The motion information of the control point is first obtained from Fig.24 The specified spatial and temporal neighbors are derived as shown. CPk (k = 1, 2, 3, 4) represents the kth control point. A0, A1, A2, B0, B1, B2, and B3 are the spatial locations used to predict CPk (k = 1, 2, 3); T is the temporal location used to predict CP4.
[0276] The coordinates of CP1, CP2, CP3 and CP4 are (0,0), (W,0), (H,0) and (W,H), respectively, where W and H are the width and height of the current block.
[0277] The motion information for each control point is obtained according to the following priority order:
[0278] For CP1, the priority of checking is B2→B3→A2. If B2 is available, use B2. Otherwise, if B2 is available, use B3. If neither B2 nor B3 is available, use A2. If none of the three candidates are available, the motion information of CP1 cannot be obtained.
[0279] For CP2, the inspection priority is B1→B0.
[0280] For CP3, the inspection priority is A1→A0.
[0281] For CP4, use T.
[0282] Second, affine merge candidates are constructed using combinations of control points.
[0283] Constructing the 6-parameter affine candidate requires the motion information of three control points. The three control points can be selected from one of the following four combinations: {CP1, CP2, CP4}, {CP1, CP2, CP3}, {CP2, CP3, CP4}, {CP1, CP3, CP4}. The combination {CP1, CP2, CP3}, {CP2, CP3, CP4}, {CP1, CP3, CP4} will be converted into a 6-parameter motion model represented by the top left, top right, and bottom left control points.
[0284] Constructing a 4-parameter affine candidate requires motion information of two control points. These two control points can be selected from one of the following six combinations: {CP1,CP4}, {CP2,CP3}, {CP1,CP2}, {CP2,CP4}, {CP1,CP3}, {CP3,CP4}. The combination {CP1,CP4}, {CP2,CP3}, {CP2,CP4}, {CP1,CP3}, {CP3,CP4} will be converted into a 4-parameter motion model represented by the top left and top right control points.
[0285] The combinations of affine candidates constructed are inserted into the candidate list in the following descending order:
[0286] {CP1,CP2,CP3}, {CP1,CP2,CP4}, {CP1,CP3,CP4}, {CP2,CP3,CP4},{CP1,CP2}, {CP1,CP3}, {CP2,CP3}, {CP1,CP4}, {CP2,CP4}, {CP3,CP4}
[0287] For a combined reference list X (X is 0 or 1), the reference index with the highest usage in the control point is selected as the reference index of list X, and the motion vector pointing to the difference reference picture will be scaled.
[0288] After deriving the candidates, a full pruning process is performed to check if the same candidate has been inserted into the list. If there is an identical candidate, the derived candidate is discarded.
[0289] 3) Fill with zero motion vectors
[0290] If the number of candidates in the affine merge candidate list is less than 5, a zero motion vector with a zero reference index is inserted into the candidate list until the list is full.
[0291] In some embodiments, for the sub-block Merge candidate list, in the 4-parameter Merge candidate, the MV is set to (0,0) and the prediction direction is set to unidirectional prediction (for P slices) and bidirectional prediction (for B slices) from list 0.
[0292] 2.3 Example of Current Picture Reference (CPR)
[0293] Intra-block copying (IBC, or intra-picture block compensation), also known as current picture referencing (CPR), is used in the HEVC Screen Content Coding extension (SCC). This tool is very effective for encoding and decoding screen content videos, because repeated patterns in text and graphic-rich content often appear in the same picture. Using previously reconstructed blocks with the same or similar patterns as prediction values can effectively reduce the prediction error, thereby improving encoding and decoding efficiency. Fig.25 An example of intra block compensation is shown.
[0294] Similar to the CRP design in HEVC SCC, in VVC, the use of IBC mode is signaled at both the sequence and picture levels. When IBC mode is enabled with a sequence parameter set (SPS), it can be enabled at the picture level. When IBC mode is enabled at the picture level, the current reconstructed picture is considered a reference picture. Therefore, no syntax changes are required at the block level to indicate the use of IBC mode in addition to the existing VVC inter-frame mode.
[0295] Some characteristics of CPR include:
[0296] οIt is treated as normal inter mode. Therefore, Merge and Skip modes also apply to IBC mode. The Merge candidate list structure is unified and contains Merge candidates from neighboring positions, which are either coded or decoded in IBC mode or coded or decoded in HEVC inter mode. Depending on the selected Merge index, the current block in Merge or Skip mode can be merged into a neighboring block coded or decoded in IBC mode, or in other ways merged into a neighboring block coded or decoded in normal inter mode with a different picture as reference picture.
[0297] The block vector prediction and coding scheme of the IBC mode reuses the scheme used for motion vector prediction and coding in the HEVC inter-frame mode (AMVP and MVD coding).
[0298] oIBC mode motion vectors (also called block vectors) are encoded and decoded with integer pixel precision, but are stored in memory with 1 / 16 pixel precision after being decoded, because quarter pixel precision is required in the interpolation and deblocking stages. When used for IBC mode motion vector prediction, the stored vector prediction value will be right-shifted by 4.
[0299] οSearch scope: limited to the current CTU.
[0300] ο When Affine Mode / Triangle Mode / GBI / Weighted Prediction is enabled, CPR is not allowed.
[0301] 2.4 Example of ATMVP in VTM-3.0
[0302] ATMVP in VTM-3.0 is much simpler than in JEM. When generating ATMVP Merge candidates, the following steps are applied in order:
[0303] (a) Check in order: Figure 2 The neighboring blocks A1, B1, B0, A0 shown are used to find the first inter-coded but not CPR-coded block, denoted as block X;
[0304] (b) Initialize TMV=(0,0). If there is an MV (denoted as MVn) for block X with reference to the collocated reference picture (as signaled in the slice header), then TMV is set equal to MVn.
[0305] (c) Assuming the center point of the current block is (x0, y0), then locate the corresponding position of (x0, y0) in the collocated image as M = (x0 + MV*x, y0 + MV*y). Find the block Z covering M
[0306] (i) If Z is intra-coded, ATMVP is not applicable;
[0307] (ii) If Z is inter-coded, MVZ_0 and MVZ_1 of the two lists of block Z are scaled to (Reflist0 index 0) and (Reflist 1 index 1) as MVdefault0, MVdefault1, and stored.
[0308] (d) For each 8×8 sub-block, assume its center point is (x0S, y0S), then locate the corresponding position of (x0S, y0S) in the collocated picture as MS=(x0S+MV*x, y0S+MV*y). Find the block ZS covering MS.
[0309] (i) If ZS is intra-coded, MVdefault0 and MVdefault1 are assigned to the sub-block;
[0310] (ii) If the ZS is inter-coded, MVZS_0 and MVZS_1 of the two lists of the block ZS are scaled to (Reflist 0 index 0) and (Reflist 1 index 0) and allocated to the sub-blocks.
[0311] 2.4.1 MV Clipping and Masking in ATMVP
[0312] like Fig.26 As shown in the example in , when the corresponding position (such as M or MS) is located in the collocated picture, it is clipped into the predetermined area. The size of CTU is S×S, and S=128 in VTM-3.0. Assuming that the upper left position of the collocated CTU is (xCTU, yCTU), then the corresponding position M or MS at (xN, yN) will be clipped into the valid area: xCTU<=xN <xCTU+S+4;yCTU<=yN<yCTU+S。
[0313] In addition to clipping, (xN, yN) is masked as xN=xN&MASK, yN=yN&MASK, where MASK is an integer equal to ~(2N-1), and N=3, to set the lowest 3 bits to 0. So xN and yN must be numbers that are multiples of 8. ("~" represents the bitwise complement operator).
[0314] 2.5 Example of Merge List Design in VVC
[0315] Three different Merge list construction processes are supported in VVC:
[0316] (1) Sub-block Merge candidate list: It includes ATMVP and affine Merge candidates. A Merge list construction process is shared for both affine mode and ATMVP mode. Here, ATMVP and affine Merge candidates can be added in sequence. The sub-block Merge list size is signaled in the slice header and the maximum value is 5.
[0317] (2) Unidirectional prediction TPM Merge list: For triangle prediction mode, two partitions share one Merge list construction process, and even the two partitions can select their own Merge candidate indexes. When building the Merge list, the spatial neighbors and two temporal blocks of the block are checked. The motion information derived from the spatial neighbors and temporal blocks is called regular motion candidates in our IDF. These regular motion candidates are further used to derive multiple TPM candidates. Please note that the transformation is performed at the whole block level, and even the two partitions can use different motion vectors to generate their own prediction blocks. In some embodiments, the unidirectional prediction TPM Merge list size is fixed to 5.
[0318] (3) Regular Merge List: For the remaining codec blocks, a Merge list construction process is shared. Here, spatial / temporal / HMVP, paired combined bidirectional prediction Merge candidates, and zero motion candidates can be inserted in order. The regular Merge list size is signaled in the slice header and the maximum value is 6.
[0319] Sub-block Merge candidate list
[0320] It is recommended to put all sub-block related motion candidates in a separate Merge list in addition to the regular Merge list for non-sub-block Merge candidates.
[0321] Sub-block related motion candidates are placed in a separate Merge list, which is named "Sub-block Merge Candidate List".
[0322] In one example, the sub-block Merge candidate list includes affine Merge candidates, ATMVP candidates, and / or sub-block-based STMVP candidates.
[0323] Additional Embodiments
[0324] In some embodiments, the ATMVP Merge candidate in the normal Merge list is moved to the first position of the affine Merge list, so that all Merge candidates in the new list (ie, the sub-block based Merge candidate list) are based on the sub-block codec tool.
[0325] The process of building the sub-block merge candidate list
[0326] In VTM-3.0, in addition to the regular Merge candidate list, a special Merge candidate list is added, called the sub-block Merge candidate list (also called the affine Merge candidate list). The sub-block Merge candidate list is filled with candidates in the following order:
[0327] (a) ATMVP candidates (may be available or not);
[0328] (b) inheritance affine candidate;
[0329] (c) constructed affine candidates;
[0330] (d) MV 4-parameter affine model filled with zeros
[0331] Regular Merge List
[0332] Different from the Merge list design, in VVC, a history-based motion vector prediction (HMVP) method is adopted. In some embodiments, the combined bi-predictive Merge candidate has been replaced by a pair of bi-predictive Merge candidates.
[0333] HMVP
[0334] In HMVP, the motion information of the previously coded blocks is stored. The motion information of the previously coded blocks is defined as HMVP candidates. Multiple HMVP candidates are stored in a table called HMVP table, which is maintained in real time during the encoding / decoding process. When a new slice is started to be coded / decoded, the HMVP table is cleared. Whenever there is an inter-coded block, the associated motion information is added to the last entry of the table as a new HMVP candidate. The entire encoding and decoding process is as follows: Fig. 27 shown.
[0335] HMVP candidates can be used in the AMVP and Merge candidate list building process. Fig.28 The modified Merge candidate list construction process is depicted (highlighted in gray). When the Merge candidate list is not full after the TMVP candidate is inserted, the HMVP candidates stored in the HMVP table can be used to fill the Merge candidate list. Considering that a block usually has a higher correlation with the nearest neighboring block in terms of motion information, the HMVP candidates in the table are inserted in descending order of index. The last entry in the table is added to the list first, and the first entry is added to the end. Similarly, redundancy elimination also applies to HMVP candidates. Once the total number of available Merge candidates reaches the maximum number of Merge candidates allowed for signaling, the Merge candidate list construction process is terminated.
[0336] Pairwise Average Candidate
[0337] The pairwise average candidate is generated by averaging the predefined candidate pairs in the current Merge candidate list, and the predefined candidate pairs are defined as {(0,1), (0,2), (1,2), (0,3), (1,3), (2,3)}, where these numbers represent the Merge index of the Merge candidate list. The average motion vector is calculated separately for each reference list. If two motion vectors are available in one list, they are averaged even if they point to different reference pictures; if only one motion vector is available, the motion vector is used directly; if no motion vector is available, the list is kept invalid. The pairwise average candidate replaces the combined candidate in the HEVC standard. Assuming that the MVs of the two Merge candidates are MV0 = (MV0x, MV0y) and MV1 = (MV1x, MV1y), the MV of the pairwise Merge candidate represented as MV* = (MV*x, MV*y) is derived as
[0338] MV*x=(MV0x+MV1x) / 2;
[0339] MV*y=(MV0y+MV1y) / 2;
[0340] In addition, when MV0 and MV1 refer to the current picture (i.e. CPR mode), MV*x and MV*y are further rounded to remove the part with higher precision than full pixels, thus ensuring that integer MVs are obtained:
[0341] MV*x=(MV*x / 16)<<4;
[0342] MV*y=(MV*y / 16)<<4;
[0343] Note that for each pair, if one of the two is coded with CPR and the other is not, such a pair is not allowed to generate pairwise average candidates.
[0344] General Merge list building process
[0345] When predicting a block using the normal Merge mode, an index pointing to an entry in the normal Merge candidate list is parsed from the bitstream and used to retrieve motion information. The structure of this list is specified in the current VVC standard and can be summarized according to the following sequence of steps, where the steps that have changed compared to HEVC are followed by (*):
[0346] Step 1 : Initial candidate derivation
[0347] Step 1.1: Spatial Candidate Derivation
[0348] Step 1.2: Redundancy check / removal of spatial candidates
[0349] οStep 1.3: Time Domain Candidate Derivation
[0350] Step 1.4: HMVP candidates for redundancy check / removal (newly introduced by VVC compared to HEVC) (*)
[0351] Step 2 : Virtual candidate insertion
[0352] Step 2.1: Create paired bi-directional prediction candidates (replacing the original combined bi-directional prediction candidates in HEVC) (*)
[0353] Step 2.2: Insert default motion candidate (zero motion candidate)
[0354] 3 Disadvantages of existing implementation methods
[0355] In existing implementations (eg, the current design of VVC), three different Merge lists are utilized in different processes, which increases the hardware implementation cost.
[0356] (1) For the sub-block Merge candidate list, in the 4-parameter Merge candidate, the MV is set to (0,0) and the prediction direction is set to unidirectional prediction (for P slices) and bidirectional prediction (for B slices) from list 0. Such a design will generate duplicate candidates.
[0357] (2) The second set of weighting factors is used when any of the following conditions is true:
[0358] (i) The reference pictures of the two triangle prediction units are different from each other.
[0359] (ii) The absolute value of the difference between the horizontal values of the two motion vectors is greater than 16 pixels.
[0360] (iii) The absolute value of the difference between the vertical values of the two motion vectors is greater than 16 pixels.
[0361] Some existing implementations do not fully consider the diversity of blocks.
[0362] (3) With the current design in the TPM Merge list construction process, after inserting all TPM candidates, there may be less than 5 candidates. It is necessary to solve how to fill the remaining TPM candidate list.
[0363] (4) The embodiments described in PCT / CN2018 / 115183 provide some solutions for reusing the conventional Merge list for deriving the TPM candidate list and virtual candidates, but there is still some room for further improving the encoding and decoding efficiency.
[0364] (5) The signaling notification of the TPM flag applied at the block level depends on the SPS flag and the stripe type. However, such information is the same for all blocks within a stripe. Checking these conditions introduces a complexity burden in the parsing process.
[0365] 4 Example Methods for Default Motion Candidates for Video Codecs
[0366] Embodiments of the currently disclosed technology overcome the shortcomings of existing implementations, thereby providing a video codec with higher codec efficiency. Based on the disclosed technology, the use of default motion candidates for video codecs can enhance existing and future video codec standards, as described in the following examples described for various implementations. The examples of the disclosed technology provided below explain the general concepts and are not meant to be interpreted as limitations. In the examples, the various features described in these examples can be combined unless explicitly indicated to the contrary. It should be noted that some of the proposed techniques can be applied to existing candidate list construction processes.
[0367] In some embodiments, a default motion candidate is derived and can be used to fill in the last few candidates in the candidate list. The default motion candidate can be added to the list in a repeated manner, such as multiple identical default motion candidates. Conventional motion candidates are defined as motion candidates whose motion information is derived from previously encoded blocks (e.g., adjacent or non-adjacent spatial / temporal blocks). HMVP candidates can also be considered as conventional motion candidates. Candidates derived from multiple previously encoded blocks (e.g., ATMVP / STMVP candidates) can also be considered as conventional motion candidates.
[0368] In some embodiments, "triangular partitioning pattern" is used to represent an example of a non-square / non-rectangular partitioning pattern (TPM), and the motion vector prediction candidates inserted into the TPM candidate list are named "TPM candidates". It should be noted that other kinds of partitioning may also be applicable. The proposed method for TPM candidate lists may be applied to any other motion candidate lists for non-square / non-rectangular partitioning, such as geometric partitioning.
[0369] Example 1. For the affine / sub-block Merge candidate list, the 6-parameter affine Merge candidate can be used as the default motion candidate.
[0370] (a) In one example, for the default motion candidate, MV is set to (0,0), and the prediction direction is set to uni-directional prediction (for P slices) and bi-directional prediction (for B slices) from list 0.
[0371] Example 2. For a default motion candidate to be added to the Affine / Sub-Block Merge candidate list, the reference picture index may be set to K (K is a non-zero integer value).
[0372] (a) In one example, several default motion candidates may be added based on an increasing order of reference index (also referred to as reference picture index in this document).
[0373] Example 3. The affine model type of the default motion candidate to be added to the Affine / Sub-Block Merge candidate list may depend on the available motion candidates.
[0374] (a) In one example, the default motion candidate to be added may reuse the same affine model type as that of the first available motion candidate.
[0375] (b) Alternatively, the default motion candidate to be added may reuse the same affine model type as the most common affine model type among some or all available motion candidates.
[0376] Example 4. The default motion candidates of the TPM candidate list can be modified in the following ways:
[0377] (a) In one example, default motion candidates may be repeatedly added to populate the TPM candidate list until it is full.
[0378] (i) In one example, such a candidate (named repeated motion candidate) has zero MV, a prediction from list 0 or list 1, and a reference index equal to M (eg, M=0).
[0379] (ii) The repeated motion candidate is associated with a reference index set to M, where M may be predefined or signaled in SPS / VPS / PPS / picture header / slice header / slice group header / CTU.
[0380] (iii) The repeated motion candidate is associated with a reference index set to M, where M may be the index associated with the collocated picture.
[0381] (iv) Repeated motion candidates are associated with prediction directions (ie, from list 0 or list 1), which may depend on the slice / slice / picture type.
[0382] (b) In one example, first, zero motion vectors associated with reference indices from zero to the number of reference pictures in list 0 minus one are used to fill any remaining entries in order; second, zero motion vectors associated with reference indices from zero to the number of reference pictures in list 1 minus one are used to fill any remaining entries in order; finally, repeated motion candidates with zero MV and given reference picture index are added multiple times in list 0 (or list 1) to fill any remaining entries in order.
[0383] (i) Assume that list 0 and list 1 have NumRefL0 and NumRefL1 reference pictures respectively. Add the following candidate C(mv(x,y), reference index, prediction direction) in order until the list is full:
[0384] C(mv(0,0),0,List0),C(mv(0,0),1,List0)..C(mv(0,0),NumRefL0-1,List0),
[0385] C(mv(0,0),0,List1),C(mv(0,0),1,List1)..C(mv(0,0),NumRefL1-1,List1),
[0386] C(mv(0,0),M,list0),C(mv(0,0),M,list0)..C(mv(0,0),M,list0).
[0387] (c) Alternatively, for each reference picture index, two default motion candidates with zero MV and the same reference picture index are added to both lists in order. The candidates are inserted also based on the ascending order of the reference picture index until it reaches the minimum number of reference pictures in all reference picture lists. Finally, repeated motion candidates with zero MV and a given reference picture index are added multiple times in List 0 (or List 1) to fill any remaining entries in order.
[0388] (i) Assume that list 0 and list 1 have NumRefL0 and NumRefL1 reference pictures respectively. Add the following candidate C(mv(x,y), reference index, prediction direction) in order until the list is full:
[0389] C(mv(0,0),0,list0),C(mv(0,0),0,list1),
[0390] C(mv(0,0),1,list0),C(mv(0,0),1,list1),
[0391] …
[0392] C(mv(0,0),min(NumRefL0,NumRefL1)-1,List0),
[0393] C(mv(0,0),min(NumRefL0,NumRefL1)-1,List1),
[0394] C(mv(0,0),M,list0),C(mv(0,0),M,list0)..C(mv(0,0),M,list0).
[0395] In some examples, the variable thresh (set to min(NumRefL0, NumRefL1)-1 in the above example) may be replaced by other values. Alternatively, if the list is still not full, some candidates with zero motion vectors and reference indices greater than or equal to thresh may also be added to the list.
[0396] (d) For the above example, candidates asserting to have ascending order of reference picture index may be replaced by descending order.
[0397] (e) For the above example, the zero motion vector may be replaced by other default motion vectors.
[0398] (f) For the above example, the default motion candidate before adding the repeated motion candidate may be replaced by other kinds of motion candidates having unequal motion vectors.
[0399] Example 5. The reference index / prediction direction of the default motion candidate may depend on the available motion candidates.
[0400] (a) In one example, the default motion candidate to be added may reuse the same reference index / prediction direction as that of the first available motion candidate.
[0401] (b) Alternatively, the default motion candidate to be added may reuse the same reference index / prediction direction as the most common reference index / prediction direction among some or all available motion candidates.
[0402] (c) Alternatively, the reference index of the default motion candidate may depend on a reference picture in a reference picture list. In one example, a reference picture having a minimum POC distance relative to the current picture containing the current block may be used.
[0403] (d) The above method may be called only when there is at least one available motion candidate before the first default motion candidate is added.
[0404] (e) The above method may be called only when there is at least one available motion candidate before the first default motion candidate is added.
[0405] (f) The above method may be applied to the first M (eg, M=1) default motion candidates.
[0406] Example 6. As described in the embodiments of PCT / CN2018 / 115183 filed on November 13, 2018 (the entire disclosure of which is incorporated by reference), a virtual candidate (e.g., a virtual candidate derived from an available candidate) can be used as a default motion candidate. For example, a virtual candidate can be derived based on a normal affine Merge candidate or an available motion candidate of the current block.
[0407] Example 7. The default candidate cannot have a reference picture as the current picture.
[0408] Example 8. As described in the embodiments of PCT / CN2018 / 114057 filed on November 6, 2018 (the entire disclosure of which is incorporated by reference), a virtual TPM candidate (e.g., a virtual candidate derived from an available TPM candidate) can be used as a default motion candidate. For example, a virtual TPM candidate can be derived based on an available TPM motion candidate for the current block.
[0409] Example 9. The above method may also be applied to AMVP candidate lists or other types of sports candidate lists.
[0410] Example 10. It is proposed to treat pairwise average candidates as regular motion candidates, and these candidates can be used to derive TPM candidates.
[0411] (a) In one example, list 0 information of the pairwise average candidate may be used as a TPM candidate and added to the TPM candidate list.
[0412] (b) In one example, list 1 information of the pairwise average candidates may be used as TPM candidates and added to the TPM candidate list.
[0413] (c) Alternatively, one MV from list 0 and another MV from list 1 of a regular motion candidate or two TPM candidates may be averaged to obtain the MV of the TPM candidate.
[0414] Example 11. It is proposed to identify other temporal blocks in addition to the bottom right temporal block and the center collocated temporal block to derive regular motion candidates and use them to derive TPM candidates that can be added to the TPM candidate list.
[0415] (a) In one example, other temporal blocks may be identified through existing conventional motion candidates / TPM candidates.
[0416] (b) Alternatively, only one of the bottom right temporal block and the center collocated temporal block may be examined to derive a regular motion candidate.
[0417] (c) Alternatively, the bottom right temporal block or the center collocated temporal block or both are not used to derive the regular motion candidate. Furthermore, in one example, other positions of the temporal blocks are used instead.
[0418] Example 12. When deriving TPM candidates using regular motion candidates, if the derived TPM candidate has a reference picture associated with the CPR mode (eg, the reference picture is the current picture), such TPM candidate is set to unavailable and therefore does not need to be added to the TPM candidate list.
[0419] (a) In addition, alternatively, the above method is applied only when the current TPM module is not encoded and decoded in CRP mode.
[0420] Example 13. When deriving TPM candidates using regular motion candidates, if the derived TPM candidate has a reference picture not associated with the CPR mode (eg, the reference picture is the current picture), such TPM candidate is set to unavailable and therefore does not need to be added to the TPM candidate list.
[0421] (a) In addition, alternatively, the above method is applied only when the current TPM module is encoded and decoded in CRP mode.
[0422] Example 14. A special set of weighting factors may replace the weighted averaging process for samples located at the edges of diagonals.
[0423] (a) Due to different motion information of multiple partitions, a zero weighting factor is assigned to one of the motion compensation blocks. Therefore, the motion compensation result based on the motion information of another partition is directly used as the final prediction value.
[0424] (b) In one example, the weighting factor set is defined as {0, 0, ... 0} or {1, 1, ... 1}.
[0425] (c) Furthermore, alternatively, for all sub-blocks, the motion information to be stored is unidirectional prediction.
[0426] Example 15. The use of a particular set of weighting factors for a sub-block may depend on the location of the sub-block.
[0427] Example 16. The set of weighting factors for selecting the TPM codec block may depend on the codec mode / MV precision / color component.
[0428] (a) In one example, for the CPR encoding / decoding block (where at least one reference picture is the current picture), the special weighting factors defined above can be utilized.
[0429] (b) In one example, if the two MVs of two partitions are both integer precision, the special weighting factors defined above can be utilized.
[0430] (c) In one example, for the chrominance block, the special weighting factors defined above can be utilized.
[0431] Example 17. The selection of the weighting factor group for the TPM encoding / decoding block can depend on the low latency check flag.
[0432] Example 18. The selection of the weighting factor group for the TPM encoding / decoding block depends on the scaled motion vector difference. Suppose there are two MVs, represented by Mv0(x0,y0) and Mv1(x1,y1) associated with the first partition and the second partition respectively. Mv1 is first scaled to the reference picture pointed by Mv0, and the scaled MV is represented as Mv1’(x1’,y1’).
[0433] (a) The selection of the weighting factor group depends on F(x1’,x0,y1’,y0), where F is a function. If F(x1’,x0,y1’,y0) is greater than or equal to the threshold T, one of the multiple weighting factor groups can be selected (e.g., the second one).
[0434] (i) The threshold T can be predefined. For example, T is (16 << MV_PRECISION), where MV_PRECISION represents the precision of the stored motion vector. For example, if the MV is stored in 1 / 16 pixel, then MV_PRECISION is set to 4.
[0435] (ii) Alternatively, T can be signaled in the SPS / VPS / PPS / picture header / slice header / slice group header / slice / CTU / region.
[0436] (iii) For different modes / different block sizes / strips or slices or picture types, T can also be different.
[0437] (b) In one example, F is defined as max(abs(x1’ – x0), abs(y1’ - y0)).
[0438] (c) Alternatively, F is defined as min(abs(x1’ – x0), abs(y1’ - y0)).
[0439] (d) Alternatively, F is defined as the sum of abs(x1’ – x0) and abs(y1’ - y0).
[0440] (e) Alternatively, F is defined as the average of the two motion vectors Mv0 and Mv1'.
[0441] (f) In one example, the above example can be applied only when the two reference pictures of the two partitions are the same. In addition, alternatively, the two reference pictures cannot be the current pictures.
[0442] (g) Alternatively, the selection of the set of weighting factors may depend on the reference pictures, such as the POC distance between two reference pictures, or the POC distance between a reference picture and the current picture.
[0443] Example 19. Pruning is applied to the regular Merge candidate derivation process without further pruning of TPM candidates derived from the pruned regular Merge candidates.
[0444] (a) In one example, whether pruning is applied may depend on whether the TPM candidate is derived from a bidirectional prediction or a unidirectional regular Merge candidate.
[0445] (i) In one example, only for TPM candidates derived from bi-predictive regular Merge candidates, pruning of other TPM candidates can be applied.
[0446] (a) Furthermore, alternatively, the TPM candidate derived from the bidirectionally predicted regular Merge candidate may be compared with the first L (eg, L is 1 or 2) TPM candidates in the TPM candidate list.
[0447] (b) Furthermore, alternatively, the TPM candidate derived from the bidirectionally predicted regular Merge candidate may be compared with the last L (e.g., L is 1 or 2) TPM candidates in the TPM candidate list constructed before adding the new candidate (i.e., the previously added L TPM candidates before adding the new TPM candidate).
[0448] (ii) In one example, pruning of other TPM candidates may be further applied regardless of what kind of regular Merge candidates are used to derive them.
[0449] (iii) Alternatively, pruning may be applied only to other TPM candidates derived from unidirectionally predicted regular Merge candidates.
[0450] (iv) Alternatively, only for TPM candidates derived from unidirectionally predicted regular Merge candidates, pruning of other TPM candidates may be applied.
[0451] (a) Furthermore, alternatively, a TPM candidate derived from a unidirectionally predicted regular Merge candidate may be compared with the first L (eg, L is 1 or 2) TPM candidates in the TPM candidate list.
[0452] (b) Furthermore, alternatively, the TPM candidate derived from the unidirectionally predicted regular Merge candidate may be compared with the last L (e.g., L is 1 or 2) TPM candidates in the TPM candidate list constructed before adding the new candidate (i.e., the previously added L TPM candidates before adding the new TPM candidate).
[0453] (b) In one example, whether to apply pruning may depend on the prediction direction of a TPM candidate.
[0454] i. In one example, whether pruning is applied may depend on whether the TPM candidate is derived from the motion information of list 0 of bi-predicted normal Merge candidates or from the motion information of list 1 of bi-predicted normal Merge candidates.
[0455] a) In one example, a TPM candidate derived from the motion information of list 0 of bi-predicted regular Merge candidates may be directly added to the TPM candidate list without pruning.
[0456] b) In one example, pruning may be applied to TPM candidates derived from the motion information of list 1 for bi-prediction.
[0457] c) Furthermore, alternatively, a TPM candidate derived from the motion information of list 1 of a bi-predicted normal Merge candidate may be compared with a TPM candidate derived from the motion information of list 0 of the same bi-predicted normal Merge candidate.
[0458] a. Furthermore, alternatively, a TPM candidate derived from list 0 information of a bi-predicted normal Merge candidate may be compared with a TPM candidate derived from motion information of list 1 of the same bi-predicted normal Merge candidate.
[0459] d) Furthermore, alternatively, the TPM candidate derived from the motion information of list 1 of the bi-predicted normal Merge candidates may be compared with the first L (eg, L is 1 or 2) TPM candidates in the TPM candidate list.
[0460] e) In addition, alternatively, the TPM candidate derived from the motion information of list 1 of bidirectionally predicted regular Merge candidates can be compared with the last L (e.g., L is 1 or 2) TPM candidates in the TPM candidate list constructed before adding the new candidate (i.e., the previously added L TPM candidates before adding the new TPM candidate).
[0461] ii. Alternatively, whether and / or how pruning is applied before adding TPM candidates derived from motion information of list 0 or list 1 of bi-predicted normal Merge candidates can be adaptively changed from block to block / region to region / slice to slice / slice group to slice group.
[0462] a) In one example, whether and / or how to apply pruning before adding TPM candidates derived from motion information of list 0 or list 1 of bi-predicted normal Merge candidates may depend on the prediction direction of the first TPM candidate in the list.
[0463] b) Alternatively, whether and / or how to apply pruning before adding a TPM candidate derived from the motion information of list 0 or list 1 of a bi-predictive normal Merge candidate may depend on the prediction direction of the last uni-predictive normal Merge candidate before the bi-predictive normal Merge candidate.
[0464] (c) In one example, pruning may be applied before adding TPM candidates derived from information of List 1 of bidirectionally predicted normal Merge candidates and / or TPM candidates derived from unidirectionally predicted normal Merge candidates.
[0465] i. Furthermore, alternatively, TPM candidates derived from the motion information of list 0 of bi-predicted regular Merge candidates may be added directly to the list without pruning.
[0466] ii. Furthermore, alternatively, whether and / or how pruning is applied may depend on the available TPM candidates in the list before adding the new TPM candidate.
[0467] a) In one example, when a TPM candidate is derived from a regular motion candidate with an index greater than a threshold, it can be directly added to the list without pruning.
[0468] iii. Furthermore, alternatively, whether and / or how pruning is applied may depend on the index of the regular motion candidate from which the TPM candidate is derived.
[0469] b) In one example, when a TPM candidate is derived from a regular motion candidate with an index greater than a threshold, it can be directly added to the list without pruning.
[0470] (d) The above method may be applicable to certain TPM candidates, for example, only to TPM candidates derived from the first bidirectional prediction regular Merge candidate (denoted as TPM sBI ).
[0471] (i) In addition, alternatively, if TPM is added sBIIf there are previously TPM candidates derived from uni-directionally predicted regular motion candidates, pruning can be applied.
[0472] (ii) In addition, alternatively, if the TPM sBI is the same or similar to the last TPM candidate derived from the unidirectional prediction regular Merge candidate, then such a TPM sBI Not added to the TPM candidate list.
[0473] (e) Whether and / or how to apply pruning among TPM candidates may depend on the block size.
[0474] i. In one example, pruning among TPM candidates may be disabled when the width and / or height of a block is greater than a given threshold.
[0475] (f) Whether and / or how to apply pruning among TPM candidates may depend on the low latency check flag in the specification.
[0476] i. Alternatively, whether and / or how to apply pruning among TPM candidates may depend on the reference pictures included in the reference picture list.
[0477] a) In one example, if the picture order count (POC) values of all reference pictures in the reference picture list or both reference picture lists are smaller than the current picture.
[0478] b) In one example, if the picture order count (POC) values of all reference pictures in the reference picture list or both reference picture lists are less than or equal to the current picture.
[0479] ii. Alternatively, whether and / or how to apply pruning among TPM candidates may depend on whether two reference picture lists contain at least one identical reference picture.
[0480] Example 20. Limited pruning is applied to those TPM candidates derived from regular Merge candidates.
[0481] (a) In one example, how many TPM candidates need to be checked (e.g., similar or identical to previously added TPM candidates) can be fixed to K. Once the number of checked TPM candidates K reaches the maximum allowed value (e.g., 5, 6, 7, 8), subsequent TPM candidates can be directly added to the list without pruning. In addition, alternatively, if the number of TPM candidates is less than K before adding a new TPM candidate, partial / full pruning can be applied. In this example, when a new TPM candidate to be added is compared with L (L>1) previously inserted TPM candidates, it is counted once.
[0482] (i) How many TPM candidates need to be checked before a TPM candidate is added (e.g., similar or identical to previously added TPM candidates, K in the above example) can depend on the number of available regular Merge candidates. Alternatively, it can depend on the number of available TPM candidates before pruning, or the block size or stripe / picture / slice type / low latency check flag / block size.
[0483] (b) In one example, how many times a TPM candidate is compared with other TPM candidates can be limited to less than or equal to K. Once the number of pruning operations reaches the maximum allowed value (e.g., K=5, 6, 7, 8), subsequent TPM candidates can be directly added to the list without pruning. In addition, alternatively, if the number of pruning operations is less than K before adding a new TPM candidate, partial / full pruning can be applied. In this example, when a new TPM candidate to be added is compared with L (L>1) previously inserted TPM candidates, it is counted as L times.
[0484] (i) How many times a TPM candidate is compared with other TPM candidates before it is added (i.e., the number of pruning operations, K in the above example) may depend on the number of available regular Merge candidates. Alternatively, it may depend on the number of available TPM candidates before pruning, or the block size or stripe / picture / slice type / low latency check flag.
[0485] (c) How the pruning process is applied (eg, which of the previously added TPM candidates a new TPM candidate should be compared to) may depend on which regular motion candidates those TPM candidates were derived from.
[0486] (d) Furthermore, alternatively, when pruning is enabled for the TPM candidate insertion process, pruning is not applied to the regular Merge candidate derivation process.
[0487] Example 21. The insertion order of list 0 or list 1 motion information from the bi-prediction normal merge candidate may be based on the previous insertion order.
[0488] (a) If two consecutive normal motion candidates (e.g., after pruning) are both bi-predicted, then list X of the first bi-predicted normal motion candidate may be added first before list Y. And list Y of the second bi-predicted normal motion candidate may be added first before list X. X+Y equals 1 and X / Y is 0 or 1.
[0489] (b) If two consecutive normal motion candidates (eg, after pruning) are uni-predicted and bi-predicted from list X, respectively, then list Y of bi-predicted normal motion candidates may be added first before list X. Y is equal to (1 - X).
[0490] (c) If the first available normal motion candidate is bi-predicted, then List 0 of the bi-predicted normal motion candidate may be added first as a TPM candidate, followed by List 1 of the bi-predicted normal motion candidate.
[0491] Example 22. Removed checks for TPM enabled flag at SPS level and stripe type equal to B-stripe at block level.
[0492] (a) A flag at the VPS / PPS / slice header / slice group header / picture header may be signaled to indicate whether TPM may be applied.
[0493] (b) Furthermore, alternatively, if the SPS level TPM enable flag indicates that the TPM should be disabled for the entire sequence, then the above flags need not be signaled and are inferred to be false.
[0494] (c) Furthermore, alternatively, if the slice type is not B-slice, the above flags may not be signaled and are inferred to be false.
[0495] (d) In addition, alternatively, when encoding a block (e.g., a codec unit), the picture level / slice level / slice level flag is checked instead. If the picture level / slice level / slice level flag is false, there is no need to parse the TPM flag for the block, and TPM is not applied to the block.
[0496] Example 23. How to generate the TPM candidate list may depend on the normal Merge list size.
[0497] In one example, when the regular Merge list size is smaller than the TPM candidate list size, more potential TPM candidates, such as virtual TPM candidates / default TPM candidates, etc., may be generated.
[0498] Example 24. Whether and / or how pruning is applied may depend on a low latency check flag in the specification.
[0499] Alternatively, whether to apply pruning among TPM candidates may depend on reference pictures included in the reference picture list.
[0500] In one example, if the picture order count (POC) values of all reference pictures in the reference picture list or both reference picture lists are less than the current picture.
[0501] In one example, if the picture order count (POC) values of all reference pictures in the reference picture list or both reference picture lists are less than or equal to the current picture.
[0502] Alternatively, whether to apply pruning among TPM candidates may depend on whether two reference picture lists contain at least one identical reference picture.
[0503] Example 25. It is proposed to not allow all kinds of motion candidates that may be added after the HMVP candidate to use the previously added HMVP information.
[0504] (a) In one example, HMVP candidates are not allowed to generate pairwise average bi-directional prediction candidates. That is, if one candidate in a combination of two candidates is an HMVP candidate, the next combination is checked instead.
[0505] (b) In one example, HMVP candidates are not allowed to generate combined bi-prediction candidates. That is, if one candidate in the combination of two candidates is an HMVP candidate, the next combination is checked instead.
[0506] Example 26. If a block is coded with a motion candidate derived after checking / inserting the HMVP candidate in the candidate list, the motion information of such block is not allowed to update the HMVP table.
[0507] (a) In one example, if a block is coded using pairwise average bi-directional prediction candidates, such motion information is not allowed to update the HMVP table.
[0508] (b) In one example, if a block is coded with combined bi-prediction candidates, such motion information is not allowed to update the HMVP table.
[0509] (c) In one example, if a block is coded with zero motion candidate, such motion information is not allowed to update the HMVP table.
[0510] (d) In one example, if a block is encoded with other kinds of default motion information checked / added after checking the HMVP candidates, such motion information is not allowed to update the HMVP table.
[0511] Example 27. The above method can be applied to a certain block size.
[0512] (a) In one example, it may be called only if the block width and / or height is less than or equal to M (eg, M is set to 4).
[0513] (b) In one example, only when the block width is less than or equal to M1 (e.g., M1=4)
[0514] And it can be called only when the block height is less than or equal to M2 (for example, M2=4).
[0515] Example 28. It is proposed that when the list (eg, Merge / amvp) is not full after all HMVP candidates are checked, some default motion candidates from the HMVP table are added until the list is full.
[0516] (a) In one example, the last entry of the HMVP table may be added repeatedly.
[0517] (b) Alternatively, the last entry of the HMVP table may be added repeatedly.
[0518] (c) In one example, it is called when the HMVP table is not empty.
[0519] (d) In one example, when the HMVP table is empty, one of the available candidates in the list is added instead.
[0520] (e) Alternatively, multiple HMVP candidates from the HMVP table may be added to populate the candidate list.
[0521] Example 29. How to generate the IBC Merge candidate list may depend on the size of the regular Merge list.
[0522] a. In one example, when the size of the regular Merge list is smaller than the size of the IBC Merge candidate list, more potential IBC Merge candidates, such as virtual IBC Merge candidates / default IBC Merge candidates, may be generated.
[0523] b. The conformant bitstream shall satisfy the signaled IBC Merge candidate index which shall be smaller than the regular Merge list size.
[0524] c. The conforming bitstream shall satisfy that the signaled IBC Merge candidate index shall be less than the maximum number of partial regular Merge lists used to derive IBC Merge candidates.
[0525] d. In one example, the size of the IBC Merge candidate list (the number of IBC Merge candidates in the IBC Merge candidate list) is the same as the size of the regular candidate list.
[0526] e. In one example, a conforming bitstream should satisfy that the size of the IBC Merge candidate list should be no larger than the size of the regular candidate list.
[0527] f. In one example, a conforming bitstream should satisfy that the size of the IBC Merge candidate list should be no greater than P, where P is an integer such as 5.
[0528] g. In one example, a conforming bitstream should satisfy that the size of the IBC Merge candidate list should be no less than P, where P is an integer such as 0 or 1.
[0529] h. In one example, the size of the IBC Merge candidate list may be signaled,
[0530] 1) For example, the size is binarized into a truncated unary code.
[0531] i. In one example, the difference between the size of the IBC Merge candidate list, denoted as C, and an integer P, such as 5, may be signaled. For example, PC or CP is signaled.
[0532] 1) For example, the difference is binarized into a truncated unary code.
[0533] j. In one example, the difference between the size of the IBC Merge candidate list (denoted as C) and the size of the regular candidate list (denoted as P) may be signaled. For example, PC or CP is signaled.
[0534] 1) For example, the difference is binarized into a truncated unary code.
[0535] Example 30. It is proposed whether to reset the HMVP table or not may depend on the use of the IBC mode.
[0536] a. In one example, when IBC is enabled for a sequence / slice group / video codec data, the HMVP table may be reset.
[0537] b. In one example, even if the slice group is an I slice group (such as an I slice), when IBC is enabled for one sequence / slice group / video codec data, the HMVP table may be reset.
[0538] c. In one example, when IBC is enabled for a sequence / slice group / video codec data, the HMVP table may be reset before encoding / decoding a new region (such as a CTU row, slice, slice group).
[0539] The above examples may be incorporated into the context of the methods described below, such as methods 2900 , 3000 , 3100 , 3200 , 3300 , and 3400 , which may be implemented at a video decoder or a video encoder.
[0540] Fig.29 A flow chart of an exemplary method for video processing is shown. Method 2900 includes, at step 2910, identifying a Merge candidate as a default motion candidate.
[0541] Method 2900 includes, at step 2920, adding a Merge candidate to a Merge candidate list based on the identification. In some embodiments, and in the context of Example 1, the Merge candidate includes a 6-parameter affine Merge candidate, and wherein the Merge candidate list includes an affine or sub-block Merge candidate list. In one example, the motion vector of the default motion candidate is set to (0,0). In another example, the prediction direction of the motion vector is set to unidirectional prediction, and wherein the current video block is located in a P slice. In yet another example, the prediction direction of the motion vector is set to bidirectional prediction, and wherein the current video block is located in a B slice.
[0542] In some embodiments, and in the context of Example 2, the Merge candidate list comprises an affine or sub-block Merge candidate list, and the reference picture index of the default motion candidate is set to K, which is a non-negative integer.
[0543] In some embodiments, and in the context of Example 3, the Merge candidate includes an affine model, wherein the Merge candidate list includes an affine or sub-block Merge candidate list, and wherein the type of the affine model is based on the available motion candidates. In an example, the type of the affine model is based on the affine model of the first available motion candidate among the available motion candidates. In another example, the type of the affine model is based on the most commonly used affine model among the available motion candidates.
[0544] The method 2900 includes, at step 2930, reconstructing the current video block based on the Merge candidate list.
[0545] In some embodiments, and in the context of Example 4, the Merge candidate list includes a triangle prediction mode (TPM) candidate list. Method 2900 may also include the following steps: when it is determined that the Merge candidate list is not full, repeatedly adding the default motion candidate to the Merge candidate list. In some embodiments, the default motion candidate is associated with a reference picture index set to a non-negative integer M. In the example, M is predetermined. In another example, M is signaled in a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a slice group header, or a codec tree unit (CTU). In yet another example, M is also associated with a reference picture index of a collocated picture. In yet another example, the prediction direction of the default motion candidate is based on a slice type of the current video block, a slice type of the current video block, or a picture type of the current video block.
[0546] In some embodiments, and in the context of Example 4, the default motion candidate includes a zero motion vector associated with reference picture index 0 in list 0, and method 2900 further includes the steps of: upon determining that the Merge candidate list is not full, adding additional default motion candidates to the Merge candidate list in the following order: associated with reference picture indexes 1 to N List0 -1 is associated with a zero motion vector, and with reference picture indices 0 to N List1 -1 associated zero motion vector; and when it is determined that the Merge candidate list is not full, repeatedly adding the zero motion vector associated with the predetermined reference picture index from list 0 or list 1 to the Merge candidate list, where N List0 and N List1 are integer sizes of list 0 and list 1, respectively. In other embodiments, the default motion candidate includes a zero motion vector associated with reference picture index 0 in list 0, and method 2900 further includes the following steps: upon determining that the Merge candidate list is not full, adding an additional default motion candidate to the Merge candidate list in the following order: a zero motion vector associated with reference picture index 0 in list 1, a zero motion vector associated with reference picture index M in list 0, and a zero motion vector associated with reference picture index M in list 1, where M is equal to 1, 2, ...min(N List0 ,N List1 )-1; and when it is determined that the Merge candidate list is not full, repeatedly adding the zero motion vector associated with the predetermined reference picture index from list 0 or list 1 to the Merge candidate list, where N List0 and N List1 are the integer sizes of list0 and list1 respectively.
[0547] In some embodiments, and in the context of Example 5, the reference picture index or prediction direction of the default motion candidate is based on one or more available motion candidates. In an example, the reference picture index or prediction direction is based on the reference index or prediction direction of the first available motion candidate in the one or more available motion candidates, respectively. In another example, the reference picture index or prediction direction is based on the most commonly used reference index or prediction direction among the one or more available motion candidates, respectively. In these examples, the one or more available motion candidates may include all available motion candidates. In these examples, the one or more available motion candidates may include the first K available motion candidates, where K is a positive integer.
[0548] In some embodiments, and in the context of Example 6, the default motion candidate is associated with a reference picture different from the current picture that includes the current video block.
[0549] In some embodiments, and in the context of Example 9, the Merge candidate list comprises an Advanced Motion Vector Prediction (AMVP) candidate list.
[0550] Fig.30 A flow chart of an exemplary method for video processing is shown. Method 3000 includes, at step 3010, deriving a triangular prediction mode (TPM) candidate from a conventional motion candidate for a current video block. In some embodiments, and in the context of Example 10, the conventional motion candidate includes a pairwise average candidate. In an example, the TPM candidate includes list 0 motion information for the pairwise average candidate. In another example, the TPM candidate includes list 1 motion information for the pairwise average candidate. In yet another example, the TPM candidate includes average motion information of list 0 motion information and list 1 motion information of the conventional motion candidate.
[0551] The method 3000 includes, at step 3020 , selectively adding the TPM candidate to a TPM candidate list.
[0552] The method 3000 includes, at step 3030 , reconstructing the current video block based on the TPM candidate list.
[0553] In some embodiments, and in the context of Example 11, the conventional motion candidate is derived from a lower right collocated temporal block, a center collocated temporal block, or at least one temporal block different from the lower right and center collocated temporal blocks. In an example, at most one temporal block is identified by a conventional motion candidate.
[0554] In some embodiments, and in the context of Example 12, the TPM candidate includes a reference picture that is not associated with a current picture reference (CPR) mode, and wherein the TPM candidate is not added to the TPM candidate list. In other embodiments, the TPM candidate includes a reference picture associated with a current picture reference (CPR) mode, and wherein the TPM candidate is not added to the TPM candidate list.
[0555] Fig.31 A flow chart of an exemplary method for video processing is shown. The method 3100 includes, at step 3110, selecting a weighting factor group when it is determined that the current video block is a triangular prediction mode (TPM) codec block.
[0556] The method 3100 includes, at step 3120, reconstructing the current video block based on the set of weighting factors.
[0557] In some embodiments, and in the context of Example 14, method 3100 further includes the following steps: using a weighting factor group to replace the weighted averaging process. In an example, the weighting factor group is {0, 0, ..., 0}. In another example, the weighting factor group is {1, 1, ..., 1}.
[0558] In some embodiments, and in the context of Example 15, reconstructing the current video block comprises reconstructing a sub-block of the current video block, and wherein selecting the set of weighting factors is based on a position of the sub-block in the current video block.
[0559] In some embodiments, and in the context of Example 16, the selection is further based on at least one of a codec mode of the current video block, a precision of a motion vector associated with the current video block, or a color component of the current video block. In an example, the precision of the motion vector is integer precision. In another example, the color component of the current video block is a chroma component of the current video block.
[0560] In some embodiments, and in the context of Example 17, the selection is also based on the value of a low delay check flag in the bitstream representation of the current video block.
[0561] In some embodiments, and in the context of Example 18, the selection is further based on a scaled motion vector difference associated with the current video block. The method 3100 may also include the step of generating a scaled motion vector MV1'(x1', y1') by scaling the second motion vector to the first motion vector, wherein the first motion vector MV0(x0, y0) is associated with a first partition of the TPM codec block and the second motion vector MV1(x1, y1) is associated with a second partition of the TPM codec block.
[0562] In some embodiments, and continuing in the context of Example 18, F(x1', x0, y1', y0) ≥ T, where F(·) is a function, and where T is a non-negative integer threshold. In one example, T is predetermined. In another example, T is signaled in a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a slice group header, or a codec tree unit (CTU). In yet another example, T is based on the size of the current video block, the codec mode of the current video block, the slice type of the current video block, or the picture type of the current video block.
[0563] In yet another example, F=max(abs(x1′-x0), abs(y1′-y0)).
[0564] In yet another example, F=min(abs(x1′-x0), abs(y1′-y0)).
[0565] In yet another example, F=abs(x1′-x0)+abs(y1′-y0).
[0566] In yet another example, F is the average of MV0 and MV1'.
[0567] In some embodiments, the selection is also based on a picture order count (POC) distance between two reference pictures.
[0568] Fig.32 A flow chart of an exemplary method for video processing is shown. The method 3200 includes, at step 3210, generating pruned triangle prediction mode (TPM) candidates by selectively pruning one or more TPM candidates derived from a plurality of conventional Merge candidates.
[0569] The method 3200 includes, at step 3220 , reconstructing the current video block based on the pruned TPM candidate.
[0570] In some embodiments, and in the context of Example 19, one or more TPM candidates are pruned, and the plurality of regular Merge candidates include uni-directionally predicted or bi-directionally predicted regular Merge candidates.
[0571] In some embodiments, and in the context of Example 20, selectively pruning includes pruning the first K candidates of one or more TPM candidates, where K is an integer. In an example, 5≤K≤8. In another example, the plurality of regular Merge candidates includes a first bidirectionally predicted regular Merge candidate. In yet another example, the one or more TPM candidates are pruned, and the method 3200 may further include the following steps: avoiding pruning the plurality of regular Merge candidates.
[0572] Fig.33 A flow chart of an exemplary method for video processing is shown. The method 3300 includes, at step 3310, inserting a first plurality of motion candidates from a first list and a second plurality of motion candidates from a second list into a candidate list based on an insertion order, wherein the insertion order is based on a previous insertion order of a third plurality of motion candidates into the candidate list.
[0573] The method 3300 includes, at step 3320, reconstructing the current video block based on the candidate list.
[0574] In some embodiments, and in the context of Example 21, the third plurality of motion candidates includes two candidates derived from one bi-directionally predicted normal motion candidate, wherein a candidate from the second list is added before another candidate from the first list, and the insertion order includes the first plurality of motion candidates followed by the second plurality of motion candidates. In other embodiments, the third plurality of motion candidates includes one uni-directionally predicted candidate from the first list, and the insertion order includes the second plurality of motion candidates followed by the first plurality of motion candidates.
[0575] Fig.34A flow chart of an exemplary method for video processing is shown. The method 3400 includes, at step 3410, determining a slice type and a value of a triangle prediction mode (TPM) flag in a sequence parameter set (SPS) associated with a current video block.
[0576] The method 3400 includes, at step 3420, reconstructing the current video block based on the slice type and the value.
[0577] In some embodiments, and in the context of Example 22, the slice type is a B slice. In other embodiments, the TPM flag is further signaled in a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, or a slice group header.
[0578] Yet another exemplary method for video processing includes: checking one or more history-based motion vector prediction (HMVP) candidates for addition to a Merge candidate list; after checking one or more HMVP candidates, checking a set of new motion candidates for addition to the Merge candidate list, wherein each motion candidate in the set of new motion candidates is not based on previously added HMVP information and is not used to update the HMVP table; and reconstructing the current video block based on the set of new motion candidates. In some embodiments, the set of new motion candidates includes paired average bidirectional prediction candidates, combined bidirectional prediction candidates, or zero motion candidates. In other embodiments, the height or width of the current video block is less than or equal to M (e.g., M=4). In yet other embodiments, the method further includes the following steps: after checking one or more HMVP candidates, determining that the Merge candidate list is not full, and repeatedly adding the last entry of the HMVP table to the Merge candidate list until the Merge candidate list is full.
[0579] Yet another exemplary method for video processing includes checking or updating a history-based motion vector prediction (HMVP) table, deriving a motion candidate based on the checking or updating, encoding and decoding a current video block with the motion candidate, and avoiding updating the HMVP table using motion information based on the current video block. In some embodiments, the motion candidate is a pairwise average bidirectional prediction candidate, a combined bidirectional prediction candidate, a zero motion candidate, or a default motion candidate. In other embodiments, the height or width of the current video block is less than or equal to M. In one example, M=4.
[0580] 5 Example Embodiments of Default Motion Candidates for Video Codecs
[0581] The following exemplary embodiments are related to a TPM candidate list construction process, where the TPM candidate list size is denoted by M.
[0582] Example #1: TPM's Unidirectional Prediction Candidate List (with Default Motion Candidates)
[0583] In this embodiment, there is no pruning when inserting TPM candidates into the candidate list, however, there is pruning for the regular motion candidate derivation process.
[0584] The example is described as follows: The following steps are involved to unify the TPM list and the regular Merge list as much as possible (in one example, the first three steps can be the same as the regular Merge list):
[0585] 1. Use pruning (e.g., limited pruning in the same way as a regular Merge list) to remove the entries from A1, B1, B0, A0, B2 (corresponding to Fig.14 Blocks 1-5 in the above example obtain conventional motion candidates.
[0586] 2. From Col1 or Col2 (corresponding to Fig.14 Blocks 6-7 in the above example) obtain conventional motion candidates
[0587] 3. Obtain regular motion candidates from HMVP candidates using pruning (eg, pruning in the same manner as regular Merge lists).
[0588] 4. Set the variable numCurrMrgCand = 0
[0589] 5. For each available regular motion candidate after pruning, and numCurrMrgCand is less than M, perform the following steps to add the TPM candidate to the list:
[0590] - If the normal motion candidate is uni-directionally predicted (from list 0 or list 1), it is directly added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1.
[0591] - If the normal motion candidate is bi-predicted, add the following two candidates in order.
[0592] i) The motion information from list 0 is added to the TPM Merge list as a new TPM candidate (ie, modified to be uni-directional prediction from list 0), and numCurrMrgCand is increased by 1.
[0593] ii) The motion information from List 1 is added to the TPM Merge list (ie modified to be unidirectional prediction from List 1), and numCurrMrgCand is increased by 1.
[0594] 6. If numCurrMrgCand is less than M, add default motion candidates in the following steps in order until numCurrMrgCand is equal to M:
[0595] - Set variable numRef = minimum(number of reference pictures in list 0, number of reference pictures in list 1).
[0596] - for each i is 0…numRef-1,
[0597] i) Add a default motion candidate with MV set to (0,0), and reference picture index set to i, prediction direction set to list 0, and numCurrMrgCand increased by 1.
[0598] ii) Add a default motion candidate with MV set to (0,0), and reference picture index set to i, prediction direction set to list 1, and numCurrMrgCand increased by 1.
[0599] -Set variable numPrevMrgCand = numCurrMrgCand.
[0600] - For i is 0 ... (M - numPrevMrgCand - 1), add a default motion candidate with MV set to (0,0), and reference picture index set to 0, prediction direction set to list 0, and numCurrMergeCand increased by 1.
[0601] Alternatively, step 6 can be replaced by:
[0602] 6. If numCurrMergeCand is less than M, add default motion candidates in the following steps in order until numCurrMergeCand is equal to M:
[0603] - Set variable numRefList0 = number of reference pictures in list0.
[0604] i) For each i is 0...numRefList0-1, add a default motion candidate with MV set to (0,0), and reference picture index set to i, prediction direction set to list 0, and numCurrMrgCand increased by 1.
[0605] - Set variable numRefList1 = number of reference pictures in list1.
[0606] i) for each i is 0...numRefList1-1, add a default motion candidate with MV set to (0,0) and reference picture index set to i and prediction direction set to list1,
[0607] And numCurrMrgCand increases by 1.
[0608] -Set variable numPrevMrgCand = numCurrMrgCand.
[0609] - For i is 0 ... (M - numPrevMrgCand - 1), add a default motion candidate with MV set to (0,0), and reference picture index set to 0, prediction direction set to list 0, and numCurrMrgCand increased by 1.
[0610] Example #2: TPM's Unidirectional Prediction Candidate List (with Bidirectional Prediction Regular Merge Candidates from List 0 / List 1) Adaptive order of derived TPM candidates)
[0611] The following steps are involved to unify the TPM list and the regular Merge list as closely as possible (in one example, the first three steps may be the same as for the regular Merge list):
[0612] 1. Use pruning (e.g., limited pruning in the same way as a regular Merge list) to remove the entries from A1, B1, B0, A0, B2 (corresponding to Fig.14 Blocks 1-5 in the above example obtain conventional motion candidates
[0613] 2. From Col1 or Col2 (corresponding to Fig.14 Blocks 6-7 in the above example) obtain conventional motion candidates
[0614] 3. Obtain regular motion candidates from HMVP candidates using pruning (eg, pruning in the same manner as regular Merge lists).
[0615] 4. Set variables numCurrMrgCand = 0, prevDir = List1;
[0616] 5. For each regular motion candidate, and numCurrMrgCand is less than 5, perform the following steps to add the TPM candidate to the list:
[0617] - If the normal motion candidate is unidirectionally predicted (from list 0 or list 1), it is directly added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1. And prevDir is set to the direction of the unidirectionally predicted normal Merge candidate;
[0618] - If the normal motion candidate is bi-predicted, add the following two candidates in order.
[0619] i) Set variable currDir=prevDir==list0?list1:list0.
[0620] ii) The motion information from currDir is added to the TPMMerge list as a new TPM candidate (ie modified to be a unidirectional prediction from currDir), and numCurrMrgCand is incremented by 1.
[0621] iii) The motion information from prevDir is added to the TPM Merge list (ie, modified to be a unidirectional prediction from prevDir), and numCurrMrgCand is increased by 1.
[0622] iv) prevDir = currDir;
[0623] 6. If numCurrMrgCand is less than M, add default motion candidates in order until numCurrMrgCand is equal to M, such as the process in embodiment #1.
[0624] Embodiment #3: Unidirectional prediction candidate list for TPM (with limited pruning among TPM candidates)
[0625] The following steps are involved to unify the TPM list and the regular Merge list as closely as possible (in one example, the first three steps may be the same as for the regular Merge list):
[0626] 1. Use pruning (e.g., limited pruning in the same way as a regular Merge list) to remove the entries from A1, B1, B0, A0, B2 (corresponding to Fig.14 Blocks 1-5 in the above example obtain conventional motion candidates
[0627] 2. From Col1 or Col2 (corresponding to Fig.14 Blocks 6-7 in the above example) obtain conventional motion candidates
[0628] 3. Obtain regular motion candidates from HMVP candidates using pruning (eg, pruning in the same manner as regular Merge lists).
[0629] 4. Set the variable numCurrMrgCand = 0, isFirstUsedBi to false;
[0630] 5. For each regular motion candidate, and numCurrMrgCand is less than 5, perform the following steps to add the TPM candidate to the list:
[0631] - If the normal motion candidate is uni-directionally predicted (from list 0 or list 1), it is added directly to the Merge list as a TPM candidate (indicated by TPM[numCurrMrgCand]) and numCurrMrgCand is increased by 1.
[0632] - If the normal motion candidate is bi-predicted, add the following two candidates in order.
[0633] i) Set the variable numPrevMrgCand = numCurrMrgCand.
[0634] ii) The motion information from list 0 is added to the TPM Merge list as a new TPM candidate (i.e., modified to be a unidirectional prediction from list 0), represented by TPM[numCurrMrgCand],
[0635] - If numCurrMrgCand is non-zero, isFirstUsedBi is true, and TPM[numCurrMrgCand] is the same as TPM[numPrevMrgCand-1], go to step iii).
[0636] - Otherwise, add TPM[numCurrMrgCand] and increase numCurrMrgCand by 1.
[0637] iii) The motion information from List 1 is added to the TPM Merge list (i.e., modified to be a unidirectional prediction from List 1), represented by TPM[numCurrMrgCand],
[0638] - If numCurrMrgCand is non-zero, isFirstUsedBi is true, and TPM[numCurrMrgCand] is the same as TPM[numPrevMrgCand-1], go to the next regular Merge candidate.
[0639] - Otherwise, add TPM[numCurrMrgCand] and increase numCurrMrgCand by 1.
[0640] iv)isFirstUsedBi is set to false.
[0641] 6. If numCurrMrgCand is less than M, add default motion candidates in order until numCurrMrgCand is equal to M, such as the process in embodiment #1.
[0642] Example #4: Unidirectional prediction candidate list for TPM (no pruning for regular motion candidates and no pruning for TPM Candidates undergo limited pruning)
[0643] The following steps are involved to derive the TPM list and remove the redundancy check (pruning process) of conventional motion candidates and apply TPM candidate pruning. Note that the redundancy check / pruning process refers to checking the element to be added to the list to see if the element is redundant and determining the subsequent steps accordingly. The subsequent step can be to discard the element. The subsequent step can also remove the existing element in the list that is redundant and add the element to the list.
[0644] The example description is as follows:
[0645] 1. From A1, B1, B0, A0, B2 (corresponding to Fig.14 Blocks 1-5 in (a) obtain regular motion candidates without pruning
[0646] 2. From Col1 and / or Col2 (corresponding to Fig.14 Blocks 6-7 in (a) obtain regular motion candidates without pruning
[0647] 3. Obtain regular motion candidates from HMVP candidates without pruning.
[0648] 4. Set variables numCurrMrgCand = 0, numCheckedCanD = 0;
[0649] 5. For each available regular motion candidate, and numCurrMrgCand is less than M, perform the following steps to add the TPM candidate to the list:
[0650] - if the normal motion candidate is uni-directionally predicted (from list 0 or list 1),
[0651] 1) If numCheckedCand is less than Thres, pruning is applied to the regular motion candidate. If the pruning process returns false (i.e., no identical or similar TPM candidate is found), such a regular motion candidate is added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1. Otherwise, it will be directly added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1.
[0652] 2) numCheckedCand increases by 1.
[0653] - If the normal motion candidate is bi-predicted, add the following two candidates in order.
[0654] 1) The motion information from list 0 (ie modified to uni-directional prediction from list 0) is set as the first new TPM candidate.
[0655] 2) If numCheckedCand is less than Thres, pruning is applied to the first new TPM candidate. If the pruning process returns false (i.e., no identical or similar TPM candidates are found), such first new TPM candidate is added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1. Otherwise, it will be directly added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1.
[0656] 3) numCheckedCand increases by 1.
[0657] 4) The motion information from list 1 (ie modified to be uni-directional prediction from list 1) is set as the second new TPM candidate.
[0658] 5) If numCheckedCand is less than Thres, pruning is applied to the second new TPM candidate. If the pruning process returns false (i.e., no identical or similar TPM candidates are found), such second new TPM candidate is added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1. Otherwise, it is directly added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1.
[0659] 6) numCheckedCand increases by 1.
[0660] 6. If numCurrMrgCand is less than M, add default motion candidates in order until numCurrMrgCand is equal to M, such as the process in embodiment #1.
[0661] The variable Thres may be predefined, such as 5 or 6. Or it may be adaptively changed based on how many regular motion candidates are available.
[0662] Example #5: Unidirectional prediction candidate list for TPM (with limited TPM pruning)
[0663] The example is described as follows: The following steps are involved to unify the TPM list and the regular Merge list as much as possible. In one example, the regular Merge list construction process before calling the virtual Merge candidate (i.e., terminated immediately after the HMVP candidate checking process) is reused to obtain the regular motion candidate. Alternatively, the regular Merge list construction process before calling the HVMP Merge candidate checking process (i.e., terminated immediately after the TMVP candidate checking process or after the spatial Merge candidate checking process) is reused to obtain the regular motion candidate.
[0664] 1. Set the variable numCurrMrgCand = 0
[0665] 2. For each available regular motion candidate after pruning, and numCurrMrgCand is less than M, perform the following steps to add the TPM candidate to the list:
[0666] - If the normal motion candidate is uni-directionally predicted (from list 0 or list 1), the following conditions apply:
[0667] i) It is directly added to the Merge list as a TPM candidate, where numCurrMrgCand is increased by 1.
[0668] ii) Alternatively, if numCurrMrgCand is equal to 0, it is directly added to the Merge list as a TPM candidate, where numCurrMrgCand is increased by 1, and if numCurrMrgCand is not equal to 0 and it is different from the previous TPM candidate with index equal to (numCurrMrgCand-1), it is added to the Merge list as a TPM candidate, where numCurrMrgCand is increased by 1.
[0669] iii) Alternatively, if numCurrMrgCand is not equal to 0 and it is different from the first TPM candidate with index equal to 0, it is added to the Merge list as a TPM candidate with numCurrMrgCand increased by 1.
[0670] iv) Alternatively, if numCurrMrgCand is not equal to 0 and it is different from the first or previous L TPM candidates, then it is added to the Merge list as a TPM candidate with numCurrMrgCand incremented by 1.
[0671] - If the normal motion candidate is bi-predicted, add the following two candidates in order.
[0672] i) The motion information from list 0 is added to the TPM Merge list as a new TPM candidate (ie, modified to be uni-directional prediction from list 0), and numCurrMrgCand is increased by 1.
[0673] (1) Alternatively, if numCurrMrgCand is not equal to 0 and it is different from the previous TPM candidate with index equal to (numCurrMrgCand-1), it is added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1.
[0674] (2) Alternatively, if numCurrMrgCand is not equal to 0 and it is different from the first TPM candidate with index equal to 0, it is added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1.
[0675] (3) Alternatively, if numCurrMrgCand is not equal to 0 and it is different from the first or previous L TPM candidates, it is added to the Merge list as a TPM candidate, with numCurrMrgCand incremented by 1.
[0676] ii) If the motion information from List 1 is different from the previous TPM candidate with index equal to (numCurrMrgCand-1), it is added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1.
[0677] (1) Alternatively, it is added to the TPM Merge list (i.e., modified to be a unidirectional prediction from list 1), and numCurrMrgCand is incremented by 1.
[0678] (2) Alternatively, if it is different from the first TPM candidate with index equal to 0, it is added to the Merge list as a TPM candidate, with numCurrMrgCand increased by 1.
[0679] (3) Alternatively, if it is different from the first / previous L TPM candidates, it is added to the Merge list as a TPM candidate with numCurrMrgCand increased by 1.
[0680] 3. If numCurrMrgCand is less than M, default motion candidates will be added in the following steps in order until numCurrMrgCand is equal to M:
[0681] a) Set variable numRef = minimum(number of reference pictures in list 0, number of reference pictures in list 1).
[0682] b) For each i from 0…numRef-1,
[0683] i) Add a default motion candidate with MV set to (0,0), and reference picture index set to i, prediction direction set to list 0, and numCurrMrgCand increased by 1.
[0684] ii) Add a default motion candidate with MV set to (0,0), and reference picture index set to i, prediction direction set to list 1, and numCurrMrgCand increased by 1.
[0685] c) Repeat the above step 2).
[0686] In one example, M is set to 5.
[0687] The default motion candidate used in step 3 may be replaced by other kinds of default motion candidates.
[0688] As mentioned above, whether two candidates are different can be defined as follows:
[0689] 1) If the low delay check flag is false (such as in a random access configuration), or all reference pictures have smaller and / or equal POC values than the current picture, then two candidates are always considered different.
[0690] 2) If the POC values of the reference pictures of two candidates are different, or the motion vectors of two candidates are different, they are considered different.
[0691] 3) If the prediction directions or reference picture indices of two candidate reference pictures are different, or the motion vectors of two candidates are different, they are considered different.
[0692] For the above embodiments, it should be noted that different spatial / temporal blocks and / or different checking orders can be used to derive conventional motion candidates compared to the spatial / temporal blocks and / or checking orders used in the conventional Merge candidate list. Steps 1)-3) can also be replaced by other kinds of conventional motion candidate derivation processes for non-triangular block encoding and decoding.
[0693] It should also be noted that when a new TPM candidate is added, pruning / partial pruning / full pruning may not be invoked on previously added TPM candidates.
[0694] A regular motion candidate may be first compared with other regular motion candidates, and if it is the same or similar to another, such regular motion candidate is not used to derive a TPM candidate.
[0695] In addition to the above steps, other kinds of TPM candidates may be derived and added to the TPM candidate list, such as the average of two TPM candidates / the average MV of a bi-predicted normal motion candidate / a new TPM candidate derived from an existing TPM candidate with an offset, etc.
[0696] 6 Example Implementations of the Disclosed Technology
[0697] Fig.353500 is a block diagram of a video processing device 3500. Device 3500 can be used to implement one or more of the methods described herein. Device 3500 can be embodied in a smart phone, a tablet computer, a computer, an Internet of Things (IoT) receiver, etc. Device 3500 may include one or more processors 3502, one or more memories 3504, and video processing hardware 3506. (Multiple) processors 3502 can be configured to implement one or more methods described in this document (including but not limited to methods 2900, 3000, 3100, 3200, 3300, and 3400). Memory (multiple memories) 3504 can be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 3506 can be used to implement some of the techniques described in this document in hardware circuits.
[0698] In some embodiments, the video encoding and decoding method can use the reference Fig.35 The device is implemented on the hardware platform.
[0699] The following list of clauses describes example embodiments that implement some of the disclosed techniques.
[0700] 1. A method for video processing, comprising: identifying a Merge candidate as a default motion candidate; adding the Merge candidate to a Merge candidate list based on the identification; and reconstructing a current video block based on the Merge candidate list.
[0701] 2. The method of clause 1, wherein the Merge candidates comprise 6-parameter affine Merge candidates, and wherein the Merge candidate list comprises an affine or sub-block Merge candidate list.
[0702] 3. A method according to clause 2, wherein the motion vector of the default motion candidate is set to (0,0).
[0703] 4. The method of clause 3, wherein the prediction direction of the motion vector is set to uni-directional prediction, and wherein the current video block is located in a P slice.
[0704] 5. The method of clause 3, wherein the prediction direction of the motion vector is set to bi-directional prediction, and wherein the current video block is located in a B slice.
[0705] 6. The method of clause 1, wherein the Merge candidate list comprises an affine or sub-block Merge candidate list, wherein the reference picture index of the default motion candidate is set to K, and wherein K is a non-negative integer.
[0706] 7. The method of clause 1, wherein the Merge candidate comprises an affine model, wherein the Merge candidate list comprises an affine or sub-block Merge candidate list, and wherein the type of the affine model is based on available motion candidates.
[0707] 8. The method of clause 7, wherein the type of the affine model is based on an affine model of a first available motion candidate among the available motion candidates.
[0708] 9. The method of clause 7, wherein the type of affine model is based on the most common affine model among the available motion candidates.
[0709] 10. The method of clause 1, wherein the Merge candidate list comprises a triangle prediction mode (TPM) candidate list.
[0710] 11. The method according to clause 10, further comprising: when it is determined that the Merge candidate list is not full, repeatedly adding the default motion candidate to the Merge candidate list.
[0711] 12. The method of clause 11, wherein the default motion candidate is associated with a reference picture index set to M, where M is a non-negative integer.
[0712] 13. The method of clause 12, wherein M is predetermined.
[0713] 14. A method according to clause 12, wherein M is signaled in a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a slice group header or a codec tree unit (CTU).
[0714] 15. The method of clause 12, wherein M is also associated with a reference picture index of the collocated picture.
[0715] 16. The method of clause 12, wherein the prediction direction of the default motion candidate is based on a slice type of the current video block, a slice type of the current video block, or a picture type of the current video block.
[0716] 17. A method according to clause 10, wherein the default motion candidate comprises a zero motion vector associated with reference picture index 0 in list 0, and wherein the method further comprises: upon determining that the Merge candidate list is not full, adding additional default motion candidates to the Merge candidate list in the following order: zero motion vectors associated with reference picture indexes 1 to NList0-1, and zero motion vectors associated with reference picture indexes 0 to NList1-1; and upon determining that the Merge candidate list is not full, repeatedly adding zero motion vectors associated with predetermined reference picture indexes from list 0 or list 1 to the Merge candidate list, wherein N List0 and N List1 are the integer sizes of list0 and list1 respectively.
[0717] 18. A method according to clause 10, wherein the default motion candidate includes a zero motion vector associated with reference picture index 0 in list 0, and wherein the method further comprises: upon determining that the Merge candidate list is not full, adding an additional default motion candidate to the Merge candidate list in the following order: a zero motion vector associated with reference picture index 0 in list 1, a zero motion vector associated with reference picture index M in list 0, and a zero motion vector associated with reference picture index M in list 1, where M is an integer equal to 1, 2, …min(NList0, NList1)-1; and upon determining that the Merge candidate list is not full, repeatedly adding the zero motion vector associated with a predetermined reference picture index from list 0 or list 1 to the Merge candidate list, where N List0 and N List1 are the integer sizes of list0 and list1 respectively.
[0718] 19. The method of clause 1, wherein a reference picture index or prediction direction of a default motion candidate is based on one or more available motion candidates.
[0719] 20. A method according to clause 19, wherein the reference picture index or the prediction direction is based on a reference index or a prediction direction, respectively, of a first available motion candidate of the one or more available motion candidates.
[0720] 21. A method according to clause 19, wherein the reference picture index or the prediction direction is based on a most common reference index or prediction direction, respectively, among the one or more available motion candidates.
[0721] 22. A method according to any of clauses 19 to 21, wherein the one or more available motion candidates comprises all available motion candidates.
[0722] 23. A method according to any of clauses 19 to 21, wherein the one or more available motion candidates comprise the top K available motion candidates, wherein K is a positive integer.
[0723] 24. The method of clause 1, wherein the default motion candidate is associated with a reference picture different from a current picture that includes the current video block.
[0724] 25. The method of clause 1, wherein the Merge candidate list comprises an Advanced Motion Vector Prediction (AMVP) candidate list.
[0725] 26. A method for video processing, comprising: deriving triangular prediction mode (TPM) candidates from regular motion candidates of a current video block; selectively adding the TPM candidates to a TPM candidate list; and reconstructing the current video block based on the TPM candidate list.
[0726] 27. The method of clause 26, wherein the normal motion candidates comprise pair-wise average candidates.
[0727] 28. The method of clause 27, wherein the TPM candidates comprise list 0 motion information of pairwise average candidates.
[0728] 29. The method of clause 27, wherein the TPM candidates comprise list 1 motion information of pairwise average candidates.
[0729] 30. The method of clause 27, wherein the TPM candidate comprises average motion information of list 0 motion information and list 1 motion information of regular motion candidates.
[0730] 31. The method of clause 26, wherein the normal motion candidate is derived from a bottom-right collocated temporal block, a center collocated temporal block, or at least one temporal block different from the bottom-right and center collocated temporal blocks.
[0731] 32. A method according to clause 31, wherein at most one temporal block is identified by a conventional motion candidate.
[0732] 33. The method of clause 26, wherein the TPM candidate comprises a reference picture not associated with a current picture reference (CPR) mode, and wherein the TPM candidate is not added to a TPM candidate list.
[0733] 34. The method of clause 26, wherein the TPM candidate comprises a reference picture associated with a current picture reference (CPR) mode, and wherein the TPM candidate is not added to a TPM candidate list.
[0734] 35. A method for video processing, comprising: selecting a weighting factor group when determining that a current video block is a triangular prediction mode (TPM) codec block; and reconstructing the current video block based on the weighting factor group.
[0735] 36. The method of clause 35, further comprising: using a weighting factor group to replace the weighted averaging process.
[0736] 37. The method of clause 35, wherein the set of weighting factors is {0, 0, ..., 0}.
[0737] 38. The method of clause 35, wherein the set of weighting factors is {1, 1, ..., 1}.
[0738] 39. The method of clause 35, wherein reconstructing the current video block comprises reconstructing a sub-block of the current video block, and wherein selecting the set of weighting factors is based on a position of the sub-block in the current video block.
[0739] 40. The method of clause 35, wherein the selection is further based on at least one of a codec mode of the current video block, a precision of a motion vector associated with the current video block, or a color component of the current video block.
[0740] 41. A method according to clause 40, wherein the precision of the motion vectors is integer precision.
[0741] 42. The method of clause 40, wherein the color component of the current video block is a chroma component of the current video block.
[0742] 43. The method of clause 35, wherein the selection is further based on a value of a low delay check flag in the bitstream representation of the current video block.
[0743] 44. The method of clause 35, wherein the selection is further based on a scaled motion vector difference associated with the current video block.
[0744] 45. A method according to clause 44, wherein the first motion vector MV0(x0, y0) is associated with a first partition of the TPM codec block, wherein the second motion vector MV1(x1, y1) is associated with a second partition of the TPM codec block, and wherein the method further comprises: generating a scaled motion vector MV1'(x1', y1') by scaling the second motion vector to the first motion vector.
[0745] 46. The method of clause 45, wherein F(x1′, x0, y1′, y0) ≥ T, wherein F(·) is a function, and wherein T is a non-negative integer threshold.
[0746] 47. The method of clause 46, wherein T is predetermined.
[0747] 48. A method according to clause 46, wherein T is signaled in a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a slice group header or a codec tree unit (CTU).
[0748] 49. The method of clause 46, wherein T is based on a size of the current video block, a codec mode of the current video block, a slice type of the current video block, or a picture type of the current video block.
[0749] 50. A method according to any of clauses 46 to 49, wherein F = max(abs(x1′-x0), abs(y1′-y0)).
[0750] 51. A method according to any of clauses 46 to 49, wherein F = min(abs(x1'-x0), abs(y1'-y0)).
[0751] 52. A method according to any of clauses 46 to 49, wherein F = abs(x1' - x0) + abs(y1' - y0).
[0752] 53. A method according to any one of clauses 46 to 49, wherein F is the average of MV0 and MV1'.
[0753] 54. A method according to clause 35, wherein the selection is further based on a picture order count (POC) distance between two reference pictures.
[0754] 55. A method for video processing, comprising: generating pruned triangle prediction mode (TPM) candidates by selectively pruning one or more TPM candidates derived from a plurality of conventional Merge candidates; and reconstructing a current video block based on the pruned TPM candidates.
[0755] 56. The method of clause 55, wherein one or more TPM candidates are pruned, and wherein the plurality of regular Merge candidates include uni-directionally predicted or bi-directionally predicted regular Merge candidates.
[0756] 57. The method of clause 55, wherein selectively pruning comprises pruning a top K of the one or more TPM candidates, where K is an integer.
[0757] 58. A method according to clause 57, wherein 5≤K≤8.
[0758] 59. The method of clause 55, wherein the plurality of regular Merge candidates comprises a first bi-predictive regular Merge candidate.
[0759] 60. The method of clause 55, wherein one or more TPM candidates are pruned, and wherein the method further comprises: avoiding pruning multiple regular Merge candidates.
[0760] 61. A method for video processing, comprising: inserting a first plurality of motion candidates from a first list and a second plurality of motion candidates from a second list into a candidate list based on an insertion order, wherein the insertion order is based on a previous insertion order of a third plurality of motion candidates into the candidate list; and reconstructing a current video block based on the candidate list.
[0761] 62. A method according to clause 61, wherein the third plurality of motion candidates includes two candidates derived from a bidirectionally predicted normal motion candidate, wherein a candidate from the second list is added before another candidate from the first list, and wherein the insertion order includes the first plurality of motion candidates followed by the second plurality of motion candidates.
[0762] 63. A method according to clause 61, wherein the third plurality of motion candidates comprises one uni-directional prediction candidate from the first list, and wherein the insertion order comprises the second plurality of motion candidates followed by the first plurality of motion candidates.
[0763] 64. A method for video processing, comprising: determining a slice type and a value of a triangle prediction mode (TPM) flag in a sequence parameter set (SPS) associated with a current video block; and reconstructing the current video block based on the slice type and the value.
[0764] 65. The method of clause 64, wherein the stripe type is a B stripe.
[0765] 66. A method as described in clause 64, wherein the TPM flag is further signaled in a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header or a slice group header.
[0766] 67. A method for video processing, comprising: checking one or more history-based motion vector prediction (HMVP) candidates for adding to a Merge candidate list; after checking one or more HMVP candidates, checking a set of new motion candidates for adding to the Merge candidate list, wherein each motion candidate in the set of new motion candidates is not based on previously added HMVP information and is not used to update the HMVP table; and reconstructing a current video block based on the set of new motion candidates.
[0767] 68. A method according to clause 67, wherein the set of new motion candidates comprises pair-wise average bi-prediction candidates, combined bi-prediction candidates or zero motion candidates.
[0768] 69. A method according to clause 67 or 68, wherein the height or width of the current video block is less than or equal to M.
[0769] 70. The method of clause 69, wherein M=4.
[0770] 71. The method of clause 67, further comprising: after checking one or more HMVP candidates, determining that a Merge candidate list is not full; and repeatedly adding a last entry of the HMVP table to the Merge candidate list until the Merge candidate list is full.
[0771] 72. A method according to any of clauses 1 to 71, further comprising: reconstructing other video blocks in the same picture as the current video block.
[0772] 73. A method for video processing, comprising: checking or updating a history-based motion vector prediction (HMVP) table; deriving a motion candidate based on the checking or updating; encoding and decoding a current video block with the motion candidate; and avoiding updating the HMVP table using motion information based on the current video block.
[0773] 74. A method according to clause 73, wherein the motion candidate is a pair-wise average bi-prediction candidate, a combined bi-prediction candidate, a zero motion candidate or a default motion candidate.
[0774] 75. A method according to clause 73 or 74, wherein the height or width of the current video block is less than or equal to M.
[0775] 76. The method of clause 75, wherein M=4.
[0776] 77. A method of video processing, comprising: during a conversion between a current video block and a bitstream representation of the current video block, controlling the generation of a Merge candidate list for an intra-frame codec mode based on the size of a conventional Merge candidate list; and performing the conversion using the Merge candidate list for the intra-frame codec mode.
[0777] 78. The method of clause 77, wherein the intra-coding mode is an intra-block copy (IBC) mode.
[0778] 79. A method according to any of clauses 77-78, wherein controlling comprises adding an additional candidate to the Merge candidate list for the intra-frame coding mode upon determining that the regular Merge candidate list is smaller than the Merge candidate list for the intra-frame coding mode.
[0779] 80. A method according to any of clauses 77-78, wherein the Merge candidate index signalled in the bitstream representation is smaller than the size of a regular Merge candidate list.
[0780] 81. A method according to any of clauses 77-78, wherein the size of the Merge candidate list for the intra-frame coding mode is not greater than a predetermined number P.
[0781] 82. A method according to clause 81, wherein the predetermined number P is signalled in the bitstream representation.
[0782] 83. A method according to any of clauses 77-78, wherein the difference between the size of the Merge candidate list for intra coding mode and the size of the normal Merge candidate list is signalled in the bitstream representation.
[0783] Example 29 in the previous section provides an additional example of an embodiment of clauses 77-83.
[0784] 84. A video processing method, comprising: performing a reset operation on a history-based motion vector predictor (HMVP) table for conversion between a current video block and a bitstream representation of the current video block at a boundary of a video region in which an intra-frame codec mode is enabled, wherein the current video block is part of the video region; and performing the conversion using the HMVP table.
[0785] 85. The method of clause 84, wherein the video region is a slice group.
[0786] 86. The method of clause 84, wherein the reset operation is performed on a video region of an intra slice group used for encoding or decoding.
[0787] 87. A method according to any of clauses 77-86, wherein the converting comprises generating a bitstream representation from the current video block or generating the current video block from the bitstream representation.
[0788] Example Item 30 provides additional embodiments of clauses 84 to 87.
[0789] 88. An apparatus in a video system, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of clauses 1 to 87.
[0790] 89. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any of clauses 1 to 87.
[0791] Fig.36 3600 is a block diagram illustrating an example video processing system 3600 in which various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of system 3600. System 3600 may include an input 3602 for receiving video content. The video content may be received in a raw or uncompressed format, such as 8 or 10 bit multi-component pixel values, or may be in a compressed or encoded format. Input 3602 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, a Passive Optical Network (PON), and the like, and wireless interfaces such as Wi-Fi or cellular interfaces.
[0792] System 3600 may include a codec component 3604 that can implement various codecs or encoding methods described in this document. Codec component 3604 can reduce the average bit rate of the video from input 3602 to the output of codec component 3604 to generate a codec representation of the video. Codec technology is therefore sometimes referred to as video compression or video transcoding technology. The output of codec component 3604 can be stored or sent via a communication connection such as represented by component 3606. The bitstream (or codec) representation of the storage or communication transmission of the video received at input 3602 can be used by component 3608 to generate pixel values or transmit to a displayable video of display interface 3610. The process of generating user-visible video from the bitstream representation is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "codec" operations or tools, it will be understood that the codec tool or operation is used at the encoder, and the corresponding decoding tool or operation of the inverse codec result will be performed by the decoder.
[0793] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), or Displayport, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The technology described in this document may be embodied in various electronic devices, such as mobile phones, laptops, smart phones, or other devices capable of performing digital data processing and / or video display.
[0794] Fig.3737 is a flowchart representation of a method 3700 for video processing according to the present disclosure. The method 3700 includes, at operation 3710, for a conversion between a current block of a video and a bitstream representation of the video, determining that a 6-parameter affine Merge candidate is a default motion candidate to be added to a motion candidate list. In response to the number of candidates in the motion candidate list being less than a maximum allowed, the default motion candidate is added to the motion candidate list. The method 3700 also includes, at operation 3720, performing the conversion based on the determination.
[0795] In some embodiments, the Merge candidate list includes an affine Merge candidate list or a sub-block Merge candidate list. In some embodiments, the default motion candidate has a zero motion vector (0,0). In some embodiments, when the current block is in a P slice, the prediction direction of the default motion candidate is set to unidirectional prediction based on reference picture list 0. In some embodiments, when the current block is in a B slice, the prediction direction of the default motion candidate is set to bidirectional prediction.
[0796] Fig.38 is a flowchart representation of a method 3800 for video processing according to the present disclosure. The method 3800 includes, at operation 3810, for a conversion between a current block of a video and a bitstream representation of the video, determining a reference picture index K of a first default motion candidate to be added to a motion candidate list, K being a non-negative integer. In response to the number of candidates in the motion candidate list being less than a maximum allowed, the first default motion candidate is added to the motion candidate list. The method 3800 also includes, at operation 3820, performing the conversion based on the determination.
[0797] In some embodiments, K=0. In some embodiments, the method includes determining a second default motion candidate to be added to the motion candidate list. The first default motion candidate and the second default motion candidate are added to the motion candidate list according to an increasing order of corresponding reference picture indices.
[0798] Fig.39 is a flowchart representation of a method 3900 for video processing according to the present disclosure. The method 3900 includes, at operation 3910, for a conversion between a current block of a video and a bitstream representation of the video, determining an affine model type of a default motion candidate to be added to a motion candidate list based on available motion candidates for the current block. In response to the number of candidates in the motion candidate list being less than a maximum allowed, the default motion candidate is added to the motion candidate list. The method 3900 also includes, at operation 3920, performing the conversion based on the determination.
[0799] In some embodiments, the affine model type of the default motion candidate is the same as the affine model type of the first available motion candidate for the current block. In some embodiments, the affine model type of the default motion candidate is the most commonly used affine model type by a subset or all of the available motion candidates for the current block.
[0800] Fig.40 4000 is a flowchart representation of a method 4000 for video processing according to the present disclosure. The method 4000 includes, at operation 4010, determining a default motion candidate for a geometric prediction mode candidate list for a conversion between a current block of a video and a bitstream representation of the video. The triangle prediction mode partitions the current video block into a plurality of partitions. The method 4000 also includes, at operation 4020, performing the conversion based on the determination.
[0801] In some embodiments, the default motion candidate is repeatedly added to the geometric prediction mode candidate list until the geometric prediction mode candidate list is full. In some embodiments, the default motion candidate has a zero motion vector. In some embodiments, the reference picture index of the default motion candidate is equal to M, where M is a non-negative integer. In some embodiments, M=0.
[0802] In some embodiments, the reference picture index of the default motion candidate is signaled in a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a slice group header, or a codec tree unit (CTU). In some embodiments, the reference picture index of the default motion candidate is associated with a picture collocated with the current block. In some embodiments, the prediction direction of the default motion candidate is based on a slice type, a slice type, or a picture type of the current block.
[0803] In some embodiments, reference picture list 0 includes N reference pictures, and reference picture list 1 includes M reference pictures. A geometric prediction mode candidate list is constructed by inserting a first default candidate set into the geometric prediction mode candidate list, each default candidate including a predefined motion vector and a reference picture index in the range 0 to N-1 associated with reference picture list 0. In the case where the geometric prediction mode candidate list is not full, the list is constructed by inserting a second default candidate set into the geometric prediction mode candidate list, each default candidate including a predefined motion vector and a reference picture index in the range 0 to M-1 associated with reference picture list 1. In the case where the geometric prediction mode candidate list is not full, the list is constructed by repeatedly inserting a third default candidate into the geometric prediction mode candidate list until the geometric prediction mode candidate list is full, the third default candidate including a predefined motion vector and a specific reference picture index associated with reference picture list 0 or reference picture list 1.
[0804] In some embodiments, reference picture list 0 includes N reference pictures, and reference picture list 1 includes M reference pictures. The geometric prediction mode candidate list is constructed by repeatedly inserting a first default candidate and a second default candidate into the geometric prediction mode candidate list. The first default candidate includes a predefined motion vector and a first reference picture index, and the second default candidate includes a predefined motion vector and a second reference picture index. The first reference picture index is selected based on a predefined order from a range of 0 to N-1 associated with reference picture list 0, and the second reference picture index is selected based on a predefined order from a range of 0 to M-1 associated with reference picture list 1. In the event that the geometric prediction mode candidate list is not full, the list is constructed by repeatedly adding a third default candidate to the geometric prediction mode candidate list until the geometric prediction mode candidate list is full. The third default candidate includes a predefined motion vector and a specific reference picture index associated with reference picture list 0 or reference picture list 1.
[0805] In some embodiments, the predefined order includes ascending or descending order. In some embodiments, the predefined motion vector includes a zero motion vector. In some embodiments, the predefined motion vector includes a default motion vector that is not a zero motion vector. In some embodiments, the default candidate inserted before inserting the third default candidate is replaced by a motion candidate with an unequal motion vector. In some embodiments, the default motion candidate includes a geometric prediction mode virtual motion candidate, and the geometric prediction mode virtual motion candidate is derived based on an available TPM candidate for the current block.
[0806] In some embodiments of the above method, the reference picture index or prediction direction of the default motion candidate is based on the available motion candidates of the current block. In some embodiments, the reference picture index or prediction direction of the default motion candidate is the same as the reference picture index or prediction direction of the first available motion candidate of the current block. In some embodiments, the reference picture index or prediction direction of the default motion candidate is the most commonly used reference picture index or prediction direction by a subset or all of the available motion candidates of the current block. In some embodiments, the reference picture index of the default motion candidate is based on a reference picture in a reference picture list. In some embodiments, the reference picture index of the default motion candidate is based on a reference picture with a minimum picture order count distance relative to the current picture where the current block is located. In some embodiments, the current block has at least one available motion candidate. In some embodiments, the default motion candidate is the Kth default motion candidate of the current block. In some embodiments, K=1.
[0807] In some embodiments of the above method, the default motion candidate is determined based on a virtual motion candidate, wherein the virtual motion candidate is derived based on available motion candidates for the current block. In some embodiments, the current block is located in a current picture, and the default motion candidate is associated with a reference picture different from the current picture. In some embodiments, the Merge candidate list includes an Advanced Motion Vector Prediction (AMVP) candidate list.
[0808] Fig.41 is a flowchart representation of a method 4100 for video processing according to the present disclosure. The method 4100 includes, at operation 4110, for a conversion between a current block of a video and a bitstream representation of the video, determining one or more motion candidates for a geometric partitioning mode using one or more paired average candidates obtained by averaging a pair of candidates in a motion candidate list of the current block. The triangle prediction mode partitions the current video block into a plurality of partitions. The method 4100 also includes, at operation 4120, performing the conversion based on the determination.
[0809] In some embodiments, the Merge candidate list includes an affine Merge candidate list or a sub-block Merge candidate list. In some embodiments, the default motion candidate has a zero motion vector (0,0). In some embodiments, when the current block is in a P slice, the prediction direction of the default motion candidate is set to unidirectional prediction based on reference picture list 0. In some embodiments, when the current block is in a B slice, the prediction direction of the default motion candidate is set to bidirectional prediction.
[0810] Fig.42 42 is a flowchart representation of a method 4200 for video processing according to the present disclosure. The method 4200 includes, at operation 4210, for a conversion between a current block of a video and a bitstream representation of the video, determining motion candidates for a geometric partitioning pattern based on a first set of temporal blocks and a second set of temporal blocks. The first set of temporal blocks includes a lower right temporal block and a center temporal block that are juxtaposed with the current block, and the second set is different from the first set. The method 4200 also includes, at operation 4220, performing the conversion based on the determination.
[0811] In some embodiments, the second set of temporal blocks is identified based on existing motion candidates. In some embodiments, only one of the bottom right temporal block or the center temporal block in the first set is used to determine the motion candidate. In some embodiments, at least one temporal block in the first set of temporal blocks is excluded from determining the motion candidate. In some embodiments, the motion candidate is added to a candidate list of the geometric partitioning mode.
[0812] Fig.43is a flowchart representation of a method 4300 for video processing according to the present disclosure. The method 4300 includes, at operation 4310, for a conversion between a current block of a video and a bitstream representation of the video, determining whether a motion candidate is excluded from a candidate list based on whether the motion candidate is associated with a first reference picture, wherein a motion candidate block associated with the motion candidate is located in the first reference picture. The current block is encoded and decoded with a second reference picture that does not point to the current picture. The method 4300 also includes, at operation 4320, performing the conversion based on the determination.
[0813] In some embodiments, the motion candidate is excluded from the candidate list if the motion candidate is associated with the first reference picture. In some embodiments, the motion candidate is excluded from the candidate list if the motion candidate is not associated with the first reference picture. The motion candidate is associated with a third reference picture that is not in the current picture.
[0814] Fig.44 4400 is a flowchart representation of a method 4400 for video processing according to the present disclosure. The method 4400 includes, at operation 4410, for a conversion between a current block of a video and a bitstream representation of the video, determining an insertion order of reference picture list 0 information and reference picture list 1 information of a bidirectional prediction Merge candidate based on an insertion order used in a previously processed block of the video. The method 4400 also includes, at operation 4420, performing the conversion based on the determination.
[0815] In some embodiments, the two Merge candidates are two consecutive bidirectional prediction candidates in the Merge candidate list. For the first Merge candidate of the two Merge candidates, the reference picture list X information is placed before the reference picture list Y information, and for the second Merge candidate of the two Merge candidates, the reference picture list Y information is placed before the reference picture list X information, X+Y is equal to 1, and X and Y are non-negative integers. In some embodiments, the first Merge candidate of the two Merge candidates is a unidirectional prediction candidate associated with the reference list X, and the second Merge candidate of the two Merge candidates is a bidirectional prediction candidate continuously positioned after the first Merge candidate in the Merge candidate list. For the second Merge candidate, the reference picture list Y information is placed before the reference picture list X information, X+Y is equal to 1, and X and Y are non-negative integers. In some embodiments, the first Merge candidate of the two Merge candidates is a bidirectional prediction candidate. The reference picture list 0 information of the first Merge candidate is placed before the reference picture list 1 information of the first Merge candidate. A geometric partitioning mode candidate is determined according to the reference picture list 0 information, where the geometric partitioning mode includes partitioning the current block into a plurality of partitions.
[0816] Fig.45 45 is a flowchart representation of a method 4500 for video processing according to the present disclosure. The method 4500 includes, at operation 4510, for a conversion between a current block of a video and a bitstream representation of the video, determining one or more motion candidates for a geometric partitioning mode based on a size of a conventional Merge list. The geometric partitioning mode includes partitioning the current block into a plurality of partitions. The method 4500 also includes, at operation 4520, performing the conversion based on the determination.
[0817] In some embodiments, when the size of the conventional Merge list is smaller than the size of the geometric partitioning mode candidate list, the number of one or more motion candidates is increased. The one or more motion candidates include at least a virtual motion candidate or a default motion candidate. In some embodiments, the candidate index of the motion candidate signaled in the bitstream is smaller than the size of the conventional Merge list. In some embodiments, the candidate index of the motion candidate signaled in the bitstream is smaller than the maximum number of Merge candidates in the conventional Merge list for deriving the motion candidate. In some embodiments, the size of the conventional Merge list is the same as the size of the geometric partitioning mode candidate list. In some embodiments, the size of the geometric partitioning mode candidate list signaled in the bitstream is less than or equal to the size of the conventional Merge list. In some embodiments, the size of the geometric partitioning mode candidate list signaled in the bitstream is less than or equal to P, where P is an integer. In some embodiments, P=5. In some embodiments, the size of the geometric partitioning mode candidate list signaled in the bitstream is greater than or equal to Q, where Q is an integer. In some embodiments, Q is 0 or 1. In some embodiments, the size of the geometric partitioning mode candidate list is signaled in the bitstream. In some embodiments, the size of the geometric partitioning mode candidate list is binarized into a truncated unary code. In some embodiments, the difference between the size of the regular Merge list and the size of the geometric partitioning mode candidate list is signaled in the bitstream. In some embodiments, the difference is binarized into a truncated unary code.
[0818] Fig.46 is a flowchart representation of a method 4600 for video processing according to the present disclosure. The method 4600 includes, at operation 4610, for conversion between a block of video and a bitstream representation of the video, determining a weight for a weighted average of prediction samples along edges of two partitions of the block. The two partitions are generated according to a geometric partitioning pattern. The weights are selected from a first set of weighting factors in which at least one of the weights is equal to 0 or 1. The method 4600 also includes, at operation 4620, performing the conversion based on the determination.
[0819] In some embodiments, the first set of weighting factors includes all zero values or all one values, and a final prediction result of the block is determined based on motion information of only one of the two partitions. In some embodiments, motion information of all sub-blocks of the block is stored in a unidirectional prediction mode. In some embodiments, the method includes determining whether the first set of weighting factors is applicable to the sub-block based on a position of the sub-block of the block.
[0820] Fig.47 47 is a flowchart representation of a method 4700 for video processing according to the present disclosure. The method 4700 includes, at operation 4710, for conversion between a block of video and a bitstream representation of the video, determining a weight for a weighted average of prediction samples along edges of two partitions of the block. The two partitions are generated according to a geometric partitioning pattern. The weight is selected from a first set of at least two sets of weighting factors based on characteristics of the block. The method 4700 also includes, at operation 4720, performing the conversion based on the determination.
[0821] In some embodiments, the characteristic comprises a codec mode of the block, a precision of a motion vector of the block, a color characteristic of the block, or an indicator indicating a delay property of the block. In some embodiments, the weight is selected from a first set of weighting factors in the case where at least one reference picture of the current block is located in a current picture including the current block. In some embodiments, the weight is selected from a first set of weighting factors in the case where all motion vectors of the two partitions have integer precision. In some embodiments, the weight is selected from a first set of weighting factors in the case where the current block is a chroma block.
[0822] In some embodiments, a first motion vector associated with a first partition is represented as Mv0(x0,y0), and a second motion vector associated with a second partition is represented as Mv1(x1,y1). The second motion vector is scaled to Mv1’(x1’,y1’) according to a reference picture pointed to by the first motion vector. The weight is selected from a first set of weighting factors based on a function F of x1’, x0, y1’, and y0. In some embodiments, when the value of the function F is greater than or equal to a threshold, the weight in the second set of weighting factors is used. In some embodiments, the threshold is predefined. In some embodiments, the threshold is 16 << MV_PRECISION, where << represents a left shift operation and MV_PRECISION represents the precision of the stored motion vector. In some embodiments, when the precision of the stored motion vector is 1 / 16 pixel, MV_PRECISION is set to 4. In some embodiments, the threshold is signaled in a sequence parameter set (SPS), video parameter set (VPS), picture parameter set (PPS), picture header, slice header, slice group header, coding tree unit (CTU), or region. In some embodiments, the threshold varies for different blocks with different characteristics.
[0823] In some embodiments, the characteristics include coding mode, size, slice type, picture type, or slice type. In some embodiments, F is max(abs(x1’ – x0), abs(y1’ - y0)). In some embodiments, F is min(abs(x1’ – x0), abs(y1’ - y0)). In some embodiments, F is abs(x1’ – x0) + abs(y1’ - y0). In some embodiments, F is the average of Mv0 and Mv1’. In some embodiments, the two reference pictures of the two partitions are the same, and the two reference pictures are different from the current reference picture where the block is located.
[0824] In some embodiments, the weight is selected from a first set of weighting factors based on characteristics associated with one or more reference pictures of the block. In some embodiments, the characteristics include the picture order count (POC) distance between two reference pictures of the block. In some embodiments, the characteristics include the picture order count (POC) distance between the reference picture of the block and the current picture where the block is located.
[0825] Fig.4848 is a flowchart representation of a method 4800 for video processing according to the present disclosure. The method 4800 includes, at operation 4810, for a conversion between a current block of a video and a bitstream representation of the video using a geometric partitioning mode, determining whether to apply a redundancy check to a motion candidate based on a codec condition of the current block. The motion candidate is derived from one or more conventional Merge candidates of the geometric partitioning mode. The method 4800 also includes, at operation 4820, performing the conversion based on the determination.
[0826] In some embodiments, the coding condition depends on whether the redundancy check is used to generate one or more conventional Merge candidates. In some embodiments, the coding condition depends on whether one or more conventional Merge candidates are bidirectional prediction conventional Merge candidates. In some embodiments, the coding condition depends on whether one or more conventional Merge candidates are unidirectional prediction conventional Merge candidates. In some embodiments, in the case where the conventional Merge candidate is a bidirectional prediction conventional Merge candidate, the redundancy check is applied to other motion candidates in the candidate list. In some embodiments, the redundancy check is applied to the first L motion candidates in the candidate list, L is a positive integer. In some embodiments, before adding the motion candidate, the redundancy check is applied to the last L motion candidates in the candidate, L is a positive integer. In some embodiments, in the case where the conventional Merge candidate is a unidirectional prediction conventional Merge candidate, the redundancy check is applied to other motion candidates in the candidate list. In some embodiments, the redundancy check is applied to the first L motion candidates in the candidate list, L is a positive integer. In some embodiments, before adding the motion candidate, the redundancy check is applied to the last L motion candidates in the candidate list, L is a positive integer. In some embodiments, L is 1 or 2.
[0827] In some embodiments, the redundancy check is only applied to motion candidates derived from unidirectionally predicted conventional Merge candidates. In some embodiments, whether the redundancy check is applicable to motion candidates is based on the prediction direction of the motion candidate. In some embodiments, whether the redundancy check is applicable to motion candidates is based on whether the motion candidate is derived based on reference picture list 0 or reference picture list 1 of a conventional Merge candidate, and the conventional Merge candidate is a bidirectionally predicted conventional Merge candidate. In some embodiments, in the case where the motion candidate is derived based on reference picture list 0 of a conventional Merge candidate, the redundancy check is skipped. In some embodiments, in the case where the motion candidate is derived based on reference picture list 1 of a conventional Merge candidate, the redundancy check is applied. In some embodiments, the redundancy check is applied to another motion candidate derived based on reference picture list 0 of a conventional Merge candidate. In some embodiments, the redundancy check is applied to the first L motion candidates in the candidate list, L is a positive integer. In some embodiments, before adding the motion candidate, the redundancy check is applied to the last L motion candidates in the candidate list, L is a positive integer. In some embodiments, L is 1 or 2.
[0828] In some embodiments, the redundancy check is applicable to different blocks, different regions, different slices, or different groups of slices. In some embodiments, whether the redundancy check is applicable is based on the prediction direction of the first motion candidate in the candidate list. In some embodiments, whether the redundancy check is applicable is based on the prediction direction of the last motion candidate in the candidate list. In some embodiments, whether the redundancy check is applicable to a motion candidate is based on the available candidates in the candidate list.
[0829] In some embodiments, whether the redundancy check is applicable to the motion candidate is based on the index of the conventional Merge candidate. In some embodiments, when the index is greater than a threshold, the redundancy check is skipped. In some embodiments, the conventional Merge candidate is the first bidirectional prediction conventional Merge candidate. In some embodiments, the redundancy check is applied when the candidate list includes other candidates derived from the unidirectional prediction conventional Merge candidate before adding the motion candidate. In some embodiments, when the motion candidate is the same or similar to the last motion candidate derived from the unidirectional prediction conventional Merge candidate, the redundancy check is applied to the motion candidate to discard the motion candidate.
[0830] In some embodiments, whether the redundancy check is applicable to the motion candidate is based on the size of the current block. In some embodiments, the redundancy check is skipped when the width or height of the current block is greater than a threshold. In some embodiments, whether the redundancy check is applicable to the motion candidate is based on an indication of a delay in the bitstream. In some embodiments, whether the redundancy check is applicable to the motion candidate is based on a reference picture in a reference picture list of the current block. In some embodiments, the redundancy check is performed when the picture order count (POC) value of all reference pictures in one or both reference picture lists is less than the POC value of the current picture in which the current block is located. In some embodiments, the redundancy check is performed when the picture order count (POC) value of all reference pictures in one or both reference picture lists is less than or equal to the POC value of the current picture in which the current block is located. In some embodiments, whether the redundancy check is applicable to the motion candidate is based on whether the two reference picture lists include at least one common reference picture.
[0831] In some embodiments, limited redundancy check is applied to motion candidates in the candidate list. In some embodiments, the number of motion candidates to be checked for redundancy is limited to K. In some embodiments, when the number of motion candidates that have been checked for redundancy reaches K, the redundancy check is skipped. In some embodiments, when the number of motion candidates that have been checked for redundancy is less than K, the redundancy check is applied to a subset of candidates in the candidate list. In some embodiments, the number of times a motion candidate is compared with other motion candidates is limited to K. In some embodiments, when a motion candidate has been compared with other motion candidates K times, the redundancy check is skipped. In some embodiments, when a motion candidate has been compared with other motion candidates less than K times, the redundancy check is applied to a subset of candidates in the candidate list. In some embodiments, a subset of candidates is based on the number of available conventional Merge candidates. In some embodiments, a subset of candidates is based on the number of motion candidates in a geometric partitioning mode before performing any redundancy check. In some embodiments, a subset of candidates is based on at least one of the following: an indication of the size of the current block, a stripe, a picture, a slice type, or a delay in a bitstream. In some embodiments, a subset of candidates is based on a conventional Merge candidate set from which a subset of candidates is derived. In some embodiments, when redundancy checking is applied to motion candidates, redundancy checking is skipped in the derivation process to determine conventional Merge candidates. In some embodiments, when redundancy checking has been used to generate one or more conventional Merge candidates, redundancy checking is skipped for motion candidates.
[0832] Fig.494900 is a flowchart representation of a method 4900 for video processing according to the present disclosure. The method 4900 includes, at operation 4910, for a conversion between a current block of video and a bitstream representation of the video, determining whether a geometric partitioning mode is enabled based on whether a slice including the current block is a B slice. The geometric partitioning mode includes partitioning the current block into a plurality of partitions. The method 4900 also includes, at operation 4920, performing the conversion based on the determination.
[0833] In some embodiments, the determination is performed without checking an indicator in a sequence parameter set in the bitstream. In some embodiments, the determination is based on an indicator at a video level, a picture level, a slice level, or a slice level in the bitstream representation. In some embodiments, the determination is based on an indicator in a video parameter set (VPS), a picture parameter set (PPS), a slice header, a slice group header, or a picture header in the bitstream representation. In some embodiments, the determination is based only on an indicator in a sequence parameter set in the bitstream, wherein the indicator indicates that the geometric partitioning mode is disabled for the entire sequence, and the bitstream does not include an additional indicator in the video parameter set (VPS), the picture parameter set (PPS), the slice header, the slice group header, or the picture header. In some embodiments, in the case where the slice is not a B-slice, the bitstream does not include any indicator indicating whether the geometric partitioning mode is enabled or disabled. In some embodiments, in the case where the indicator at the picture level, the slice level, or the slice level indicates that the geometric mode is disabled, the determination is performed without checking the block level indicator.
[0834] In some embodiments of the above method, the current block is divided into a plurality of partitions based on at least one partitioning mode. In some embodiments, the geometric partitioning mode includes a triangle partitioning mode. In some embodiments, at least one of the plurality of partitions partitioned in the geometric partitioning mode is a non-square and non-rectangular block.
[0835] Fig.50 is a flowchart representation of a method 5000 for video processing according to the present disclosure. The method 5000 includes, at operation 5010, for a conversion between a block of a video and a bitstream representation of the video, inserting at least one past motion candidate from a past motion candidate table into a motion candidate list. The past motion candidate table is derived based on a past conversion. The method 5000 includes, at operation 5020, after inserting at least one past motion candidate, determining that the motion candidate is not added to the motion candidate list. The motion candidate is derived based on the past motion candidate table. The method 5000 also includes, at operation 5030, performing the conversion based on the motion candidate list.
[0836] In some embodiments, the motion candidate list is a Merge candidate list. In some embodiments, the past motion candidates in the table are historical motion vector prediction (HMVP) candidates. In some embodiments, the motion candidate is a paired average of two motion candidates. At least one of the two motion candidates is from a past motion candidate table. In some embodiments, the motion candidate includes a combined bidirectional prediction Merge candidate that combines two bidirectional prediction candidates. At least one of the two bidirectional prediction candidates is from a past motion candidate table.
[0837] Fig.51 51 is a flowchart representation of a method 5100 for video processing according to the present disclosure. The method 5100 includes, at operation 5110, performing conversion between a block of a video and a bitstream representation of the video based on motion candidates. The method 5100 also includes, at operation 5120, determining whether a past motion candidate table derived based on past conversions is to be updated based on a codec condition of the conversion.
[0838] In some embodiments, the table is not updated when the encoding and decoding condition indicates that the block is encoded using a motion candidate. In some embodiments, the past motion candidates in the table are historical motion vector prediction (HMVP) candidates. In some embodiments, the method includes, for the conversion, adding at least one past candidate in the past motion candidate table to the motion candidate list, and after adding at least one past candidate, adding the motion candidate to the motion candidate list. In some embodiments, the motion candidates include paired average bidirectional prediction candidates. In some embodiments, the motion candidates include combined bidirectional prediction motion candidates. In some embodiments, the motion candidates include zero motion candidates. In some embodiments, the motion candidates include default motion candidates.
[0839] In some embodiments, the codec condition is associated with the size of the block. In some embodiments, the table is not updated if the codec condition indicates that the width or height of the block is less than or equal to M, and M is a positive integer. In some embodiments, M is 4. In some embodiments, the table is not updated if the codec condition indicates that the width is less than or equal to M1 and the height of the block is less than or equal to M2, and M1 and M2 are positive integers. In some embodiments, M1 is 4 and M2 is 4.
[0840] Fig.52 52 is a flowchart representation of a method 5200 for video processing according to the present disclosure. The method 5200 includes, at operation 5210, for a conversion between a block of a video and a bitstream representation of the video, inserting one or more motion candidates into a candidate list until the candidate list is full. The one or more motion candidates are determined based on a past motion candidate list derived based on a past conversion. The method 5200 includes, at operation 5220, performing the conversion based on the candidate list.
[0841] In some embodiments, the past motion candidates in the table are historical motion vector prediction (HMVP) candidates. In some embodiments, one or more motion candidates include the first candidate or the last candidate in the past motion candidate table. In some embodiments, the first candidate or the last candidate is repeatedly inserted. In some embodiments, one or more motion candidates include multiple candidates in the past motion candidate table. In some embodiments, the insertion is performed when the past motion candidate table is not empty. In some embodiments, the past motion candidate table is empty, and the one or more motion candidates include available candidates for the block.
[0842] Fig.53 53 is a flowchart representation of a method 5300 for video processing according to the present disclosure. The method 5300 includes, at operation 5310, for conversion between a block of video and a bitstream representation of the video, determining an intra block copy (IBC) candidate list based on the size of a conventional Merge list for an inter-coded block. IBC represents a technique in which a block is reconstructed based on previously coded samples in the same picture of the block. The method 5300 includes, at operation 5320, performing the conversion based on the determination.
[0843] In some embodiments, in the case where the size of the IBC Merge candidate list is larger than the size of the regular Merge list, the IBC Merge candidate list includes at least one virtual or default IBC candidate. In some embodiments, the bitstream includes an IBC Merge candidate index that is always smaller than the size of the regular Merge list. In some embodiments, the bitstream representation includes an IBC Merge candidate index, wherein the IBC Merge candidate index is always smaller than the maximum number of regular Merge candidates used to derive the IBC Merge candidate in the IBC Merge candidate list. In some embodiments, the size of the IBC Merge candidate list is the same as the size of the regular Merge list. In some embodiments, the size of the IBC Merge candidate list is smaller than the size of the regular Merge list.
[0844] Fig.54 is a flowchart representation of a method 5400 for video processing according to the present disclosure. The method 5400 includes, at operation 5410, performing conversion between a block of video and a bitstream representation of the video.
[0845] The block is encoded in intra block copy (IBC) mode, and the bitstream representation includes an indicator indicating the size of the IBC candidate list for the block. The indicator is always less than or equal to P, where P is a positive integer. IBC represents a technique in which a block is reconstructed based on previously encoded samples in the same picture of the block. In some embodiments, P is 5 or 6.
[0846] Fig.55 55 is a flowchart representation of a method 5500 for video processing according to the present disclosure. The method 5500 includes, at operation 5510, performing a conversion between a block of a video and a bitstream representation of the video. The block is encoded and decoded in an intra-block copy (IBC) mode, and the bitstream representation includes an indicator indicating the size of an IBC candidate list for the block. The indicator is always greater than or equal to Q, where Q is a non-negative integer. IBC represents a technique in which a block is reconstructed based on previously encoded and decoded samples in the same picture of the block. In some embodiments, Q is 0 or 1.
[0847] Fig.56 56 is a flowchart representation of a method 5600 for video processing according to the present disclosure. The method 5600 includes, at operation 5610, performing a conversion between a block of a video and a bitstream representation of the block. The block is encoded and decoded in an intra-block copy (IBC) mode, and the bitstream representation includes an indicator indicating the size of the IBC candidate list. The indicator includes a difference between the size of the IBC candidate list and an integer value K.
[0848] In some embodiments, the IBC candidate list comprises an IBC Merge candidate list or an IBC Advanced Motion Vector Prediction (AMVP) candidate list. In some embodiments, the indicator is binarized as a truncated unary code. In some embodiments, the integer value K is 5 or 6. In some embodiments, the integer value K is the size of a conventional Merge candidate list.
[0849] Fig.57 is a flowchart representation of a method 5700 for video processing according to the present disclosure. The method 5700 includes, at operation 5710, for a conversion between a block of a video and a bitstream representation of the video, determining whether to reset a motion candidate table derived based on a past conversion based on whether an intra-block copy (IBC) mode is enabled. IBC represents a technique in which blocks are reconstructed based on previously coded samples in the same picture. The method 5700 also includes, at operation 5720, performing the conversion based on the determination.
[0850] In some embodiments, when IBC mode is enabled for a first region, the motion candidate table is reset before processing the first region, the first region comprising a sequence, a slice, a slice group, or a video codec data unit. In some embodiments, the first region comprises an I slice or an I slice group. In some embodiments, the motion candidate table is reset before processing the new region. In some embodiments, the new region comprises a codec tree unit (CTU) row, a slice, a slice, or a slice group.
[0851] In some embodiments of the above method, performing the conversion includes generating a bitstream representation based on the current block of video. In some embodiments, performing the conversion includes generating the current block of video from the bitstream representation.
[0852] From the foregoing it will be appreciated that specific embodiments of the presently disclosed technology have been described herein for purposes of illustration, but that various modifications may be made without departing from the scope of the invention. Accordingly, the presently disclosed technology is not to be limited except as set forth in the appended claims.
[0853] Some embodiments of the disclosed technology include making a decision or determination to enable a video processing tool or pattern. In one example, when a video processing tool or pattern is enabled, the encoder will use or implement the tool or pattern when processing a block of a video, but will not necessarily modify the bitstream produced based on the use of the tool or pattern. That is, when enabling the video processing tool or pattern based on a decision or determination, the conversion from the block of a video to the bitstream representation of the video will use the video processing tool or pattern. In another example, when the video processing tool or pattern is enabled, the decoder will process the bitstream when it is known that the bitstream has been modified based on the video processing tool or pattern. That is, the video processing tool or pattern enabled based on a decision or determination will be used to perform the conversion from the bitstream representation of the video to the block of the video.
[0854] Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In an example, when the video processing tool or mode is disabled, the encoder will not use the tool or mode in the conversion of blocks of video to a bitstream representation of the video. In another example, when the video processing tool or mode is disabled, the decoder will process the bitstream knowing that the bitstream has not been modified using the video processing tool or mode enabled based on the decision or determination.
[0855] The embodiments of the subject matter and functional operations described in this patent document can be implemented in various systems, digital electronic circuits, or in computer software, firmware or hardware (including the structures disclosed in this specification and their structural equivalents), or in a combination of one or more of them. The embodiments of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a tangible and non-temporary computer-readable medium, which are used to run or control the operation of the data processing device by a data processing device. The computer-readable medium can be a combination of a machine-readable storage device, a machine-readable storage substrate, a memory device, a material that affects a machine-readable propagation signal, or a combination of one or more of them. The term "data processing unit" or "data processing device" includes all devices, equipment and machines for processing data, including, for example, a programmable processor, a computer, or multiple processors or computers. In addition to hardware, the device can also include code that creates an operating environment for the computer program in question, for example, code that constitutes a processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0856] A computer program (also known as a program, software, software application, script, or code) can be written in any form of programming language (including compiled or interpreted languages), and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program may be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions). A computer program may be deployed to run on one computer or on multiple computers located at one site or distributed across multiple sites and interconnected by a communication network.
[0857] The processes and logic flows described in this specification can be performed by one or more programmable processors running one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuits, and the apparatus can also be implemented as special purpose logic circuits, such as FPGAs (Field Programmable Gate Arrays) or ASICs (Application Specific Integrated Circuits).
[0858] Processors suitable for running computer programs include, for example, general-purpose and special-purpose microprocessors, and any one or more processors of any type of digital computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more large-capacity storage devices (e.g., magnetic disks, magneto-optical disks, or optical disks) for storing data, or be operably coupled to receive data from the one or more large-capacity storage devices or to transfer data to the one or more large-capacity storage devices, or to receive data from and transfer data to the one or more large-capacity storage devices. However, the computer does not need such a device. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices. Processors and memory can be supplemented by or incorporated into a dedicated logic circuit.
[0859] It is intended that the specification and drawings be considered exemplary only, where exemplary means example.As used herein, the use of "or" is intended to include "and / or" unless the context clearly dictates otherwise.
[0860] Although this patent document contains many details, these details should not be interpreted as limitations on any invention or the scope that may be claimed, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features described in the context of separate embodiments in this patent document may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately in multiple embodiments or in any suitable sub-combination. In addition, although features may be described above as working in certain combinations and even initially claimed as such, one or more features from the claimed combination may be excluded from the combination in some cases, and the claimed combination may be directed to a sub-combination or a variation of the sub-combination.
[0861] Similarly, although operations are depicted in a particular order in the drawings, this should not be understood as requiring that such operations be performed in the particular order shown or in a sequential order, or that all of the operations shown be performed, to achieve the desired results. In addition, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.
[0862] Only a few implementations and examples are described, and other implementations, enhancements, and variations may be made based on what is described and shown in this patent document.
Claims
1. A method for video processing, comprising: For a conversion between a current block of a video and a bitstream representation of the video, determining a 6-parameter affine Merge candidate is a default motion candidate to be added to a motion candidate list; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates for the current block; as well as performing said converting based on said determining; In response to the number of candidates in the motion candidate list being less than a maximum allowed value, a default motion candidate is added to the motion candidate list.
2. The method according to claim 1, wherein: The Merge candidate list includes an affine Merge candidate list or a sub-block Merge candidate list.
3. The method according to any one of claims 1 to 2, wherein: In the case where the current block is located in a P slice, the prediction direction of the default motion candidate is set to unidirectional prediction based on reference picture list 0.
4. The method according to any one of claims 1 to 2, wherein: In the case where the current block is located in a B slice, the prediction direction of the default motion candidate is set to bidirectional prediction.
5. The method according to any one of claims 1 to 2, wherein: The default motion candidate has a zero motion vector (0, 0).
6. A method for video processing, comprising: For a conversion between a current block of a video and a bitstream representation of the video, determining a reference picture index K of a first default motion candidate to be added to a motion candidate list, K being a non-negative integer; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates for the current block; as well as performing said converting based on said determining; In response to the number of candidates in the motion candidate list being less than a maximum allowed value, a first default motion candidate is added to the motion candidate list.
7. The method according to claim 6, wherein: K = 0。 8. The method according to claim 6 or 7, comprising: A second default motion candidate to be added to the motion candidate list is determined, wherein the first default motion candidate and the second default motion candidate are added to the motion candidate list according to an increasing order of corresponding reference picture indexes.
9. A method for video processing, comprising: For a conversion between a current block of a video and a bitstream representation of the video, determining an affine model type of a default motion candidate to be added to a motion candidate list based on available motion candidates for the current block; as well as performing said converting based on said determining, In response to the number of candidates in the motion candidate list being less than a maximum allowed value, a default motion candidate is added to the motion candidate list.
10. The method according to claim 9, wherein: The affine model type of the default motion candidate is the same as the affine model type of the first available motion candidate of the current block.
11. The method according to claim 9, wherein: The affine model type of the default motion candidate is the most commonly used affine model type by a subset or all of the available motion candidates of the current block.
12. A method for video processing, comprising: For a conversion between a current block of a video and a bitstream representation of the video, determining a default motion candidate for a list of geometric partitioning mode candidates, wherein the geometric partitioning mode partitions the current block of the video into a plurality of partitions; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates of the current block; and The converting is performed based on the determination.
13. The method according to claim 12, wherein: The default motion candidate is repeatedly added to the geometric partition mode candidate list until the geometric partition mode candidate list is full.
14. The method according to claim 12 or 13, wherein: The default motion candidate has a zero motion vector.
15. The method according to claim 12 or 13, wherein: The reference picture index of the default motion candidate is equal to M, where M is a non-negative integer.
16. The method according to claim 15, wherein: M = 0。 17. The method according to claim 12 or 13, wherein: The reference picture index of the default motion candidate is signaled in a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a picture header, a slice header, a slice group header, or a codec tree unit (CTU).
18. The method according to claim 12 or 13, wherein: The reference picture index of the default motion candidate is associated with a picture collocated with the current block.
19. The method according to claim 12 or 13, wherein: The prediction direction of the default motion candidate is based on a slice type, a slice type, or a picture type of the current block.
20. The method according to claim 12 or 13, wherein: Reference picture list 0 includes N reference pictures, wherein reference picture list 1 includes M reference pictures, and wherein the geometric partitioning mode candidate list is constructed in the following manner: inserting a first set of default candidates into the geometric partitioning mode candidate list, each default candidate comprising a predefined motion vector and a reference picture index in the range 0 to N-1 associated with reference picture list 0, If the geometric partitioning mode candidate list is not full, inserting a second set of default candidates into the geometric partitioning mode candidate list, each default candidate comprising a predefined motion vector and a reference picture index in the range 0 to M-1 associated with reference picture list 1, and When the geometric partition mode candidate list is not full, the third default candidate is repeatedly inserted into the geometric partition mode candidate list until the geometric partition mode candidate list is full, and the third default candidate includes a predefined motion vector and a specific reference picture index associated with reference picture list 0 or reference picture list 1.
21. The method according to claim 12 or 13, wherein: Reference picture list 0 includes N reference pictures, wherein reference picture list 1 includes M reference pictures, and wherein the geometric partitioning mode candidate list is constructed in the following manner: repeatedly inserting a first default candidate and a second default candidate into a geometric partitioning mode candidate list, wherein the first default candidate comprises a predefined motion vector and a first reference picture index, wherein the second default candidate comprises the predefined motion vector and the second reference picture index, wherein the first reference picture index is selected based on a predefined order from a range of 0 to N-1 associated with reference picture list 0, and wherein the second reference picture index is selected based on a predefined order from a range of 0 to M-1 associated with reference picture list 1, When the geometric partition mode candidate list is not full, a third default candidate is repeatedly added to the geometric partition mode candidate list until the geometric partition mode candidate list is full, and the third default candidate includes a predefined motion vector and a specific reference picture index associated with reference picture list 0 or reference picture list 1.
22. The method according to claim 21, wherein: The predefined order includes ascending order or descending order.
23. The method according to claim 20, wherein: The predefined motion vector comprises a zero motion vector.
24. The method according to claim 20, wherein: The predefined motion vector comprises a default motion vector that is not a zero motion vector.
25. The method according to claim 20, wherein: The default candidates inserted before the third default candidate is inserted are replaced by motion candidates with unequal motion vectors.
26. The method according to claim 12 or 13, wherein: The default motion candidate includes a geometric partition mode virtual motion candidate, and wherein the geometric partition mode virtual motion candidate is derived based on available geometric partition mode candidates of the current block.
27. The method according to claim 12, wherein: The reference picture index or prediction direction of the default motion candidate is based on the available motion candidates of the current block.
28. The method according to claim 27, wherein: The reference picture index or prediction direction of the default motion candidate is the same as the reference picture index or prediction direction of the first available motion candidate for the current block.
29. The method according to claim 27, wherein: The reference picture index or prediction direction of the default motion candidate is the most commonly used reference picture index or prediction direction of a subset or all of the available motion candidates for the current block.
30. The method according to any one of claims 27 to 29, wherein: The reference picture index of the default motion candidate is based on the reference picture in the reference picture list.
31. The method according to claim 30, wherein: The reference picture index of the default motion candidate is based on a reference picture having a minimum picture order count distance relative to a current picture where the current block is located.
32. The method according to any one of claims 27 to 29, wherein: The current block has at least one available motion candidate.
33. The method according to any one of claims 27 to 29, wherein: The default motion candidate is the Kth default motion candidate of the current block.
34. The method of claim 33, wherein: K = 1。 35. The method of claim 12, wherein: The default motion candidate is determined based on a virtual motion candidate, wherein the virtual motion candidate is derived based on available motion candidates of the current block.
36. The method of claim 12, wherein: The current block is located in a current picture, and wherein the default motion candidate is associated with a reference picture different from the current picture.
37. The method of claim 12, wherein: The Merge candidate list includes the Advanced Motion Vector Prediction (AMVP) candidate list.
38. The method of claim 12, wherein: The current block is divided into a plurality of partitions based on at least one partition mode.
39. The method of claim 12, wherein: The geometric partitioning mode includes a triangle partitioning mode.
40. The method of claim 12, wherein: At least one of the plurality of partitions partitioned in the geometric partitioning mode is a non-square and non-rectangular block.
41. The method of claim 12, wherein: Performing the conversion includes generating a bitstream representation based on the current block of video.
42. The method of claim 12, wherein: Performing the conversion includes generating a current block of video from a bitstream representation.
43. A video processing device, comprising a processor, wherein the processor is configured to perform the method of any one of claims 1 to 42.
44. A computer readable medium having stored thereon code which, when executed by a processor, causes the processor to implement the method of any one of claims 1 to 42.
45. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to: For a conversion between a current block of a video and a bitstream representation of the video, determining a 6-parameter affine Merge candidate is a default motion candidate to be added to a motion candidate list; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates for the current block; as well as performing said converting based on said determining; In response to the number of candidates in the motion candidate list being less than a maximum allowed value, a default motion candidate is added to the motion candidate list.
46. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to: For a conversion between a current block of a video and a bitstream representation of the video, determining a reference picture index K of a first default motion candidate to be added to a motion candidate list, K being a non-negative integer; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates for the current block; as well as performing said converting based on said determining; In response to the number of candidates in the motion candidate list being less than a maximum allowed value, a first default motion candidate is added to the motion candidate list, wherein the first default motion candidate has a zero motion vector (0, 0).
47. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to: For a conversion between a current block of video and a bitstream representation of the video, determining an affine model type of a default motion candidate to be added to a motion candidate list based on available motion candidates for the current block; and performing said converting based on said determining, in, In response to the number of candidates in the motion candidate list being less than an allowed maximum value, a default motion candidate is added to the motion candidate list.
48. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to: For a transition between a current block of a video and a bitstream representation of the video, a default motion candidate for a geometric partitioning mode candidate list is determined, where The geometric partitioning mode divides the current video block into multiple partitions; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates for the current block; as well as The converting is performed based on the determination.
49. A method for storing a bitstream of a video, comprising: For a conversion between a current block of a video and a bitstream representation of the video, determining a 6-parameter affine Merge candidate is a default motion candidate to be added to a motion candidate list; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates for the current block; generating the bitstream based on the determination; as well as storing the bitstream in a non-transitory computer-readable recording medium, In response to the number of candidates in the motion candidate list being less than a maximum allowed value, a default motion candidate is added to the motion candidate list.
50. A method for storing a bitstream of a video, comprising: For a conversion between a current block of a video and a bitstream representation of the video, determining a reference picture index K of a first default motion candidate to be added to a motion candidate list, K being a non-negative integer; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates for the current block; generating the bitstream based on the determination; as well as storing the bitstream in a non-transitory computer-readable recording medium, In response to the number of candidates in the motion candidate list being less than a maximum allowed value, a first default motion candidate is added to the motion candidate list, wherein the first default motion candidate has a zero motion vector (0, 0).
51. A method for storing a bitstream of a video, comprising: For a conversion between a current block of a video and a bitstream representation of the video, determining an affine model type of a default motion candidate to be added to a motion candidate list based on available motion candidates for the current block; generating the bitstream based on the determination; as well as storing the bitstream in a non-transitory computer-readable recording medium, In response to the number of candidates in the motion candidate list being less than a maximum allowed value, a default motion candidate is added to the motion candidate list.
52. A method for storing a bitstream of a video, comprising: For a conversion between a current block of a video and a bitstream representation of the video, determining a default motion candidate for a list of geometric partitioning mode candidates, wherein the geometric partitioning mode partitions the current block of the video into a plurality of partitions; determining an affine model type of a default motion candidate to be added to the motion candidate list based on available motion candidates for the current block; generating the bitstream based on the determination; and The bit stream is stored in a non-transitory computer-readable recording medium.
