Reduce the in-CTU storage required for affine inheritance
By optimizing the storage method of the affine motion model, the storage requirements of CTU memory and line buffer are reduced, solving the problem of excessive storage requirements in existing technologies and improving the efficiency and performance of video encoding and decoding.
Patent Information
- Application Number
- CN201980079467.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-02-22
- Filing Date
- 2019-12-09
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-12-09
AI Technical Summary
Existing video encoding and decoding technologies have excessive storage requirements when dealing with complex motion scenes, resulting in wasted computing resources and reduced efficiency. In particular, when using affine motion models, storage requirements increase by 94%.
By optimizing the storage method of the affine motion model, reducing the CTU memory and line buffer storage required for affine inheritance, and adopting new storage and derivation methods, such as storing the difference between CPMVs or affine parameters instead of directly storing CPMVs, and using offset and limiting techniques, storage requirements are reduced.
This effectively reduces the storage requirements of affine motion models, lowers the consumption of computing resources, and improves the efficiency and performance of video encoding and decoding.
Smart Images

Figure CN113170148B_ABST
Abstract
Description
[0001] This application is intended to promptly claim the priority and benefits of International Patent Application No. PCT / CN2018 / 119946 filed on December 8, 2018, International Patent Application No. PCT / CN2018 / 121118 filed on December 14, 2018, International Patent Application No. PCT / CN2019 / 075094 filed on February 14, 2019, and International Patent Application No. PCT / CN2019 / 075846 filed on February 22, 2019, in accordance with applicable patent laws and / or rules. The entire disclosures of International Patent Application Nos. PCT / CN2018 / 119946, PCT / CN2018 / 121118, PCT / CN2019 / 075094 and PCT / CN2019 / 075846 are incorporated by reference as part of the disclosure of this application. Technical Field
[0002] This patent document relates to image and video coding and decoding. Background Art
[0003] Digital video 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
[0004] The disclosed techniques may be used by video decoder or encoder embodiments during video decoding or encoding using control point motion vectors and affine codecs.
[0005] In one example aspect, a method for processing video is disclosed. The method includes: associating a first set of motion vectors (MVs) for determining inherited motion information of other video blocks, a second set of MVs for deriving MVs of sub-blocks of a current video block, and a third set of MVs included in a bitstream representation of the current video block with the current video block; and performing conversion between the current video block and the bitstream representation using the first set of MVs, the second set of MVs, or the third set of MVs.
[0006] In another example aspect, another video processing method is disclosed. The method includes: using an affine inherited motion vector (MV) of a current block to perform a conversion between a current block and a bitstream representation of the current block, wherein the affine inherited MV is derived from (1) a stored MV for an adjacent neighboring basic block (denoted as Badj) or (2) an affine history list.
[0007] In yet another example aspect, another method of video processing is disclosed. The method includes: performing a conversion between a current block and a bitstream representation of the current block using an affine inherited motion vector (MV) of the current block, wherein the affine inherited MV is derived from a first MV stored in a first basic block adjacent to the current block and a second MV stored in a second basic block offset from the first building block.
[0008] In yet another example aspect, another method of video processing is disclosed. The method includes: associating a first set of control point motion vectors (CPMVs) for determining inherited motion information of a block encoded and decoded after a first block with a second set of CPMVs for deriving MVs of sub-blocks of the first block or a third set of CPMVs signaled for the first block, wherein the first set of CPMVs is different from the second set of CPMVs or the third set of CPMVs; determining inherited motion information of a second block encoded and decoded after the first block based on the first set of CPMVs; and performing conversion between bitstream representations of the second block and the second block by using the inherited motion information.
[0009] In yet another example aspect, another method of video processing is disclosed. The method includes: for conversion between a first block of video and a bitstream representation of the first block, deriving an affine inherited motion vector (MV) of the first block of video based on a stored motion vector (MV); and performing the conversion by using the affine inherited MV.
[0010] In yet another example aspect, another method of video processing is disclosed. The method includes: for conversion between a current block of video and a bitstream representation of the current block, deriving an affine inherited motion vector (MV) of the current block based on a first stored motion vector (MV) and a second stored MV different from the first stored MV, wherein the first stored MV is stored in a first basic block adjacent to the current block, and the second stored MV is stored in a second basic block offset from the first basic block; and performing the conversion by using the affine inherited MV of the current block.
[0011] In yet another example aspect, another video processing method is disclosed. The method includes: deriving one or more parameters of an affine model parameter set associated with an affine model of the current block for conversion between a current block and a bitstream representation of the current block; shifting the one or more parameters; and storing the shifted one or more parameters.
[0012] In yet another example aspect, a video encoder apparatus is disclosed. The video encoder apparatus includes a processor configured to implement the method described herein.
[0013] In yet another example aspect, a video decoder apparatus is disclosed. The video decoder apparatus includes a processor configured to implement the method described herein.
[0014] In yet another aspect, a computer readable medium having code stored thereon is disclosed. When executed by a processor, the code causes the processor to implement the method described in this document.
[0015] These and other aspects are described in this document. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 An example of the derivation process of Merge candidate list construction is shown.
[0017] Figure 2 Example locations of spatial merge candidates are shown.
[0018] Figure 3 An example of candidate pairs considered for redundancy checking of spatial merge candidates is shown.
[0019] Figure 4A-4B Example locations of the second PU for Nx2N and 2NxN partitions are shown.
[0020] Figure 5 It is a diagram of the motion vector scaling of the temporal merge candidate.
[0021] Figure 6 The candidate positions of the time-domain Merge candidates C0 and C1 are shown.
[0022] Figure 7 An example of combining bi-predictive Merge candidates is shown.
[0023] Figure 8 The derivation process of motion vector prediction candidates is summarized.
[0024] Fig. 9 is an example illustration of motion vector scaling of spatial motion vector candidates.
[0025] Fig.10 An example of alternative motion vector predictor (ATMVP) motion prediction for a coding unit CU is shown.
[0026] Fig.11 An example of one CU having four sub-blocks (AD) and their neighboring blocks (ad) is shown.
[0027] Fig.12 An example flow chart for encoding at different MV precisions is shown.
[0028] Figure 13A-13B 4 and 6 parameter simplified affine motion models are shown respectively.
[0029] Fig.14 An example of the affine MVF for each sub-block is shown.
[0030] Fig.15A An example of a 4-parameter affine model is shown.
[0031] Fig. 15B An example of a 6-parameter affine model is shown.
[0032] Fig.16 An example of MVP for AF_INTER inheriting affine candidates is shown.
[0033] Fig.17 An example MVP of AF_INTER for a constructed affine candidate is shown.
[0034] Fig.18A Examples of candidates for AF_MERGE in five neighboring block scenarios are shown.
[0035] Fig.18B An example flow of the CPMV prediction value derivation process is shown.
[0036] Fig.19 Example candidate positions for the Affine Merge mode are shown.
[0037] Fig. 20 An example of affine inheritance at a CTU row is shown.
[0038] Fig.21 An example showing MVs stored in adjacent neighboring basic blocks
[0039] Fig. 22 The positions in the 4×4 basic blocks are shown.
[0040] Fig.23 An example of MVs of two adjacent neighboring blocks is shown.
[0041] Fig.24 An example of MV for affine inheritance across CTU rows is shown.
[0042] Fig.25 is a flow chart of an example of a video processing method.
[0043] Fig.26 is a block diagram of an example of a video processing device.
[0044] Fig. 27 An exemplary flow chart for finding a first basic block and a second basic block is shown (rectangular blocks indicate the termination of the entire process).
[0045] Fig.28 Another exemplary flow chart for finding the first basic block and the second basic block is shown (the rectangular blocks indicate the termination of the entire process).
[0046] Fig.29 is a flow chart of an example of a video processing method.
[0047] Fig.30 is a flow chart of an example of a video processing method.
[0048] Fig.31 is a flow chart of an example of a video processing method.
[0049] Fig.32 is a flow chart of an example of a video processing method. DETAILED DESCRIPTION
[0050] This document provides various techniques that can be used by decoders of video bitstreams to improve the quality of decompressed or decoded digital video or images. Additionally, video encoders can implement these techniques during the encoding process to reconstruct decoded frames for further encoding.
[0051] For ease of understanding, section headings are used in this document, and embodiments and techniques are not limited to the corresponding sections. Thus, embodiments from one section can be combined with embodiments from other sections.
[0052] 1. Overview
[0053] This patent document relates to video codec technology. Specifically, it relates to motion vector coding in video codec. It can be applied to existing video codec standards, such as HEVC, or to-be-finalized standards (Universal Video Codec). It may also be applicable to future video codec standards or video codecs.
[0054] 2. Introduction
[0055] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T produced H.261 and H.263, ISO / IEC produced MPEG-1 and MPEG-4 Vision, and the two organizations jointly produced the H.262 / MPEG-2 Video and H.264 / MPEG-4 Advanced Video Codec (AVC) and H.265 / HEVC standards. Since H.262, video codec standards have been based on a hybrid video codec structure that utilizes temporal prediction plus transform codec. In order to explore future video codec technologies beyond HEVC, the Joint Video Exploration Team (JVET) was jointly established in 2015 by VCEG and MPEG. Since then, JVET has adopted many new methods and input them into a reference software called the Joint Exploration Model (JEM). In April 2018, the Joint Video Experts Group (JVET) was created between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) to work on the VVC standard with the goal of a 50% bitrate reduction compared to HEVC.
[0056] 2.1 Inter-frame prediction in HEVC / H.265
[0057] Each inter-predicted PU (prediction unit) has motion parameters for one or two reference picture lists. The motion parameters include motion vectors and reference picture indices. The use of one of the two reference picture lists can also be signaled using inter_pred_idc. Motion vectors can be explicitly encoded and decoded as deltas relative to the predicted value.
[0058] When a CU is encoded or decoded in skip mode, a 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 the skip mode, but also to any inter-frame predicted PU. An alternative to the Merge mode is the explicit transmission of motion parameters, where the motion vector (more accurately, the motion vector difference (MVD) compared to the motion vector prediction value), the corresponding reference picture index of each reference picture list, and the use of the reference picture list are explicitly signaled per PU. In the present disclosure, this mode is named Advanced motion vector prediction (AMVP). When the signaling indicates that one of the two reference picture lists is to be used, a PU is generated from a sample block. This is called "unidirectional prediction". Unidirectional prediction can be used for P slices and B slices.
[0059] 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.
[0060] The following provides details of the inter prediction modes specified in HEVC. The description will start with the Merge mode.
[0061] 2.1.1 Reference Image List
[0062] 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. Like 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 index identifies which reference picture in the list should be used to create a prediction signal.
[0063] 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.
[0064] 2.1 Merge mode
[0065] 2.1.2.1 Merge Mode Candidate Derivation
[0066] 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 is specified in the HEVC standard and can be summarized according to the following series of steps:
[0067] Step 1: Initial candidate derivation
[0068] oStep 1.1: Spatial Candidate Derivation
[0069] oStep 1.2: Redundancy check of spatial domain candidates
[0070] oStep 1.3: Time Domain Candidate Derivation
[0071] Step 2: Additional candidate insertions
[0072] oStep 2.1: Create bidirectional prediction candidates
[0073] oStep 2.2: Insert zero motion candidates
[0074] exist Figure 1These steps are also schematically depicted in . For spatial Merge candidate derivation, up to four Merge candidates are selected from candidates located at five different positions. For temporal 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 obtained from step 1 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.
[0075] Next, operations associated with the aforementioned steps are described in detail.
[0076] 2.1.2.2 Spatial Candidate Derivation
[0077] 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 not available (for example, because it belongs to another stripe 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 the coding efficiency. 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-4B The 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 fact, adding this candidate would result in two prediction units having the same motion information, which is redundant for having only one PU in the codec unit. Similarly, position B1 is not considered when the current PU is partitioned into 2N×N.
[0078] Figure 2 The positions of spatial merge candidates are shown.
[0079] Figure 3The candidate pairs considered for redundancy check of spatial merge candidates are shown.
[0080] Figure 4A-4B The location of the second PU for N×2N and 2N×N partitions is shown.
[0081] 2.1.2.3 Time Domain Candidate Derivation
[0082] 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 smallest 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. Figure 5 In the figure, a scaled motion vector for the temporal Merge candidate is obtained as shown by the dotted line, 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. The actual implementation of the scaling process is described in the HEVC specification. 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 bidirectional prediction Merge candidate.
[0083] Figure 5 FIG. 4 is an example diagram of motion vector scaling of a temporal merge candidate.
[0084] 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 coding tree unit (CTU, also known as the largest coding unit (LCU)) row, position C1 is used. Otherwise, position C0 is used in the derivation of the time domain Merge candidate.
[0085] Figure 6 Examples of candidate positions C0 and C1 of the time-domain Merge candidate are shown.
[0086] 2.1.2.4 Additional Candidate Insertion
[0087] In addition to the spatial and temporal 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 spatial and temporal 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. As an example, Figure 7 Depicted is the case when two candidates in the original list (on the left) (which have mvL0 and refIdxL0 or mvL1 and refIdxL1) are used to create a combined bi-predictive Merge candidate that is added to the final list (on the right). There are many rules for combining that are considered to generate these additional Merge candidates.
[0088] 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. Finally, no redundancy check is performed on these candidates.
[0089] 2.1.3 AMVP
[0090] AMVP exploits the spatio-temporal correlation of motion vectors with neighboring PUs, which is used for explicit transmission of motion parameters. For each reference picture list, a motion vector candidate list is constructed by first checking the availability of the PU positions in the temporal domain adjacent to the left and above, 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 the 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.
[0091] 2.1.3.1 Derivation of AMVP Candidates
[0092] Figure 8 The process of deriving motion vector prediction candidates is outlined.
[0093] 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 2The motion vectors of each PU at the five different positions depicted are used to derive two motion vector candidates.
[0094] 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.
[0095] 2.1.3.2 Constructing Spatial Motion Vector Candidates
[0096] 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 depicted position, and those positions are the same as the positions of the motion merge. The derivation order for the left side of the current PU is defined as A0, A1, and scaling A0, scaling A1. The derivation order for 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:
[0097] No airspace scaling
[0098] -(1) Same reference picture list and same reference picture index (same POC)
[0099] -(2) Different reference picture lists, but same reference pictures (same POC)
[0100] Airspace scaling
[0101] -(3) Same reference picture list, but different reference pictures (different POC)
[0102] -(4) Different reference picture lists, and different reference pictures (different POC)
[0103] First check the non-spatial scaling case, then the spatial scaling case. 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.
[0104] Fig. 9 is a diagram of motion vector scaling of spatial motion vector candidates.
[0105] In the spatial domain scaling process, the motion vectors of neighboring PUs are scaled in a similar way to the temporal domain scaling, such as Fig. 9 The main 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.
[0106] 2.1.3.3 Temporal Motion Vector Candidates
[0107] 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 (see Figure 6 ). The reference picture index is signaled to the decoder.
[0108] 2.2 Motion vector prediction method based on sub-CU in JEM
[0109] In JEM with QTBT (quadtrees plus binary trees), each CU can have at most one motion parameter set for each prediction direction. 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 temporal motion vector prediction (ATMVP) method allows each CU to extract multiple motion information sets 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.
[0110] In order to maintain a more accurate motion field for sub-CU motion prediction, motion compression of reference frames is currently disabled.
[0111] Fig.10 An example of ATMVP motion prediction for a CU is shown.
[0112] 2.2.1 Optional temporal motion vector prediction
[0113] In the optional temporal motion vector prediction (ATMVP) method, the motion vector temporal motion vector prediction (TMVP) is modified by extracting multiple sets of motion information (including motion vectors and reference indices) from blocks smaller than the current CU. A sub-CU is a square N×N block (N is set to 4 by default). ATMVP predicts the motion vector of a sub-CU within a CU in two steps. The first step is to identify the corresponding block in the reference picture with the so-called temporal vector. The reference picture is called the motion source picture. The second step is to divide the current CU into sub-CUs and obtain the motion vector and the reference index of each sub-CU from the block corresponding to each sub-CU.
[0114] In the first step, the reference picture and the corresponding block are determined by the motion information of the spatial neighboring blocks of the current CU. 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 is used. The first available motion vector and its associated reference index are set to the index of the temporal vector and the motion source picture. In this way, in ATMVP, the corresponding block can be identified more accurately than in TMVP, where the corresponding block (sometimes called the collocated block) is always in the lower right or center position relative to the current CU.
[0115] In the second step, the corresponding block of the sub-CU is identified by the time domain vector in the motion source picture by adding the time domain vector to the coordinates of the current CU. For each sub-CU, the motion information of its corresponding block (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 (that is, 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 (motion vector corresponding to reference picture list X) to predict the motion vector MV of each sub-CU y (where X equals 0 or 1, and Y equals 1-X).
[0116] 2.2.2 Spatio-temporal motion vector prediction
[0117] In this method, the motion vector of a sub-CU is recursively derived in raster scan order. Fig.11 The concept is shown in Figure 1. Let us consider an 8x8 CU, which contains four 4x4 sub-CUs: A, B, C, and D. The neighboring 4x4 blocks in the current frame are labeled a, b, c, and d.
[0118] The motion derivation of sub-CU A starts by identifying its two spatial neighbors. The first neighbor is the N×N block (block c) above the sub-CUA. If this block c is not available or is intra-coded, check the other N×N blocks above the sub-CU A (from left to right, starting with block c). The second neighbor is the block on the left of sub-CU A (block b). If block b is not available or is intra-coded, check the other blocks on the left of sub-CU A (from top to bottom, starting with block b). 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 is derived by following the same process of TMVP derivation as specified by HEVC. The motion information of the collocated block at position D is extracted and scaled accordingly. Finally, after retrieving and scaling the motion information, all available motion vectors (up to 3) are averaged separately for each reference list. The average motion vector is assigned as the motion vector of the current sub-CU.
[0119] Fig.11 An example of one CU having 4 sub-blocks (AD) and their neighboring blocks (ad) is shown.
[0120] 2.2.3 Sub-CU Motion Prediction Mode Signaling
[0121] 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 ATMVP mode and STMVP mode. If the sequence parameter set indicates that ATMVP and STMVP are enabled, up to seven Merge candidates are used. The encoding logic of the additional Merge candidates is the same as that of the Merge candidates in HM, which means that for each CU in a P slice or B slice, two RD (Rate Distortion) checks are required for the two additional Merge candidates.
[0122] In JEM, all binaries of the Merge index are context-encoded by CABAC, whereas in HEVC, only the first binary is context-encoded, and the remaining binaries are context-bypassed.
[0123] 2.3 Inter-frame prediction method in VVC
[0124] 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).
[0125] 2.3.1 Codec Block Structure in VVC
[0126] In VVC, a quadtree / binarytree / multitree (QT / BT / TT) structure is used to divide images into square or rectangular blocks.
[0127] In VVC, in addition to QT / BT / TT, a separate tree (also called a dual coding tree) may be used for I frames. For the separate tree, the codec block structure is signaled separately for the luminance component and the chrominance component.
[0128] 2.3.2 Adaptive Motion Vector Difference Resolution
[0129] In HEVC, when use_integer_mv_flag in the slice header is equal to 0, the motion vector difference (MVD) (between the PU's motion vector and the predicted motion vector) is signaled in units of quarter luma samples. In VVC, local adaptive motion vector resolution (LAMVR) is introduced. In VVC, MVD can be encoded and decoded in units of quarter luma samples, integer luma samples, or four luma samples (i.e., 1 / 4 pixel, 1 pixel, 4 pixels). 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.
[0130] 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.
[0131] When the first MVD resolution flag of the CU is zero or the CU is not coded (meaning all MVDs in the CU are zero), quarter luminance sample MV resolution is used for the CU. When the CU uses integer luminance sample MV precision or quadruple luminance sample MV precision, the MVP in the AMVP candidate list of the CU is rounded to the corresponding precision. In the encoder, CU-level RD checking 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. To speed up the encoder, the following coding scheme is applied in JEM:
[0132] · During the RD checking of a CU with normal quarter luminance sample MVD resolution, the motion information of the current CU (integer luminance sample accuracy) is stored. The stored motion information (after rounding) is used as the starting point for further small-range motion vector refinement during the RD checking of the same CU with integer luminance sample and 4 luminance sample MVD resolutions, so that the time-consuming motion estimation process is not repeated three times.
[0133] ● Conditionally call the RD checking of a CU with 4 luminance sample MVD resolution. For a CU, when the RD cost of the integer luminance sample MVD resolution is much greater than the RD cost of the quarter luminance sample MVD resolution, skip the RD checking of the 4 luminance sample MVD resolution for the CU.
[0134] 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 th is a positive value), 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 they can be reused to accelerate the encoding process of the integer or 4 pixel MV.
[0135] Fig.12 is the flowchart of encoding with different MV precisions.
[0136] 2.3.3 Affine Motion Compensation Prediction
[0137] In HEVC, only the translational motion model is applied to motion compensation prediction (MCP). In the real world, there are various motions, such as zooming in / out, rotation, perspective motion, and other irregular motions. In VVC, a simplified affine transform motion compensation prediction is applied using a 4-parameter affine model and a 6-parameter affine model. As Fig.13A and Fig. 13B As shown, the affine motion field of the block is described by two control point motion vectors (CPMVs) of the 4-parameter affine model and three CPMVs of the 6-parameter affine model.
[0138] The motion vector field (MVF) of the block is described by the following equations, respectively, the 4-parameter affine model of equation (1) (where the 4-parameter affine model is defined as variables a, b, e and f) and the 6-parameter affine model of equation (2) (where the 6-parameter affine model is defined as variables a, b, c, d, e and f):
[0139]
[0140]
[0141] Among them, (mv h 0,mv h 0) is the motion vector of the upper left control point, and (mv h 1,mv h 1) is the motion vector of the upper right control point, and (mv h 2,mv h 2) is the motion vector of the lower left control point. All three motion vectors are called control point motion vectors (CPMV). (x, y) represents the coordinates of the representative point in the current block relative to the upper left sample point, and (mv h (x,y),mv v (x,y)) is the motion vector derived for the sample point at (x,y). The CP motion vector can be signaled (as in affine AMVP mode) or dynamically derived (as in 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 (i.e. 4×4 in VTM), the motion vector of the entire sub-block is derived using the representative point.
[0142] To further simplify motion compensation prediction, sub-block based affine transformation prediction is applied. To derive the motion vector of each M×N sub-block (in the current VVC, both M and N are set to 4), the motion vector of the center sample of each sub-block can be calculated according to equations (1) and (2) (e.g. Fig.14The affine mode introduces an interpolation filter of 1 / 16 pixel.
[0143] Fig.14 An example of the affine MVF for each sub-block is shown.
[0144] After MCP, the high-precision motion vector of each sub-block is rounded and saved with the same precision as the normal motion vector.
[0145] 2.3.3.1 Signaling of Affine Prediction
[0146] Similar to the translational motion model, there are also two modes for signaling the side information generated by affine prediction. They are AFFINE_INTER and AFFINE_MERGE modes.
[0147] 2.3.3.2 Example of AF_INTER mode
[0148] 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.
[0149] 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.17 The difference between the best CPMV found by mv0mv1mv2) and the estimated CPMV is signaled. In addition, the index of the affine AMVP candidate from which the estimated CPMV is derived is further signaled.
[0150] 1) Inheriting affine motion prediction value
[0151] The order of checking is similar to that of 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} that is affine-coded and has the same reference picture as the current block. Second, the inherited affine motion prediction value on the top is derived from the first block in {B1, B0, B2} that is affine-coded and has the same reference picture as the current block. Fig.16 Five blocks A1, A0, B1, B0, B2 are depicted in FIG.
[0152] 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.18B As shown, the CPMV for the upper left is expressed as The CPMV for the upper right corner 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 ).
[0153] 2) Constructed affine motion prediction value
[0154] like Fig.17 As shown, the constructed affine motion prediction value includes 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. The CPMV on the upper left It is derived from the MV of the first block in the group {A, B, C} that is affine-coded and has the same reference picture as the current block. is derived from the MV of the first block in group {D, E} that is inter-coded and has the same reference picture as the current block. is derived from the MV at the first block in group {F, G} that is inter-coded and has the same reference picture as the current block.
[0155] - If the current affine motion model is 4-parameter affine, 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.
[0156] - If the current affine motion model is 6-parameter affine, 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.
[0157] When inserting the constructed affine motion predictor into the candidate list, no pruning process is applied.
[0158] 3) Normal AMVP motion prediction value
[0159] Before the number of affine motion predictors reaches the maximum value, the following conditions apply.
[0160] 1) By setting all CPMVs equal to (if available), derive affine motion prediction values.
[0161] 2) By setting all CPMVs equal to (if available), derive affine motion prediction values.
[0162] 3) By setting all CPMVs equal to (if available), derive affine motion prediction values.
[0163] 4) Derive affine motion prediction values by setting all CPMVs equal to HEVC TMVP (if available).
[0164] 5) Derive the affine motion prediction value by setting all CPMVs to zero MV.
[0165] Note that the affine motion prediction values already constructed are derived
[0166] Fig.15A An example of a 4-parameter affine model is shown. Fig. 15B An example of a 6-parameter affine model is shown.
[0167] Fig.16 An example of MVP of AF_INTER inheriting the affine candidate is shown.
[0168] Fig.17 An example of the MVP of the constructed affine candidate AF_INTER is shown. 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.15A and Fig. 15B As shown. The following derivation of MV is proposed, that is, predicting mvd1 and mvd2 from mvd0.
[0169]
[0170]
[0171]
[0172] in, 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. 15B Note that the addition of two motion vectors (e.g., mvA(xA, yA) and mvB(xB, yB)) is equal to the sum of the two components, that is, newMV = mvA + mvB, and the two components of newMV are set to (xA + xB) and (yA + yB), respectively.
[0173] 2.3.3.3 AF_Merge Mode
[0174] 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.18A As shown in (in order represented by A, B, C, D, E). For example, if the adjacent lower left block is Fig.18B 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 extracted. N 、mv1 N and mv2 N . And based on mv0 N 、mv1 N and mv2 N Calculate the motion vector mv0 of the upper left corner / upper right / 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 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 can store 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.
[0175] The CPMVmv0 of the current CU is derived from the simplified affine motion model in equations (1) and (2). C 、mv1 C and mv2 CAfter that, the MVF of the current CU is generated. In order to identify whether the current CU is coded or decoded in AF_MERGE mode, when at least one neighboring block is coded or decoded in affine mode, an affine flag is signaled in the bitstream.
[0176] Fig.18A Example candidates for AF_MERGE in the case of 5 neighboring blocks are shown.
[0177] Fig.18B An example of the CPMV prediction value derivation process is shown.
[0178] The following steps are proposed to construct the affine merge candidate list:
[0179] 1) Insert inherited affine candidates
[0180] Inherited affine candidates are candidates derived from the affine motion model of its valid neighboring affine codec blocks. Up to two inherited affine candidates are derived from the affine motion model of the neighboring blocks and inserted into the candidate list. For the left prediction value, the scanning order is {A0,A1}; for the top prediction value, the scanning order is {B0,B1,B2}.
[0181] 2) Insert the constructed affine candidate
[0182] If the number of candidates in the affine Merge candidate list is less than MaxNumAffineCand (eg, 5), 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.
[0183] A) The motion information of the control point is first obtained from Fig.19 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.
[0184] 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.
[0185] Fig.19 An example of candidate positions for the affine merge mode is shown.
[0186] The motion information for each control point is obtained according to the following priority order:
[0187] - For CP1, the priority of checking is B2->B3->A2. If B2 is available, B2 is used.
[0188] Otherwise, if B2 is available, B3 is used. If neither B2 nor B3 is available, A2 is used.
[0189] If none of the three candidates are available, the motion information of CP1 cannot be obtained.
[0190] - For CP2, check priority is B1->B0.
[0191] - For CP3, check priority is A1->A0.
[0192] -For CP4, use T.
[0193] B) Secondly, use the combination of control points to construct affine merge candidates.
[0194] I. Constructing the 6-parameter affine candidate requires the motion information of three control points. The three control points can be selected from 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.
[0195] II. Constructing a 4-parameter affine candidate requires motion information of two control points. These two control points can be selected from two combinations ({CP1, CP2}, {CP1, CP3}). These two combinations will be converted into a 4-parameter motion model represented by the upper left and upper right control points.
[0196] III. Insert the combinations of constructed affine candidates into the candidate list in the following order:
[0197] {CP1,CP2,CP3},{CP1,CP2,CP4},{CP1,CP3,CP4},{CP2,CP3,CP4},{CP1,CP2},{CP1,CP3}
[0198] i. For each combination, check the reference index of list X for each CP, if they are all the same, then the combination has a valid CPMV for list X. If the combination does not have a valid CPMV for both list 0 and list 1, then the combination is marked as invalid. Otherwise, it is valid and the CPMV is put into the sub-block Merge list.
[0199] 3) Fill with zero motion vectors
[0200] 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.
[0201] More specifically, for the sub-block Merge candidate list, there are 4-parameter Merge candidates, where 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.
[0202] 2.3.3.4 Storage Required for Affine Model Inheritance
[0203] Memory required inside the CTU
[0204] In order to carry out Fig.18B The affine model shown inherits,additional information is stored in each 8×8 block inside the CTU.
[0205] 1) Two reference lists have three CPMVs, requiring 2 (2 reference lists) × 2 (x and y components) × 16 (16 bits per component) × 3 (3 CPMVs) = 192 bits (or 24 bytes in software design).
[0206] 2) The coordinates of the upper left corner of the CU require 2×13=26 bits (or 4 bytes in software design).
[0207] 3) The width and height of the CU require 2×7=14 bits (or 2 bytes in software design).
[0208] Therefore, a total of 232 bits (or 30 bytes) of side information need to be stored for each 8×8 block. We should note that in HEVC, the total amount of motion information that needs to be stored in each 8×8 block is 2 (2 reference lists) × 2 (x and y components) × 16 (16 bits per component) × 4 (4 MVs for 4 4×4 blocks) = 256 bits (or 32 bytes in software design).
[0209] Therefore, in software design, the memory inside the CTU required for motion information increases by 232 / 256=90% or 30 / 32=94%, which greatly increases the demand for cache memory.
[0210] Memory required for line buffers
[0211] For blocks at CTU row boundaries, it is proposed to reduce the line buffer memory required for affine inheritance. Fig. 20 An example is shown when the current CU is at a CTU row boundary. Assume that the selected LE1 ) of the 4×4 block inherits the affine model, and then finds the cover (x LE1 ,yLE1 ) of the neighboring CU. Find the MV of the lower left 4×4 block and the lower right block of the neighboring CU (marked as vLE0 and vLE1 in the figure). The CPMV of the current block is calculated as follows:
[0212] The control point vector of the current CU is derived by using the 4-parameter model and the following formula: and
[0213]
[0214]
[0215] And if the current CU uses a 6-parameter affine motion model, the control point vector is derived by the following formula
[0216]
[0217]
[0218] Because the CPMV of neighboring blocks outside the current CTU row is not needed, the CPMV does not need to be stored in the line buffer. In addition, the height and the y component of the upper left corner coordinate do not need to be stored in the line buffer. However, the width and the x component of the upper left corner coordinate still need to be stored in the line buffer.
[0219] Fig. 20 An example of affine inheritance at a CTU row is shown.
[0220] For affine inheritance, it is proposed to store affine parameters a, b, c and d for affine inheritance instead of storing CPMV. For historical motion vector prediction (HMVP), it is proposed that affine parameters a, b, c and d can be stored to generate historical motion vector prediction (HMVP) for affine Merge or affine inter-frame coding. The buffer / table / list for storing history-based affine models is called an affine HMVP buffer / table / list.
[0221] 3. Examples of Problems Solved by the Embodiments and Techniques Described Herein
[0222] In the current design, the extra storage required for affine inheritance is still a big problem.
[0223] Furthermore, in current designs of affine inheritance across CTU rows, there is a misalignment with respect to MVs that are associated with one location but are assumed to be associated with another location.
[0224] like Fig. 20As shown, the control point vector of the current CU is derived by using the 4-parameter model and the following formula: and
[0225]
[0226]
[0227] And if the current CU uses a 6-parameter affine motion model, the control point vector is derived by the following formula
[0228]
[0229]
[0230] In the above equation, (x LE1 ,y LE1 ) and (x LE0 ,y LE0 ) are used as representative positions of the lower right and lower left sample point coordinates of the codec unit in affine mode, respectively.
[0231] Assume that v LE0 Assigned to the lower left position of the adjacent CU (denoted as (x E0 ,y0)). However, v LE0 Assigned to the center position of the lower left sub-block of the adjacent CU.
[0232] In addition, the coordinates of the CU of the affine codec and the width of the CU need to be known, because it is necessary to identify two representative sub-blocks covering the lower left and lower right samples of the CU. LE0 ,y LE0 ) is called the first representative sub-block, and covers (x LE1 ,y LE1 ) is called the second representative sub-block. Therefore, an additional line buffer is required to store CU width, coordinates, etc.
[0233] 4. Examples of Embodiments and Technologies
[0234] The detailed list of the following items should be considered as an example to explain the general concept. These embodiments should not be interpreted narrowly. In addition, these inventions can be combined in any way.
[0235] In the following discussion, SatShift(x,n) is defined as
[0236]
[0237] Shift(x,n) is defined as Shift(x,n)=(x+offset0)>>n.
[0238] In one example, offset0 and / or offset1 are set to (1 <<n)> >1 or (1<<(n-1)). In another example, offset0 and / or offset1 are set to 0.
[0239] Clip3(min,max,x) is defined as
[0240]
[0241] Reduce the in-CTU storage required for affine inheritance .
[0242] 1. The first set of CPMVs of the block used for affine inheritance of subsequent blocks (located at the representative point (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2), expressed as MV F 0. MV F 1 and MV F 2) A second set of CPMVs (located at the representative points (x S 0,y S 0)、(x S 1,y S 1) and (x S 2,y S 2), expressed as MV S 0. MV S 1 and MV S 2) or the third group of CPMVs (located at the representative points (x T 0,y T 0)、(x T 1,y T 1) and (x T 2,y T 2), expressed as MV T 0. MV T 1 and MV T 2).
[0243] a) In one example, the second set of CPMVs is the same as the third set of CPMVs.
[0244] b) In one example, the first set of CPMVs is derived from the second or third set of CPMVs.
[0245] c) In one example, the first set of CPMVs is stored after encoding / decoding the block.
[0246] d) In one example, the coordinates of the representative point (such as (x F i,y F i)、(x S i,y S i)、(x T i,y T i)) is defined relative to the coordinates of a sub-block used in the affine motion compensation process.
[0247] 2. The relative offset between the representative points of two CPMVs in the first group may not depend on the width or height of the block.
[0248] a) In one example, the pairs are located at the representative points (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) The CPMV of block B (expressed as MV F 0. MV F 1 and MV F 2) are stored. In another example, the F 0,y F 0) and (x F 1,y F 1) The CPMV of block B (expressed as MV F 0 and MV F 1) Store. (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) They can be inside block B, or they are outside it.
[0249] b) In one example, y F 1=y F 0,x F 1 = x F 0+PW.
[0250] c) In one example, x F 1 = x F 0,y F 1=y F 0+PH.
[0251] d) In one example, y F 2=y F0,x F 2 = x F 0+PW.
[0252] e) In one example, x F 2 = x F 0,y F 2=y F 0+PH.
[0253] f) In one example, y F 2=y F 1,x F 2 = x F 1+PW.
[0254] g) In one example, x F 2 = x F 1, y F 2=y F 1+PH.
[0255] h) PW and PH are integers.
[0256] i. In one example, PW = 2 M For example, PW can be equal to 4, 8, 16, 32, 64, or 128.
[0257] ii. In one example, PW = -2 M For example, PW can be equal to -4, -8, -16, -32, -64, or -128.
[0258] iii. In one example, PH = 2 M For example, PH can be equal to 4, 8, 16, 32, 64, or 128.
[0259] iv. In one example, PH = -2 M For example, pH can be equal to -4, -8, -16, -32, -64, or -128.
[0260] v. PW and PH are not stored.
[0261] 1. In one example, they are fixed.
[0262] 2. In another example, they are signaled in VPS / SPS / PPS / slice header / slice group header / slice / CTU.
[0263] 3. In another example, they may be different in different standard profiles / levels / tiers.
[0264] 4. In another example, they may depend on the maximum CU size or / and the minimum CU size of a slice / picture.
[0265] i) In one example, MV F 0=MV S 0,(x F 0,y F 0)=(x S 0,y S 0), or MV F 0=MV T 0,(x F 0,y F 0)=(x T 0,y T 0);
[0266] j) In one example, MV F 0=MV S 1, (x F 0,y F 0)=(x S 1,y S 1), or MV F 0=MV T 1, (x F 0,y F 0)=(x T 1,y T 1);
[0267] k) In one example, MV F 0=MV S 2, (x F 0,y F 0)=(x S 2,y S 2), or MV F 0=MV T 2, (x F 0,y F 0)=(x T 2,y T 2);
[0268] l) In one example, (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) As input coordinates, from MV S 0 and MV S MV is derived from 1 F 0. MV F 1 and MV F 2.
[0269] m) In one example, (xF 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) As input coordinates, from MV S 0. MV S 1 and MV S 2. Derived MV F 0. MV F 1 and MV F 2.
[0270] n) In one example, (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) As input coordinates, from MV T 0 and MV T MV is derived from 1 F 0. MV F 1 and MV F 2.
[0271] o) In one example, (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) As input coordinates, from MV T 0. MV T 1 and MV T 2. Derived MV F 0. MV F 1 and MV F 2.
[0272] p) In one example, MV is calculated only when the current block is encoded or decoded using a 6-parameter affine model. F 2.
[0273] i. Alternatively, regardless of whether the current block is encoded or decoded using a 4-parameter affine model or a 6-parameter affine model, MV is calculated. F 2.
[0274] 3. Storing the difference between CPMVs instead of storing the CPMVs themselves.
[0275] a) In one example, store D1 = MV F 1-MV F 0;
[0276] b) In one example, store D2 = MV F 2-MV F 0;
[0277] c) In one example, both D1 and D2 are stored;
[0278] i. In one example, D2 is stored only when the current block is encoded or decoded using a 6-parameter affine model.
[0279] ii. Alternatively, whether the current block is encoded or decoded using a 4-parameter affine model or a 6-parameter affine model, D2 is stored.
[0280] d) In one example, the CPMV and the difference between the CPMV can be stored together. For example, storing MV F 0, D1 and D2.
[0281] 4. The stored CPMV or the difference between CPMVs may be shifted before storage. Assuming that the MV is the CPMV or the difference between CPMVs to be stored, then
[0282] a) For example, MV'x = SatShift(MVx,n), and MV'y = SatShift(MVy,n). Store MV' = (MV'x, MV'y) instead of MV.
[0283] b) For example, MV'x = Shift(MVx,n), and MV'y = Shift(MVy,n). Store MV' = (MV'x, MV'y) instead of MV.
[0284] c) for example, n is an integer such as 2 or 4;
[0285] i. In one example, n depends on the motion accuracy.
[0286] ii. n may be different when storing CPMVs or storing differences between CPMVs.
[0287] d) In one example, the stored MV' is first left-shifted before being used in affine inheritance.
[0288] 5. The CPMV or the difference between the CPMVs to be stored may be clipped before storage. Assuming that the MV is the CPMV or the difference between the CPMVs to be stored, then
[0289] a) MV'x = Clip3(MinV, MaxV, MVx), and MV'y = Clip3(MinV, MaxV, MVy). Store MV' = (MV'x, MV'y) instead of MV.
[0290] b) In one example, K bits are used to store MV, then MinV = -2 K-1 , MaxV=2 K-1 -1. For example, when K=8, MinV=-128, MaxV=127.
[0291] iK may be different depending on whether the MV is a CPMV or a difference between CPMVs.
[0292] c) In one example, the stored MV' is first shifted and then clipped before it is used for affine inheritance.
[0293] 6. The MV stored in the adjacent neighboring basic block denoted as Badj is used to derive the affine inheritance MV of the current block.
[0294] a) Fig.21 Examples of MVs stored in adjacent neighboring basic blocks are shown: L, A, LB, AR, and AL. In VTM, a basic block is a 4x4 block.
[0295] b) The MV stored in the adjacent neighboring basic block Badj is represented as MVa=(mv h a ,mv v a ), then it will be expressed as (mv h (x,y),mv v The affine inheritance MV of the current block at position (x,y) is derived as
[0296]
[0297] or
[0298]
[0299] Among them, (x0,y0) is the representative point of MVa.
[0300] i.(x0,y0) can be any position inside basic block Badj. Fig. 22 An example is shown. (x0, y0) can be any one of Pij (i=0...Wb-1, j=0...Hb-1), where Wb and Hb are the width and height of the basic block. In this example, Wb=Hb=4. In one example, assuming that the coordinates of the upper left corner sample point in Badj are (xTL, yTL), then (x0, y0) can be any one of (xTL+i, yTL+j) (i=0...Wb-1, j=0...Hb-1).
[0301] 1. For example, (x0,y0) can be Fig. 22 P22 in.
[0302] 2. Assume that the coordinates of the upper left sample point of the current block are (xPos00, yPos00), the coordinates of the upper right sample point of the current block are (xPos10, yPos00), and the coordinates of the upper right sample point of the current block are (xPos00, yPos01). Fig.21 middle:
[0303] a. The (x0, y0) of the adjacent basic block L is (xPos00-2, yPos01-1);
[0304] b. The (x0, y0) of the adjacent basic block LB is (xPos00-2, yPos01+3);
[0305] c. The (x0, y0) of the adjacent basic block A is (xPos10-1, yPos00-2);
[0306] d. The (x0, y0) of the adjacent basic block AR is (xPos10+3, yPos00-2);
[0307] e. The (x0, y0) of the adjacent neighboring basic block AL is (xPos00-2, yPos00-2).
[0308] ii. (x0, y0) can be any location outside or at the boundary of basic block Badj.
[0309] 1. For example, assuming that the coordinates of the upper left corner sample point in Badj are (xTL, yTL), then (x0, y0) can be any one of (xTL+i, yTL+j), where i can be -1, 0, Wb-1, or Wb; j can be -1, 0, Hb-1, or Hb.
[0310] iii. Assume that the coordinates of the upper left corner sample point in Badj are (xTL, yTL), and (x0, y0) = (xTL+i, yTL+j).
[0311] 1. i and j can depend on the position of Badj. For example, if Badj is Fig.21 If the block L in is, then i=0, j=Hb-1, but if Badj is Fig.21 If it is block A in , then i=Wb-1, j=0.
[0312] 2. i and j can depend on the width and height of the current block.
[0313] 3. i and j may be signaled in VPS / SPS / PPS / slice header / slice group header / slice / CTU / CU.
[0314] 4. In another example, i and j may be different in different standard grades / levels / tiers.
[0315] iv. The position (x, y) can be in a sub-block of the current block, then it depends on MVa to inherit the MV of the sub-block.
[0316] v. The position (x, y) can be a corner of the current block, then it depends on MVa to inherit the CPMV of the current block.
[0317] 1. In one example, the inherited CPMV can be used to predict the signaled CPMV of the current block for affine inter coding.
[0318] 2. In one example, the inherited CPMV can be directly used as the CPMV of the current block of the affine Merge codec.
[0319] vi. In one example, if the current block uses a 4-parameter affine model, equation (3) applies. If the current block uses a 6-parameter affine model, equation (4) applies.
[0320] vii. Alternatively, regardless of whether the current block uses a 4-parameter affine model or a 6-parameter affine model, equation (4) is applied.
[0321] c) a, b, c and d in equations (3) and (4) are calculated as follows
[0322]
[0323] i. In one example, a, b, c, and d are derived from the CPMV stored in the second or third group of CUs covering the adjacent neighboring basic block Badj, as stated in bullet 1. Assuming that the CU covering the adjacent neighboring basic block Badj is block Z, then mv t0 =(mv h t0 ,mv v t0 ), mv t1 =(mv h t1 ,mv v t1 ), mv t2 =(mv h t2 ,mv v t2 ) is the CPMV in the second or third group of block Z. t and h t are the width and height of block Z.
[0324] ii. In one example, a, b, c, and d are derived from the CPMV stored in the first group of CUs covering the adjacent neighboring basic block Badj, as stated in bullet 1. Assuming that the CU covering the adjacent neighboring basic block Badj is block Z, then mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 ) and mv t2 =(mv h t2 ,mv v t2 ) is the CPMV in the first group of block Z. t and h t It is the PW and PH stated in bullet 2.
[0325] iii. In one example, extract mv directly from the storage device h t1 -mv h t0 、mv v t1 -mv v t0 、mv h t2 -mv h t0 、mv v t2 -mv v t0 , as stated in bullet point 3.
[0326] Fig.21 An example of MVs stored in adjacent neighboring basic blocks is shown.
[0327] Fig. 22 The positions in the 4×4 basic blocks are shown.
[0328] Reduces line buffer storage required for affine inheritance.
[0329] 7. A first MV stored in a first basic block adjacent to the current block and a second MV stored in a second basic block having a known offset from the first basic block are used to derive the CPMV of the current block.
[0330] a) In one example, the MV stored in the first adjacent neighbor basic block is represented as MVa=(mv h a,mv v a ), and then derived from equation (3) as (mv h (x,y),mv v (x, y)), the affine inheritance MV of the current block at position (x, y), and a and b are derived by equation (5).
[0331] i. In one example, mv in equation (5) t0 and mv t1 are set equal to the MV stored in the first basic block and the MV stored in the second basic block, respectively. t Set to the horizontal offset between two basic blocks.
[0332] b) Alternatively, a and b can be derived as
[0333]
[0334] Among them, h t Set to the horizontal offset between two basic blocks.
[0335] c) For example, w t and h t Must be 2 N In the form of 4, 8, 16...
[0336] d) Assuming that (xLT0, yLT0) and (xLT1, yLT1) represent the coordinates of the upper left corner sample point of the first basic block and the second basic block respectively, then
[0337] i. The horizontal offset between the first basic block and the second basic block is defined as xLT1-xLT0;
[0338] ii. The vertical offset between the first basic block and the second basic block is defined as yLT1-yLT0;
[0339] e) In one example, when the first basic block is in the current block (such as Fig.23 When above blocks A, AL, and AR), yLT1-yLT0 must be equal to 0.
[0340] f) In one example, when the first basic block is to the left of the current block (such as Fig.23 For blocks L, LB, and AL), xLT1-xLT0 must be equal to 0.
[0341] g) How to select the second basic block depends on the position of the first block.
[0342] i. For example, if xLT0%M is not equal to 0, then yLT1=yLT0 and xLT1=xLT0−offset, where offset is a positive number such as 4, 8, or 16, for example, M=8 and offset=4.
[0343] ii. For example, if xLT0%M is equal to 0, then yLT1=yLT0 and yLT1=yLT0+offset, where offset is a positive number such as 4, 8, or 16, for example, M=8 and offset=4. iii. For example, if xLT0%M is equal to 0, then yLT1=yLT0 and xLT1=xLT0+offset, where offset is a positive number such as 4, 8, or 16, for example, M=8 and offset=4. iv. For example, if xLT0%M is not equal to 0, then xLT1=xLT0 and yLT1=yLT0–offset, where offset is a positive number such as 4, 8, or 16, for example, M=8 and offset=4.
[0344] v. For example, if xLT0%M is equal to 0, then xLT1=xLT0 and yLT1=yLT0+offset, where offset is a positive number such as 4, 8 or 16, for example, M=8 and offset=4.
[0345] vi. Fig.23 Examples of pairs of first and second basic blocks are shown: AL and AL', A and A', AR and AR', L and L', LB and LB'.
[0346] vii. For example, if the first block is above and to the left of the current block (such as Fig.23 If block AL is in block AL), then yLT1=yLT0 and xLT1=xLT0+offset, where offset is a positive number such as 4, 8 or 16.
[0347] viii. For example, if the first block is above and to the right of the current block (such as Fig.23 If block AR is in the block AR), then yLT1=yLT0 and xLT1=xLT0-offset, where offset is a positive number such as 4, 8 or 16.
[0348] ix. For example, if the first block is above and to the left of the current block (such as Fig.23 If the current block is block AL in CTU, and the left boundary of the current block is also the left boundary of CTU, then yLT1=yLT0 and xLT1=xLT0+offset, where offset is a positive number such as 4, 8 or 16.
[0349] x. For example, if the first block is above and to the right of the current block (such as Fig.23in the block AR), and the right boundary of the current block is also the right boundary of the CTU, then yLT1 = yLT0 and xLT1 = xLT0 - offset, where offset is a positive number such as 4, 8, or 16.
[0350] xi. For example, if xLT0 – offset < xLT_AL, where xLT_AL is the upper left coordinate of the neighboring basic block (such as Fig.23 the block AL) in the upper left of the current block, then yLT1 = yLT0 and xLT1 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0351] xii. For example, if xLT0 + offset > xRT_AR, where xRT_AR is the upper right coordinate of the neighboring basic block (such as Fig.23 the block AR) in the upper right of the current block, then yLT1 = yLT0 and xLT1 = xLT0 - offset, where offset is a positive number such as 4, 8, or 16.
[0352] xiii. For example, if xLT0 – offset < xLT_AL, where xLT_AL is the upper left coordinate of the neighboring basic block (such as Fig.23 the block AL) in the upper left of the current block, and the left boundary of the current block is also the left boundary of the CTU, then yLT1 = yLT0 and xLT1 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0353] xiv. For example, if xLT0 + offset > xRT_AR, where xRT_AR is the upper right coordinate of the neighboring basic block (such as Fig.23 the block AR) in the upper right of the current block, and the right boundary of the current block is also the right boundary of the CTU, then yLT1 = yLT0 and xLT1 = xLT0 - offset, where offset is a positive number such as 4, 8, or 16.
[0354] h) The second basic block can be selected from a number of candidate basic blocks.
[0355] i. For example, the upper left positions of M candidate basic blocks are represented as (xC0, yC0), (xC1, yC1), ……, (xC M-1 , yC M-1 ). The M candidate basic blocks are checked in order to find a candidate basic block that is inter-frame coded and has an MV that references the same reference picture as the MV referenced by the first basic block. The candidate found is selected as the second basic block.
[0356] 1. In one example, M = 2. yC0 = yLT0, xC0 = xLT0−offset, yC1 = yLT0, xC1 = xLT0−offset, where offset is a positive number such as 4, 8, or 16.
[0357] 2. In one example, M = 2. xC0 = xLT0, yC0 = yLT0−offset, xC1 = xLT0, yC1 = yLT0−offset, where offset is a positive number such as 4, 8, or 16.
[0358] 3. In one example, M = 2. yC0 = yLT0, xC0 = xLT0−offset, yC1 = yLT0, xC1 = xLT0+offset, where offset is a positive number such as 4, 8, or 16.
[0359] 4. In one example, M = 2. xC0 = xLT0, yC0 = yLT0−offset, xC1 = xLT0, yC1 = yLT0+offset, where offset is a positive number such as 4, 8, or 16.
[0360] ii. Whether and / or how to select the second basic block from the candidate basic blocks may depend on the position of the first basic block and / or the position of the current block.
[0361] 1. For example, M=1. If the first block is above and to the left of the current block (such as Fig.23 If block AL is in the block AL), then yC0=yLT0, xC0=xLT0+offset, where offset is a positive number such as 4, 8 or 16.
[0362] a. For example, in other cases, M = 2. yC0 = yLT0, xC0 = xLT0−offset, yC1 = yLT0, xC1 = xLT0+offset, where offset is a positive number such as 4, 8, or 16.
[0363] 2. For example, M = 1. If the first block is above and to the right of the current block (such as Fig.23 If block AR is in the block AR), then yC0=yLT0, xC0=xLT0-offset, where offset is a positive number such as 4, 8 or 16.
[0364] a. For example, in other cases, M = 2. yC0 = yLT0, xC0 = xLT0−offset, yC1 = yLT0, xC1 = xLT0+offset, where offset is a positive number such as 4, 8, or 16.
[0365] 3. For example, M=1. If the first block is above and to the left of the current block (such as Fig.23 in block AL) in it, and the left boundary of the current block is also the left boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0366] a. For example, in other cases, M = 2. yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0367] 4. For example, M = 1. If the first block is in the upper right of the current block (such as Fig.23 in block AR), and the right boundary of the current block is also the right boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 - offset, where offset is a positive number such as 4, 8, or 16.
[0368] a. For example, in other cases, M = 2. yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0369] 5. For example, M = 1. If xLT0 – offset < xLT_AL, where xLT_AL is the upper left coordinate of the neighboring basic block in the upper left of the current block (such as Fig.23 in block AL), then yC0 = yLT0, xC0 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0370] a. For example, in other cases, M = 2. yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0371] 6. For example, M = 1. If xLT0 + offset > xRT_AR, where xRT_AR is the upper right coordinate of the neighboring basic block in the upper right of the current block (such as Fig.23 in block AR), then yC0 = yLT0, xC0 = xLT0 - offset, where offset is a positive number such as 4, 8, or 16.
[0372] a. For example, in other cases, M = 2. yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0373] 7. For example, M = 1. If xLT0 – offset < xLT_AL, where xLT_AL is the upper left coordinate of the neighboring basic block in the upper left of the current block (such as Fig.23 block AL in ), and the left boundary of the current block is also the left boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0374] a. For example, in other cases, M = 2. yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0375] 8. For example, M = 1. If xLT0 + offset > xRT_AR, where xRT_AR is the upper right coordinate of the neighboring basic block in the upper right of the current block (such as Fig.23 block AR in ), and the right boundary of the current block is also the right boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 - offset, where offset is a positive number such as 4, 8, or 16.
[0376] a. For example, in other cases, M = 2. yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, where offset is a positive number such as 4, 8, or 16.
[0377] i) If the second basic block cannot be found, affine inheritance cannot be performed from the first basic block, and the second basic block is inter - frame coded and has a motion vector (MV) that references the same reference picture as the MV referenced by the first basic block.
[0378] j) In one example, whether and how to apply the method in the bullet points may depend on the position of the current block.
[0379] i. For example, the method in the bullet points is applied only when the affine model is inherited from a neighboring block above and it is not in the current CTU or CTU row.
[0380] ii. For example, the method in the bullet points is applied only when the affine model is inherited from a neighboring block above or to the left and it is not in the current CTU.
[0381] k) It is proposed to identify the first representative sub - block by deriving the sub - block from which the affine model inheritance is obtained. In this case, the motion vector associated with a block from which the affine model inheritance is derived is used as (mv h a , mvv a ).
[0382] l) proposed Fig.24 The embodiment shown.
[0383] i. If the current block inherits the affine model from basic block BB (BB can be A, AR or AL, the top left position of BB is (xBB, yBB), and BB must be affine encoded), then BB is considered as the first adjacent neighboring basic block. And the following process is applied to find the second adjacent neighboring basic block.
[0384] If xBB%8==0, first check the basic block BBR on the right of BB (if BB is A, then BBR is AR; if BB is AR, then BBR is AR'; if BB is AL, then BBR is AL'); otherwise (xBB%8!=0), first check the basic block BBL on the left of BB (if BB is A, then BBL is A'; if BB is AR, then BBL is A; if BB is AL, then BBL is AL').
[0385] ii. When checking BBR first, if BBR is affine encoded and it has the same reference index as BB for a given reference list, then BBR is considered as the second adjacent neighboring basic block. Otherwise, BBL will be considered as the second adjacent neighboring basic block.
[0386] iii. When checking BBL first, if BBL is affine encoded and it has the same reference index as BB for a given reference list, then BBL is considered as the second adjacent neighboring basic block. Otherwise, BBR will be considered as the second adjacent neighboring basic block.
[0387] m) For example, whether to find the second block from multiple candidates or from a predefined offset depends on the position of the first block and / or the position of the current block.
[0388] i. Fig.24 The embodiment shown.
[0389] 1. If the current block inherits the affine model from basic block BB (BB can be A, AR or AL, the top left position of BB is (xBB, yBB), and BB must be affine encoded), then BB is considered as the first adjacent neighboring basic block. And the following process is applied to find the second adjacent neighboring basic block.
[0390] a. If BB is AL and the left boundary of the current block is the left boundary of CTU, only the basic block BBR(AL") to the right of BB is checked. If BBR is affine coded and it has the same reference index as BB for a given reference list, BBR is considered as the second adjacent neighboring basic block. Otherwise, the affine model inherited from BB is not available.
[0391] b. Otherwise, if xBB%S==0, first check the basic block BBR on the right of BB (if BB is A, then BBR is AR; if BB is AR, then BBR is AR'; if BB is AL, then BBR is AL'); otherwise (xBB%S!=0), first check the basic block BBL on the left of BB (if BB is A, then BBL is A'; if BB is AR, then BBL is A; if BB is AL, then BBL is AL'). For example, S is equal to 8.
[0392] i. When checking BBR first, if BBR is affine encoded and it has the same reference index as BB for a given reference list, then BBR is considered as the second adjacent neighboring basic block. Otherwise, BBL will be considered as the second adjacent neighboring basic block.
[0393] ii. When checking BBL first, if BBL is affine encoded and it has the same reference index as BB for a given reference list, then BBL is considered as the second adjacent neighboring basic block. Otherwise, BBR will be considered as the second adjacent neighboring basic block.
[0394] n) The offset between the first basic unit and the second basic unit disclosed in this document is a positive integer.
[0395] i. In one example, offset must be 2 K in the form of.
[0396] ii. In one example, the offset may depend on the minimum allowed CU width.
[0397] iii. In one example, the offset may depend on the minimum allowed CU height.
[0398] iv. In one example, the offset may depend on the basic block width.
[0399] v. In one example, the offset may depend on the basic block height.
[0400] vi. In one example, the offset may depend on the minimum allowed width of the CU for which the affine codec is applicable.
[0401] vii. In one example, the offset may depend on the minimum allowed height of the CU for which the affine codec is applicable.
[0402] viii. In one example, the offset can be signaled from the encoder to the decoder.
[0403] o) If basic block P is selected as the second block when basic block Q is the first block, it is not allowed to select Q as the second block when P is the first block.
[0404] i. In one example, P is not allowed to be the first block.
[0405] ii. In one example, when P is the first block, if Q is to the right of P, the second block can only be selected from the basic units to the left of P.
[0406] iii. In one example, when P is the first block, if Q is to the left of P, the second block can only be selected from the basic unit to the right of P.
[0407] iv. In one example, when P is the first block, if Q is below P, the second block can only be selected from the basic unit above P.
[0408] v. In one example, when P is the first block, if Q is above P, the second block can only be selected from the basic unit below P.
[0409] p) In one example, the adjacent neighboring basic blocks may be in rows or columns adjacent to the current block. Fig.23 In the example, AL', AR', and LB' can also be regarded as adjacent neighboring blocks.
[0410] q) In one example, a first basic block is considered "valid" if it satisfies one, several, or all of the following conditions:
[0411] i. It is inter-frame coded;
[0412] ii. It is not intra-block copy coded;
[0413] iii. It is affine encoded and decoded;
[0414] iv. It is affine Merge encoded and decoded;
[0415] v. It is affine inter-frame codec;
[0416] r) In one example, whether the second basic block is considered "valid" may depend on information of the first basic block.
[0417] s) In one example, the second basic block is considered "valid" if it satisfies one, several or all of the following conditions:
[0418] i. It is inter-frame coded;
[0419] ii. It is not intra-block copy coded;
[0420] iii. It is affine encoded and decoded;
[0421] iv. It is affine Merge encoded and decoded;
[0422] v. It is affine inter-frame codec;
[0423] vi. It has the same inter prediction direction as the first basic block;
[0424] vii. It has the same reference index of reference list 0 as the first basic block;
[0425] viii. It has the same reference index of reference list 1 as the first basic block;
[0426] ix. It has the same inter prediction direction and the same reference index as the first basic block;
[0427] x. It has the same picture order count (POC) value of the reference picture in reference list X (X is 0 and / or 1) as the first basic block;
[0428] t) In one example, checking neighboring basic blocks (such as Fig.24 Each candidate above (AR, A and AL1 in ) is selected to determine whether it is a valid first basic block. For example, the order can be AR, A, AL1 or A, AR, AL1.
[0429] i. In one example, if a basic block BB (BB can be AR, A or AL1) is checked and BB is a valid first basic block, the basic blocks to its left and / or the basic blocks to its right are checked to find the corresponding second basic block.
[0430] 1. In one example, first check the basic block BBR to the right of BB. An example of detailed steps for determining the first basic block and the second basic block is given below:
[0431] - If BBR is a valid second basic block, output BB and BBR as the first basic block and the second basic block;
[0432] - Otherwise (BBR is invalid), check the basic block BBL to the left of BB;
[0433] i. If BBL is a valid second basic block, output BB and BBL as the first basic block and the second basic block;
[0434] ii. Otherwise (BBL is invalid), then check that the next basic block in sequence is the first basic block. In an alternative example, a valid first basic block and a second basic block cannot be output.
[0435] 2. Alternatively, first check the basic block BBL to the left of BB. An example of detailed steps for determining the first basic block and the second basic block is given below:
[0436] - if BBL is a valid second basic block, output BB and BBL as the first basic block and the second basic block;
[0437] - Otherwise (BBL is invalid), check the basic block BBR to the right of BB;
[0438] i. If BBR is a valid second basic block, output BB and BBR as the first basic block and the second basic block;
[0439] ii. Otherwise (BBR is invalid), check the next basic block in sequence to determine whether it is a valid first basic block.
[0440] 1. Alternatively, no valid first basic block and second basic block may be output from the upper adjacent basic block.
[0441] ii. In one example, if a basic block BB (BB can be AR, A or AL1) is checked and BB is a valid first basic block, only the basic block BBL to its left is checked to find the corresponding second basic block. An example of detailed steps for determining the first basic block and the second basic block is given below:
[0442] - if BBL is a valid second basic block, output BB and BBL as the first basic block and the second basic block;
[0443] - Otherwise (BBL is invalid), BB and the basic block BBR to the right of BB are output as the first basic block and the second basic block;
[0444] a. Alternatively, BB is not used as the first basic block, and the next basic block in sequence is checked to determine whether it is a valid first basic block.
[0445] b. Alternatively, no valid first basic block or second basic block may be output from the upper adjacent basic block.
[0446] iii. Alternatively, if a basic block BB is checked (BB can be AR, A or AL1), and BB is a valid first basic block, only the basic block BBR to its right is checked to find the corresponding second basic block. An example of detailed steps for determining the first basic block and the second basic block is given below:
[0447] - If BBR is a valid second basic block, output BB and BBR as the first basic block and the second basic block;
[0448] - Otherwise (BBR is invalid), BB and the basic block BBL to the left of BB are output as the first basic block and the second basic block;
[0449] a. Alternatively, BB is not used as the first basic block, and the next basic block in sequence is checked to determine whether it is a valid first basic block.
[0450] b. Alternatively, no valid first basic block or second basic block may be output from the upper adjacent basic block.
[0451] Fig. 27 and Fig.28 Two exemplary flow charts are shown how to select a first basic block and a second basic block.
[0452] iv. In one example, which upper neighboring basic block may be checked to determine the first basic block may depend on the position of the current block and / or the sub-block size of the affine motion compensation.
[0453] 1. For example, if the current block is at the left boundary of CTU, the candidate basic block is Fig.24 For example, if xPos00%CTU_W==0 (xPos00 is the upper left coordinate of the current block, and CTU_W is the width of CTU), the current block is located at the left boundary of CTU.
[0454] a. For example, if the current block is located at the left boundary of CTU, the candidate basic blocks are AR, A, and AL”; otherwise, the candidates are AR, A, and AL1.
[0455] v. Whether a basic block can be used as the first basic block may depend on the position of the current block.
[0456] 1. For example, if the current block is located at the left boundary of the CTU, then Fig.24 The basic block AL1 in cannot be used as the first basic block.
[0457] 2. For example, if the current block is located at the left boundary of the CTU, then Fig.24 The basic block AL' in cannot be used as the first basic block.
[0458] 3. For example, if the current block is located at the right boundary of the CTU, then Fig.24 The basic block AR in cannot be used as the first basic block. For example, if (xPos00+W)%CTU_W==0 (xPos00 is the upper left coordinate of the current block, W is the width of the current block, and CTU_W is the width of the CTU), the current block is located at the right boundary of the CTU.
[0459] 4. For example, if the current block is located at the right boundary of the CTU, then Fig.24 The basic block AR' in cannot be used as the first basic block.
[0460] vi. Whether a basic block can be used as a second basic block may depend on the position of the current block.
[0461] 1. For example, if the current block is located at the left boundary of the CTU, then Fig.24 The basic block AL1 in cannot be used as the second basic block.
[0462] 2. For example, if the current block is located at the left boundary of the CTU, then Fig.24 The basic block AL' in cannot be used as the second basic block.
[0463] 3. For example, if the current block is located at the right boundary of the CTU, then Fig.24 The basic block AR in cannot be used as the second basic block.
[0464] 4. For example, if the current block is located at the right boundary of the CTU, then Fig.24 The basic block AR' in cannot be used as a second basic block.
[0465] u) In one example, the first basic block and the second basic block may be swapped.
[0466] i. In one example, the output first basic block and the second basic block are first exchanged and then used to decode a block.
[0467] ii. Alternatively, the determination process of the first basic block and the second basic block may be exchanged. Fig.23 An example of MVs of two adjacent neighboring blocks is shown.
[0468] Extension to stored affine parameters
[0469] 8. The stored affine parameters can be shifted before storage. Assuming that m is to be stored (m can be a, b, c or d), then
[0470] a) For example, m'=SatShift(m,n). Store m' instead of m.
[0471] b) For example, m'=Shift(m,n). Store m' instead of m.
[0472] c) for example, n is an integer such as 2 or 4;
[0473] i. In one example, n depends on the accuracy of the movement.
[0474] ii. In one example, n may be different for different affine parameters.
[0475] i. In one example, n may be signaled in VPS / SPS / PPS / / slice header / slice group header / slice / CTU / CU.
[0476] ii. In another example, n may be different in different standard grades / levels / tiers.
[0477] d) In one example, the stored affine parameters are first left-shifted before being used for affine inheritance.
[0478] e) In one example, the stored m' is first shifted and then clipped before being used for affine inheritance.
[0479] Extensions to Affine HMVP
[0480] 9. In one example, the CPMVs in the first group as disclosed in bullets 1 and 2 may be stored in an affine HMVP buffer / table / list to represent a history-based candidate affine model.
[0481] 10. In one example, the differences between the CPMVs as disclosed in bullet point 3 may be stored in an affine HMVP buffer / table / list to represent a history-based candidate affine model.
[0482] 11. All methods proposed in this article, such as bullet points 4 and 5, can be applied to CPMVs or differences between CPMVs stored in an affine HMVP buffer / table / list.
[0483] 12. When the CPMV or the difference between CPMVs does not come from neighboring blocks but from an affine history buffer / table / list, all methods disclosed in bullet point 6 can be applied.
[0484] More accurate MV location
[0485] 13. It is proposed that the position of the MV used for affine inheritance from a block should be aligned with the position of the MV used to derive the block.
[0486] a) In Fig. 20 In an example shown, the control point vector of the current CU is derived by using a 4-parameter model and the following formula: and
[0487]
[0488]
[0489] And if the current CU uses a 6-parameter affine motion model, the control point vector is derived by the following formula
[0490]
[0491]
[0492] i. For example, offx = 1 and offy = -1;
[0493] ii. For example, offx = 2 and offy = -2;
[0494] iii. For example, offx=1 and offy=-2;
[0495] iv. For example, offx = 2 and offy = -1;
[0496] v. For example, offx = 1 and offy = -3;
[0497] vi. For example, offx=2 and offy=-3;
[0498] b) In Fig. 20 In an example shown, the control point vector of the current CU is derived by using a 4-parameter model and the following formula: and
[0499]
[0500]
[0501] And if the current CU uses a 6-parameter affine motion model, the control point vector is derived by the following formula
[0502]
[0503]
[0504] i. For example, offx = -1 and offy = -1;
[0505] ii. For example, offx = -2 and offy = -2;
[0506] iii. For example, offx = -1 and offy = -2;
[0507] iv. For example, offx = -2 and offy = -1;
[0508] v. For example, offx = -1 and offy = -3;
[0509] vi. For example, offx = -2 and offy = -3;
[0510] 5. Examples
[0511] In one embodiment, bullet 6 is applied to not perform affine inheritance at CTU row boundaries. An exemplary decoding process is specified as (section numbers here refer to the current version of the VVC standard):
[0512] 8.3.3.2 Derivation of motion vectors and reference indices in sub-block merge mode
[0513] …
[0514] 2. When sps_affine_enabled_flag is equal to 1, the sample point positions (xNbA0, yNbA0), (xNbA1, yNbA1), (xNbA2, yNbA2), (xNbB0, yNbB0), (xNbB1, yNbB1), (xNbB2, yNbB2), (xNbB3, yNbB3) and the variables numSbX and numSbY are derived as follows:
[0515] (xA0,yA0)=(xCb-2,yCb+cbHeight+2) (8-309)
[0516] (xA1,yA1)=(xCb-2,yCb+cbHeight-2) (8-310)
[0517] (xA2,yA2)=(xCb-1,yCb) (8-311)
[0518] (xB0,yB0)=(xCb+cbWidth+2,yCb-2) (8-312)
[0519] (xB1,yB1)=(xCb+cbWidth-2,yCb-2) (8-313)
[0520] (xB2,yB2)=(xCb-2,yCb-2) (8-314)
[0521] (xB3,yB3)=(xCb,yCb-1) (8-315)
[0522] numSbX=cbWidth>>2 (8-316)
[0523] numSbY=cbHeight>>2 (8-317)
[0524] 3. When sps_affine_enabled_flag is equal to 1, the variable availableFlagA is set equal to FALSE, and the following applies to (xNbA0, yNbA0) to (xNbA1, yNbA1). k ,y k ):
[0525] - With the current luminance position (xCurr, yCurr) set equal to (xCb, yCb) and the neighboring luminance position (xNbA k ,y k ) as input, invokes the chunk availability derivation process as specified in clause 6.4.X, and assigns the output to the chunk availability flag availableA k .
[0526] -When availableA k is equal to TRUE and MotionModelIdc[xNbA k ][yNb k ] is greater than 0 and availableFlagA is equal to FALSE, the following applies:
[0527] -The variable availableFlagA is set equal to TRUE and motionModelIdcA is set equal to MotionModelIdc[xNbA k ][yNb k ], (xNb, yNb) is set equal to (CbPosX[xNbA k ][yNb k ],CbPosY[xNbA k ][yNb k ]), nbW is set equal to CbWidth[xNbA k ][yNb k ], nbH is set equal to CbHeight[xNbA k ][yNb k ], and numCpMv is set equal to MotionModelIdc[xNbA k ][yNb k ]+1.
[0528] -For X replaced by 0 or 1, the following applies:
[0529] -When PredFlagLX[xNbA k ][yNbA k ] is equal to 1, based on the luminance codec block position (xCb, yCb), luminance codec block width and height (cbWidth, cbHeight), adjacent luminance codec block position (xNb, yNb), adjacent sub-block center position (xNbA k ,y k ), the adjacent luma codec block width and height (nbW, nbH) and the number of control point motion vectors numCpMv as input, and the control point motion vector prediction value candidates cpMvLXA[cpIdx] (where cpIdx = 0..numCpMv-1) as output, calling the derivation process of deriving luma affine control point motion vectors from adjacent blocks as specified in clause 8.3.3.5.
[0530] - Make the following allocations:
[0531] predFlagLXA=PredFlagLX[xNbA k ][yNbA k ] (8-318)
[0532] refIdxLXA=RefIdxLX[xNbAk][yNbAk] (8-319)
[0533] 4. When sps_affine_enabled_flag is equal to 1, the variable availableFlagB is set equal to FALSE, and the following applies to (xNbB0, yNbB0) to (xNbB2, yNbB2). k ,yNb k ):
[0534] - with the current luminance position (xCurr, yCurr) set equal to (xCb, yCb) and the neighboring luminance position (xNbB k ,yNb k ) as input, invokes the block availability derivation process as specified in clause 6.4.X, and assigns the output to the block availability flag availableB k .
[0535] -When availableB k is equal to TRUE and MotionModelIdc[xNbB k ][yNb k] is greater than 0 and availableFlagB is equal to FALSE, the following applies:
[0536] -The variable availableFlagB is set equal to TRUE and motionModelIdcB is set equal to MotionModelIdc[xNbB k ][yNb k ], (xNb, yNb) is set equal to (CbPosX[xNbAB][yNbB k ],CbPosY[xNbB k ][yNb k ]), nbW is set equal to CbWidth[xNbB k ][yNb k ], nbH is set equal to CbHeight[xNbB k ][yNb k ], and numCpMv is set equal to MotionModelIdc[xNbB k ][yNb k ]+1.
[0537] -For X replaced by 0 or 1, the following applies:
[0538] -When PredFlagLX[xNbB k ][yNb k ] is equal to TRUE, based on the luminance codec block position (xCb, yCb), luminance codec block width and height (cbWidth, cbHeight), adjacent luminance codec block position (xNb, yNb), adjacent sub-block center position (xNbB k ,yNb k ), the adjacent luma codec block width and height (nbW, nbH) and the number of control point motion vectors numCpMv as input, and the control point motion vector prediction value candidates cpMvLXB[cpIdx] (where cpIdx = 0..numCpMv-1) as output, calling the derivation process of deriving luma affine control point motion vectors from adjacent blocks as specified in clause 8.3.3.5.
[0539] - Make the following allocations:
[0540] 8.3.3.5 Derivation of Luminance Affine Control Point Motion Vectors from Neighboring Blocks
[0541] The input to this process is:
[0542] - Luma position (xCb, yCb), specifies the top left sample of the current luma codec block relative to the top left luma sample of the current picture,
[0543] -Two variables cbWidth and cbHeight, specify the width and height of the current brightness codec block,
[0544] - Luma position (xNb, yNb), specifies the upper left sample of the adjacent luma codec block relative to the upper left luma sample of the current picture,
[0545] - Luma position (xNbC, yNbC), specifies the center sample of the adjacent luma codec sub-block relative to the upper left luma sample of the current picture,
[0546] - Two variables nNbW and nNbH, specifying the width and height of the adjacent luma codec block,
[0547] - The number of control point motion vectors numCpMv.
[0548] The output of this process is the brightness affine control point vector cpMvLX[cpIdx], where cpIdx=0..numCpMv–1, and X is either 0 or 1.
[0549] The variable isCTUboundary is derived as follows:
[0550] -isCTUboundary is set equal to TRUE if all of the following conditions are true:
[0551] -((yNb+nNbH)%CtbSizeY) is equal to 0
[0552] -yNb+nNbH equals yCb
[0553] - Otherwise, isCTUboundary is set equal to FALSE.
[0554] The variables log2NbW and log2NbH are derived as follows:
[0555] log2NbW=Log2(nNbW) (8-369)
[0556] log2NbH=Log2(nNbH) (8-370)
[0557] The variables mvScaleHor, mvScaleVer, dHorX, and dVerX are derived as follows:
[0558] - If isCTUboundary equals TRUE, the following applies:
[0559] mvScaleHor=MvLX[xNb][yNb+nNbH-1][0]<<7 (8-371)
[0560] mvScaleVer=MvLX[xNb][yNb+nNbH-1][1]<<7 (8-372)
[0561] dHorX=(MvLX[xNb+nNbW-1][yNb+nNbH-1][0]-MvLX[xNb][yNb+nNbH-1][0])
[0562] <<(7-log2NbW) (8-373)
[0563] dVerX=(MvLX[xNb+nNbW-1][yNb+nNbH-1][1]-MvLX[xNb][yNb+nNbH-1][1])
[0564] <<(7-log2NbW) (8-374)
[0565] Otherwise (isCTUboundary equals FALSE), the following applies:
[0566] mvScaleHor=MvLX[xNbC][yNbC][0][0]<<7 (8-375)
[0567] mvScaleVer=MvLX[xNbC][yNbC][0][1]<<7 (8-376)
[0568] dHorX=(CpMvLX[xNb+nNbW-1][yNb][1][0]-CpMvLX[xNb][yNb][0][0])
[0569] <<(7-log2NbW) (8-377)
[0570] dVerX=(CpMvLX[xNb+nNbW-1][yNb][1][1]-CpMvLX[xNb][yNb][0][1])
[0571] <<(7-log2NbW) (8-378)
[0572] The variables dHorY and dVerY are derived as follows:
[0573] - If isCTUboundary equals FALSE and MotionModelIdc[xNb][yNb] equals 2, then the following applies:
[0574] dHorY=(CpMvLX[xNb][yNb+nNbH-1][2][0]-CpMvLX[xNb][yNb][2][0])
[0575] <<(7-log2NbH) (8-379)
[0576] dVerY=(CpMvLX[xNb][yNb+nNbH-1][2][1]-CpMvLX[xNb][yNb][2][1])
[0577] <<(7-log2NbH) (8-380)
[0578] Otherwise (isCTUboundary is equal to TRUE or MotionModelIdc[xNb][yNb] is equal to 1), the following applies:
[0579] dHorY=-dVerX (8-381)
[0580] dVerY=dHorX (8-382)
[0581] The luminance affine control point motion vector cpMvLX[cpIdx] (where cpIdx=0..numCpMv–1, and X is 0 or 1) is derived as follows:
[0582] -When isCTUboundary is equal to TRUE, yNb is set equal to yCb. Then xNbC is set equal to xNb and yNbC is set equal to yNb.
[0583] - The first two control point motion vectors cpMvLX[0] and cpMvLX[1] are derived as follows:
[0584] cpMvLX[0][0]=(mvScaleHor+dHorX*(xCb-xNbC)+dHorY*(yCb-yNbC)) (8-383)
[0585] cpMvLX[0][1]=(mvScaleVer+dVerX*(xCb-xNbC)+dVerY*(yCb-yNbC)) (8-384)
[0586] cpMvLX[1][0]=(mvScaleHor+dHorX*(xCb+cbWidth-xNbC)+dHorY*(yCb-yNbC))(8-385)
[0587] cpMvLX[1][1]=(mvScaleVer+dVerX*(xCb+cbWidth-xNbC)+dVerY*(yCb-yNbC))(8-386)
[0588] If numCpMv is equal to 3, the third control point vector cpMvLX[2] is derived as follows:
[0589] cpMvLX[2][0]=(mvScaleHor+dHorX*(xCb-xNbC)+dHorY*(yCb+cbHeight-yNbC))(8-387)
[0590] cpMvLX[2][1]=(mvScaleVer+dVerX*(xCb-xNbC)+dVerY*(yCb+cbHeight-yNbC))(8-388)
[0591] - Call the motion vector rounding process as specified in clause 8.3.2.12 with mvX set equal to cpMvLX[cpIdx], rightShift set equal to 7, and leftShift set equal to 0 as input, and with the rounded cpMvLX[cpIdx] as output (where X is 0 or 1 and cpIdx = 0..numCpMv-1).
[0592] …
[0593] 8.3.3.7 Derivation of Luminance Affine Control Point Motion Vector Prediction Values
[0594] The input to this process is:
[0595] …
[0596] 1. The number of control point motion vector prediction value candidates in the list numCpMvpCandLX is set equal to 0.
[0597] 2. The variables availableFlagA and availableFlagB are both set equal to FALSE.
[0598] 3. The sample point positions (xNbA0, yNbA0), (xNbA1, yNbA1), (xNbA2, yNbA2), (xNbB0, yNbB0), (xNbB1, yNbB1) and (xNbB2, yNbB2) are derived as follows:
[0599] (xA0,yA0)=(xCb-2,yCb+cbHeight+2) (8-440)
[0600] (xA1,yA1)=(xCb-2,yCb+cbHeight-2) (8-441)
[0601] (xB0,yB0)=(xCb+cbWidth+2,yCb-2) (8-442)
[0602] (xB1,yB1)=(xCb+cbWidth-2,yCb-2) (8-443)
[0603] (xB2,yB2)=(xCb-2,yCb-2) (8-444)
[0604] 4. The following applies to (xNbA0,yNbA0) to (xNbA1,yNbA1) k ,y k ):
[0605] - With the current luminance position (xCurr, yCurr) set equal to (xCb, yCb) and the neighboring luminance position (xNbA k ,y k ) as input, invokes the block availability derivation process as specified in clause 6.4.X [Ed.(BB): Neighbouring blocks availability checking process tbd], and assigns the output to the block availability flag availableA k .
[0606] -When availableA k is equal to TRUE and MotionModelIdc[xNbA k ][yNbA k ] is greater than 0 and availableFlagA is equal to FALSE, the following applies:
[0607] - The variables (xNb, yNb) are set equal to (CbPosX[xNbA k ][yNbA k ],CbPosY[xNbA k ][yNbA k ]), nbW is set equal to CbWidth[xNbA k ][yNbA k ], and nbH is set equal to CbHeight[xNbA k ][yNbA k ].
[0608] -If PredFlagLX[xNbA k ][yNb k ] is equal to 1, and DiffPicOrderCnt(RefPicListX[RefIdxLX[xNbA k ][yNb k ]], RefPicListX[refIdxLX]) is equal to 0, then the following applies:
[0609] -The variable availableFlagA is set to true
[0610] - Call the derivation process for deriving luma affine control point motion vectors from neighboring blocks as specified in clause 8.3.3.5, with as input the luma codec block position (xCb, yCb), the luma codec block width and height (cbWidth, cbHeight), the neighboring luma codec block position (xNb, yNb), the neighboring luma codec block width and height (nbW, nbH), and the number of control point motion vectors numCpMv, and with as output the control point motion vector prediction value candidates cpMvpLX[cpIdx] (where cpIdx = 0..numCpMv-1).
[0611] - Call the motion vector rounding process as specified in clause 8.3.2.12 with mvX set equal to cpMvpLX[cpIdx], rightShift set equal to 2, and leftShift set equal to 2 as input, and with the rounded cpMvpLX[cpIdx] as output (where cpIdx = 0..numCpMv-1).
[0612] - Make the following allocations:
[0613] cpMvpListLX[numCpMvpCandLX][0]=cpMvpLX[0] (8-445)
[0614] cpMvpListLX[numCpMvpCandLX][1]=cpMvpLX[1] (8-446)
[0615] cpMvpListLX[numCpMvpCandLX][2]=cpMvpLX[2] (8-447)
[0616] numCpMvpCandLX=numCpMvpCandLX+1 (8-448)
[0617] - Else if PredFlagLY[xNbA k][yNb k ] (where Y = !X) is equal to 1 and DiffPicOrderCnt(RefPicListY[RefIdxLY[xNbA k ][yNb k ]], RefPicListX[refIdxLX]) is equal to 0, then the following applies:
[0618] -The variable availableFlagA is set to TRUE
[0619] - Based on the luma codec block position (xCb, yCb), luma codec block width and height (cbWidth, cbHeight), adjacent luma codec block position (xNb, yNb), adjacent sub-block center position (xNbA k ,y k ), the adjacent luma codec block width and height (nbW, nbH) and the number of control point motion vectors numCpMv as input, and the control point motion vector prediction value candidates cpMvpLY[cpIdx] (where cpIdx = 0..numCpMv-1) as output, calling the derivation process of deriving luma affine control point motion vectors from adjacent blocks as specified in clause 8.3.3.5.
[0620] - Call the motion vector rounding process as specified in clause 8.3.2.12 with mvX set equal to cpMvpLY[cpIdx], rightShift set equal to 2, and leftShift set equal to 2 as input, and with the rounded cpMvpLY[cpIdx] as output (where cpIdx = 0..numCpMv-1).
[0621] - Make the following allocations:
[0622] cpMvpListLX[numCpMvpCandLX][0]=cpMvpLY[0] (8-449)
[0623] cpMvpListLX[numCpMvpCandLX][1]=cpMvpLY[1] (8-450)
[0624] cpMvpListLX[numCpMvpCandLX][2]=cpMvpLY[2] (8-451)
[0625] numCpMvpCandLX=numCpMvpCandLX+1 (8-452)
[0626] 5. The following applies to (xNbB0, yNbB0) to (xNbB2, yNbB2) k ,yNb k ):
[0627] - with the current luminance position (xCurr, yCurr) set equal to (xCb, yCb) and the neighboring luminance position (xNbB k ,yNb k ) as input, invokes the block availability derivation process as specified in clause 6.4.X [Ed.(BB): Neighbouring blocks availability checking process tbd], and assigns the output to the block availability flag availableB k .
[0628] -When availableB k is equal to TRUE and MotionModelIdc[xNbB k ][yNb k ] is greater than 0 and availableFlagB is equal to FALSE, the following applies:
[0629] - The variable (xNb, yNb) is set equal to (CbPosX[xNbB k ][yNb k ],CbPosY[xNbB k ][yNb k ]), nbW is set equal to CbWidth[xNbB k ][yNb k ], and nbH is set equal to CbHeight[xNbB k ][yNb k ].
[0630] -If PredFlagLX[xNbB k ][yNb k ] is equal to 1, and DiffPicOrderCnt(RefPicListX[RefIdxLX[xNbB k ][yNb k ]],RefPicListX[refIdxLX]) is equal to 0, then the following applies:
[0631] -The variable availableFlagB is set to TRUE
[0632] - Based on the luma codec block position (xCb, yCb), luma codec block width and height (cbWidth, cbHeight), adjacent luma codec block position (xNb, yNb), adjacent sub-block center position (xNbB k ,yNb k ), the adjacent luma codec block width and height (nbW, nbH) and the number of control point motion vectors numCpMv as input, and the control point motion vector prediction value candidates cpMvpLX[cpIdx] (where cpIdx = 0..numCpMv-1) as output, calling the derivation process of deriving luma affine control point motion vectors from adjacent blocks as specified in clause 8.3.3.5.
[0633] - Call the motion vector rounding process as specified in clause 8.3.2.12 with mvX set equal to cpMvpLX[cpIdx], rightShift set equal to 2, and leftShift set equal to 2 as input, and with the rounded cpMvpLX[cpIdx] as output (where cpIdx = 0..numCpMv-1).
[0634] - Make the following allocations:
[0635] cpMvpListLX[numCpMvpCandLX][0]=cpMvpLX[0] (8-453)
[0636] cpMvpListLX[numCpMvpCandLX][1]=cpMvpLX[1] (8-454)
[0637] cpMvpListLX[numCpMvpCandLX][2]=cpMvpLX[2] (8-455)
[0638] numCpMvpCandLX=numCpMvpCandLX+1 (8-456)
[0639] - Otherwise, if PredFlagLY[xNbB k ][yNb k ] (where Y = !X) is equal to 1 and DiffPicOrderCnt (RefPicListY [RefIdxLY [xNbB k ][yNb k ]],RefPicListX[refIdxLX]) is equal to 0, then the following applies:
[0640] -The variable availableFlagB is set to TRUE
[0641] - Call the derivation process for deriving luma affine control point motion vectors from neighboring blocks as specified in clause 8.3.3.5, with as input the luma codec block position (xCb, yCb), the luma codec block width and height (cbWidth, cbHeight), the neighboring luma codec block position (xNb, yNb), the neighboring luma codec block width and height (nbW, nbH), and the number of control point motion vectors numCpMv, and with as output the control point motion vector prediction value candidates cpMvpLY[cpIdx] (where cpIdx = 0..numCpMv-1).
[0642] - Call the motion vector rounding process as specified in clause 8.3.2.12 with mvX set equal to cpMvpLY[cpIdx], rightShift set equal to 2, and leftShift set equal to 2 as input, and with the rounded cpMvpLY[cpIdx] as output (where cpIdx = 0..numCpMv-1).
[0643] - Make the following allocations:
[0644] cpMvpListLX[numCpMvpCandLX][0]=cpMvpLY[0] (8-457)
[0645] cpMvpListLX[numCpMvpCandLX][1]=cpMvpLY[1] (8-458)
[0646] cpMvpListLX[numCpMvpCandLX][2]=cpMvpLY[2] (8-459)
[0647] numCpMvpCandLX=numCpMvpCandLX+1 (8-460)
[0648] Fig.26 is a block diagram of a video processing device 2600. Device 2600 may be used to implement one or more methods described herein. Device 2600 may be embodied in a smartphone, a tablet, a computer, an Internet of Things (IoT) receiver, etc. Device 2600 may include one or more processors 2602, one or more memories 2604, and video processing hardware 2606. Processor(s) 2602 may be configured to implement one or more methods described in this document. Memory(s) 2604 may be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 2606 may be used to implement some of the techniques described in this document in hardware circuits.
[0649] Fig.25 2500 is a flow chart of an example method 2500 for video processing. The method 2500 includes associating (2502) a first set of motion vectors (MVs) for determining inherited motion information of other video blocks, a second set of MVs for deriving MVs of sub-blocks of the current video block, and a third set of MVs included in a bitstream representation of the current video block with the current video block; and performing (2504) a conversion between the current video block and the bitstream representation using the first set of MVs, the second set of MVs, or the third set of MVs.
[0650] It should be appreciated that several techniques have been disclosed that will benefit video encoder and decoder embodiments incorporated within video processing devices such as smartphones, laptops, desktops, and similar devices by allowing the amount of memory used to store CPMV to be reduced during video encoding and decoding based on affine codecs. The following clause-based description can be used to describe various embodiments and techniques.
[0651] 1. A video processing method, comprising:
[0652] Associating with the current video block a first set of motion vectors (MVs) for determining inherited motion information for other video blocks, a second set of MVs for deriving MVs for sub-blocks of the current video block, and a third set of MVs included in a bitstream representation of the current video block; and
[0653] The conversion between the current video block and the bitstream representation is performed using the first set of MVs, the second set of MVs, or the third set of MVs.
[0654] 2. The method according to clause 1, wherein the first set of MVs comprises control point MVs (CPMVs) MVF0, MVF1 and MVF2 located at representative points (xF0, yF0), (xF1, yF1) and (xF2, yF2), respectively.
[0655] 3. A method according to any one of clauses 1-2, wherein the second set of MVs includes control point MVs (CPMVs) located at representative points (xS0, yS0), (xS1, yS1) and (xS2, yS2), denoted as MVS0, MVS1 and MVS2, respectively.
[0656] 4. A method according to any one of clauses 1-3, wherein the third group of MVs includes control point MVs (CPMVs) located at representative points (xT0, yT0), (xT1, yT1) and (xT2, yT2), denoted as MVT0, MVT1 and MVT2, respectively.
[0657] 5. The method according to any of clauses 1-4, wherein the second set of MVs is identical to the third set of MVs.
[0658] 6. The method according to any of clauses 1-5, wherein the first set of MVs is derived from the second set of MVs or the third set of MVs.
[0659] 7. A method according to any of clauses 1-2, wherein the relative offset between representative points of two control points MV in the first set is independent of the width or height of the current video block.
[0660] 8. A method according to clause 2, wherein:
[0661] yF1=yF0,xF1=xF0+PW,or
[0662] xF1=xF0,yF1=yF0+PH, or
[0663] yF2=yF0,xF2=xF0+PW,or
[0664] xF2=xF0,yF2=yF0+PH,or
[0665] yF2=yF1,xF2=xF1+PW,or
[0666] xF2=xF1,yF2=yF1+PH, or
[0667] Wherein, PW and PH are integers.
[0668] 8a. A method according to any one of clauses 4 to 7, wherein
[0669] MVF0=MVS0, (xF0, yF0)=(xS0, yS0), or MVF0=MVT0, (xF0, yF0)=(xT0, yT0); or
[0670] MVF0=MVS1, (xF0, yF0)=(xS1, yS1), or MVF0=MVT1, (xF0, yF0)=(xT1, yT1); or
[0671] MVF0=MVS2, (xF0, yF0)=(xS2, yS2), or MVF0=MVT2, (xF0, yF0)=(xT2, yT2).
[0672] 9. The method according to any of clauses 2-8, further comprising storing a difference value D1 = MVF1 - MVF0.
[0673] 10. The method according to any of clauses 2-9, further comprising storing a difference D2 = MVF2 - MVF0.
[0674] 11. A method according to any of clauses 9-10, wherein storing comprises storing a bit-shifted version of the motion vector value.
[0675] 12. The method of clause 11, wherein storing further comprises clipping the motion vector values prior to storing.
[0676] Other examples and embodiments of clauses 1-12 are described in Section 4, e.g., clauses 1-3.
[0677] 13. A method for video processing, comprising: using an affine inherited motion vector (MV) of a current block to perform a conversion between a current block and a bitstream representation of the current block, wherein the affine inherited MV is derived from (1) an MV stored for an adjacent neighboring basic block (denoted as Badj) or (2) an affine history list.
[0678] 14. The method of clause 13, wherein the MVs stored for Badj include: L (left), A (top), LB (bottom left), AR (top right), and AL (top left), and wherein Badj is a block of size 4×4.
[0679] 15. A method according to any of clauses 13-14, wherein the motion vector MVa of Badj at position (x0, y0) is used to calculate the MV at position (x, y) in the current block, where (x0, y0) is one of: (a) a position inside Badj, or (b) a position outside or on the boundary of Badj.
[0680] 16. The method of clause 15, wherein the position (x, y) is (1) in a sub-block of the current block, or (2) at a corner of the current block.
[0681] 17. A method according to any of clauses 13-16, wherein the current block uses a 4-parameter affine model.
[0682] 18. A method according to any of clauses 13-16, wherein the current block uses a 6-parameter affine model.
[0683] Other examples and embodiments of clauses 13-18 are described in Section 4, e.g., clauses 3-6.
[0684] 19. A method for video processing, comprising: using an affine inherited motion vector (MV) of a current block to perform a conversion between a current block and a bitstream representation of the current block, wherein the affine inherited MV is derived from a first MV stored in a first basic block adjacent to the current block and a second MV stored in a second basic block that is offset from the first building block.
[0685] 20. A method according to clause 19, wherein the affine inheritance MV is derived using linear weighting of the x-difference and y-difference between motion vectors weighted with coefficients a and b, where a and b are derived from the offset.
[0686] 21. A method according to any of clauses 19-20, wherein the value of the offset is a function of the position of the first basic block.
[0687] 22. A method according to any of clauses 19-21, wherein the second basic block is selected from the M candidate basic blocks by checking the M candidate basic blocks in order, where M is an integer.
[0688] 23. A method according to any of clauses 19-22, wherein the first building block and the second basic building block are inter-coded and refer to the same reference picture.
[0689] 24. A method according to any of clauses 1-23, wherein the affine parameters of the current block are shifted before storage.
[0690] 25. A method according to clause 24, wherein the amount of bit shifting (1) varies with the precision of the motion used during the conversion, or (2) is different for different affine parameters.
[0691] 26. The method of clause 24, wherein the affine parameters are clipped prior to storage.
[0692] 27. A method according to any of clauses 1-12, wherein MVs in the first set of MVs are stored and used in a table of history-based motion vector predictors for a history-based candidate affine model of the current block.
[0693] 28. A method according to clauses 9-10, wherein D1 and D2 are stored and used in a table of history-based motion vector predictors for a history-based candidate affine model of the current block.
[0694] 29. The method of clause 19, wherein a first basic block adjacently neighboring the current block is one of A (Above), AR (Above Right), or AL (Above Left), and wherein an upper left sample point of the first basic block is denoted as xBB.
[0695] 30. A method according to clause 29, wherein (xBB%8=0), wherein the block to the right of the first basic block is affine encoded and has a reference index of a given reference list that is the same as the reference index of the first basic block, and wherein the second basic block is the block to the right of the first basic block.
[0696] 31. A method according to clause 29, wherein (xBB%8=0), wherein the block to the right of the first basic block is not affine encoded or has a reference index of a given reference list that is different from the reference index of the first basic block, and wherein the second basic block is a block to the left of the first basic block.
[0697] 32. A method according to clause 29, wherein (xBB%8≠0), wherein the block to the left of the first basic block is affine encoded and has a reference index of a given reference list that is the same as the reference index of the first basic block, and wherein the second basic block is the block to the left of the first basic block.
[0698] 33. A method according to clause 29, wherein (xBB%8≠0), wherein the block to the left of the first basic block is not affine encoded or has a reference index of a given reference list that is different from the reference index of the first basic block, and wherein the second basic block is a block to the right of the first basic block.
[0699] 34. The method of clause 19, wherein the first basic block adjacently neighboring the current block is located in a row or column adjacent to the current block.
[0700] 35. The method of clause 19, wherein at least one affine-inherited MV is aligned with the first MV or the second MV.
[0701] 36. A method according to clause 19, wherein the second basic block is selected depending on the position of the first basic block, wherein the position of the first basic block is at the upper left, upper right, left boundary or right boundary of the current block, and depending on the position, a corresponding offset is selected based on the position.
[0702] 37. The method of clause 19, wherein the second basic block is selected from the plurality of candidate blocks using a technique that depends on a position of the first basic block or a position of the current block.
[0703] 38. A method according to any of clauses 19-37, wherein the decision to find the second block from a plurality of candidates or from a predetermined offset is made based on the position of the first block or the position of the current block.
[0704] 39. A method according to clause 38, wherein, in case the current block inherits an affine model from a basic block, the basic block is then considered as a first neighboring basic block and the second neighboring basic block is determined according to a rule based on the position of the basic block.
[0705] 40. A method according to any of clauses 19-39, wherein, in the case where basic block P is selected as the second block and basic block Q is selected as the first block, the method does not include using basic block P as the first block and using basic block Q as the second block during conversion of another video block.
[0706] 41. The method of clause 41, wherein the other video block is in the same codec tree unit row or the same slice as the current video block.
[0707] Additional features and examples of the techniques described in clauses 36-41 are provided in Section 4, clauses 7(g), 7(h), 7(m), 7(n), and 7(o).
[0708] 42. A method according to any of clauses 1-41, wherein the conversion comprises generating a bitstream representation from pixel values of the current block.
[0709] 43. A method according to any of clauses 1-41, wherein the converting comprises generating pixel values of the current block from a bitstream representation.
[0710] 44. A video encoder apparatus comprising a processor configured to implement the method according to any one or more of clauses 1-43.
[0711] 45. A video decoder device comprising a processor configured to implement the method according to any one or more of clauses 1-43.
[0712] 46. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method according to any of clauses 1 to 43.
[0713] Fig.29 2900 is a flowchart of a method 2900 for processing a video. The method 2900 includes associating (2902) a first set of control point motion vectors (CPMVs) for determining inherited motion information of a block encoded and decoded after a first block with a second set of CPMVs for deriving MVs of sub-blocks of the first block or a third set of CPMVs signaled for the first block, wherein the first set of CPMVs is different from the second set of CPMVs or the third set of CPMVs; determining (2904) inherited motion information of a second block encoded and decoded after the first block based on the first set of CPMVs; and performing (2906) a conversion between bitstream representations of the second block and the second block by using the inherited motion information.
[0714] In some examples, the first set of CPMVs is derived from the second set of CPMVs or the third set of CPMVs.
[0715] In some examples, the method further includes storing the first set of CPMVs after the conversion of the first block.
[0716] In some examples, the second set of CPMVs is the same as the third set of CPMVs.
[0717] In some examples, multiple representative point coordinates of the first set of CPMVs, multiple representative point coordinates of the second set of CPMVs, and / or multiple representative point coordinates of the third set of CPMVs are defined as coordinates relative to a block or sub-block used in an affine motion compensation process.
[0718] In some examples, the relative offset between the representative points of two CPMVs in the first set of CPMVs is independent of the width or height of the first block.
[0719] In some examples, the representative points of the first set of CPMVs are inside the first block or outside the first block.
[0720] In some examples, yF1=yF0, xF1=xF0+PW, or xF1=xF0, yF1=yF0+PH, or yF2=yF0, xF2=xF0+PW, or xF2=xF0, yF2=yF0+PH, or yF2=yF1, xF2=xF1+PW, or xF2=xF1, yF2=yF1+PH, where (xF0, yF0), (xF1, yF1), (xF2, yF2) are coordinates of multiple representative points of the first group, and PW and PH are integers.
[0721] In some examples, PW=2M, or PW=−2M, or PH=2M, or PH=−2M, and M is an integer in the range of 2 to 7.
[0722] In some examples, the PW and PH are not stored.
[0723] In some examples, PW and PH are fixed.
[0724] In some examples, the PW and PH are signaled in at least one of a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a slice header, a slice group header, a slice, or a CTU.
[0725] In some examples, PW and PH are different in different standard grades or levels or tiers.
[0726] In some examples, PW and PH depend on the maximum codec unit (CU) size or / and the minimum CU size of a slice or picture.
[0727] In some examples, in the first set of CPMV, MVF0=MVS0, (xF0, yF0)=(xS0, yS0), or MVF0=MVT0, (xF0, yF0)=(xT0, yT0); or MVF0=MVS1, (xF0, yF0)=(xS1, yS1), or MVF0=MVT1, (xF0, yF0)=(xT1, yT1); or MVF0=MVS2, (xF0, yF0)=(xS2, yS2), or MVF0=MVT2, (xF0, yF0)=(xT2, yT2); wherein the motion vector MVF0 , MVF1, MVF2 are multiple CPMVs of the first group of CPMVs at multiple representative point coordinates (xF0, yF0), (xF1, yF1), (xF2, yF2), motion vectors MVS0, MVS1, MVS2 are multiple CPMVs of the second group of CPMVs at multiple representative point coordinates (xS0, yS0), (xS1, yS1), (xS2, yS2), and motion vectors MVT0, MVT1, MVT2 are multiple CPMVs of the third group of CPMVs at multiple representative point coordinates (xT0, yT0), (xT1, yT1), (xT2, yT2).
[0728] In some examples, motion vectors MVF0, MVF1, and MVF2 in the first set of CPMV are derived from motion vectors MVS0 and MVS1 in the second set of CPMV by using a 4-parameter affine model with coordinates (xF0, yF0), (xF1, yF1), and (xF2, yF2) as input coordinates of the affine model.
[0729] In some examples, motion vectors MVF0, MVF1, and MVF2 in the first set of CPMV are derived from motion vectors MVS0, MVS1, and MVS2 in the second set of CPMV by using a 6-parameter affine model with (xF0, yF0), (xF1, yF1), and (xF2, yF2) as input coordinates of the affine model.
[0730] In some examples, motion vectors MVF0, MVF1, and MVF2 in the first set of CPMV are derived from motion vectors MVT0 and MVT1 in the third set of CPMV by using a 4-parameter affine model with (xF0, yF0), (xF1, yF1), and (xF2, yF2) as input coordinates of the affine model.
[0731] In some examples, motion vectors MVF0, MVF1, and MVF2 in the first group of CPMV are derived from motion vectors MVT0, MVT1, and MVT2 in the third group of CPMV by using a 6-parameter affine model with (xF0, yF0), (xF1, yF1), and (xF2, yF2) as input coordinates of the affine model.
[0732] In some examples, motion vector MVF2 in the first set of CPMVs including motion vectors MVF0, MVF1, and MVF2 is calculated only when the first block is encoded and decoded using a 6-parameter affine model, or motion vector MVF2 in the first set of CPMVs including motion vectors MVF0, MVF1, and MVF2 is calculated regardless of whether the first block is encoded and decoded using a 4-parameter affine model or a 6-parameter affine model.
[0733] In some examples, the method further includes storing one or more differences ( D1 , D2 ) between the CPMVs in the first set of CPMVs.
[0734] In some examples, the first set of MVs includes motion vectors MVF0, MVF1, and MVF2, and D1 = MVF1 - MVF0 is stored, or D2 = MVF2 - MVF0 is stored, or both D1 and D2 are stored.
[0735] In some examples, D2 is stored only if the first block is encoded with a 6-parameter affine model.
[0736] In some examples, D2 is stored when the first block is encoded using a 4-parameter affine model or a 6-parameter affine model.
[0737] In some examples, the method further includes storing the first set of CPMVs together with one or more differences ( D1 , D2 ) between the CPMVs in the first set of CPMVs.
[0738] In some examples, a shift function is utilized to shift a plurality of CPMVs in the first set of CPMVs and / or one or more differences between CPMVs in the first set of CPMVs, and the shifted CPMVs and / or differences are stored.
[0739] In some examples, the shift function SatShift(x,n) is defined as: where n is an integer, and offset0 and / or offset1 are set to (1 <<n)> >1 or (1<<(n-1)) or ((1<<n)> >1)-1, or offset0 and / or offset1 are set to 0.
[0740] In some examples, the shift function SatShift(x,n) is defined as: Shift(x,n)=(x+offset0)>>n, where n is an integer and offset0 is set to (1<<n)> >1 or (1<<(n-1)) or ((1<<n)> >1)-1, or offset0 is set to 0.
[0741] In some examples, n is 2 or 4, or n depends on the accuracy of the motion.
[0742] In some examples, n in the case of storing the CPMVs in the first set of CPMVs is different from n in the case of storing the differences between the CPMVs in the first set of CPMVs.
[0743] In some examples, the stored CPMV is first left-shifted before affine inheritance for blocks encoded after the first block.
[0744] In some examples, a plurality of CPMVs in the first set of CPMVs and / or one or more differences between CPMVs in the first set of CPMVs are clipped using a clipping function, and the clipped CPMVs and / or differences are stored.
[0745] In some examples, the clipping function Clip3(min,max,x) is defined as:
[0746]
[0747] Where Min is the lower threshold of the clipping function and Max is the upper threshold of the clipping function.
[0748] In some examples, when K bits are used to store CPMV or difference, Min = -2 K-1 , and Max = 2 K-1 -1, K is an integer.
[0749] In some examples, K is different depending on whether CPMV or difference is to be stored.
[0750] In some examples, a plurality of CPMVs in the first set of CPMVs and / or one or more differences between CPMVs in the first set of CPMVs are sequentially processed with a shift function and a clipping function, and the processed CPMVs and / or differences are stored.
[0751] In some examples, multiple CPMVs in the first set of CPMVs are stored in an affine (historical motion vector prediction) HMVP buffer or table or list to represent a history-based candidate affine model.
[0752] In some examples, one or more differences between the CPMVs in the first set of CPMVs are stored in an affine (historical motion vector prediction) HMVP buffer or table or list to represent a history-based candidate affine model.
[0753] In some examples, one or more CPMVs or one or more differences stored in an HMVP buffer or table or list are shifted with a shift function and / or clipped with a clipping function.
[0754] Fig.30 3000 is a flow chart of a method 3000 for processing a video. The method 3000 includes: for a conversion between a first block of the video and a bitstream representation of the first block, deriving (3002) an affine inherited motion vector (MV) for the first block of the video based on stored motion vectors (MV); performing (3004) the conversion by using the affine inherited MV.
[0755] In some examples, MVs are stored in adjacent neighboring basic blocks.
[0756] In some examples, the MVs are stored in an affine (historical motion vector prediction) HMVP buffer or table or list.
[0757] In some examples, the MVs stored in adjacent neighboring basic blocks include at least: an MV stored in a left adjacent neighboring basic block (L), an MV stored in an upper adjacent neighboring basic block (A), an MV stored in a lower left adjacent neighboring basic block (LB), an MV stored in an upper right adjacent neighboring basic block (AR), and an MV stored in an upper left adjacent neighboring basic block (AL).
[0758] In some examples, the adjacent neighboring basic blocks are 4x4 blocks.
[0759] In some examples, based on an affine model with (x-x0, y-y0) as the input coordinates of the affine model, by using the first MV (MVa=(mv h a ,mv v a )), derive the affine inheritance MV at position (x,y) in the first block.
[0760] In some examples, the representative point (x0, y0) is any location inside the basic block.
[0761] In some examples, the representative point (x0, y0) is any location outside or at the boundary of a basic block.
[0762] In some examples, the coordinates of the representative point (x0, y0) are determined based on the coordinates of the top left corner sample point (xTL, yTL) in the adjacent neighboring basic block and additional information including two variables (i, j).
[0763] In some examples, a first of the two variables (i) depends on a width of the basic block, and a second of the two variables (j) depends on a height of the basic block.
[0764] In some examples, the variables (i, j) depend on the location of neighboring basic blocks.
[0765] In some examples, the coordinates of the representative point (x0, y0) are determined based on the coordinates of the upper left sample point of the first block (xPos00, yPos00), the coordinates of the upper right sample point of the first block (xPos10, yPos00), and the coordinates of the lower left sample point of the first block (xPos00, yPos01).
[0766] In some examples, the coordinates of the representative point (x0, y0) of the adjacent neighboring basic block L on the left are (xPos00-2, yPos01-1); the coordinates of the representative point (x0, y0) of the adjacent neighboring basic block (LB) at the bottom are (xPos00-2, yPos01+3); the coordinates of the representative point (x0, y0) of the adjacent neighboring basic block (A) at the top are (xPos10-1, yPos00-2); the coordinates of the representative point (x0, y0) of the adjacent neighboring basic block (AR) at the top are (xPos10+3, yPos00-2); and the coordinates of the representative point (x0, y0) of the adjacent neighboring basic block (AL) at the top are (xPos00-2, yPos00-2).
[0767] In some examples, the additional information depends on the position of adjacent neighboring basic blocks or adjacent neighboring basic blocks, or the additional information is signaled in at least one of a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a slice header, a slice group header, a slice, a codec tree unit (CTU), and a CU.
[0768] In some examples, the additional information is different in different standard levels or grades or tiers.
[0769] In some examples, based on an affine model with (x-x0, y-y0) as the input coordinates of the affine model, an affine inheritance MV at position (x, y) in a sub-block of the first block is derived by using the first MV (MVa) of an adjacent neighboring basic block at a representative point (x0, y0).
[0770] In some examples, the affine inherited MV at position (x, y) in the sub-block is used to perform motion compensation on the sub-block.
[0771] In some examples, based on an affine model with (x-x0, y-y0) as the input coordinates of the affine model, an affine inheritance MV at a position (x, y) as the corner of the first block is derived by using the first MV (MVa) of the adjacent neighboring basic block at the representative point (x0, y0) as the inheritance control point motion vector (CPMV) of the first block.
[0772] In some examples, the inherited CPMV is used to predict the signaled CPMV of the first block of the affine inter codec.
[0773] In some examples, the inherited CPMV is directly used as the CPMV of the first block of the affine Merge codec.
[0774] In some examples, when the first block uses a 4-parameter affine model, the affine model used to derive the affine inheritance MV at position (x, y) in the first block is:
[0775]
[0776] Among them, a and b are the variables of the affine model.
[0777] In some examples, when the first block uses a 6-parameter affine model, the affine model used to derive the affine inheritance MV at position (x, y) in the first block is:
[0778]
[0779] Among them, a, b, c, and d are the variables of the affine model.
[0780] In some examples, variables a, b or variables a, b, c, d are calculated as follows:
[0781]
[0782] Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 )、mv t2 =(mv h t2 ,mv v t2 ) are the CPMVs at three representative points in the first set of CPMVs of the second block covering the adjacent neighboring basic blocks, and wt and h t Depending on the relative offset between the representative points of the second block, the first set of CPMVs is used to determine the inherited motion information of the blocks encoded after the second block.
[0783] In some examples, variables a, b or variables a, b, c, d are calculated as follows:
[0784]
[0785] Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 )、mv t2 =(mv h t2 ,mv v t2 ) are the CPMVs at three representative points in the second set of CPMVs or the third set of CPMVs of the second block covering the adjacent neighboring basic blocks, and w t and h t are the width and height of the second block, wherein the second set of CPMVs is used to derive the MV of each sub-block of the second block, and the third set of CPMVs is signaled from the encoder to the decoder.
[0786] In some examples, variables a, b or variables a, b, c, d are calculated as follows:
[0787]
[0788] Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 )、mv t2 =(mv h t2 ,mv v t2 ) are the CPMVs at three representative points of the second block covering the adjacent neighboring basic blocks, and w t and h t is the width and height of the second block, where mvh t1 -mv h t0 、mv v t1 -mv v t0 、mv h t2 -mv h t0 、mv v t2 -mv v t0 It is taken directly from the storage device used to store the difference between the CPMVs of the blocks.
[0789] In some examples, the transform generates a first / second block of video from the bitstream representation.
[0790] In some examples, the transform generates a bitstream representation from the first / second block of video.
[0791] Fig.31 3100 is a flow chart of a method 3100 for processing a video. The method 3100 includes: for conversion between a current block of a video and a bitstream representation of the current block, deriving (3102) an affine inherited motion vector (MV) of the current block based on a first stored motion vector (MV) and a second stored MV different from the first stored MV, wherein the first stored MV is stored in a first basic block adjacent to the current block and the second stored MV is stored in a second basic block offset from the first basic block; and performing (3104) the conversion by using the affine inherited MV of the current block.
[0792] In some examples, the first basic block adjacent to the current block includes at least one of: a neighboring basic block to the left (L), a neighboring basic block above (A), a neighboring basic block to the lower left (LB), a neighboring basic block to the upper right (AR, AR'), and a neighboring basic block to the upper left (AL, AL', AL1, AL").
[0793] In some examples, based on an affine model with parameters a and b, by using a first stored MV (MVa=(mv h a ,mv v a )) or the first stored MV (MVa = (mv) associated with the sub-block of the first basic block at the point (x0, y0) h a ,mv v a )), derive the affine inheritance MV (mv) at position (x, y) in the current blockh (x,y),mv v (x,y)), motion vector (mv h (x,y),mv v (x,y)) is derived by the following formula:
[0794]
[0795] In some examples, parameters a and b are calculated as follows:
[0796]
[0797] Among them, mv t0 =(mv h t0 ,mv v t0 ) and mv t1 =(mv h t1 ,mv v t1 ) are set equal to the MV stored in the first basic block and the MV stored in the second basic block, respectively, and w t is the horizontal offset between the first basic block and the second basic block.
[0798] In some examples, parameters a and b are calculated as follows:
[0799]
[0800] Among them, mv t0 =(mv h t0 ,mv v t0 ) and mv t1 =(mv h t1 ,mv v t1 ) are set equal to the MV stored in the first basic block and the MV stored in the second basic block, respectively, and h t is the vertical offset between the first basic block and the second basic block.
[0801] In some examples, w t =2 N And h t =2 M , where N and M are integers.
[0802] In some examples, when the coordinates of the upper-left sample points of the first basic block and the second basic block are (xLT0, yLT0) and (xLT1, yLT1) respectively, the horizontal offset between the first basic block and the second basic block is defined as xLT1 - xLT0, and / or the vertical offset between the first basic block and the second basic block is defined as yLT1 - yLT0.
[0803] In some examples, when the first basic block is above the current block, the vertical offset is 0.
[0804] In some examples, when the first basic block is to the left of the current block, the horizontal offset is 0.
[0805] In some examples, the second basic block is selected depending on the position of the first basic block.
[0806] In some examples, the coordinates of the upper-left sample points of the first basic block and the second basic block are (xLT0, yLT0) and (xLT1, yLT1) respectively, and
[0807] where, when xLT0 % M is not equal to 0, M is an integer, yLT1 = yLT0 and xLT1 = xLT0 – offset, or xLT1 = xLT0 and yLT1 = yLT0 – offset, where offset is a positive number.
[0808] In some examples, the coordinates of the upper-left sample points of the first basic block and the second basic block are (xLT0, yLT0) and (xLT1, yLT1) respectively, and
[0809] where, when xLT0 % M is equal to 0, M is an integer, yLT1 = yLT0 and xLT1 = xLT0 + offset, or xLT1 = xLT0 and yLT1 = yLT0 + offset, where offset is a positive number.
[0810] In some examples, the coordinates of the upper-left sample points of the first basic block and the second basic block are (xLT0, yLT0) and (xLT1, yLT1) respectively, and when the first block is in the upper-left of the current block, or when the first block is in the upper-left of the current block and the left boundary of the current block is also the left boundary of the CTU, or when xLT0 – offset < xLT_AL, where xLT_AL is the upper-left coordinate of the neighboring basic block in the upper-left of the current block, or when xLT0 – offset < xLT_AL, where xLT_AL is the upper-left coordinate of the neighboring basic block in the upper-left of the current block and the left boundary of the current block is also the left boundary of the CTU,
[0811] yLT1 = yLT0 and xLT1 = xLT0 + offset, where offset is a positive number.
[0812] In some examples, the coordinates of the upper left sample points of the first basic block and the second basic block are (xLT0, yLT0) and (xLT1, yLT1), respectively, and when the first block is above and to the right of the current block, or when the first block is above and to the right of the current block and the right boundary of the current block is also the right boundary of the CTU, or when xLT0+offset>xRT_AR, where xLT_AR is the upper right coordinate of the adjacent basic block above and to the right of the current block, or when xLT0+offset>xRT_AR, where xLT_AR is the upper right coordinate of the adjacent basic block above and to the right of the current block and the right boundary of the current block is also the right boundary of the CTU, yLT1=yLT0 and xLT1=xLT0-offset, where offset is a positive number.
[0813] In some examples, the second basic block is selected from M candidate basic blocks, where M is an integer.
[0814] In some examples, the second basic block is selected as the second basic block by checking the M candidate basic blocks in order to determine one of the M candidate basic blocks that is inter-coded and has an MV that references the same reference picture as the MV of the first basic block.
[0815] In some examples, the coordinates of the upper left sample point of the first basic block are (xLT0, yLT0), and the coordinates of the upper left positions of the M candidate basic blocks are (xC0, yC0), (xC1 yC1), ..., (xC M-1 ,yC M-1 ), and when M is 2, yC0=yLT0, xC0=xLT0–offset, and yC1=yLT0, xC1=xLT0+offset, or xC0=xLT0, yC0=yLT0–offset, and xC1=xLT0, yC1=yLT0+offset, or yC0=yLT0, xC0=xLT0–offset, yC1=yLT0, xC1=xLT0+offset, or xC0=xLT0, yC0=yLT0–offset, xC1=xLT0, yC1=yLT0+offset, where offset is a positive number.
[0816] In some examples, whether and / or how to select the second basic block from the M candidate basic blocks depends on the position of the first basic block and / or the position of the current block.
[0817] In some examples, the coordinates of the upper-left sample point of the first basic block are (xLT0, yLT0), and the coordinates of the upper-left positions of the M candidate basic blocks are (xC0, yC0), (xC1, yC1), …, (xC M-1 , yC M-1 ), and when M is 1, if the first basic block is in the upper-left of the current block, then yC0 = yLT0, xC0 = xLT0 + offset; or if the first block is in the upper-right of the current block, then yC0 = yLT0, xC0 = xLT0 - offset; or if the first block is in the upper-left of the current block and the left boundary of the current block is also the left boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 + offset; or if the first block is in the upper-right of the current block and the right boundary of the current block is also the right boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 - offset; or if xLT0 – offset < xLT_AL, where xLT_AL is the upper-left coordinate of the adjacent basic block in the upper-left of the current block, then yC0 = yLT0, xC0 = xLT0 + offset; or if xLT0 + offset > xRT_AR, where xRT_AR is the upper-right coordinate of the adjacent basic block in the upper-right of the current block, then yC0 = yLT0, xC0 = xLT0 - offset; or if xLT0 – offset < xLT_AL, where xLT_AL is the upper-left coordinate of the adjacent basic block in the upper-left of the current block and the left boundary of the current block is also the left boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 + offset; or if xLT0 + offset > xRT_AR, where xRT_AR is the upper-right coordinate of the adjacent basic block in the upper-right of the current block and the right boundary of the current block is also the right boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 - offset, where offset is a positive number.
[0818] In some examples, the coordinates of the upper-left sample point of the first basic block are (xLT0, yLT0), and the coordinates of the upper-left positions of the M candidate basic blocks are (xC0, yC0), (xC1, yC1), …, (xC M-1 , yC M-1), and when M is 2, if the first basic block is at the upper left of the current block, then yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, or if the first basic block is at the upper right of the current block, then yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, or if the first basic block is at the upper left of the current block and the left boundary of the current block is also the left boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, or if the first basic block is at the upper right of the current block and the right boundary of the current block is also the right boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, or if xLT0 – offset < xLT_AL, where xLT_AL is the upper left coordinate of the neighboring basic block at the upper left of the current block, then yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, or if xLT0 + offset > xRT_AR, where xRT_AR is the upper right coordinate of the neighboring basic block at the upper right of the current block, then yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, or if xLT0 – offset < xLT_AL, where xLT_AL is the upper left coordinate of the neighboring basic block at the upper left of the current block and the left boundary of the current block is also the left boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, or if xLT0 + offset > xRT_AR, where xRT_AR is the upper right coordinate of the neighboring basic block at the upper right of the current block and the right boundary of the current block is also the right boundary of the CTU, then yC0 = yLT0, xC0 = xLT0 – offset, yC1 = yLT0, xC1 = xLT0 + offset, where offset is a positive number.
[0819] In some examples, when a second basic block for inter - coding that has an MV referring to the same reference picture as the MV of the first basic block cannot be found, the affine inherited motion vector (MV) of the current block cannot be derived from the first basic block.
[0820] In some examples, whether and / or how to derive the affine inherited motion vector (MV) of the current block depends on the position of the current block.
[0821] In some examples, the affine model of the current block is inherited from the upper neighboring block of the current block in different ways depending on whether the neighboring block in the current block is located in a codec tree unit (CTU) or a CTU row where the current block is located.
[0822] In some examples, when the affine model of the current block is inherited from a neighboring block above or to the left of the current block that is not in the CTU or CTU row where the current block is located, the affine inherited motion vector (MV) of the current block is derived based on the first stored motion vector (MV) and the second stored MV.
[0823] In some examples, whether and / or how to select the second basic block from the plurality of candidates or according to the predefined offset depends on the position of the first block and / or the position of the current block, and wherein the second basic block is a second neighboring basic block.
[0824] In some examples, the affine model of the current block is inherited from a first basic block adjacent to the current block, the first basic block is affine encoded and includes at least one of: an adjacent basic block above (A), an adjacent basic block to the upper right (AR), and an adjacent basic block to the upper left (AL), and wherein the upper left position of the first basic block is (xBB, yBB).
[0825] In some examples, when xBB%8=0, the second neighboring basic block is selected by:
[0826] Check whether the basic block to the right of the first basic block is affine-encoded and has the same reference index of a given reference list as the first basic block; and if so, select the basic block to the right of the first basic block as the second adjacent basic block, otherwise, select the basic block to the left of the first basic block as the second adjacent basic block.
[0827] In some examples, when xBB%8!=0, the second neighboring basic block is selected by:
[0828] Check whether the basic block to the left of the first basic block is affine-encoded and has the same reference index of a given reference list as the first basic block; and if so, select the block to the left of the first basic block as the second adjacent basic block, otherwise, select the block to the right of the first basic block as the second adjacent basic block.
[0829] In some examples, when the first basic block is AL and the left boundary of the current block is the left boundary of CTU, the second adjacent basic block is selected in the following manner: only check whether the basic block to the right of the first basic block is affine encoded and has the same reference index as the first basic block in a given reference list; and if so, select the basic block to the right of the first basic block as the second adjacent basic block, otherwise, the affine model of the current block cannot be inherited from the first basic block.
[0830] In some examples, when xBB%S=0, the second adjacent basic block is selected by checking whether the basic block to the right of the first basic block is affine encoded and has the same reference index as the first basic block in a given reference list; and if so, selecting the basic block to the right of the first basic block as the second adjacent basic block, otherwise, selecting the basic block to the left of the first basic block as the second adjacent basic block.
[0831] In some examples, when xBB%S!=0, the second adjacent basic block is selected by checking whether the basic block to the left of the first basic block is affine-coded and has the same reference index of a given reference list as the first basic block; and if so, selecting the block to the left of the first basic block as the second adjacent basic block, otherwise, selecting the block to the right of the first basic block as the second adjacent basic block.
[0832] In some examples, S is equal to 8.
[0833] In some examples, the offset between the first basic block and the second basic block is a positive integer.
[0834] In some examples, the offset is 2 K In the form of , K is an integer, or depends on the minimum allowed CU width and / or height, or depends on the width and / or height of the basic block, or depends on the minimum allowed width and / or height of the CU to which the affine codec is applicable, or is signaled from the encoder to the decoder.
[0835] In some examples, when basic block P is selected as the second basic block in the first affine inheritance process and when basic block Q is the first basic block, basic block Q is not allowed to be selected as the second basic block when basic block P is the first basic block in the second affine inheritance process.
[0836] In some examples, when basic block P is selected as the second basic block in the first affine inheritance process and when basic block Q is the first basic block, basic block P is not allowed to be the first basic block in the second affine inheritance process.
[0837] In some examples, when basic block P is the first block in the second affine inheritance process, if basic block Q is to the right of basic block P, the second basic block in the second affine inheritance process can only be selected from the basic blocks to the left of basic block P, or if basic block Q is to the left of basic block P, the second basic block can only be selected from the basic blocks to the right of basic block P, or if basic block Q is below basic block P, the second basic block can only be selected from the basic blocks above basic block P, or if basic block Q is above basic block P, the second basic block can only be selected from the basic blocks below basic block P.
[0838] In some examples, the neighboring basic blocks are on rows or columns adjacent to the current block.
[0839] In some examples, the first basic block is determined to be valid if it satisfies at least one of the following conditions: i. it is inter-coded; ii. it is not intra-block copy coded; iii. it is affine coded; iv. it is affine Merge coded; v. it is affine inter-coded.
[0840] In some examples, whether the second basic block is determined to be valid depends on information of the first basic block.
[0841] In some examples, the second basic block is determined to be valid if the second basic block satisfies at least one of the following conditions: i. it is inter-frame coded and decoded; ii. it is not intra-frame block copy coded and decoded; iii. it is affine coded and decoded; iv. it is affine Merge coded and decoded; v. it is affine inter-frame coded and decoded; vi. it has the same inter-frame prediction direction as the first basic block; vii. it has the same reference index of reference list 0 as the first basic block; viii. it has the same reference index of reference list 1 as the first basic block; ix. it has the same inter-frame prediction direction and the same reference index as the first basic block; x. it has the same picture order count (POC) value of the reference picture in reference list X as the first basic block, where X is 0 and / or 1.
[0842] In some examples, each basic block that is an upper neighbor of a current block is checked in a predetermined order to determine whether it is a valid first basic block.
[0843] In some examples, the upper neighboring basic blocks of the current block are checked in order from left to right or from right to left.
[0844] In some examples, the above neighboring basic block includes at least one of: an above neighboring basic block (A), an upper right neighboring basic block (AR), and a first upper left neighboring basic block (AL1).
[0845] In some examples, when one of the upper neighboring basic blocks (BB) is a valid first basic block, basic blocks to the left and / or right of the valid first basic block (BB) are checked to determine a corresponding second basic block.
[0846] In some examples, a basic block (BBR) to the right of a valid first basic block (BB) is first checked to determine whether it is a valid second basic block, and when the basic block (BBR) is a valid second basic block, the valid first basic block (BB) and the valid second basic block (BBR) are output as the first basic block and the second basic block.
[0847] In some examples, when the basic block (BBR) is invalid, the basic block (BBL) to the left of the valid first basic block (BB) is checked to determine whether it is a valid second basic block, and when the basic block (BBL) is a valid second basic block, the valid first basic block (BB) and the valid second basic block (BBL) are output as the first basic block and the second basic block.
[0848] In some examples, when a basic block (BBL) is invalid, the next basic block to the left of a basic block (BB) is checked in sequence to determine if it is a valid first basic block.
[0849] In some examples, when a basic block (BBL) is invalid, no valid first basic block and no valid second basic block are output from the upper neighboring basic block.
[0850] In some examples, a basic block (BBL) to the left of a valid first basic block (BB) is first checked to determine whether it is a valid second basic block, and when the basic block (BBL) is a valid second basic block, the valid first basic block (BB) and the valid second basic block (BBL) are output as the first basic block and the second basic block.
[0851] In some examples, when the basic block (BBL) is invalid, the basic block (BBR) to the right of the valid first basic block (BB) is checked to determine whether it is a valid second basic block, and when the basic block (BBR) is a valid second basic block, the valid first basic block (BB) and the valid second basic block (BBR) are output as the first basic block and the second basic block.
[0852] In some examples, when a basic block (BBR) is invalid, the next basic block to the right of a basic block (BB) is checked in sequence to determine if it is a valid first basic block.
[0853] In some examples, when a basic block (BBR) is invalid, no valid first basic block and no valid second basic block are output from the upper neighboring basic block.
[0854] In some examples, only the basic block (BBR) to the right of the valid first basic block (BB) is checked to determine whether it is a valid second basic block, and when the basic block (BBR) is a valid second basic block, the valid first basic block (BB) and the valid second basic block (BBR) are output as the first basic block and the second basic block.
[0855] In some examples, when the basic block (BBR) is invalid, a valid first basic block (BB) and a basic block to the left of the valid first basic block (BBL) are output as the first basic block and the second basic block.
[0856] In some examples, when a basic block (BBR) is invalid, the next basic block to the right of a basic block (BB) is checked in sequence to determine if it is a valid first basic block.
[0857] In some examples, when a basic block (BBL) is invalid, no valid first basic block and no valid second basic block are output from the upper neighboring basic block.
[0858] In some examples, only the basic block (BBL) to the left of the valid first basic block (BB) is checked to determine whether it is a valid second basic block, and when the basic block (BBL) is a valid second basic block, the valid first basic block (BB) and the valid second basic block (BBL) are output as the first basic block and the second basic block.
[0859] In some examples, when the basic block (BBL) is invalid, a valid first basic block (BB) and a basic block to the right of the valid first basic block (BBR) are output as the first basic block and the second basic block.
[0860] In some examples, when a basic block (BBL) is invalid, the next basic block to the left of a basic block (BB) is checked in sequence to determine if it is a valid first basic block.
[0861] In some examples, when a basic block (BBL) is invalid, no valid first basic block and no valid second basic block are output from the upper neighboring basic block.
[0862] In some examples, selecting a candidate basic block from above neighboring basic blocks to be checked for determining the first basic block depends on the position of the current block and / or the sub-block size of the affine motion compensation.
[0863] In some examples, when the current block is located at the left boundary of the CTU, the candidate basic blocks include at least one of the following: an upper adjacent basic block (A), an upper right adjacent basic block (AR), and a first upper left adjacent basic block (AL1), and when the current block is not located at the left boundary of the CTU, the candidate basic blocks include at least one of the following: an upper adjacent basic block (A), an upper right adjacent basic block (AR), and a second upper left adjacent adjacent basic block (AL").
[0864] In some examples, whether a candidate basic block from an upper neighboring basic block can be used as the first basic block depends on the position of the current block.
[0865] In some examples, when the current block is located at the left boundary of the CTU, the upper left neighboring basic blocks (AL1, AL”) cannot be used as the first basic block.
[0866] In some examples, when the current block is located at the right boundary of the CTU, the upper right neighboring basic blocks (AR, AR') cannot be used as the first basic block.
[0867] In some examples, whether a candidate basic block from an upper neighboring basic block can be used as the second basic block depends on the position of the current block.
[0868] In some examples, when the current block is located at the left boundary of the CTU, the upper left neighboring basic blocks (AL1, AL') cannot be used as the second basic block.
[0869] In some examples, when the current block is located at the right boundary of the CTU, the upper right neighboring basic blocks (AR, AR') cannot be used as the second basic block.
[0870] In some examples, the first basic block and the second basic block are interchangeable.
[0871] In some examples, the first basic block and the second basic block are first exchanged, and the transformation of the current block is performed by using the exchanged first basic block and the second basic block.
[0872] In some examples, the determination process of the first basic block and the second basic block are interchangeable.
[0873] In some examples, the conversion generates the current video block from the bitstream representation.
[0874] In some examples, the conversion generates a bitstream representation from the current video block.
[0875] Fig.32 3200. The method 3200 includes: for conversion between a current block of video and a bitstream representation of the current block, deriving (3202) one or more parameters of an affine model parameter set associated with an affine model of the current block; shifting (3204) the one or more parameters; and storing (3206) the shifted one or more parameters.
[0876] In some examples, shifting the one or more parameters further includes shifting the one or more parameters using a first shift function SatShift(x,n), the first shift function being defined as:
[0877]
[0878] Where x is one of one or more parameters, n is an integer, and offset0 and / or offset1 are set to (1 <<n)> >1 or (1<<(n-1)) or ((1<<n)> >1)-1, or offset0 and / or offset1 are set to 0.
[0879] In some examples, shifting the one or more parameters further includes shifting the one or more parameters using a second shift function Shift(x,n), the second shift function Shift(x,n) being defined as:
[0880] Shift(x,n)=(x+offset0)>>n,
[0881] Where x is one of the one or more parameters, n is an integer, and offset0 is set to (1 <<n)> >1 or (1<<(n-1)) or ((1<<n)> >1)-1, or offset0 is set to 0.
[0882] In some examples, n is 2 or 4.
[0883] In some examples, n depends on the motion accuracy, or n is different for different parameters in the affine model parameter set.
[0884] In some examples, n is signaled in at least one of a sequence parameter set (SPS), a video parameter set (VPS), a picture parameter set (PPS), a slice header, a slice group header, a slice, a codec tree unit (CTU), or a codec unit (CU).
[0885] In some examples, n is different in different standard grades or levels or tiers.
[0886] In some examples, the stored parameters are first left-shifted before affine inheritance for blocks encoded after the current block.
[0887] In some examples, the stored parameters are sequentially shifted using a shift function and clipped using a clipping function before affine inheritance for blocks encoded after the current block.
[0888] In some examples, the parameter a of the affine model parameter set is given by To calculate, where mv h 0 is the horizontal motion vector component of the upper left corner control point of the current block, mv h 1 is the horizontal motion vector component of the upper right control point of the current block, and w is the width of the current block.
[0889] In some examples, the parameter b of the affine model parameter set is given by To calculate, where mv v 0 is the vertical motion vector component of the upper left corner control point of the current block, mv v 1 is the vertical motion vector component of the upper right control point of the current block, and w is the width of the current block.
[0890] In some examples, the parameter c of the affine model parameter set is given by To calculate, where mv h 0 is the horizontal motion vector component of the upper left corner control point of the current block, mv h 2 is the horizontal motion vector component of the lower left control point of the current block, and h is the height of the current block.
[0891] In some examples, the parameter d of the affine model parameter set is given by To calculate, where mv v 0 is the vertical motion vector component of the upper left corner control point of the current block, mv v 2 is the vertical motion vector component of the lower left control point of the current block, and h is the height of the current block.
[0892] In some examples, the parameter e of the affine model parameter set is given by To calculate, where mv h 0 is the horizontal motion vector component of the upper left control point of the current block.
[0893] In some examples, the parameters f of the affine model parameter set are given by To calculate, where mv v 0 is the vertical motion vector component of the upper left control point of the current block.
[0894] In some examples, the parameters e and f of the affine model parameter set are represented by (e, f) = (mv xi ,mv yi ) to calculate, where (mv xi ,mv yi ) is the motion vector of any point.
[0895] In some examples, the width and height of the current block are labeled w and h, where w and h are equal to 2. WB and 2 HB , where WB and HB are integers greater than 1.
[0896] In some examples, the parameter a of the affine model parameter set is given by To calculate, where P is an integer and represents the calculation precision, mv h 0 is the horizontal motion vector component of the upper left corner control point of the current block, and mv h 1 is the horizontal motion vector component of the upper right corner control point of the current block.
[0897] In some examples, the parameter b of the affine model parameter set is given by To calculate, where P is an integer and represents the calculation precision, mv v 0 is the vertical motion vector component of the upper left control point of the current block, and mv v1 is the vertical motion vector component of the upper right corner control point of the current block.
[0898] In some examples, the parameter c of the affine model parameter set is given by To calculate, where P is an integer and represents the calculation precision, mv h 0 is the horizontal motion vector component of the upper left corner control point of the current block, and mv h 2 is the horizontal motion vector component of the lower left control point of the current block.
[0899] In some examples, the parameter d of the affine model parameter set is given by To calculate, where P is an integer and represents the calculation precision, mv v 0 is the vertical motion vector component of the upper left control point of the current block, and mv v 2 is the vertical motion vector component of the lower left control point of the current block.
[0900] In some examples, P is set to 7.
[0901] In some examples, the method further includes: prior to storing the one or more parameters, limiting the one or more parameters.
[0902] In some examples, if K bits are used to store a parameter X among the one or more parameters, then X=Clip3(-2 K-1 ,2 K-1 -1,X), where X=a or b or c or d, and K is an integer greater than 1.
[0903] In some examples, X is a, b, c, d, e, or f.
[0904] In some examples, K is equal to 8.
[0905] In some examples, the affine model parameter set includes 6 variables (a, b, c, d, e, f) corresponding to a 6-parameter affine model given by
[0906]
[0907] Among them, mv h (x,y) is the horizontal component of the motion vector of the current block, mv v (x, y) is the vertical component of the motion vector of the current block, and (x, y) represents the coordinates of the representative point relative to the upper left sample point in the current block; (mv h 0,mv v 0) is the motion vector of the upper left control point (CP) of the current block, and (mv h 1,mv v1) is the motion vector of the upper right corner control point of the current block, and (mv h 2,mv v 2) is the motion vector of the lower left control point of the current block.
[0908] In some examples, the one or more parameters include a, b, c, and d.
[0909] In some examples, the affine model parameter set includes 4 variables (a, b, e, f) corresponding to a 4-parameter affine model given by
[0910]
[0911] Among them, mv h (x,y) is the horizontal component of the motion vector of the current block, mv v (x, y) is the vertical component of the motion vector of the current block, and (x, y) represents the coordinates of the representative point relative to the upper left sample point in the current block; (mv h 0,m hv 0) is the motion vector of the upper left control point (CP) of the current block, and (mv h 1,mv v 1) is the motion vector of the upper right corner control point of the current block.
[0912] In some examples, the one or more parameters include a and b.
[0913] In some examples, the one or more parameters include a, b, e, and f.
[0914] In some examples, the one or more parameters include a, b, c, d, e, and f, and wherein, when a 4-parameter affine model is used to perform conversion between the current block and a bitstream representation of the current block, c=-b and d=a are constrained.
[0915] In some examples, the one or more parameters include a, b, c, and d, and wherein, when the conversion between the current block and the bitstream representation of the current block is performed with a 4-parameter affine mode, c=-b and d=a are constrained.
[0916] In some examples, when the conversion between the current block and the bitstream representation of the current block is performed with a 4-parameter affine mode, parameter c=-b.
[0917] In some examples, when the conversion between the current block and the bitstream representation of the current block is performed with a 4-parameter affine mode, the parameter d=a.
[0918] In some examples, the method further includes performing a conversion between a block encoded after the current block and a bitstream representation of the block encoded after the current block based on the stored one or more parameters of the shift.
[0919] In some examples, the method further includes performing a conversion between the current block and a bitstream representation of the current block based on the stored one or more parameters.
[0920] In some examples, the conversion generates a block from the bitstream representation that is encoded after the current block.
[0921] In some examples, the transform generates a bitstream representation from a block encoded after the current block.
[0922] Those skilled in the art will appreciate that techniques for using motion candidate lists in various video codec scenarios are disclosed.Video blocks may be encoded into a bitstream representation that includes non-contiguous bits placed in various headers or network adaptation layers, etc.
[0923] The disclosed and other solutions, examples, embodiments, modules and implementations of functional operations described in this document may be implemented in digital electronic circuits, or in computer software, firmware or hardware (including the structures disclosed in this document and their structural equivalents), or in a combination of one or more of them. The disclosed and other embodiments may be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer-readable medium, which are used to be run by a data processing device or control the operation of the data processing device. The computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, a combination of substances that affect machine-readable propagation signals, or a combination of one or more of them. The term "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 may also include code that creates an operating environment for the computer program in question, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them. A propagation signal is an artificially generated signal, such as a machine-generated electrical, optical or electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device.
[0924] 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.
[0925] The processes and logic flows described in this document 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).
[0926] 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 mass storage devices (e.g., magnetic disks, magneto-optical disks, or optical disks) for storing data, or be operably coupled to receive data from or transfer data to or from the one or more mass storage devices. However, a computer does not require 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; magnetic disks, such as internal hard disks or removable disks; magneto-optical disks; and CD ROM and DVD-ROM disks. The processor and memory can be supplemented by or incorporated into a dedicated logic circuit.
[0927] Although this patent document contains many details, these details should not be interpreted as limitations on any subject matter or the scope of possible protection, but rather as descriptions of features specific to particular embodiments of particular technologies. Certain features described in the context of separate embodiments in this patent document may also be implemented in combination in a single embodiment. On the contrary, 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.
[0928] 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.
[0929] 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 video processing method, comprising: Associating a first set of control point motion vectors CPMVs for determining inherited motion information of blocks encoded and decoded after the first block with a second set of CPMVs for deriving MVs of sub-blocks of the first block or a third set of CPMVs signaled for the first block, wherein the first set of CPMVs is different from the second set of CPMVs or the third set of CPMVs; determining, based on the first set of CPMVs, inherited motion information for a second block encoded after the first block; and performing a conversion between the second block and the bitstream representation of the second block by using the inherited motion information, Among them, the first group of CPMVs is derived from the second group of CPMVs or the third group of CPMVs.
2. The method according to claim 1, further comprising: The first set of CPMVs is stored after conversion of the first block.
3. The method according to any one of claims 1 to 2, wherein: The second group of CPMVs is the same as the third group of CPMVs.
4. The method according to any one of claims 1 to 2, wherein: The plurality of representative point coordinates of the first set of CPMVs, the plurality of representative point coordinates of the second set of CPMVs, and / or the plurality of representative point coordinates of the third set of CPMVs are defined as coordinates relative to a block or sub-block used in the affine motion compensation process.
5. The method according to any one of claims 1 to 2, wherein: The relative offset between the representative points of two CPMVs in the first set of CPMVs is independent of the width or height of the first block.
6. The method according to any one of claims 1 to 2, wherein: The representative points of the first group of CPMVs are inside the first block or outside the first block.
7. The method according to any one of claims 1 to 2, wherein: a)y F 1=y F 0,x F 1 = x F 0+PW, or b)x F 1 = x F 0,y F 1=y F 0+PH, or c)y F 2=y F 0,x F 2 = x F 0+PW, or d)x F 2 = x F 0,y F 2=y F 0+PH, or e)y F 2=y F 1,x F 2 = x F 1+PW, or f)x F 2=x F 1, yes F 2=y F 1+PH, Among them, (x F 0,y F 0)、(x F 1,y F 1) (x F 2,y F 2) are multiple representative point coordinates of the first group of CPMV, and PW and PH are integers.
8. The method according to claim 7, wherein: PW=2 M , or PW = -2 M , or pH = 2 M , or pH = -2 M , M is an integer in the range of 2 to 7.
9. The method according to claim 7, wherein: PW and PH are not stored.
10. The method according to claim 9, wherein: PW and PH are fixed.
11. The method according to claim 9, wherein: The PW and the PH are signaled in at least one of a sequence parameter set SPS, a video parameter set VPS, a picture parameter set PPS, a slice header, a slice group header, a slice, or a CTU.
12. The method according to claim 9, wherein: In different standard grades or levels or tiers, PW and PH are different.
13. The method according to claim 9, wherein: PW and PH depend on the maximum coding unit CU size and / or the minimum CU size of a slice or picture.
14. The method according to any one of claims 1 to 2, wherein: In the first group of CPMV, a) MV F 0 = MV S 0, (x F 0, y F 0) = (x S 0, y S 0), or MV F 0 = MV T 0, (x F 0, y F 0) = (x T 0,y T 0); or b) MV F 0 = MV S 1, (x F 0, y F 0) = (x S 1, y S 1), or MV F 0 = MV T 1, (x F 0, y F 0) = (x T 1,y T 1); or c) MV F 0 = MV S 2, (x F 0, y F 0) = (x S 2, y S 2), or MV F 0 = MV T 2, (x F 0, y F 0) = (x T 2,and T 2); Among them, the motion vector MV F 0. MV F 1. MV F 2 are the coordinates of the first group of CPMV at multiple representative points (x F 0,y F 0)、(x F 1,y F 1) (x F 2,y F 2) Multiple CPMVs, motion vector MVs S 0. MV S 1. MV S 2 are the coordinates of the second group of CPMV at multiple representative points (x S 0,y S 0)、(x S 1,y S 1) (x S 2,y S 2) multiple CPMVs at the same time, and the motion vector MV T 0. MV T 1. MV T 2 are the coordinates of the third group of CPMV at multiple representative points (x T 0,y T 0)、(x T 1,y T 1) (x T 2,y T 2) Multiple CPMVs at.
15. The method according to any one of claims 1 to 2, wherein: By using the coordinates (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) A 4-parameter affine model with input coordinates as the affine model, from the motion vector MV in the second set of CPMV S 0 and MV S 1 derives the motion vector MV in the first set of CPMV F 0. MV F 1 and MV F 2.
16. The method according to any one of claims 1 to 2, wherein: By using the coordinates (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) A 6-parameter affine model with input coordinates as the affine model, from the motion vector MV in the second set of CPMV S 0. MV S 1 and MV S 2 Derived the motion vector MV in the first group of CPMV F 0. MV F 1 and MV F 2.
17. The method according to any one of claims 1 to 2, wherein: By using the coordinates (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) A 4-parameter affine model with input coordinates as the affine model, from the motion vector MV in the third set of CPMV T 0 and MV T 1 derives the motion vector MV in the first set of CPMV F 0. MV F 1 and MV F 2.
18. The method according to any one of claims 1 to 2, wherein: By using the coordinates (x F 0,y F 0)、(x F 1,y F 1) and (x F 2,y F 2) A 6-parameter affine model with input coordinates as the affine model, from the motion vector MV in the third set of CPMV T 0. MV T 1 and MV T 2 Derived the motion vector MV in the first group of CPMV F 0. MV F 1 and MV F 2.
19. The method according to any one of claims 1 to 2, wherein: The motion vector MV is calculated only when the first block is encoded and decoded using the 6-parameter affine model. F 0. MV F 1 and MV F 2 The motion vector MV in the first set of CPMV F 2, or regardless of whether the 4-parameter affine model or the 6-parameter affine model is used to encode and decode the first block, the motion vector MV is calculated. F 0. MV F 1 and MV F 2 The motion vector MV in the first set of CPMV F 2.
20. The method of claim 1, further comprising: One or more differences between the CPMVs in the first set of CPMVs are stored.
21. The method according to claim 20, wherein: The first group of CPMVs includes motion vectors MV F 0. MV F 1 and MV F 2, and store D1 = MV F 1-MV F 0, or store D2 = MV F 2-MV F 0, or store both D1 and D2.
22. The method according to claim 21, wherein: D2 is stored only when the first block is encoded or decoded with the 6-parameter affine model.
23. The method according to claim 21, wherein: When the first block is encoded or decoded using a 4-parameter affine model or a 6-parameter affine model, D2 is stored.
24. The method of claim 1, further comprising: The first set of CPMVs and one or more differences between the CPMVs in the first set of CPMVs are stored together.
25. The method according to claim 2, wherein: A plurality of CPMVs in the first set of CPMVs and / or one or more differences between CPMVs in the first set of CPMVs are shifted using a shift function, and the shifted CPMVs and / or differences are stored.
26. The method according to claim 25, wherein: The shift function SatShift(x,n) is defined as: Where n is an integer and offset0 and / or offset1 are set to (1 <<n)> >1 or (1<<(n-1)), or ((1<<n)> >1)-1, or offset0 and / or offset1 are set to 0.
27. The method according to claim 25, wherein: The shift function Shift(x,n) is defined as: Shift(x,n)=(x+offset0)>>n, Where n is an integer and offset0 is set to (1 <<n)> >1 or (1<<(n-1)), or ((1<<n)> >1)-1, or offset0 is set to 0.
28. The method according to claim 26 or 27, wherein: n is 2 or 4, or n depends on the precision of the movement.
29. The method according to claim 26 or 27, wherein: n in the case of storing the CPMVs in the first group of CPMVs is different from n in the case of storing the differences between the CPMVs in the first group of CPMVs.
30. The method according to claim 26 or 27, wherein: The stored CPMV is first left-shifted before affine inheritance for blocks encoded after the first block.
31. The method of claim 2, wherein: A plurality of CPMVs in the first set of CPMVs and / or one or more differences between CPMVs in the first set of CPMVs are clipped using a clipping function, and the clipped CPMVs and / or differences are stored.
32. The method according to claim 31, wherein: The clipping function Clip3(min,max,x) is defined as: Among them, Min is the lower threshold of the clipping function, and Max is the upper threshold of the clipping function.
33. The method of claim 32, wherein: When K bits are used to store CPMV or difference, Min = -2 K-1 , and Max = 2 K-1 -1, K is an integer.
34. The method of claim 33, wherein: K is different depending on whether CPMV or difference is to be stored.
35. The method according to any one of claims 25-27, 31-34, wherein: A plurality of CPMVs in the first set of CPMVs and / or one or more differences between CPMVs in the first set of CPMVs are sequentially processed using a shift function and a clipping function, and the processed CPMVs and / or differences are stored.
36. The method according to any one of claims 1-2, wherein: Multiple CPMVs in the first set of CPMVs are stored in an affine historical motion vector prediction HMVP buffer or table or list to represent a history-based candidate affine model.
37. The method of claim 20, wherein: One or more differences between the CPMVs in the first set of CPMVs are stored in an affine historical motion vector prediction HMVP buffer or table or list to represent a history-based candidate affine model.
38. The method of claim 36, wherein: One or more CPMVs or one or more differences stored in the HMVP buffer or table or list are shifted with a shift function and / or clipped with a clipping function.
39. The method of claim 1, further comprising: For a conversion between a first block of the video and a bitstream representation of the first block, deriving an affine inherited motion vector MV for the first block based on the stored motion vector MV; as well as The transformation is performed by using the affine inheritance MV.
40. The method of claim 39, wherein: The MVs are stored in adjacent neighboring basic blocks.
41. The method of claim 39, wherein: The MV is stored in an affine historical motion vector prediction HMVP buffer or table or list.
42. The method of claim 40, wherein: The MVs stored in adjacent neighboring basic blocks include at least: the MV stored in the left adjacent neighboring basic block L, the MV stored in the top adjacent neighboring basic block A, the MV stored in the bottom left adjacent neighboring basic block LB, the MV stored in the top right adjacent neighboring basic block AR, and the MV stored in the top left adjacent neighboring basic block AL.
43. The method according to claim 40 or 42, wherein: The adjacent neighboring basic blocks are 4×4 blocks.
44. The method according to any one of claims 39 to 42, wherein: Based on the affine model with (x-x0, y-y0) as the input coordinates of the affine model, the affine inheritance MV at the position (x, y) in the first block is derived by using the first MV of the adjacent neighboring basic block at the representative point (x0, y0).
45. The method of claim 44, wherein: The representative point (x0, y0) is any position inside the basic block.
46. The method of claim 44, wherein: The representative point (x0, y0) is any position outside or at the boundary of a basic block.
47. The method according to claim 45 or 46, wherein: The coordinates of the representative point (x0, y0) are determined based on the coordinates of the upper left corner sample point (xTL, yTL) in the adjacent neighboring basic block and additional information including two variables i and j.
48. The method of claim 47, wherein: A first variable i of the two variables depends on the width of the basic block, and a second variable j of the two variables depends on the height of the basic block.
49. The method of claim 47, wherein: The variables i and j depend on the positions of the neighboring basic blocks.
50. The method of claim 45, wherein: The coordinates of the representative point (x0, y0) are determined based on the coordinates of the upper left sample point (xPos00, yPos00) of the first block, the coordinates of the upper right sample point (xPos10, yPos00) of the first block, and the coordinates of the lower left sample point (xPos00, yPos01) of the first block.
51. The method of claim 49 or 50, wherein: The coordinates of the representative point (x0, y0) of the adjacent basic block L on the left are (xPos00-2, yPos01-1); the coordinates of the representative point (x0, y0) of the adjacent basic block LB on the lower left are (xPos00-2, yPos01+3); the coordinates of the representative point (x0, y0) of the adjacent basic block A on the upper right are (xPos10-1, yPos00-2); the coordinates of the representative point (x0, y0) of the adjacent basic block AR on the upper right are (xPos10+3, yPos00-2); the coordinates of the representative point (x0, y0) of the adjacent basic block AL on the upper left are (xPos00-2, yPos00-2).
52. The method of claim 47, wherein: The additional information depends on the position of the adjacent neighboring basic blocks or the adjacent neighboring basic blocks, or is signaled in at least one of the sequence parameter set SPS, the video parameter set VPS, the picture parameter set PPS, the slice header, the slice group header, the slice, the codec tree unit CTU, and the CU.
53. The method of claim 47, wherein: The additional information is different in different standard grades or levels or tiers.
54. The method according to any one of claims 39 to 42, wherein: Based on the affine model with (x-x0, y-y0) as the input coordinates of the affine model, the affine inheritance MV at the position (x, y) in the sub-block of the first block is derived by using the first MV of the adjacent neighboring basic block at the representative point (x0, y0).
55. The method of claim 54, wherein: The affine inherited MV at position (x, y) in a sub-block is used to perform motion compensation on the sub-block.
56. The method according to any one of claims 39 to 42, wherein: Based on the affine model with (x-x0, y-y0) as the input coordinates of the affine model, by using the first MV of the adjacent neighboring basic block at the representative point (x0, y0), the affine inheritance MV at the position (x, y) as the corner of the first block is derived as the inheritance control point motion vector CPMV of the first block.
57. The method of claim 56, wherein: The inherited CPMV is used to predict the signaled CPMV of the first block of the affine inter codec.
58. The method of claim 56, wherein: The inherited CPMV is directly used as the CPMV of the first block of the affine Merge codec.
59. The method according to any one of claims 39 to 42, wherein: When the first block uses a 4-parameter affine model, the affine model used to derive the affine inheritance MV at position (x, y) in the first block is: Wherein, a and b are variables of the affine model.
60. The method according to any one of claims 39 to 42, wherein: When the first block uses a 6-parameter affine model, the affine model used to derive the affine inheritance MV at position (x, y) in the first block is: Wherein, a, b, c and d are variables of the affine model.
61. The method of claim 59, wherein: The variables a and b are calculated as follows: Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 ) are the CPMVs at two representative points in the first set of CPMVs of the second block covering the adjacent neighboring basic block, and w t Depending on the relative offset between the representative points of the second block, the first set of CPMVs is used to determine the inherited motion information of the blocks encoded after the second block.
62. The method of claim 60, wherein: The variables a, b, c, d are calculated as follows: Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 )、mv t2 =(mv h t2 ,mv v t2 ) are the CPMVs at three representative points in the first set of CPMVs of the second block covering the adjacent neighboring basic blocks, and w t and h t Depending on the relative offset between the representative points of the second block, the first set of CPMVs is used to determine the inherited motion information of the blocks encoded after the second block.
63. The method of claim 59, wherein: The variables a and b are calculated as follows: Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 ) are the CPMVs at two representative points in the second set of CPMVs or the third set of CPMVs of the second block covering the adjacent neighboring basic blocks, respectively, and w t is the width of the second block, wherein the second set of CPMVs is used to derive the MV of each sub-block of the second block, and the third set of CPMVs is signaled from the encoder to the decoder.
64. The method of claim 60, wherein: The variables a, b, c, d are calculated as follows: Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 )、mv t2 =(mv h t2 ,mv v t2 ) are the CPMVs at three representative points in the second set of CPMVs or the third set of CPMVs of the second block covering the adjacent neighboring basic blocks, and w t and h t are the width and height of the second block, wherein the second set of CPMVs is used to derive the MV of each sub-block of the second block, and the third set of CPMVs is signaled from the encoder to the decoder.
65. The method of claim 59, wherein: The variables a and b are calculated as follows: Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 ) are the CPMVs at two representative points of the second block covering the adjacent neighboring basic block, and w t is the width of the second block, where mv h t1 -mv h t0 、mv v t1 -mv v t0 It is taken directly from the storage device used to store the difference between the CPMVs of the blocks.
66. The method of claim 60, wherein: The variables a, b, c, d are calculated as follows: Among them, mv t0 =(mv h t0 ,mv v t0 )、mv t1 =(mv h t1 ,mv v t1 )、mv t2 =(mv h t2 ,mv v t2 ) are the CPMVs at three representative points of the second block covering the adjacent neighboring basic blocks, and w t and h t is the width and height of the second block, where mv h t1 -mv h t0 、mv v t1 -mv v t0 、mv h t2 -mv h t0 、mv v t2 -mv v t0 It is taken directly from the storage device used to store the difference between the CPMVs of the blocks.
67. The method according to any one of claims 1-2, 39-42, wherein: The conversion generates a first block or a second block of video from the bitstream representation.
68. The method according to any one of claims 1-2, 39-42, wherein: The transform generates a bitstream representation from the first block or the second block of video.
69. 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 implement the method of any one of claims 1 to 68.
70. A non-transitory computer readable medium storing instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 68.
