Using syntax for affine modes with adaptive motion vector resolution

Adaptive motion vector resolution techniques address the challenge of efficient video compression by optimizing motion vector precision, improving coding efficiency and compression performance in video coding standards.

JP7568753B2Active Publication Date: 2024-10-16DOUYIN VISION CO LTD +1

Patent Information

Application Number
JP2023002631
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-02-01
Filing Date
2023-01-11
Publication Date
2024-10-16
Estimated Expiration
2039-09-19

AI Technical Summary

Technical Problem

Existing video coding standards face challenges in achieving efficient compression of digital video due to increasing bandwidth demands and the need for higher resolution, particularly in handling complex camera and object movements.

Method used

The implementation of adaptive motion vector resolution (AMVR) techniques for affine modes, which allow for varying motion vector precision based on block size, shape, and coding conditions, enhancing motion vector prediction accuracy and coding efficiency.

Benefits of technology

AMVR improves coding efficiency by optimizing motion vector precision, reducing computational complexity, and enhancing video compression performance in existing and future video coding standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007568753000045
    Figure 0007568753000045
  • Figure 0007568753000046
    Figure 0007568753000046
  • Figure 0007568753000047
    Figure 0007568753000047
Patent Text Reader

Abstract

A method, apparatus and program for processing video data are provided. A method for video processing includes determining a motion vector difference (MVD) precision to be used for conversion between a coded representation of a current block of video and the current block from a set of multiple allowed MVD precisions applicable to a video region including the current video block, the set of multiple allowed MVD precisions being picture, slice, or block dependent on the coded information of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) Under applicable patent laws and / or regulations under the Paris Convention, this application is intended to timely claim priority to and the benefit of International Patent Application No. PCT / CN2018 / 106513, filed September 19, 2018, and International Patent Application No. PCT / CN2019 / 074433, filed February 1, 2019. For all purposes under U.S. law, the entire disclosures of the above applications are incorporated by reference as part of the disclosure herein.

[0002] This patent specification relates to image processing techniques, devices and systems. [Background technology]

[0003] Despite advances in video compression, digital video still accounts for the largest bandwidth usage in the Internet and other digital communications networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demands for digital video use are expected to continue to grow. Summary of the Invention

[0004] Devices, systems, and methods are described that relate to digital video coding, and in particular to deriving and signaling motion vector predictors for affine modes with adaptive motion vector resolution (AMVR). The described methods may be applied to both existing video coding standards (e.g., High Efficiency Video Coding (HEVC)) and future video encoding standards or video codecs.

[0005] In one exemplary aspect, the disclosed techniques may be used to provide a method of video processing that includes determining a motion vector difference (MVD) precision to be used for conversion between a coded representation of a current block of video and the current block, from a set of multiple allowable MVD precisions applicable to a video region that includes the current video block, and performing the conversion based on the MVD precision.

[0006] In one exemplary aspect, the disclosed techniques may be used to provide a method of video processing that includes, for one or more video blocks of a video and a video domain that includes a coded representation of the video, determining a use of multiple motion vector difference (MVD) precisions for transforming the one or more video blocks in the video domain, and performing the transform based on the determination.

[0007] In another representative aspect, the disclosed techniques may be used to provide a method of video processing that includes, for a video domain that includes one or more video blocks of a video and a coded representation of the video, determining whether to apply adaptive motion vector resolution (AMVR) processing to a current video block to convert between the current video block and the coded representation of the video, and performing the conversion based on the determination.

[0008] In another representative aspect, the disclosed techniques may be used to provide a method of video processing that includes, for a video domain that includes one or more video blocks of a video and a coded representation of the video, determining how to apply adaptive motion vector resolution (AMVR) processing to a current video block to convert between the current video block and the coded representation of the video, and performing the conversion based on the determination.

[0009] In one exemplary aspect, the disclosed techniques may be used to provide a method of video processing, the method including: determining use of adaptive motion vector resolution (AMVR) to convert between a coding representation of a current block of a video and the current block based on a coding mode of a parent coding unit of the current coding unit using an affine coding mode or a distortion ratio (RD) cost of an affine coding mode, and performing the conversion according to a result of the determination.

[0010] In one exemplary aspect, the disclosed techniques may be used to provide a method of video processing that includes determining an amount of adaptive motion vector resolution (AMVR) usage for converting between a coded representation of a current block of a video and the current block using an advanced motion vector prediction (AMVP) coding mode based on a distortion ratio (RD) cost of the AMVP coding mode, and performing the conversion according to a result of the determination.

[0011] In one exemplary aspect, the disclosed techniques may be used to provide a method of video processing that includes generating a set of MV (motion vector) precisions using a four-parameter affine model or a six-parameter affine model to convert between a coding representation of a current block of a video and the current block, and performing the conversion based on the set of MV precisions.

[0012] In one exemplary aspect, the disclosed techniques may be used to provide a method of video processing, which includes determining whether to perform a conversion using an adaptive motion vector resolution (AMVR) tool to improve motion vector resolution during decoding based on a coding mode of a parent block of a current block using an affine coding mode, and performing the conversion according to a result of the determination.

[0013] In one exemplary aspect, the disclosed techniques may be used to provide a method of video processing that includes determining an end of a distortion ratio (RD) calculation of an MV precision of a current block that uses an affine coding mode to convert between a coding representation of the current block and the current block based on the use of the MV precision of a previous block that was previously coded using the affine coding mode, and performing the conversion according to a result of the determination.

[0014] In another exemplary embodiment, the method is embodied in a processor executable code and stored on a computer readable program medium.

[0015] In yet another exemplary aspect, a device configured or operable to perform the above-described method is disclosed. The device may include a processor programmed to implement the method.

[0016] In yet another representative aspect, a video decoder device may implement the methods as described herein.

[0017] These and other aspects and features of the disclosed technology are explained in more detail in the drawings, description and claims. [Brief description of the drawings]

[0018] [Figure 1] Here is an example of building a merge candidate list: [Diagram 2] 1 shows an example of spatial candidate locations. [Diagram 3] 1 shows an example of candidate pairs subject to redundancy checking of spatial merge candidates. [Figure 4A] 13 shows an example of a position of a second prediction unit (PU) based on a size and shape of a current block. [Figure 4B] 13 shows an example of a position of a second prediction unit (PU) based on a size and shape of a current block. [Diagram 5]13 illustrates an example of scaling of motion vectors for temporal merge candidates. [Figure 6] FIG. 13 is a diagram illustrating an example of candidate positions of temporal merge candidates. [Figure 7] 13 illustrates an example of generating combined bi-predictive merge candidates. [Figure 8] 1 shows an example of constructing motion vector prediction candidates. [Figure 9] 13 illustrates an example of motion vector scaling for spatial motion vector candidates. [Figure 10] 1 illustrates an example of motion prediction using an alternative temporal motion vector prediction (ATMVP) algorithm for a coding unit (CU). [Figure 11] 1 illustrates an example of a coding unit (CU) with sub-blocks and neighboring blocks used in a spatial-temporal motion vector prediction (STMVP) algorithm. [Figure 12] 1 shows an exemplary flowchart for coding with different MV precisions. [Figure 13A] 1 illustrates an exemplary snapshot of sub-blocks when using an overlapped block motion compensation (OBMC) algorithm. [Figure 13B] 1 illustrates an exemplary snapshot of sub-blocks when using an overlapped block motion compensation (OBMC) algorithm. [Figure 14] 1 shows an example of a neighborhood of samples used to derive parameters for the Local Illumination Compensation (LIC) algorithm. [Figure 15] An example of a simplified affine motion model is shown. [Figure 16] 1 shows an example of an affine motion vector field (MVF) for each subblock. [Figure 17] 13 shows an example of motion vector prediction (MVP) in AF_INTER affine motion mode. [Figure 18A] Examples of 4-parameter and 6-parameter affine modes are shown, respectively. [Figure 18B] Examples of 4-parameter and 6-parameter affine modes are shown, respectively. [Figure 19A] Examples of AF_MERGE affine motion mode candidates are shown. [Figure 19B] Examples of AF_MERGE affine motion mode candidates are shown. [Figure 20] We present an example of bilateral matching in the Pattern Matching Motion Vector Derivation (PMMVD) mode, which is a special merging mode based on the Frame Rate Up Conversion (FRUC) algorithm. [Figure 21] An example of template matching in the FRUC algorithm is shown below. [Figure 22] 1 shows an example of unilateral motion estimation in the FRUC algorithm. [Diagram 23] 1 shows an example of an optical flow trajectory used in the Bidirectional Optical Flow (BIO) algorithm. [Figure 24A] 13 shows an example snapshot using the Bidirectional Optical Flow (BIO) algorithm without block extension. [Figure 24B] 13 shows an example snapshot using the Bidirectional Optical Flow (BIO) algorithm without block extension. [Diagram 25] 1 illustrates an example of a decoder-side motion vector refinement (DMVR) algorithm based on bilateral template matching. [Figure 26A] 1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Figure 26B] 1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Figure 26C] 1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Figure 26D] 1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Figure 26E]1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Figure 26F] 1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Figure 26G] 1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Fig. 26H] 1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Figure 26I] 1 shows a flowchart of an exemplary method for video processing in accordance with some implementations of the disclosed technology. [Figure 27] FIG. 2 is a block diagram illustrating an example of a hardware platform for implementing the visual media decoding or visual media encoding techniques described herein. [Figure 28] An example of a symmetric mode is shown. [Figure 29] FIG. 2 is another block diagram illustrating an example of a hardware platform for implementing the video processing system described herein. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0019] Due to the increasing demand for higher resolution video, video coding methods and techniques are ubiquitous in modern technology. Video codecs generally include electronic circuits or software that compress or decompress digital video and are constantly being improved to provide higher coding efficiency. Video codecs convert uncompressed video into compressed formats or vice versa. There is a complex relationship between the quality of the video, the amount of data used to represent the video (determined by the bit rate), the complexity of the encoding and decoding algorithms, the sensitivity to data loss and errors, the ease of editing, random access, and end-to-end delay (latency). The compression format usually complies with a standard video compression specification, such as the High Efficiency Video Coding (HEVC) standard (also known as H.265 or MPEG-H Part 2), a general-purpose video coding standard to be completed, or other current and / or future video coding standards.

[0020] Embodiments of the disclosed technology may be applied to existing video coding standards (e.g., HEVC, H.265) and future standards to improve compression performance. Section headings are used herein to improve readability of the description and are not intended to limit the description or embodiments (and / or implementations) to only the respective section.

[0021] 1. Example of Inter Prediction in HEVC / H.265

[0022] Video coding standards have improved significantly over the years and now, in part, achieve high coding efficiency and support higher resolutions. Recent standards such as HEVC and H.265 are based on a hybrid video coding structure in which temporal prediction plus transform coding is utilized.

[0023] 1.1 Prediction mode examples

[0024] Each inter-predicted PU (Prediction Unit) has motion parameters for one or two reference picture lists. In some embodiments, the motion parameters include a motion vector and a reference picture index. In other embodiments, the use of one of the two reference picture lists may be signaled using inter_pred_idc. In yet other embodiments, the motion vector may be explicitly coded as a delta to the predictor.

[0025] When a coding unit (CU) is coded in skip mode, one PU is associated with this CU, there are no significant residual coefficients, no coding motion vector deltas, and no reference picture indexes. A merge mode is specified, which obtains motion parameters for the current PU from neighboring PUs, including spatial and temporal candidates. The merge mode can be applied to any inter-predicted PU, not just for skip mode. An alternative to the merge mode is explicit transmission of motion parameters, explicitly signaling a motion vector for each reference picture list and a reference picture index corresponding to the use of the reference picture list, for each PU.

[0026] If the signaling indicates to use one of the two reference picture lists, the PU is generated from a block of one sample. This is called "uni-prediction." Uni-prediction is available for both P and B slices.

[0027] If the signaling indicates to use both reference picture lists, generate the PU from a block of two samples. This is called "bi-prediction." Bi-prediction is only available for B slices.

[0028] 1.1.1 Implementation of Constructing Merge Mode Candidates

[0029] 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 look up the motion information. The construction of this list can be summarized based on the following sequence of steps:

[0030] Step 1: Initial candidate selection Step 1.1: Spatial candidate derivation Step 1.2: Redundancy check of spatial candidates Step 1.3: Temporal candidate derivation Step 2: Insert additional candidates Step 2.1: Creating bi-predictive candidates Step 2.2: Inserting zero motion candidates

[0031] Figure 1 shows an example of constructing a merge candidate list based on the sequence of steps above. For spatial merge candidate derivation, select up to four merge candidates among candidates at five different positions. For temporal merge candidate derivation, select up to one merge candidate among two candidates. Since the decoder side expects a constant number of candidates per PU, it generates additional candidates if the number of candidates does not reach the maximum number of merge candidates (MaxNumMergeCand) signaled in the slice header. Since the number of candidates is constant, it uses a shortened unary binarization (TU) to encode the index of the best merge candidate. If the size of a CU is equal to 8, all PUs of the current CU share one merge candidate list, which is the same as the merge candidate list of 2N × 2N prediction units.

[0032] 1.1.2 Constructing spatial merging candidates

[0033] In the derivation of spatial merge candidates, up to four merge candidates are selected from the candidates at the positions shown in FIG. 2. The order of derivation is A1, B1, B0, A0, B2. Position B2 is considered only if any PU at positions A1, B1, B0, A0 is not available (e.g., because it belongs to another slice or tile) or is intra-coded. After adding the candidate at position A1, the addition of the remaining candidates is subject to a redundancy check, which can ensure that candidates with the same motion information are removed from the list, improving coding efficiency.

[0034] In order to reduce computational complexity, the aforementioned redundancy check does not consider all possible candidate pairs. Instead, it only considers pairs connected by arrows in FIG. 3, and only adds candidates to the list if the corresponding candidates used in the redundancy check do not have the same motion information. Another source of duplicated motion information is a "second PU" associated with a partition different from 2N×2N. As an example, FIG. 4A and FIG. 4B depict the second PU for N×2N and 2N×N, respectively. When splitting the current PU into N×2N, the candidate at position A1 is not considered for list construction. In some embodiments, adding this candidate results in two prediction units having the same motion information, and having only one PU in one coding unit is redundant. Similarly, when splitting the current PU into 2N×N, position B1 is not considered.

[0035] 1.1.3 Building Temporal Merge Candidates

[0036] In this step, only one candidate is added to the list. Specifically, in the derivation of this temporal merge candidate, a scaled motion vector is derived based on the co-located PU belonging to the picture with the smallest picture order count (POC) difference with the current picture in a given reference picture list. In the slice header, the reference picture list used for the derivation of the co-located PU is explicitly signaled.

[0037] FIG. 5 shows an example of derivation of a scaled motion vector (dotted line) for a temporal merge candidate, where t is the POC difference between the reference picture of the current picture and the current picture, scaled from the motion vector of the co-located PU using POC distances t, t, and t is the POC difference between the reference picture of the co-located picture and the co-located picture. Set the reference picture index of the temporal merge candidate equal to zero. For B slice, take two motion vectors, one for reference picture list 0 and the other for reference picture list 1, and combine them to form a bi-predictive merge candidate.

[0038] At the same position PU(Y) belonging to the reference frame, select the position of the temporal candidate between candidates C0 and C1 as shown in Figure 6. If the PU at position C0 is not available, is intra-coded, or is outside the current CTU, position C1 is used. Otherwise, position C0 is used to derive the temporal merge candidate.

[0039] 1.1.4 Building Additional Types of Merge Candidates

[0040] Besides the spatio-temporal merge candidates, there are two additional types of merge candidates: combined bi-predictive merge candidates and zero merge candidates. The spatio-temporal merge candidates are utilized to generate a combined bi-predictive merge candidate. The combined bi-predictive merge candidate is used only for B slices. A combined bi-predictive candidate is generated by combining a first reference picture list motion parameter of a first candidate with a second reference picture list motion parameter of another candidate. If these two tuples provide different motion hypotheses, these tuples form a new bi-predictive candidate.

[0041] FIG. 7 shows an example of this process, where two candidates in an original list (710, left) with mvL0, refIdxL0 or mvL1, refIdxL1 are used to generate a combined bi-predictive merge candidate that is added to a final list (720, right).

[0042] The MaxNumMergeCand capacity is hit by inserting zero motion candidates to fill the remaining entries in the merge candidate list. These candidates have a spatial displacement of zero and a reference picture index that starts from zero and increases each time a new zero motion candidate is added to the list. The number of reference frames used by these candidates is one for uni-prediction and two for bi-prediction, respectively. In some embodiments, no redundancy check is performed on these candidates.

[0043] 1.1.5 Example of motion estimation region for parallel processing

[0044] To speed up the encoding process, motion estimation can be done in parallel, thereby deriving motion vectors for all prediction units in a given region simultaneously. Derivation of merge candidates from spatial neighborhoods can interfere with parallel processing, since one prediction unit cannot derive motion parameters from neighboring PUs until its associated motion estimation is completed. To mitigate the tradeoff between coding efficiency and processing latency, a motion estimation region (MER) can be specified. The "log2_parallel_merge_level_minus2" syntax element may be used to signal the size of the MER in the picture parameter set (PPS). When specifying one MER, merge candidates in the same region are marked as unavailable and therefore not considered in list construction.

[0045] 1.2 Advanced Motion Vector Prediction (AMVP) Implementation

[0046] AMVP exploits the spatial-temporal correlation of motion vectors with neighboring PUs, which is used for unambiguous transmission of motion parameters. First, it builds a motion vector candidate list by checking the availability of the left and upper temporal neighboring PU positions, removing redundant candidates, and adding zero vectors to keep the length of the candidate list constant. Then, the encoder can select the best predictor from the candidate list and transmit the corresponding index indicating the selected candidate. Similar to the merge index signaling, the index of the best motion vector candidate is coded using a shortened unary term. The maximum value to be coded in this case is 2 (see Figure 8). The following sections will explain the details of the motion vector prediction candidate derivation process.

[0047] 1.2.1 Example of constructing motion vector prediction candidates

[0048] FIG. 8 summarizes the process of deriving motion vector prediction candidates, which may be implemented for each reference picture list with refidx as input.

[0049] In motion vector prediction, two types of motion vector candidates can be considered: spatial motion vector candidates and temporal motion vector candidates. To derive spatial motion vector candidates, as shown in Figure 2 above, two motion vector candidates are ultimately derived based on the motion vectors of each PU at five different positions.

[0050] To derive a temporal motion vector candidate, select one motion vector candidate from two candidates derived based on two different co-located positions. After creating the first spatio-temporal candidate list, remove duplicate motion vector candidates in the list. If the number of candidates is greater than two, remove from the list the motion vector candidates whose reference picture index in the associated reference picture list is greater than 1. If the number of spatial-temporal motion vector candidates is less than two, add an additional zero motion vector candidate to the list.

[0051] 1.2.2 Construction of spatial motion vector candidates

[0052] In the derivation of spatial motion vector candidates, up to two candidates are considered among the five candidates derived from the PUs located as shown in FIG. 2 above, and their positions are the same as the positions of the motion merge. The order of derivation for the left side of the current PU is specified as A0, A1, scaled A0, scaled A1. The order of derivation for the top side of the current PU is specified as B0, B1, B2, scaled B0, scaled B1, scaled B2. Therefore, for each side, there are four cases that can be used as motion vector candidates, namely two cases that do not need to use spatial scaling and two cases that use spatial scaling. The four different cases can be summarized as follows:

[0053] --No spatial scaling (1) The same reference picture list and the same reference picture index (same POC) (2) Different reference picture lists but the same reference picture index (same POC) --Spatial Scaling (3) Same reference picture list, but different reference picture indexes (different POC) (4) Different reference picture lists and different reference picture indexes (different POCs)

[0054] First, check the case of non-spatial scaling, then check the case of allowing spatial scaling. Regardless of the reference picture list, consider spatial scaling if the POC is different between the reference picture of the neighboring PU and the reference picture of the current PU. If all PUs of the left candidate are not available or are intra-coded, scaling of the top motion vector is useful for parallel derivation of the left and top MV candidates. Otherwise, spatial scaling is not allowed for the top motion vector.

[0055] As shown in the example of Figure 9, in the case of spatial scaling, the motion vectors of neighboring PUs are scaled in the same way as in the case of temporal scaling. One difference is that the reference picture list and index of the current PU are given as input, and the actual scaling process is the same as that of temporal scaling.

[0056] 1.2.3 Construction of Temporal Motion Vector Candidates

[0057] Other than deriving the reference picture index, all the processes for deriving the temporal merge candidates are the same as the processes for deriving the spatial motion vector candidates (shown in the example of FIG. 6). In some embodiments, the reference picture index is signaled to the decoder.

[0058] 2. Example of Inter-Prediction Method in Joint Exploration Model (JEM)

[0059] In some embodiments, future video coding techniques are explored using reference software known as the Joint Search Model (JEM), in which sub-block-based prediction is applied in several coding tools, such as affine prediction, alternative temporal motion vector prediction (ATMVP), spatio-temporal motion vector prediction (STMVP), bidirectional optical flow (BIO), frame rate up-conversion (FRUC), locally adaptive motion vector resolution (LAMVR), overlapped block motion compensation (OBMC), local illumination compensation (LIC), and decoder-side motion vector refinement (DMVR).

[0060] 2.1 Example of motion vector prediction based on sub-CU

[0061] In the quadtree plus binary tree JEM (QTBT), each CU can have at most one set of motion parameters for each prediction direction. In some embodiments, the encoder considers two sub-CU level motion vector prediction methods by splitting the large CU into sub-CUs and deriving motion information for all sub-CUs of the large CU. The alternative temporal motion vector prediction (ATMVP) method allows each CU to fetch multiple sets of motion information from multiple blocks smaller than the current CU in the aligned reference picture. In the spatial-temporal motion vector prediction (STMVP) method, the temporal motion vector predictor and spatial neighbor motion vectors are used to recursively derive the motion vectors of the sub-CUs. In some embodiments, the motion compression of the reference frame may be disabled to maintain a more accurate motion field for sub-CU motion prediction.

[0062] 2.1.1 Alternative Temporal Motion Vector Prediction (ATMVP) Example

[0063] In the ATMVP method, the temporal motion vector prediction (TMVP) method is modified by deriving multiple sets of motion information (including motion vectors and reference indexes) from blocks smaller than the current CU.

[0064] 10 shows an example of ATMVP motion prediction processing in a CU 1000. The ATMVP method predicts a motion vector of a sub-CU 1001 in a CU 1000 in two steps. In the first step, a corresponding block 1051 in a reference picture 1050 is identified by a temporal vector. The reference picture 1050 is also called a motion source picture. In the second step, the current CU 1000 is divided into sub-CUs 1001, and the motion vector and reference index of each sub-CU are obtained from the block corresponding to each sub-CU.

[0065] In the first step, the reference picture 1050 and corresponding blocks are determined according to the motion information of the spatially neighboring blocks of the current CU 1000. To avoid the repeated scanning process of the neighboring blocks, the first merging candidate in the merging candidate list of the current CU 1000 is used. The first available motion vector and its associated reference index are set to the temporal vector and the index of the motion source picture. In this way, compared with TMVP, the corresponding block can be identified more accurately, and the corresponding block (sometimes called the aligned block) is always in the bottom-right or center position with respect to the current CU.

[0066] In a second step, the corresponding block of the sub-CU 1051 is identified by the temporal vector in the motion source picture 1050 by adding the temporal vector to the coordinates of the current CU. For each sub-CU, the motion information of its corresponding block (e.g., the smallest motion grid covering the center sample) 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, and motion scaling and other procedures are applied, similar to TMVP in HEVC. For example, the decoder checks whether a low-delay condition (e.g., the POC of all reference pictures of the current picture is smaller than the POC of the current picture) is met, and possibly predicts the motion vector MVy (e.g., X is equal to 0 or 1, and Y is equal to 1-X) of each sub-CU using the motion vector MVx (e.g., the motion vector corresponding to the reference picture list X).

[0067] 2.1.2 Spatial-Temporal Motion Vector Prediction (STMVP) Example

[0068] In the STMVP method, the motion vectors of sub-CUs are derived recursively along the raster scan order. Figure 11 shows an example of one CU with four sub-blocks and neighboring blocks. Consider an 8x8 CU 1100, which contains four 4x4 sub-CUs, A (1101), B (1102), C (1103), and D (1104). The neighboring 4x4 blocks in the current frame are labeled a (1111), b (1112), c (1113), and d (1114).

[0069] The motion derivation of sub-CU A starts by identifying its two spatial neighbors. The first neighbor is the N×N block above sub-CU A 1101 (block c 1113). If this block c (1113) is not available or is intra-coded, check the other N×N blocks above sub-CU A (1101) (starting from block c 1113 and going from left to right). The second neighbor is the block to the left of sub-CU A 1101 (block b 1112). If block b (1112) is not available or is intra-coded, check the other block to the left of sub-CU A 1101 (starting from block b 1112 and going from top to bottom). The motion information obtained from the neighboring blocks in each list is scaled to the first reference frame of a given list. Then, derive the temporal motion vector predictor (TMVP) of sub-block A 1101 following the same procedure as the TMVP derivation specified in HEVC. The motion information of the ordered blocks in block D1104 is fetched and scaled accordingly. Finally, after retrieving and scaling the motion information, average all available motion vectors for each reference list separately. This averaged motion vector is the motion vector of the current sub-CU.

[0070] 2.1.3 Example of Sub-CU Motion Prediction Mode Signaling

[0071] In some embodiments, sub-CU modes are enabled as additional merge candidates, and no additional syntax elements are required to signal the mode. Add two additional merge candidates to the merge candidate list of each CU to represent ATMVP and STMVP modes. In other embodiments, up to seven merge candidates may be used if the sequence parameter set indicates that ATMVP and STMVP are enabled. The encoding logic of the additional merge candidates is the same as that of the merge candidates in HM, that is, for each CU in a P or B slice, two or more RD checks may be required for the two additional merge candidates. In some embodiments, such as JEM, all bins of the merge index are context coded by context-based adaptive binary arithmetic coding (CABAC). In other embodiments, such as HEVC, only the first bin is context coded, and the remaining bins are context bypass coded.

[0072] 2.2 Example of Adaptive Motion Vector Difference Resolution

[0073] In some embodiments, when use_integer_MV_flag is 0 in the slice header, the motion vector difference (MVD) (the difference between the motion vector and the predicted motion vector of the PU) is signaled in units of quarter luma samples. In JEM, locally adaptive motion vector resolution (LAMVR) is introduced. In JEM, MVD can be coded in units of quarter luma samples, integer luma samples or four luma samples. MVD resolution is controlled at the coding unit (CU) level, and the MVD resolution flag is conditionally signaled for each CU that has at least one non-zero MVD module.

[0074] For a CU with at least one non-zero MVD module, a first flag is signaled to indicate whether ¼ luma sample MV precision is used in the CU. If the first flag (equal to 1) indicates that ¼ luma sample MV precision is not used, another flag is signaled to indicate whether integer luma sample MV precision or 4 luma sample MV precision is used.

[0075] If the first MVD resolution flag of a CU is zero or not coded for the CU (i.e., all MVDs in the CU are zero), then 1 / 4 luma sample MV resolution is used for the CU. If the CU uses integer luma sample MV precision or 4 luma sample MV precision, round the MVP in the CU's AMVP candidate list to the corresponding precision.

[0076] In the encoder, the CU-level RD check is used to determine which MVD resolution to use for the CU. That is, the CU-level RD check is performed three times for each MVD resolution. To increase the speed of the encoder, the following coding method is applied in JEM:

[0077] --During RD check of a CU with normal 1 / 4 luma sample MVD resolution, the motion information (integer luma sample precision) of the current CU is stored. During RD check of the same CU with integer luma sample and 4 luma sample MVD resolution, the stored motion information (after rounding) is used as starting point for further small range motion vector refinement, so that the time consuming motion estimation process is not duplicated three times.

[0078] --Conditionally invoke RD check for CUs with 4 luma sample MVD resolution. For a CU, if the RD cost of integer luma sample MVD resolution is much larger than that of 1 / 4 luma sample MVD resolution, the RD check of 4 luma sample MVD resolution for the CU is omitted.

[0079] The symbolic processing is shown in Fig. 12. First, the 1 / 4 pixel MV is tested, and the RD cost is calculated and represented as RDCost0. Next, the integer MV is tested, and the RD cost is represented as RDCost1. If RDCost1 < th * RDCost0 (where th is a positive threshold value), the 4-pixel MV is tested; otherwise, the 4-pixel MV is skipped. Basically, when checking the integer or 4-pixel MV, the motion information and RD cost, etc. for the 1 / 4 pixel MV are already known, and this can be reused to speed up the encoding process of the integer or 4-pixel MV.

[0080] 2.3 Examples of Improving the Memory Accuracy of Motion Vectors

[0081] In HEVC, the accuracy of the motion vector is 1 / 4 pixel (for 4:2:0 video, 1 / 4 luminance samples and 1 / 8 chroma samples). In JEM, the accuracy of the internal motion vector memory and merge candidates is improved to 1 / 16 pixel. For motion compensation inter-prediction of CUs coded in skip / merge mode, a higher motion vector accuracy (1 / 16 pixel) is used. For CUs coded in the normal AMVP mode, either integer pixel or 1 / 4 pixel motion is used.

[0082] The SHVC upsampling interpolation filter with the same filter length and normalization coefficient as the HEVC motion compensation interpolation filter is used as the additional fractional pixel position motion compensation interpolation filter. In JEM, the accuracy of the motion vector of the chroma component is 1 / 32 sample, and an additional interpolation filter at the fractional position of 1 / 32 pixel is derived using the average of the filters at the fractional positions of two neighboring 1 / 16 pixels.

[0083] 2.4 Examples of Overlapped Block Motion Compensation (OBMC)

[0084] In JEM, OBMC can be switched on / off using CU-level syntax. When using OBMC in JEM, OBMC is performed for all motion compensation (MC) block boundaries except the bottom-right boundary of the CU. It also applies to both luma and chroma components. In JEM, an MC block corresponds to a coding block. If a CU is coded in a sub-CU mode (including sub-CU merge, affine, and FRUC modes), each sub-block of the CU is one MC block. To handle CU boundaries uniformly, OBMC is performed at the sub-block level for all MC block boundaries, where the sub-block size is set equal to 4×4, as shown in Figures 13A and 13B.

[0085] Figure 13A shows the sub-blocks at the CU / PU boundary, where the shaded sub-blocks are where OBMC is applied. Similarly, Figure 13B shows the sub-PUs in ATMVP mode.

[0086] When OBMC is applied to the current subblock, in addition to the current motion vector, the motion vectors of the four connected neighboring subblocks are also available and used to derive a prediction block for the current subblock if they are not identical to the current motion vector. These multiple prediction blocks based on multiple motion vectors are combined to generate a final prediction signal for the current subblock.

[0087] Let PN (N is the index of the neighboring subblocks above, below, left, and right) be the prediction block based on the motion vector of the neighboring subblock, and PC be the prediction block based on the motion vector of the current subblock. If PN is based on the motion information of the neighboring subblocks that contain the same motion information as the current subblock, OBMC is not performed from PN. Otherwise, add all samples of PN to the same samples in PC, i.e., add four rows / columns of PN to PC. Use weighting factors {1 / 4, 1 / 8, 1 / 16, 1 / 32} for PN and weighting factors {3 / 4, 7 / 8, 15 / 16, 31 / 32} for PC. The exception is small MC blocks (i.e., when the height or width of the coding block is equal to 4 or one CU is coded in sub-CU mode), in which case only two rows / columns of PN are added to PC. In this case, weighting factors {1 / 4, 1 / 8} are used for PN and weighting factors {3 / 4, 7 / 8} are used for PC. For a PN generated based on the motion vector of a neighboring subblock in the vertical (horizontal) direction, a sample in the same row (column) of the PN is added to the PC with the same weighting coefficient.

[0088] In JEM, for CUs whose size is 256 luma samples or less, a CU level flag is signaled to indicate whether OBMC is applied for the current CU. For CUs whose size is larger than 256 luma samples or not coded in AMVP mode, OBMC is applied by default. In the encoder, if OBMC is applied to a CU, its influence is considered during the motion estimation stage. The prediction signal formed by OBMC using the motion information of the upper and left neighboring blocks is used to compensate the upper and left boundaries of the original signal of the current CU, and then the normal motion estimation process is applied.

[0089] 2.5 Local Illumination Compensation (LIC) Example

[0090] LIC is based on a linear model of illumination changes, with a scale factor a and an offset b, and is adaptively enabled or disabled for each inter-mode coding unit (CU).

[0091] When LIC is applied to a CU, a least square error method is used to derive parameters a and b by using the neighboring samples of the current CU and their corresponding reference samples. Figure 14 shows an example of the neighboring samples used to derive the parameters of the IC algorithm. Specifically, as shown in Figure 14, the subsampled (2:1 subsampled) neighboring samples of the CU and the corresponding samples in the reference picture (identified by the motion information of the current CU or sub-CU) are used. The IC parameters are derived and applied separately for each prediction direction.

[0092] If a CU is coded in merge mode, it copies the LIC flag from the neighboring block, similar to copying motion information in merge mode, otherwise it signals the LIC flag to the CU to indicate whether LIC is applied or not.

[0093] When LIC is enabled for a picture, an additional CU-level RD check is required to determine whether LIC applies for a CU. If LIC is enabled for a CU, the mean removed sum of absolute differences (MR-SAD) and mean removed sum of absolute Hadamard transform differences (MR-SATD) are used instead of SAD and SATD for integer pixel motion search and fractional pixel motion search, respectively.

[0094] To reduce the coding complexity, the following coding scheme is applied in JEM:

[0095] --If there is no clear illumination change between the current picture and its reference pictures, LIC is disabled for the entire picture. To identify this situation, in the encoder, the histograms of the current picture and all reference pictures of the current picture are calculated. If the histogram difference between the current picture and all reference pictures of the current picture is smaller than a given threshold, LIC is disabled for the current picture, otherwise LIC is enabled for the current picture.

[0096] 2.6 Affine Motion Compensation Prediction Example

[0097] In HEVC, only a translational motion model is applied for motion compensated prediction (MCP). However, the camera and the object may have various kinds of motion, such as zoom in / out, rotation, perspective motion, and / or other irregular motion. On the other hand, JEM applies a simplified affine transformation motion compensated prediction. Figure 15 shows an example of an affine motion field of a block 1400 described by two control point motion vectors V0 and V1. The motion vector field (MVF) of the block 1400 can be expressed as the following equation:

[0098]

number

[0099] As shown in Figure 15, (v 0x ,v 0y ) is the motion vector of the control point in the upper left corner, and (v 1x ,v 1y ) is the motion vector of the control point in the upper right corner. To simplify the motion compensation prediction, sub-block based affine transformation prediction can be applied. The size of the sub-block M×N is derived as follows:

[0100]

number

[0101] where MvPre is the fractional precision of the motion vector (e.g., 1 / 16 in JEM). 2x ,v 2y ) is the motion vector of the bottom-left control point calculated according to equation (1). If necessary, M and N can be adjusted downward to be divisors of w and h, respectively.

[0102] FIG. 16 shows an example of per-subblock affine MVF for block 1500. To derive the motion vector for each M×N subblock, the motion vector of the center sample of each subblock is calculated according to equation (1) and rounded to the fractional precision of the motion vector (e.g., 1 / 16 for JEM). A motion compensation interpolation filter can then be applied to generate a prediction for each subblock using the derived motion vector. After MCP, the high-precision motion vector for each subblock is rounded and stored with the same precision as the normal motion vector.

[0103] 2.6.1 AF_INTER mode implementation

[0104] In JEM, there are two affine motion modes: AF_INTER mode and AF_MERGE mode. For CUs with both width and height greater than 8, AF_INTER mode can be applied. A CU-level affine flag is signaled in the bitstream to indicate whether AF_INTER mode is used. In AF_INTER mode, the motion vector pair {(v0,v1)|v0={v A ,v B ,v C},v1={v D ,v E}} to build a candidate list.

[0105] FIG. 17 shows an example of motion vector prediction (MVP) for block 1600 in AF_INTER mode. As shown in FIG. 17, v0 is selected from the motion vectors of subblocks A, B, or C, and the motion vectors from neighboring blocks can be scaled according to the reference list. Also, the motion vector may be scaled based on the relationship between the picture order count (POC) of the reference of the neighboring block and the POC of the current CU and the POC of the current CU. The method of selecting v1 from neighboring subblocks D and E is similar. If the number of candidate lists is less than two, fill the list with motion vector pairs that duplicate each of the AMVP candidates. If the candidate list is greater than two, first sort the candidates based on the neighboring motion vectors (e.g., based on the similarity of the two motion vectors in the pair candidate). In some implementations, keep the first two candidates. In some embodiments, use a distortion ratio (RD) cost check to determine which motion vector pair candidate to select as the control point motion vector prediction (CPMVP) of the current CU. An index indicating the position of the CPMVP in the candidate list can be signaled in the bitstream. After determining the CPMVP of the current affine CU, affine motion estimation is applied to obtain a control point motion vector (CPMV). Then, the difference between the CPMV and the CPMVP is signaled in the bitstream.

[0106] In AF_INTER mode, if a 4 / 6 parameter affine mode is used, 2 / 3 control points are needed, and therefore it is necessary to code 2 / 3 MVDs for these control points, as shown in Figures 18A and 18B. In the existing implementation, the MVs may be derived, for example, by predicting mvd1 and mvd2 from mvd0, as follows:

[0107]

number

[0108] Here, m i , mvdi , mv1 are the predicted motion vector, the motion vector difference, and the motion vector of the top left pixel (i=0), the top right pixel (i=1), and the bottom left pixel (i=2), respectively, as shown in FIG. 18B. In some embodiments, the addition of two motion vectors (e.g., mvA(xA, yA) and mvB(xB, yB)) is equivalent to summing the two components separately. For example, newMV=mvA+mvB means setting the two components of newMV to (xA+xB) and (yA+yB), respectively.

[0109] 2.6.2 Example of the fast affine ME algorithm in AF_INTER mode

[0110] In some embodiments of the affine mode, the MVs of two or three control points need to be determined together. Directly searching multiple MVs together is computationally complex. In one example, a fast affine ME algorithm is proposed and adopted in the VTM / BMS.

[0111] For example, we describe a fast affine ME algorithm for a four-parameter affine model, and the ideas can be extended to a six-parameter affine model.

[0112]

number

[0113]

number

[0114] By replacing (a-1) with a', the motion vector can be rewritten as follows:

[0115]

number

[0116] Assuming that the motion vectors of the two control points (0,0) and (0,w) are known, from equation (5), the affine parameters may be derived as follows:

[0117]

number

[0118] The motion vector can be rewritten in vector form as follows:

[0119]

number

[0120] where P=(x,y) is the pixel position.

[0121]

number

[0122] In some embodiments, at the encoder, the MVD of AF_INTER can be derived iteratively. i Let (P) be the MV derived at the ith iteration of position P, and dMV C i Let be the updated delta for MVC in the ith iteration. Then, in the (i+1)th iteration,

[0123]

number

[0124] Pic ref Let Pic be the reference picture. cur Let be the current picture, and Q = P + MV i (P). When using MSE as the matching criterion, the function that needs to be minimized may be expressed as:

[0125]

number

[0126] (dMV C i ) T Assuming that is sufficiently small, Pic ref (Q+A(P)*(dMV C i ) T ) may be rewritten as an approximation based on a first-order Taylor expansion as follows:

[0127]

number

[0128] Here,

[0129]

number

[0130] E i+1 (P)=Pic cur (P)-Pic ref If we adopt the notation (Q), it becomes as follows.

[0131]

number

[0132] Set the derivative of the error function to zero, then A(P)*(dMV C i ) T Based on this, the delta MV of the control points (0,0) and (0,w) is calculated as follows: C i can be derived.

[0133]

number

[0134] In some embodiments, this MVD derivation process can be repeated n times and the final MVD calculated as follows:

[0135]

number

[0136] In the above implementation, predicting the delta MV of the control point (0,w) represented by mvd1 from the delta MV of the control point (0,0) represented by mvd0 is (Σ i=0 n-1 dMV C i [1]*w,-Σ i=0 n-1 dMV C i [3]*w) will be encoded only if

[0137] 2.6.3 Implementation of AF_MERGE Mode

[0138] When applying a CU in AF_MERGE mode, the CU obtains the first block coded in affine mode from the valid neighboring reconstructed blocks. FIG. 19A shows an example of a selection order of candidate blocks for a current CU 1800. As shown in FIG. 19A, the selection order can be the left (1801), top (1802), right (1803), bottom left (1804), top left (1805) of the current CU 1800. FIG. 19B shows another example of candidate blocks for the current CU 1800 in AF_MERGE mode. If the neighboring bottom left block 1801 is coded in affine mode, motion vectors v2, v3, and v4 of the top left corner, top right corner, and bottom left corner of the CU containing the sub-block 1801 are derived as shown in FIG. 19B. Based on v2, v3, and v4, the motion vector v0 of the top left corner in the current CU 1800 is calculated. Thus, the motion vector v1 of the top right of the current CU can be calculated.

[0139] After calculating the CPMV of the current CU v0, v1 according to the affine motion model in equation (1), the MVF of the current CU can be generated. To identify whether the current CU is coded in AF_MERGE mode, an affine flag can be signaled in the bitstream if there is at least one neighboring block coded in affine mode.

[0140] 2.7 Pattern Matching Motion Vector Derivation (PMMVD) Example

[0141] The PMMVD mode is a special merging mode based on the Frame Rate Up-Conversion (FRUC) method, in which the motion information of the blocks is not signaled but is derived at the decoder side.

[0142] The FRUC flag may be signaled to the CU if its merge flag is true. If the FRUC flag is false, a merge index may be signaled and normal merge mode is used. If the FRUC flag is true, an additional FRUC mode flag may be signaled to indicate which method (e.g., bilateral matching or template matching) is used to derive motion information for the block.

[0143] On the encoder side, the decision to use the FRUC merging mode for a CU is based on the RD cost selection, just as it is done for regular merging candidates. For example, we use the RD cost selection to check multiple matching modes (e.g., bilateral matching and template matching) for one CU. The one that leads to the minimum cost is compared with the other CU modes. If the FRUC matching mode is the most efficient one, we set the FRUC flag to true for the CU and use the associated matching mode.

[0144] Generally, the motion derivation process in FRUC merge mode has two steps: first, CU-level motion search is performed, and then sub-CU-level motion refinement is performed. At the CU level, an initial motion vector for the entire CU is derived based on bilateral matching or template matching. First, a list of MV candidates is generated, and the candidate that leads to the minimum matching cost is selected as the starting point for further CU-level refinement. Then, a local search based on bilateral matching or template matching is performed near the starting point. The MV result at the minimum matching cost is taken as the MV for the entire CU. Then, the derived CU motion vector is used as the starting point to further refine the motion information at the sub-CU level.

[0145] For example, for deriving W×H CU motion information, the following derivation process is performed: In the first stage, an MV for the entire W×H CU is derived. In the second stage, the CU is further divided into M×M sub-CUs. The value of M is calculated as in equation (22), where D is a predefined division depth, which is set to 3 by default in JEM. Then, the MV of each sub-CU is derived.

[0146]

number

[0147] FIG. 20 shows an example of bilateral matching used in the frame rate up-conversion (FRUC) method. This bilateral matching is used to derive the motion information of the current CU (1900) by finding the closest match between two blocks along the motion trajectory of the current CU (1900) in two different reference pictures (1910, 1911). Assuming a continuous motion trajectory, the motion vectors MV0 (1901), MV1 (1902) pointing to the two reference blocks are proportional to the temporal distance between the current picture and the two reference pictures, e.g., TD0 (1903), TD1 (1904). In some embodiments, when the current picture 1900 is between the two reference pictures (1910, 1911) and the temporal distance from the current picture to the two reference pictures is the same, the bilateral matching becomes a bidirectional MV based on the mirror.

[0148] FIG. 21 shows an example of template matching used in the Frame Rate Up Conversion (FRUC) method. Using template matching, motion information of the current CU 2000 can be derived by finding the closest match between a template in the current picture (e.g., a block in the upper and / or left neighbor of the current CU) and a block in the reference picture 2010 (e.g., the same size as the template). Besides the FRUC merge mode mentioned above, template matching can also be applied to the AMVP mode. In both JEM and HEVC, AMVP has two candidates. A new candidate can be derived by using the template matching method. If the newly derived candidate by template matching is different from the first existing AMVP candidate, it is inserted at the beginning of the AMVP candidate list, and then the list size is set to 2 (e.g., by removing the second existing AMVP candidate). When applied to the AMVP mode, only the CU level search is applied.

[0149] The CU-level MV candidate set may include: (1) the original AMVP candidates if the current CU is in AMVP mode, (2) all merge candidates, (3) multiple MVs in the interpolated MV field (described below), and the motion vectors of the top-left neighbor.

[0150] When using bilateral matching, each valid MV of the merge candidate can be used as input to generate MV pairs assuming bilateral matching. For example, one valid MV of the merge candidate is (MVa,ref a ) and its corresponding bilateral MV reference picture ref b is found in another reference list B, ref a and ref b are on different sides of the current picture in time. b If not available, ref b ref a The ref is determined as a different reference from the current picture, and its temporal distance from the current picture is the minimum value in list B. b After determining the current picture and ref a ,ref b MVb is derived by scaling MVa based on the time distance between

[0151] In some implementations, four MVs from the interpolated MV field may be added to the CU level candidate list. Specifically, the interpolated MVs at positions (0,0), (W / 2,0), (0,H / 2), and (W / 2,H / 2) of the current CU are added. When applying FRUC in AMVP mode, the original AMVP candidates are also added to the CU level MV candidate set. In some implementations, at the CU level, 15 MVs for the AMVP CU and 13 MVs for the merged CU can be added to the candidate list.

[0152] The sub-CU level MV candidate set includes the MV determined by the CU level search, (2) the MVs of the top, left, top-left, and top-right neighbors, (3) the scaled version of the aligned MV from the reference picture, (4) one or more (e.g., up to four) ATMVP candidates, and (5) one or more (e.g., up to four) STMVP candidates. The scaled MV from the reference picture is derived as follows: Traverse the reference pictures in both lists. The MV at the aligned position of the sub-CU in the reference picture is scaled with respect to the reference of the starting CU level MV. The candidates for ATMVP and STMVP may be the first four candidates. At the sub-CU level, one or more (e.g., up to 17) MVs are added to the candidate list.

[0153] Generation of interpolated MV fields. Before coding a frame, an interpolated motion field is generated for the whole picture based on one-sided ME, and the motion field may be used as a CU-level or sub-CU-level MV candidate later.

[0154] In some embodiments, the motion field of each reference picture in both reference lists is traversed at the 4x4 block level. Figure 22 shows an example of unilateral motion estimation (ME) 2100 in the FRUC method. For each 4x4 block, if the motion associated with the block passing through the 4x4 block of the current picture does not have an interpolated motion assigned to it yet, scale the motion of the reference block to the current picture based on the temporal distances TD0 and TD1 (similar to the MV scaling of TMVP in HEVC) and assign the scaled motion to the block of the current frame. If the 4x4 block does not have a scaled MV assigned to it, the motion of the block is marked as unavailable in the interpolated motion field.

[0155] Interpolation and matching costs.When one motion vector points to one fractional sample position, motion compensated interpolation is necessary. To reduce complexity, bilinear interpolation can be used for both bilateral and template matching instead of the usual 8-tap HEVC interpolation.

[0156] The calculation of the matching cost is slightly different in different steps. When selecting a candidate from the CU-level candidate set, the matching cost may be the sum of absolute differences (SAD) of bilateral matching or template matching. After determining the starting MV, the matching cost C of bilateral matching in the sub-CU level search is calculated as follows:

[0157]

number

[0158] where w is a weighting factor. In some embodiments, w may be empirically set to 4. MV and MV s denote the current MV and the start MV, respectively. The SAD may still be used as the matching cost for template matching in the sub-CU level search.

[0159] In FRUC mode, MV is derived by using only luma samples. The derived motion is used for both luma and chroma for MC inter prediction. After determining the MV, an 8-tap interpolation filter for luma and a 4-tap interpolation filter for chroma are used to perform the final MC.

[0160] MV refinement is a pattern-based MV search with the criteria of bilateral matching cost or template matching cost. JEM supports two search patterns, namely Unlimited Center Biased Diamond Search (UCBDS) and Adaptive Cross Search for MV refinement at CU level and sub-CU level, respectively. For both CU and sub-CU level MV refinement, MV is directly searched with the accuracy of 1 / 4 luma sample MV, followed by 1 / 8 luma sample MV refinement. The search range of MV refinement for CU and sub-CU steps is set equal to 8 luma samples.

[0161] In the bilateral matching merge mode, bi-prediction is applied because the motion information of the CU is derived based on the closest matching between two blocks along the motion trajectory of the current CU in two different reference pictures. In the template matching merge mode, the encoder can select among uni-prediction from list0, uni-prediction from list1, or bi-prediction for the CU. The selection can be made based on the template matching cost as follows:

[0162] If costBi<=factor*min(cost0,cost1) Bi-prediction is used. Otherwise, if cost0<=cost1 Use a single prediction from list0. If not, Use a single prediction from list1.

[0163] Here, cost0 is the SAD of list0 template matching, cost1 is the SAD of list1 template matching, and costBi is the SAD of bi-prediction template matching. For example, a factor value of 1.25 means that the selection process is biased toward bi-prediction. This inter-prediction direction selection can be applied to the template matching process at the CU level.

[0164] 2.8 Bidirectional Optical Flow (BIO) Example

[0165] The Bidirectional Optical Flow (BIO) method is a sample-by-sample motion refinement performed on top of block-by-block motion compensation for bi-prediction. In some implementations, the sample-level motion refinement does not use signaling.

[0166] I (k) Let I be the luminance from reference k (k=0,1) after block motion compensation. (k) The horizontal and vertical components of the gradient are ∂I (k) / ∂x and ∂I (k) Assuming that optical flow is valid, the motion vector field (v x ,v y ) is given by equation (24).

[0167]

number

[0168] Combining this optical flow equation with Hermite interpolation of the motion trajectory of each specimen, we obtain the function value I (k) and the derivative ∂I (k) / ∂x and ∂I (k) We obtain a unique third-order polynomial that fits both t = 0 and t = 0. The value of this polynomial at t = 0 is the BIO prediction.

[0169]

number

[0170] FIG. 23 shows an example of optical flow trajectory in the bidirectional optical flow (BIO) method. Here, τ0 and τ1 indicate the distance to the reference frame. The distances τ0 and τ1 are calculated based on the POCs of Ref0 and Ref1 as follows: τ0=POC(current)-POC(Ref0), τ1=POC(Ref1)-POC(current). If both predictions are from the same time series (both are from the past or both are from the future), they have different signs (e.g., τ0·τ1<0). In this case, BIO is applied if the predictions are not from the same time moment (e.g., τ0≠τ1). Both reference regions have non-zero motion (e.g., MVx0,MVy0,MVx1,MVy1≠0), and the block motion vectors are proportional to the time distance (e.g., MVx0 / MVx1=MVy0 / MVy1=-τ0 / τ1).

[0171] The motion vector field (v x ,v y 9A-9B show examples of intersections of motion trajectories with reference frame planes. The model uses only the first linear term of the local Taylor expansion for Δ.

[0172]

number

[0173] All values ​​in the above equation depend on the sample position, denoted as (i',j'). Assuming that the motion is consistent in the local surrounding area, Δ can be minimized inside a (2M+1)×(2M+1) square window Ω centered on the current prediction point (i,j), where M is equal to 2.

[0174]

number

[0175] For this optimization problem, JEM uses a simple approach that first minimizes vertically and then horizontally, resulting in:

[0176]

number

[0177] To avoid division by zero or very small values, regularization parameters r and m can be introduced into equations (28) and (29). r=500·4 d-8 Formula (31) m=700·4 d-8 Formula (32) where d is the bit depth of the video samples.

[0178] To make the memory access of BIO the same as that of normal bipredictive motion compensation, all the prediction values ​​and gradient values ​​I (k) , ∂I (k) / ∂x,∂I (k) y is calculated for a location within the current block. FIG. 24A shows an example of an access location outside the block 2300. As shown in equation (28) in FIG. 24A, a (2M+1)×(2M+1) square window Ω is required to access locations outside the block, centered on a prediction point on the boundary of the currently predicted block. In JEM, I (k) , ∂I (k) / ∂x,∂I (k) The value of / ∂y is set equal to the closest available value within the block. For example, this can be implemented as a padding region 2301, as shown in Figure 24B.

[0179] By using BIO, the motion field can be refined for each sample. To reduce the computational complexity, a block-based BIO design is used in JEM. The motion refinement can be calculated based on 4x4 blocks. In block-based BIO, the sn values ​​in equation (28) of all samples in a 4x4 block can be aggregated, and then the aggregated sn values ​​are used to derive the offset BIO motion vector for the 4x4 block. Specifically, the following equation can be used for block-based BIO derivation:

[0180]

number

[0181] where b k denotes the set of samples belonging to the k-th 4 × 4 block of the prediction block. n ((s n , bk )>>4) and derive the associated motion vector offset.

[0182] In some scenarios, the MV regimen of BIO may be unreliable due to noise and irregular motion. Therefore, in BIO, the magnitude of the MV regimen is clipped to a threshold value. The threshold value is determined based on whether the reference pictures of the current picture are all from one direction. For example, if the reference pictures of the current picture are all from one direction, the threshold value is 12 × 2 (14-d) otherwise, 12 × 2 (13-d) is set to.

[0183] The gradients of BIO may be calculated simultaneously with the motion compensation interpolation using arithmetic compatible with the HEVC motion compensation process (e.g., 2D separable finite impulse response (FIR)). In some embodiments, the input for the 2D separable FIR is the same reference frame sample as for the motion compensation process and fractional position (fracX, fracY) based on the fractional part of the block motion vector. For the horizontal gradient ∂I / ∂x, the signal is first interpolated vertically using BIOfilterS corresponding to fractional position fracY with a scaling shift of d-8. Then, the gradient filter BIOfilterG is applied horizontally corresponding to fractional position fracX and the descaling is shifted by 18-d. For the vertical gradient ∂I / ∂y, the gradient filter is vertically filtered using BIOfilterG corresponding to fractional position fracY with a scaling shift of d-8. Then, the BIOFilterS is used to displace the signal horizontally corresponding to fractional position fracX and the scaling is shifted by 18-d. To maintain reasonable complexity, the length of the interpolation filters for gradient calculation BIOFilterG and signal displacement BIOFilterF may be short (e.g., 6 taps). Table 1 shows exemplary filters that can be used for gradient calculation of different fractional positions of block motion vectors in BIO. Table 2 shows exemplary interpolation filters that can be used for generating the prediction signal in BIO.

[0184] Table 1: Exemplary filters for gradient calculations in BIO

[0185] [Table 1]

[0186] Table 2: Exemplary Interpolation Filters for Prediction Signal Generation in BIO

[0187] [Table 2]

[0188] In this JEM, BIO can be applied to all bi-predictive blocks when the two predictions are from different reference pictures. BIO can be disabled when CU's local lighting compensation (LIC) is enabled.

[0189] In some embodiments, OBMC is applied to one block after normal MC processing. In order to reduce computational complexity, BIO may not be applied during OBMC processing. That is, BIO is applied in the MC processing of one block when it uses its own MV, and is not applied in the MC processing when it uses the MV of a neighboring block in the OBMC processing.

[0190] 2.9 Decoder-side Motion Vector Refinement (DMVR) Example

[0191] In bi-prediction operation, bi-prediction blocks are combined using the motion vectors (MVs) in list0 and MVs in list1 to predict one block region, respectively, to form one prediction signal. In the decoder-side motion vector refinement (DMVR) method, the two motion vectors of bi-prediction are further refined by a bilateral template matching process. To obtain the refined MV without transmitting additional motion information, bilateral template matching is applied in the decoder to perform a distortion-based search between the bilateral template and the reconstructed samples in the reference picture.

[0192] In DMVR, a bilateral template is generated from the first MV0 in list0 and MV1 in list1 as a weighted combination (i.e., average) of bi-predictive blocks, respectively, as shown in Figure 25. The template matching operation consists of calculating a cost measure between the generated template and a sample region in the reference picture (near the first predicted block). For each of the two reference pictures, the MV with the smallest template cost is considered as the updated MV of that list and replaces the original MV. In JEM, nine MV candidates are searched for each list. The nine MV candidates include the original MV and eight surrounding MVs with one luma sample offset with respect to the original MV in either horizontal or vertical direction or both directions. Finally, the two new MVs, i.e., MV0' and MV1', are used to generate the final bi-predictive result, as shown in Figure 25. The sum of absolute differences (SAD) is used as the cost measure.

[0193] DMVR is applied to bi-predictive merge modes between one MV from a past reference picture and one MV from a future reference picture without transmitting additional syntax elements. In JEM, DMVR is not applied if LIC, affine motion, FRUC or sub-CU merge candidates are enabled for a CU.

[0194] 2.10 Symmetric Motion Vector Difference Example

[0195] To code MVD more efficiently, we propose Symmetric Motion Vector Difference (SMVD).

[0196] First, at the slice level, the variables BiDirPredFlag, RefIdxSymL0, and RefIdxSymL1 are derived as follows.

[0197] Search for the forward reference picture in reference picture list 0 that is closest to the current picture. If found, set RefIdxSymL0 equal to the reference index of the forward picture.

[0198] Search for the backward reference picture in reference picture list 1 that is closest to the current picture. If found, set RefIdxSymL1 equal to the reference index of the backward picture.

[0199] If both forward and backward pictures are found, BiDirPredFlag is set equal to 1.

[0200] If not, the following applies:

[0201] Search for the backward reference picture in reference picture list 0 that is closest to the current reference picture. If found, set RefIdxSymL0 equal to the reference index of the backward picture.

[0202] Search for the forward reference picture in reference picture list 1 that is closest to the current reference picture. If found, set RefIdxSymL1 equal to the reference index of the forward picture.

[0203] If both a backward and a forward picture are found, BiDirPredFlag is set equal to 1. Otherwise, BiDirPredFlag is set equal to 0.

[0204] Second, at the CU level, if the prediction direction of the CU is bi-predictive and BiDirPredFlag is equal to 1, then we explicitly signal a symmetric mode flag that indicates whether to use symmetric mode.

[0205] If this flag is true, then only mvp_l0_flag, mvp_l1_flag, and MVD0 are explicitly signaled. The reference indexes are set equal to RefIdxSymL0, RefIdxSymL1 for list 0 and list 1, respectively. MVD1 is simply set to -MVD0. The final motion vectors are given by the following equations:

[0206]

number

[0207] FIG. 28 shows an example of a symmetric mode.

[0208] Table 3 shows the coding unit syntax modifications.

[0209] Table 3: Coding unit syntax modifications

[0210] [Table 3] [Table 4]

[0211] 2.10.1 Symmetric MVD for Affine Bipredictive Coding

[0212] SMVD for affine modes is proposed to extend the application of symmetric MVD modes to affine bi-prediction. When applying symmetric MVD modes to affine bi-prediction coding, the control point MVDs are derived without signaling. The MVD of the top-left control point in list-1 is derived from list-0 based on the linear motion assumption. The other control point MVD in list-0 is set to zero.

[0213] 2.11 Context-Adaptive Binary Arithmetic Coding (CABAC)

[0214] 2.11.1 CABAC Design in HEVC

[0215] 2.11.1.1 Context Representation and Initialization in HEVC

[0216] In HEVC, for each context variable, we initialize two variables: pStateIdx and valMps.

[0217] From the 8-bit table entry initValue, two 4-bit variables slopeIdx and offsetIdx are derived as follows:

[0218] slopeIdx=initValue>>4 offsetIdx=initValue&15 (34)

[0219] The variables m and n used to initialize the context variables are derived from slopeIdx and offsetIdx as follows:

[0220] m=slopeIdx*5-45 n=(offsetIdx<<3)-16 (35)

[0221] The two values ​​assigned to pStateIdx and valMps for initialization are derived from the luma quantization parameter of the slice represented by SliceQpY. Given the variables m and n, the initialization is specified as follows:

[0222] preCtxState=Clip3(1,126,((m*Clip3(0,51,SliceQpY))>>4)+n) valMps=(preCtxState<=63)?0:1 pStateIdx=valMps?(preCtxState-64):(63-preCtxState) (36)

[0223] 2.11.1.2 State transition processing in HEVC

[0224] The input to this process is the current pStateIdx, ctxTable and the decoded values ​​of the context variables binVal and valMps associated with ctxIdx.

[0225] The output of this process is the updated pStateIdx and valMps for the context variables associated with ctxIdx.

[0226] Based on the decoded value binVal, updates to the two variables pStateIdx and valMps associated with ctxIdx are derived as follows (37):

[0227] if(binVal==valMps) pStateIdx=transIdxMps(pStateIdx) else { if(pStateIdx==0)valMps=1-valMps pStateIdx=transIdxLps(pStateIdx) } (37)

[0228] 2.11.2 CABAC Design in VVC

[0229] The context-adaptive binary arithmetic coder (BAC) in VVC has been improved differently from HEVC in terms of context update processing and the arithmetic coder in VVC.

[0230] An overview of the recently adopted proposal (JVET-M0473, CEtest5.1.13) is provided below.

[0231] Table 4: Summary of CABAC corrections in VVC

[0232] [Table 5]

[0233] 2.11.2.1 Context initialization process in VVC

[0234] In VVC, the two values ​​assigned to pStateIdx0 and pStateIdx1 for initialization are derived from SliceQpY. Given variables m and n, the initialization is specified as follows:

[0235] preCtxState=Clip3(0,127,((m*Clip3(0,51,SliceQpY))>>4)+n) pStateIdx0=initStateIdxToState[preCtxState]>>4 pStateIdx1=initStateIdxToState[preCtxState] (38)

[0236] 2.11.2.2 State transition processing in VVC

[0237] The inputs to this process are the current pStateIdx0 and pStateIdx1, and the decoded value binVal.

[0238] The output of this process is the updated pStateIdx0 and pStateIdx1 of the context variables associated with ctxIdx.

[0239] The variables shift0 (corresponding to the variables in the CABAC modification summary in VVCTable4) and shift1 (corresponding to the variable b in the CABAC modification summary in VVCTable4) are derived from the shiftIdx values ​​associated with ctxTable and ctxInc.

[0240] shift0=(shiftIdx>>2)+2 shift1=(shiftIdx&3)+3+shift0 (39)

[0241] Depending on the decoded value binVal, the updates of the two variables pStateIdx0 and pStateIdx1 associated with ctxIdx are derived as follows:

[0242] pStateIdx0=pStateIdx0-(pStateIdx0>>shift0)+(1023*binVal>>shift0) pStateIdx1=pStateIdx1-(pStateIdx1>>shift1)+(16383*binVal>>shift1) (40)

[0243] 3. Shortcomings of existing implementations

[0244] In some existing implementations, when the MV / MV difference (MVD) can be selected from a set of multiple MV / MVD precisions for an affine coding block, it is still unclear how a more accurate motion vector can be obtained.

[0245] In other existing implementations, MV / MVD precision information also plays an important role in determining the overall coding gain of AMVR applied to affine mode, but whether it achieves this goal remains uncertain.

[0246] 4. Exemplary Method for MV Predictor for Affine Modes Using AMVR

[0247] The embodiments of the disclosed technology overcome the shortcomings of existing implementations, thereby providing video coding with higher coding efficiency. Based on the disclosed technology, deriving and signaling a motion vector predictor for affine mode with adaptive motion vector resolution (AMVR) can improve both existing and future video coding standards, as will be demonstrated in the following examples that illustrate various implementations. The examples of the disclosed technology provided below are intended to illustrate the general concept and should not be construed as limiting. In an example, various features described in these examples can be combined, unless expressly indicated to the contrary.

[0248] In some embodiments, when AMVR is applied, the following examples can be applied to affine or normal modes. These examples assume that precision Prec (i.e., MV has precision 1 / (2^Prec)) is used to code MVD in AF_INTER mode or to code MVD in normal inter mode. Let the motion vector predictor (e.g., inherited from neighboring block MV) and its precision be denoted by MVPred (MVPred X ,MVPred Y ) and PredPrec.

[0249] Improved affine mode with AMVR support

[0250] 1. The set of allowed MVD precisions may vary per picture, per slice, or per block. In one example, the set of allowed MVD precisions may depend on coded information such as block size, block shape, etc. b. The set of allowed MV precisions may be predefined, such as {1 / 16, 1 / 4, 1}. c. An indication of the allowed MV precision may be signaled in the SPS / PPS / VPS / sequence header / picture header / slice header / group etc. of the CTU. d. Signaling the selected MV precision from the set of allowed MV precisions further depends on the number of allowed MV precisions for one block.

[0251] 2. One syntax element is signaled to the decoder to indicate the MVD precision used in affine inter mode. In one example, only one single syntax element is used to indicate the MVD precision that applies to affine and AMVR modes. i. In one example, the same semantics are used, i.e. syntax elements with the same value are mapped to the same MVD precision for AMVR and affine modes. Alternatively, the semantics of a single syntax element may differ for AMVR and affine modes, i.e., the values ​​of the same syntax element may be mapped to different MVD precisions for AMVR and affine modes. b. In one example, if the affine mode uses the same set of MVD precisions as the AMVR (e.g., the MVD precision set is {1,1 / 4,4}-pixel), the MVD precision syntax element in the AMVR is reused in the affine mode, i.e., only a single syntax element is used. i. Alternatively, in addition, in the CABAC encoder / decoder, the same or different context models for AMVR and affine modes may be used when encoding / decoding this syntax element. Alternatively, this syntax element may have different semantics in AMVR and affine mode: for example, in AMVR, syntax elements equal to 0, 1, and 2 indicate MV precisions of ¼ pixel, 1 pixel, and 4 pixels, respectively, while in affine mode, syntax elements equal to 0, 1, and 2 indicate MV precisions of ¼ pixel, 1 / 16 pixel, and 1 pixel, respectively. c. In one example, if the affine mode uses the same number of MVD precisions as the AMVR, but a different set of MVD precisions (e.g., the MVD precision set for AMVR is {1, ¼, 4}-pixel, while for affine it is {1 / 16, ¼, 1}-pixel) the MVD precision syntax elements in the AMVR are reused in the affine mode, i.e., only one syntax element is used. i. Alternatively, in addition, in the CABAC encoder / decoder, the same or different context models for AMVR and affine modes may be used when encoding / decoding this syntax element. ii. Alternatively, this syntax element may have different semantics in AMVR and affine modes. In one example, the affine mode uses a smaller MVD precision than the AMVR, and the MVD precision syntax elements in the AMVR are reused in the affine mode, however, only a subset of the syntax element values ​​are valid for the affine mode. i. Alternatively, in addition, in the CABAC encoder / decoder, the same or different context models for AMVR and affine modes may be used when encoding / decoding this syntax element. ii. Alternatively, this syntax element may have different semantics in AMVR and affine modes. In one example, the affine mode uses a higher MVD precision than the AMVR, and the MVD precision syntax elements in the AMVR are reused in the affine mode, however, such syntax elements are extended to allow more values ​​in the affine mode. i. Alternatively, in addition, in the CABAC encoder / decoder, the same or different context models for AMVR and affine modes may be used when encoding / decoding this syntax element. ii. Alternatively, this syntax element may have different semantics in AMVR and affine modes. f. In one example, a new syntax element is used to code the MVD precision for affine mode, i.e., two different syntax elements are used to code the MVD precision for AMVR and for affine mode. g. Syntax for indication of affine mode MVD accuracy may be signaled under one or all of the following conditions are true: i. The MVD of all control points is non-zero. ii. The MVD for at least one control point is non-zero. iii. The MVD of one control point (e.g., the first CPMV) is not zero. In this case, there is no need to signal the MVD accuracy if one or all of the above conditions are not met. h. The syntax elements for indicating the MVD precision for either the affine or AMVR modes may be coded in a context, where the context depends on the coded information. i. In one example, if there is only one syntax element, the context may depend on whether the current block is coded in affine mode. i. In one example, the context may depend on neighboring blocks / temporal layer index / block size of prediction direction / block shape / MVD precision, etc. j. Enabling or disabling the use of multiple MVD precisions in affine mode may be signaled in the SPS / PPS / VPS / sequence header / picture header / slice header / CTUs, etc. In one example, signaling information to allow or disallow the use of multiple MVD precisions for affine mode may depend on other syntax elements, for example, information to enable or disable the use of multiple MV and / or MVP and / or MVD precisions in affine mode is signaled when affine mode is enabled and is not signaled and inferred to be 0 when affine mode is disabled. k. Alternatively, multiple syntax elements may be signaled to indicate the MV and / or MVP and / or MVD precision (all referred to as "MVD precision" in the following description) to be used in affine inter mode. i. In one example, the syntax elements for indicating the MVD precision used in affine inter mode and normal inter mode may be different. 1. The number of syntax elements to indicate the MVD precision used in affine inter mode and normal inter mode may be different. 2. The semantics of the syntax elements for indicating the MVD precision used in affine inter mode and normal inter mode may be different. 3. The context model in arithmetic coding for coding one syntax element and indicating the MVD precision used in affine inter mode and normal inter mode may be different. 4. The method of deriving a context model in arithmetic coding to code one syntax element to indicate the MVD precision used in affine inter mode and normal inter mode may be different. ii. In one example, a first syntax element (eg, amvr_flag) may be signaled to indicate whether to apply AMVR in an affine coding block. 1. The first syntax element is conditionally signaled. In one example, if the current block is coded in a particular mode (eg, CPR / IBC mode), the signaling of the first syntax element (amvr_flag) is skipped. b. In one example, if the MVDs (including both horizontal and vertical components) of all CPMVs are all zero, the signaling of the first syntax element (amvr_flag) is skipped. c. In one example, if the MVD (including both horizontal and vertical components) of the selected CPMV is all zeros, the signaling of the first syntax element (amvr_flag) is skipped. i. In one example, the MVD of the selected CPMV is the MVD of the first CPMV to be encoded / decoded. d. In one example, if the use of enabling multiple MVD precision for affine coding blocks is false, the signaling of the first syntax element (amvr_flag) is skipped. e. In one example, the first syntax element may be signaled under the following conditions: i. The use of allowing multiple MVD precisions for affine coding blocks is true and the current block is coded in affine mode. ii. Alternatively, the use of enabling multiple MVD precisions for affine coding blocks is true, the current block is coded in affine mode, and at least one component of the MVD of the CPMV is not equal to 0. iii. Alternatively, the use of enabling multiple MVD precisions for affine coding blocks is true, the current block is coded in affine mode, and at least one component of the MVD of the selected CPMV is not equal to 0. 1. In one example, the MVD of the selected CPMV is the MVD of the first CPMV to be encoded / decoded. 2. If AMVR is not applied to the affine coding block or the first syntax element is not present, the default MV and / or MVD precision is utilized. In one example, the default precision is 1 / 4 pixel. b. Alternatively, the default precision is set to the precision used for motion compensation of the affine coding block. 3. For example, if amvr_flag is 0, then the MVD precision of the affine mode is 1 / 4 pixel, otherwise the MVD precision of the affine mode may be other values. Alternatively, the additional MVD precision may be further signaled via a second syntax element. iii. In one example, a second syntax element (eg, amvr_coarse_precision_flag) may be signaled to indicate the MVD precision of the affine mode. 1. In one example, whether the second syntax element is signaled may depend on the first syntax element. For example, the second syntax element is signaled only when the first syntax element is 1. 2. In one example, if the second syntax element is 0, then the MVD precision of the affine mode is 1 pixel, otherwise, the MVD precision of the affine mode is 1 / 16 pixel. 3. In one example, if the second syntax element is 0, then the MVD precision of the affine mode is 1 / 16 pixel, otherwise the MVD precision of the affine mode is full pixel. iv. In one example, a syntax element used to indicate the MVD precision used in affine inter mode shares the same context model as a syntax element that has the same name but is used to indicate the MVD precision used in normal inter mode. 1. Alternatively, the syntax element used to indicate the MVD precision used in affine inter mode uses a different context model as the syntax element having the same name but used to indicate the MVD precision used in regular inter mode.

[0252] 3. Whether or not or how to apply AMVR to an affine coding block may depend on the reference pictures of the current block. i. In one example, if the reference picture is the current picture, i.e., if intra block copy is applied in the current block, AMVR is not applied.

[0253] A Fast Algorithm of AVMR in Affine Mode for Encoders The RD cost of affine mode and AMVP mode (real RD cost, or SATD / SSE / SAD cost plus rough bit cost) is denoted as affineCosti and amvpCosti when IMV=i, where i=0,1,2. Here, IMV=0 means 1 / 4 pixel MV, IMV=1 means integer MV in AMVP mode and 1 / 16 pixel MV in affine mode, and IMV=2 means 4 pixel MV in AMVP mode and integer MV in affine mode. The RD cost of merge mode is mergeCost.

[0254] 4. If the affine mode of the current CU is such that the best mode of its parent CU is neither AF_INTER nor AF_MERGE, it is suggested to disable AMVR. Alternatively, the AMVR is disabled for the affine mode of the current CU if the best mode of its parent CU is not AF_INTER mode.

[0255] 5. If affineCost0>th1*amvpCost0, where th1 is a positive threshold, then it is proposed that AMVR is disabled for affine mode. a. Alternatively, if min(affineCost0, amvpCost0)>th2*mergeCost, where th2 is a positive threshold, then AMVR is disabled for affine mode. b. Alternatively, if affineCost0>th3*affineCost1, where th3 is a positive threshold, integer MVs are disabled for affine modes.

[0256] 6. If amvpCost0>th4*affineCost0, where th4 is a positive threshold, it is suggested to disable AMVR in AMVP mode. a. Alternatively, in AMVP mode, if min(affineCost0, amvpCost0)>th5*mergeCost, where th5 is a positive threshold, AMVR is disabled.

[0257] 7. It is proposed that the 4 / 6 parameter affine models obtained at one MV precision may be used as candidate starting search points for other MV precisions. In one example, the 4 / 6 parameter affine model obtained with 1 / 16 MV may be used as a candidate starting search point for other MV accuracies. b. In one example, the 4 / 6 parameter affine model obtained with 1 / 4 MV may be used as a candidate starting search point for other MV accuracy.

[0258] 8. In the encoder, if the parent block of the current block does not select affine mode, the AMVR of affine mode is not checked.

[0259] 9. By utilizing the statistics of the use of different MV precisions for affine coding blocks in the aforementioned coded frame / slice / tile / CTU row, the distortion rate calculation of the MV precision for affine coding blocks in the current slice / tile / CTU row can be terminated early. a. In one example, the percentage of affine coding blocks having a specific MV precision is recorded. If the percentage is too small, the check for the corresponding MV precision is skipped. b. In one example, previously coded frames having the same time layer are utilized to determine whether to skip a certain MV precision.

[0260] 10. The proposed method may be applied under specific conditions such as block size, slice / picture / tile type, or motion information. a. In one example, when the block size is smaller than M*H samples, for example, including 16 or 32 or 64 luminance samples, the proposed method is not permitted. b. Alternatively, when the minimum size of the width and / or height of the block is smaller than or equal to X, the proposed method is not permitted. In one example, X is set to 8. c. Alternatively, when the minimum size of the width and / or height of the block is not smaller than X, the proposed method is not permitted. In one example, X is set to 8. d. Alternatively, when the width of the block > th1 or >= th1 and / or the height of the block > th2 or >= th2, the proposed method is not permitted. In one example, th1 and / or th2 are set to 8. e. Alternatively, when the width of the block < th1 or <= th1 and / or the height of the block < th2 or <= th2, the proposed method is not permitted. In one example, th1 and / or th2 are set to 8. f. Alternatively, whether the above methods are enabled or disabled and / or which method is applied may depend on the block dimensions, video processing data unit (VPDU), picture type, low latency check flag, coded information of the current block (e.g., reference picture, uni- or bi-predictive) or previously coded blocks.

[0261] 11. The AMVR method for affine mode can be implemented in different ways depending on whether or not intra block copy (IBC, also known as current picture reference (CPR)) is applied. In one example, if a block is coded by IBC, AMVR for affine mode cannot be used. b. In one example, AMVR for affine mode may be used, but if one block is coded by IBC, the candidate MV / MVD / MVP precision may be different from that used for non-IBC coding affine coding blocks.

[0262] 12. All occurrences of the term "slice" in the document may be replaced with "tile group" or "tile".

[0263] 13. In a VPS / SPS / PPS / slice header / tile group header, a syntax element equal to 1 (e.g., no_amvr_constraint_flag) specifies that it is a bitstream conformance requirement that the syntax element indicating whether AMVR is enabled (e.g., sps_amvr_enabled_flag) and the syntax element indicating whether affine AMVR is enabled (e.g., sps_affine_avmr_enabled_flag) are both equal to 0. A syntax element equal to 0 (e.g., no_amvr_constraint_flag) imposes no constraint.

[0264] 14. A syntax element (eg, no_affine_amvr_constraint_flag) can be signaled in the VPS / SPS / PPS / slice header / tile group header or other video data unit. In one example, no_affine_amvr_constraint_flag equal to 1 specifies that it is a bitstream conformance requirement that a syntax element to indicate whether affine AMVR is enabled (e.g., sps_affine_avmr_enabled_flag) is equal to 0. When the syntax element (e.g., no_affine_amvr_constraint_flag) is equal to 0, no constraint is imposed.

[0265] 5. Embodiments

[0266] 5.1. Example 1: Display of Affine AMVR Mode Usage It may be signaled in the SPS / PPS / VPS / APS / Sequence Header / Picture Header / Tile Group Header etc. In this chapter, signaling in the SPS is described.

[0267] 5.1.1. SPS Syntax Table

[0268] [Table 6]

[0269] An alternative SPS syntax table is given below:

[0270] [Table 7]

[0271] Semantics: sps_affine_amvr_enabled_flag=1 specifies that adaptive motion vector differential resolution is used for affine inter mode motion vector coding. amvr_enabled_flag equal to 0 specifies that adaptive motion vector differential resolution is not used for affine inter mode motion vector coding.

[0272] 5.2. Parsing Affine AMVR Mode Information

[0273] The syntax for affine AMVR mode information may be reused for AMVR mode information (which applies to normal inter modes), or alternatively, different syntax elements may be used. Affine AMVR mode information may be conditionally signaled. Different embodiments below provide some examples of this condition.

[0274] 5.2.1. Implementation #1: CU Syntax Table

[0275] [Table 8] [Table 9]

[0276] 5.2.2. Example 2: Alternative CU Syntax Table Design

[0277] [Table 10] [Table 11]

[0278] 5.2.3. Third embodiment: Third CU syntax table design

[0279] [Table 12] [Table 13]

[0280] 5.2.4. Embodiment 4: Syntax Table Design with Different Syntax for AMVR and Affine AMVR Modes

[0281] [Table 14] [Table 15]

[0282] In one example, conditionsA is defined as follows: (sps_affine_amvr_enabled_flag && inter_affine_flag==1 && (MvdCpL0[x0][y0][0][0]!=0|| MvdCpL0[x0][y0][0][1]!=0|| MvdCpL1[x0][y0][0][0]!=0|| MvdCpL1[x0][y0][0][1]!=0|| MvdCpL0[x0][y0][1][0]!=0|| MvdCpL0[x0][y0][1][1]!=0|| MvdCpL1[x0][y0][1][0]!=0|| MvdCpL1[x0][y0][1][1]!=0|| MvdCpL0[x0][y0][2][0]!=0|| MvdCpL0[x0][y0][2][1]!=0|| MvdCpL1[x0][y0][2][0]!=0|| MvdCpL1[x0][y0][2][1]!=0))

[0283] Alternatively, conditionsA can be defined as follows: (sps_affine_amvr_enabled_flag && inter_affine_flag==1 && (MvdCpL0[x0][y0][0][0]!=0|| MvdCpL0[x0][y0][0][1]!=0|| MvdCpL1[x0][y0][0][0]!=0|| MvdCpL1[x0][y0][0][1]!=0)

[0284] Alternatively, conditionsA can be defined as follows: (sps_affine_amvr_enabled_flag && inter_affine_flag==1 && (MvdCpLX[x0][y0][0][0]!=0|| MvdCpLX[x0][y0][0][1]!=0) Here, X is 0 or 1.

[0285] Alternatively, conditionsA can be defined as follows: (sps_affine_amvr_enabled_flag && inter_affine_flag==1)

[0286] In one example, conditionsB is defined as follows: !sps_cpr_enabled_flag||!(inter_pred_idc[x0][y0]==PRED_L0 && ref_idx_l0[x0][y0]==num_ref_idx_l0_active_minus1)

[0287] Alternatively, conditionsB can be defined as follows: !sps_cpr_enabled_flag||!(pred_mode[x0][y0]==CPR).

[0288] Alternatively, conditionsB can be defined as follows: !sps_ibc_enabled_flag||!(pred_mode[x0][y0]==IBC).

[0289] When using different syntax elements for coding AMVR or affine AMVR, the context modelling and / or context used in the 5.5 embodiment applied to affine AMVR can be applied accordingly.

[0290] Semantics

[0291] amvr_flag[x0][y0] specifies the resolution of the motion vector difference. The array index x0,y0 specifies the position (x0,y0) of the top-left luma sample of the coding block relative to the top-left luma sample of the picture. amvr_flag[x0][y0] equal to 0 specifies that the resolution of the motion vector difference is 1 / 4 of the luma sample, and amvr_flag[x0][y0] equal to 1 specifies that the resolution of the motion vector difference is further specified by amvr_coarse_precisoin_flag[x0][y0]. If amvr_flag[x0][y0] is not present, it is inferred as follows: -If sps_cpr_enabled_flag is equal to 1, amvr_flag[x0][y0] is inferred to be equal to 1. - Otherwise (sps_cpr_enabled_flag is equal to 0), amvr_flag[x0][y0] is inferred to be equal to 0.

[0292] amvr_coarse_precisoin_flag[x0][y0] equal to 1 specifies that the resolution of the motion vector differential is 4 luma samples if inter_affine_flag is 0, and 1 luma sample if inter_affine_flag is 1. The array index x0,y0 specifies the position (x0,y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. If amvr_coarse_precisoin_flag[x0][y0] is not present, it is inferred to be equal to 0.

[0293] If inter_affine_flag[x0][y0] is 0, the variable MvShift is set to (amvr_flag[x0][y0]+amvr_coarse_precisoin_flag[x0][y0])<<1, and the variables MvdL0[x0][y0][0], MvdL0[x0][y0][1], MvdL1[x0][y0][0], MvdL1[x0][y0][1] are modified as follows:

[0294] MvdL0[x0][y0][0]=MvdL0[x0][y0][0]<<(MvShift+2) (7-70) MvdL0[x0][y0][1]=MvdL0[x0][y0][1]<<(MvShift+2) (7-71) MvdL1[x0][y0][0]=MvdL1[x0][y0][0]<<(MvShift+2) (7-72) MvdL1[x0][y0][1]=MvdL1[x0][y0][1]<<(MvShift+2) (7-73)

[0295] When inter_affine_flag[x0][y0] is 1, the variable MvShift is set to (amvr_coarse_precisoin_flag?(amvr_coarse_precisoin_flag<<1):(-(amvr_flag<<1))), and the variables MvdCpL0[x0][y0][0][0], MvdCpL0[x0][y0][0][1], MvdCpL0[x0][y0][1][0], MvdCpL0[x0][y0][1][1], MvdCpL0[x0][y0][2][0], MvdCpL0[x0][y0][2][1] are modified as follows:

[0296] MvdCpL0[x0][y0][0][0]=MvdCpL0[x0][y0][0][0]<<(MvShift+2) (7-73) MvdCpL1[x0][y0][0][1]=MvdCpL1[x0][y0][0][1]<<(MvShift+2) (7-67) MvdCpL0[x0][y0][1][0]=MvdCpL0[x0][y0][1][0]<<(MvShift+2) (7-66) MvdCpL1[x0][y0][1][1]=MvdCpL1[x0][y0][1][1]<<(MvShift+2) (7-67) MvdCpL0[x0][y0][2][0]=MvdCpL0[x0][y0][2][0]<<(MvShift+2) (7-66) MvdCpL1[x0][y0][2][1]=MvdCpL1[x0][y0][2][1]<<(MvShift+2) (7-67)

[0297] Alternatively, if inter_affine_flag[x0][y0] is equal to 1, then the variable MvShift is set equal to (affine_amvr_coarse_precisoin_flag?(affine_amvr_coarse_precisoin_flag<<1):(-(affine_amvr_flag<<1))).

[0298] 5.3. Motion Vector Rounding

[0299] The rounding process is modified such that if a given rightShift value is 0 (which occurs with 1 / 16 pixel accuracy), then the rounding offset is set to 0 instead of (1<<(rightShift-1)).

[0300] For example, the rounding subclause for MV is modified as follows: The inputs to this process are: - the motion vector mvX, - the right shift parameter when rounding, rightShift, - Left shift parameter leftShift to increase resolution. The output of this process is the rounded motion vector mvX. When rounding mvX, the following applies:

[0301] offset=(rightShift==0)?0:(1<<(rightShift-1)) (8-371) mvX[0]=(mvX[0]>=0?(mvX[0]+offset)>>rightShift: -((-mvX[0]+offset)>>rightShift))< <leftshift (8-372) mvx[1]="(mvX[1]">=0?(mvX[1]+offset)>>rightShift: -((-mvX[1]+offset)>>rightShift))< <leftShift (8-373)

[0302] 5.4. Decryption process

[0303] The rounding process invoked in the affine motion vector derivation process is done with an input of (MvShift+2) instead of being fixed at 2.

[0304] Derivation of luminance affine control point motion vector predictor The inputs to this process are: - Luminance position (xCb, yCb) of the top-left sample of the current luma coding block relative to the top-left luma sample of the current picture - Two variables cbWidth and cbHeigh that specify the width and height of the current luminance coding block - Reference index of the current coding unit refIdxLX, where X is 0 or 1. - Number of control point motion vectors numCpMv The output of this process is the intensity affine control point motion vector predictor mvpCpLX[cpIdx], where X is either 0 or 1, cpIdx=0..numCpMv-1.

[0305] To derive the control point motion vector predictor candidate list, which is cpMvpListLX, where X is 0 or 1, the following ordered steps are applied:

[0306] The number of control point motion vector predictor candidates in the list numCpMvpCandLX is set equal to 0. The variables availableFlagA and availableFlagB are both set equal to FALSE.

[0307] … The motion vector rounding process specified in clause 8.4.2.14 is called with mvX set equal to cpMvpLX[cpIdx], rightShift set equal to (MvShift+2), leftShift set equal to (MvShift+2) as input, and cpMvpLX[cpIdx] rounded by cpIdx=0..numCpMv-1 as output.

[0308] … The variable availableFlagA is set equal to TRUE. The derivation of luminance affine control point motion vectors from neighboring blocks process specified in Section 8.4.4.5 is called with the luminance coding block position (xCb, yCb), the luminance coding block width and height (cbWidth, cbHeight), the neighboring luminance coding block position (xNb, yNb), the neighboring luminance coding block width and height (nbW, nbH), and the number of control point motion vectors numCpMv as inputs, and the control point motion vector predictor candidate cpMvpLY[cpIdx] (cpIdx=0..numCpMv-1) as output. The motion vector rounding process specified in clause 8.4.2.14 is called with input mvX set equal to cpMvpLY[cpIdx], rightShift set equal to (MvShift+2), leftShift set equal to (MvShift+2), and output cpMvpLY[cpIdx] rounded by cpIdx=0..numCpMv-1.

[0309] … The derivation of a luminance affine control point motion vector from neighboring blocks process specified in section 8.4.4.5 is called with the luma coding block position (xCb, yCb), the luma coding block width and height (cbWidth, cbHeight), the neighboring luma coding block position (xNb, yNb), and the number of control point motion vectors numCpMv as input, and the control point motion vector predictor candidate cpMvpLX[cpIdx] (cpIdx=0...numCpMv-1) as output. The motion vector rounding process specified in clause 8.4.2.14 is called with mvX set equal to cpMvpLX[cpIdx], rightShift set equal to (MvShift+2), leftShift set equal to (MvShift+2), and output cpMvpLX[cpIdx] rounded by cpIdx=0..numCpMv-1.

[0310] Make the following assignments: cpMvpListLX[numCpMvpCandLX][0]=cpMvpLX[0] (8-618) cpMvpListLX[numCpMvpCandLX][1]=cpMvpLX[1] (8-619) cpMvpListLX[numCpMvpCandLX][2]=cpMvpLX[2] (8-620) numCpMvpCandLX=numCpMvpCandLX+1 (8-621) Alternatively, if PredFlagLY[xNbBk][yNbBk] (withY=!X) is equal to 1 and DiffPicORDerCnt(RefPicListY[RefIdxLY[xNbBk][yNbBk]], RefPicListX[refIdxLX]) is equal to 0 then the following applies:

[0311] The variable availableFlagB is set to TRUE. The derivation of luminance affine control point motion vectors from neighboring blocks process specified in Section 8.4.4.5 is called with the luminance coding block position (xCb, yCb), the luminance coding block width and height (cbWidth, cbHeight), the neighboring luminance coding block position (xNb, yNb), the neighboring luminance coding block width and height (nbW, nbH), and the number of control point motion vectors numCpMv as inputs, and the control point motion vector predictor candidate cpMvpLY[cpIdx] (cpIdx=0..numCpMv-1) as output. The motion vector rounding process specified in clause 8.4.2.14 is called with input mvX set equal to cpMvpLY[cpIdx], rightShift set equal to (MvShift+2), leftShift set equal to (MvShift+2), and output cpMvpLY[cpIdx] rounded by cpIdx=0..numCpMv-1.

[0312] Make the following assignments: cpMvpListLX[numCpMvpCandLX][0]=cpMvpLY[0] (8-622) cpMvpListLX[numCpMvpCandLX][1]=cpMvpLY[1] (8-623) cpMvpListLX[numCpMvpCandLX][2]=cpMvpLY[2] (8-624) numCpMvpCandLX=numCpMvpCandLX+1 (8-625)

[0313] If numCpMvpCandLX is less than 2, the following applies: The affine control point motion vector prediction candidate derivation process specified in Section 8.4.4.8 is invoked with the luma coding block position (xCb, yCb), the luma coding block width cbWidth, the luma coding block height cbHeight, and the reference index of the current coding unit refIdxLX as input, and the availability flag availableConsFlagLX, the availability flag availableFlagLX[cpIdx], and cpMvpLX[cpIdx] (cpIdx=0..numCpMv-1) as output.

[0314] If availableConsFlagLX is equal to 1 and numCpMvpCandLX is equal to 0, the following allocation is made: cpMvpListLX[numCpMvpCandLX][0]=cpMvpLX[0] (8-626) cpMvpListLX[numCpMvpCandLX][1]=cpMvpLX[1] (8-627) cpMvpListLX[numCpMvpCandLX][2]=cpMvpLX[2] (8-628) numCpMvpCandLX=numCpMvpCandLX+1 (8-629)

[0315] Applies to cpIdx=0..numCpMv-1. If numCpMvpCandLX is less than 2 and availableFlagLX[cpIdx] is equal to 1, the following allocation takes place: cpMvpListLX[numCpMvpCandLX][0]=cpMvpLX[cpIdx] (8-630) cpMvpListLX[numCpMvpCandLX][1]=cpMvpLX[cpIdx] (8-631) cpMvpListLX[numCpMvpCandLX][2]=cpMvpLX[cpIdx] (8-632) numCpMvpCandLX=numCpMvpCandLX+1 (8-633)

[0316] If numCpMvpCandLX is less than 2, the following applies: The temporal luma motion vector prediction derivation process described in section 8.4.2.11 is called using the luma coding block position (xCb, yCb), the luma coding block width cbWidth, the luma coding block height cbHeight, refIdxLX as input, and the availability flag availabilityFlagLXCol, and the temporal motion vector predictor mvLXCol as output.

[0317] If availableFlagLXCol is equal to 1, the following applies: The motion vector rounding process described in section 8.4.2.14 is called with mvX set equal to mvLXCol, rightShift set equal to (MvShift+2), leftShift set equal to (MvShift+2) as input, and the rounded mvLXCol as output.

[0318] Make the following assignments: cpMvpListLX[numCpMvpCandLX][0]=mvLXCol (8-634) cpMvpListLX[numCpMvpCandLX][1]=mvLXCol (8-635) cpMvpListLX[numCpMvpCandLX][2]=mvLXCol (8-636) numCpMvpCandLX=numCpMvpCandLX+1 (8-637)

[0319] If numCpMvpCandLX is less than 2, repeat the following until numCpMvpCandLX is equal to 2 and both mvZero[0] and mvZero[1] are equal to 0. cpMvpListLX[numCpMvpCandLX][0]=mvZero (8-638) cpMvpListLX[numCpMvpCandLX][1]=mvZero (8-639) cpMvpListLX[numCpMvpCandLX][2]=mvZero (8-640) numCpMvpCandLX=numCpMvpCandLX+1 (8-641)

[0320] The affine control point motion vector predictor cpMvpLX, where X is 0 or 1, is derived as follows: cpMvpLX=cpMvpListLX[mvp_lX_flag[xCb][yCb]] (8-642)

[0321] Derivation process of motion vector prediction candidates based on constructed affine control points The inputs to this process are: - A luminance position (xCb, yCb) that specifies the top-left sample of the current luma coding block relative to the top-left luma sample of the current picture. - Two variables cbWidth and cbHeigh that specify the width and height of the current luminance coding block - The reference index of the split refIdxLX (where X is 0 or 1) of the current prediction unit. The output of this process is: - Availability flag of constructed affine control point motion vector prediction candidates availableConsFlagLX (X is 0 or 1) -availability flags availabilityLX[cpIdx] (cpIdx=0..2, X is 0 or 1) -constructed affine control point motion vector prediction candidate cpMvLX[cpIdx] (cpIdx=0..numCpMv-1, X is 0 or 1)

[0322] The first (top-left) control point motion vector cpMvLX[0] and availability flag availabilityFlagLX[0] are derived in the following sequential steps. Sample positions (xNbB2, yNbB2), (xNbB3, yNbB3) and (xNbA2, yNbA2) are set equal to (xCb-1, yCb-1), (xCb, yCb-1) and (xCb-1, yCb), respectively. The availability flag availabilityFlagLX[0] is set equal to 0, and both components of cpMvLX[0] are set equal to 0.

[0323] The following applies when (xNbTL, yNbTL) is replaced with B2, B3, and A2. The coding block availability derivation process described in section is called with inputs the luma coding block position (xCb, yCb), the luma coding block width cbWidth, the luma coding block height cbHeight, and the luma position (xNbY, yNbY) set equal to (xNbTL, yNbTL), and the output is assigned to the coding block availability flag availabilityTR.

[0324] If availableTL is equal to TRUE and availableFlagLX[0] is equal to 0, the following applies:

[0325] If PredFlagLX[xNbTL][yNbTL] is equal to 1, DiffPicORDerCnt(RefPicListX[RefIdxLX[xNbTL][yNbTL]], RefPicListX[refIdxLX]) is equal to 0, and the reference picture corresponding to RefIdxLX[xNbTL][yNbTL] is not the current picture, then availableFlagLX[0] is set equal to 1 and the following allocation is made:

[0326] cpMvLX[0]=MvLX[xNbTL][yNbTL] (8-643)

[0327] Otherwise, if PredFlagLY[xNbTL][yNbTL] (Y=!X) is equal to 1, and DiffPicORDerCnt(RefPicListY[RefIdxLY[xNbTL][yNbTL]],RefPicListX[refIdxLX]) is equal to 0, and the reference picture corresponding to RefIdxLY[xNbTL][yNbTL] is not the current picture, set availableFlagLX[0] equal to 1 and make the assignment as follows:

[0328] cpMvLX[0]=MvLY[xNbTL][yNbTL] (8-644)

[0329] If availableFlagLX[0] is 1, the motion vector rounding process specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvLX[0], rightShift set equal to (MvShift+2), leftShift set equal to (MvShift+2), and the rounded cpMvLX[0] as output.

[0330] The second (top right) control point motion vector cpMvLX[1] and availability flag availabilityFlagLX[1] are derived in the following sequential steps. Sample positions (xNbB1, yNbB1) and (xNbB0, yNbB0) are set equal to (xCb+cbWidth-1, yCb-1) and (xCb+cbWidth, yCb-1), respectively. The availability flag availabilityFlagLX[1] is set to 0, and both components of cpMvLX[1] are set to 0.

[0331] The following applies when (xNbTR, yNbTR) is replaced by B1 and B0. As specified in Section 6.4.X, the coding block availability derivation process is invoked with inputs the luma coding block position (xCb, yCb), the luma coding block width cbWidth, the luma coding block height cbHeight, and the luma position (xNbY, yNbY) set equal to (xNbTR, yNbTR), and the output is assigned to the coding block availability flag availabilityTR.

[0332] If availableTR is equal to TRUE and availableFlagLX[1] is equal to 0, the following applies:

[0333] If predFlagLX[xNbTR][yNbTLR] is equal to 1, DiffPicOrderCnt(RefPicListX[RefIdxLX[xNbTR][yNbTR]], RefPicListX[refIdxLX]) is equal to 0, and the reference picture corresponding to RefIdxLX[xNbTR][yNbTR] is not the current picture, then availableFlagLX[1] is set equal to 1 and the following allocation is made:

[0334] cpMvLX[1]=MvLX[xNbTR][yNbTR] (8-645)

[0335] Otherwise, if PredFlagLY[xNbTR][yNbTR] (Y=!X) is equal to 1, and DiffPicORDerCnt(RefPicListY[RefIdxLY[xNbTR][yNbTR]],RefPicListX[refIdxLX]) is equal to 0, and the reference picture corresponding to RefIdxLY[xNbTR][yNbTR] is not the current picture, set availableFlagLX[1] equal to 1 and make the allocation as follows:

[0336] cpMvLX[1]=MvLY[xNbTR][yNbTR] (8-646)

[0337] If availableFlagLX[1] is equal to 1, the motion vector rounding process specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvLX[1], rightShift set equal to (MvShift+2), leftShift set equal to (MvShift+2), and the rounded cpMvLX[1] as output.

[0338] The third (bottom-left) control point motion vector cpMvLX[2] and availability flag availabilityFlagLX[2] are derived in the following sequential steps.

[0339] Sample positions (xNbA1, yNbA1) and (xNbA0, yNbA0) are set equal to (xCb-1, yCb+cbHeight-1) and (xCb-1, yCb+cbHeight), respectively. The availability flag availabilityFlagLX[2] is set equal to 0, and both components of cpMvLX[2] are set equal to 0.

[0340] The following applies to (xNbBL, yNbBL) where BL is replaced by A1 and A0:

[0341] The coding block availability derivation process described in Section 6.4.X is invoked with the luminance coding block position (xCb, yCb), the luminance coding block width cbWidth, the luminance coding block height cbHeight, and the luminance position (xNbY, yNbY) = (xNbBL, yNbBL) as inputs, and its output is assigned to the coding block availability flag availabilityBL.

[0342] If availableBL is equal to TRUE and availableFlagLX[2] is equal to 0, the following applies:

[0343] If PredFlagLX[xNbBL][yNbBL] is equal to 1, DiffPicORDerCnt(RefPicListX[RefIdxLX[xNbBL][yNbBL]], RefPicListX[refIdxLX]) is equal to 0, and the reference picture corresponding to RefIdxLY[xNbBL][yNbBL] is not the current picture, set availableFlagLX[2] to 1 and make the following allocation:

[0344] cpMvLX[2]=MvLX[xNbBL][yNbBL] (8-647)

[0345] Otherwise, if PredFlagLY[xNbBL][yNbBL] (Y=!X) is equal to 1, and DiffPicORDerCnt(RefPicListY[RefIdxLY[xNbBL][yNbBL]],RefPicListX[refIdxLX]) is equal to 0, and the reference picture corresponding to RefIdxLY[xNbBL][yNbBL] is not the current picture, set availableFlagLX[2] equal to 1 and make the following allocation:

[0346] cpMvLX[2]=MvLY[xNbBL][yNbBL] (8-648)

[0347] If availableFlagLX[2] is equal to 1, the motion vector rounding process specified in clause 8.4.2.14 is invoked with mvX set equal to cpMvLX[2], rightShift set equal to (MvShift+2), leftShift set equal to (MvShift+2), and the rounded cpMvLX[2] as output.

[0348] 5.5. Context Modeling

[0349] Assignment of ctxInc to syntax elements using context-coded binary values:

[0350] [Table 16]

[0351] A ctxInc specification using the syntax elements at top left: In one example, the context increment offset ctxInc=(condL && availableL)+(condA && availableA)+ctxSetIdx*3. Alternatively, ctxInc=((condL && availableL)||(condA && availableA))+ctxSetIdx*3. ctxInc=(condL && availableL)+M*(condA && availableA)+ctxSetIdx*3. (For example, M=2) ctxInc=M*(condL && availableL)+(condA && availableA)+ctxSetIdx*3.(For example, M=2)

[0352] [Table 17]

[0353] Value of initValue of ctxIdx in amvr_flag: Different contexts are used if the current block is affine or non-affine.

[0354] [Table 18]

[0355] Value of initValue for ctxIdx in amvr_coarse_precisoin_flag: Different contexts are used if the current block is affine or non-affine.

[0356] [Table 19]

[0357] The above described examples may be incorporated in conjunction with the methods described below, such as methods 2600 to 2680, which may be implemented in a video decoder or video encoder.

[0358] 26A shows a flow chart of an example video processing method. The method 2600 includes, at step 2602, determining a motion vector difference (MVD) precision to be used for conversion from a set of multiple allowed MVD precisions applied to a video region that includes the current video block to convert between a coded representation of the current block of video and the current block. The method 2600 includes, at step 2604, performing the conversion based on the MVD precision.

[0359] Figure 26B shows a flow chart of an example video processing method. The method 2610 shown in Figure 26B includes, at step 2612, determining for a video domain including one or more video blocks of a video and a coded representation of the video to use multiple motion vector difference (MVD) precisions for transforming the one or more video blocks in the video domain. The method 2610 includes, at step 2614, performing the transform based on the determination.

[0360] Figure 26C shows a flowchart of an example video processing method. The method 2620 shown in Figure 26C includes determining, at step 2622, whether to apply adaptive motion vector resolution (AMVR) processing to a current video block for a video domain including one or more video blocks of a video and a coding representation of the video to convert between the current video block and the coding representation of the video. The method 2620 includes, at step 2624, performing the conversion based on the determination.

[0361] Figure 26D shows a flowchart of an example video processing method. The method 2630 shown in Figure 26D includes, for a video domain including one or more video blocks of a video and a coding representation of the video, determining how to apply adaptive motion vector resolution (AMVR) processing to a current video block to convert between the current video block and the coding representation of the video at step 2632. The method 2630 includes, at step 2634, performing the conversion based on the determination.

[0362] Figure 26E shows a flowchart of an example video processing method. The method 2640 shown in Figure 26E includes, at step 2642, determining the use of adaptive motion vector resolution (AMVR) to convert between a coding representation of a current block of a video and the current block based on a coding mode of a parent coding unit of the current coding unit using an affine coding mode or a distortion rate (RD) cost of an affine coding mode. The method 2640 includes, at step 2644, performing the conversion based on the determined result.

[0363] Figure 26F illustrates a flow chart of an exemplary video processing method. The method 2650 illustrated in Figure 26F includes, at step 2652, determining an adaptive motion vector resolution (AMVR) usage for converting between a coded representation of a current block of a video and the current block using an advanced motion vector prediction (AMVP) coding mode, where the determination is based on a distortion ratio (RD) cost of the AMVP coding mode. The method 2650 includes, at step 2654, performing the conversion based on the determined result.

[0364] Figure 26G shows a flow chart of an example video processing method. The method 2660 shown in Figure 26G includes generating a set of MV (motion vector) precisions using a four-parameter affine model or a six-parameter affine model to convert between a coding representation of a current block of video and the current block at step 2662. The method 2660 includes performing the conversion based on the set of MV precisions at step 2664.

[0365] Figure 26H shows a flow chart of an exemplary video processing method. The method 2670 shown in Figure 26H includes determining, in step 2672, whether to perform a conversion using an adaptive motion vector resolution (AMVR) tool to improve motion vector resolution during decoding based on a coding mode of a parent block of the current block using an affine coding mode. The method 2670 includes, in step 2674, performing the conversion based on the result of the determination.

[0366] FIG. 26I shows a flow chart of an exemplary video processing method. The method 2680 shown in FIG. 26I includes, in step 2682, determining an end of MV-precision distortion ratio (RD) calculation for a current block using an affine coding mode to convert between a coding representation of the current block and the current block based on the use of MV-precision for a previous block previously coded using an affine coding mode. The method 2680 includes, in step 2684, performing the conversion based on the determined result.

[0367] 5. Exemplary implementations of the disclosed technology

[0368] FIG. 27 is an example of a block diagram of a video processing device 2700. The device 2700 may be used to implement one or more of the methods described herein. The device 2700 may be implemented in a smartphone, a tablet, a computer, an Internet of Things (IoT) receiver, etc. The device 2700 may include one or more processing devices 2702, one or more memories 2704, and video processing hardware 2706. The one or more processing devices 2702 may be configured to implement one or more methods described herein, including but not limited to methods 2610 and 2680. The memory(s) 2704 may be used to store data and codes used to implement the methods and techniques described herein. The video processing hardware 2706 may be used to implement the techniques described herein in a hardware circuit.

[0369] FIG. 29 is another example of a block diagram of a video processing system in which the disclosed technology may be implemented. FIG. 29 is a block diagram illustrating an example video processing system 2900 in which various technologies disclosed herein may be implemented. Various implementations may include some or all of the modules of the system 2900. The system 2900 may include an input unit 2902 for receiving video content. The video content may be received in a raw or uncompressed format, for example, 8 or 10 bit multi-module pixel values, or may be received in a compressed or encoded format. The input unit 2902 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, passive optical network (PON), and wireless interfaces such as Wi-Fi or cellular interfaces.

[0370] The system 2900 may include a coding module 2904 that may implement various coding or encoding methods described herein. The coding module 2904 may reduce the average bit rate of the video from the input unit 2902 to the output of the coding module 2904, generating a coded representation of the video. Thus, this coding technique may be referred to as a video compression or video transcoding technique. The output of the coding module 2904 may be stored or transmitted via a connected communication, as represented by module 2906. The bitstream (or coded) representation of the video received at the input unit 2902, stored or communicated, may be used by module 2908 to generate pixel values ​​or displayable video that are transmitted to the display interface unit 2910. The process of generating a user-viewable video from the bitstream representation may be referred to as video decompression. Additionally, although certain video processing operations are referred to as "coding" operations or tools, it will be understood that the coding tool or operation is performed by an encoder, and the corresponding decoding tool or operation that reverses the results of the decoding is performed by a decoder.

[0371] Examples of peripheral bus interface units or display interface units may include Universal Serial Bus (USB) or High-Definition Multimedia Interface (HDMI) or DisplayPort, etc. Examples of storage interfaces include Serial Advanced Technology Attachment (SATA), PCI, IDE interfaces, etc. The techniques described herein may be implemented in various electronic devices such as mobile phones, laptops, smartphones, or other devices capable of digital data processing and / or video display.

[0372] In some embodiments, the video processing method may be performed using an apparatus implemented on a hardware platform, such as those described with reference to FIG.

[0373] The various techniques and embodiments may be described using a format based on the following clauses, which may be implemented as preferred features of some embodiments.

[0374] The first set of sections may, for example, use some of the techniques described in sections 1, 2, and 13-15 of the previous chapter.

[0375] 1. A method of video processing comprising: determining a motion vector difference (MVD) precision to be used for conversion from a set of multiple allowable MVD precisions applicable to a video region including a current video block, for converting between a coding representation of the current video block and the current block; and performing the conversion based on the MVD precision.

[0376] 2. The method of claim 1, wherein the set of allowed MVD precisions depends on a picture, a slice, or a block of the video data.

[0377] 3. The method according to clause 1, where the set of allowed MVD precisions depends on the coded information of the current block.

[0378] 4. The method of claim 1, wherein a set of allowed MVD precisions is predefined.

[0379] 5. The method according to clause 1, wherein the set of allowed MVD precisions is signalled in a sequence parameter set (SPS), a picture parameter set (PPS), a video parameter set (VPS), a sequence header, a picture header, a slice header, or a group of coding tree units (CTUs).

[0380] 6. The method of claim 1, further comprising signaling a determined MVD precision from a set of multiple allowed MVD precisions based on a number of allowed MV precisions for the current block.

[0381] 7. The method of claim 1, wherein determining the MVD accuracy is based on one or more syntax elements and the current block is coded using an affine mode.

[0382] 8. The method of clause 3 or 7, in which the same syntax element is used to indicate a set MVD precision from a set of allowed MVD precisions that apply to both affine and non-affine modes.

[0383] 9. The method of claim 3, 7 or 8, wherein the affine and non-affine modes use the same set of allowed MVD precisions.

[0384] 10. The affine coding block is different from that used in the non-affine mode. The method of any one of claims 3, 7, or 8, using a set of multiple allowed MVD precisions.

[0385] 11. The method of claim 10, wherein a different set having the same number of allowed MVD precisions as used in the non-affine mode reuses syntax elements used in the non-affine mode in the affine mode.

[0386] 12. The method of claim 10, wherein the different set has at least one MVD precision different from that used in the non-affine mode.

[0387] 13. The method of claim 3, 7 or 8, wherein the semantics of syntax elements used in the non-affine and affine modes are different, and the syntax elements have the same decoded value that is interpreted to different MVD precisions.

[0388] 14. A method according to clause 3, 7 or 8, wherein the number of allowed multiple MVD precisions used in affine mode is less than those used in non-affine mode.

[0389] 15. The method of claim 8, wherein one or more subsets of the syntax values ​​for the non-affine mode are not valid in the affine mode.

[0390] 16. The method of claim 8 or 14, wherein the semantics of syntax elements used in the non-affine and affine modes are different, and syntax elements of the same value are interpreted to different MVD precisions.

[0391] 17. The method of clause 3 or 7, wherein the number of allowed multiple MVD precisions used in affine mode is greater than those used in non-affine mode.

[0392] 18. The method of claim 17, wherein one or more syntax elements in a non-affine mode are extended to allow more values ​​for the affine mode.

[0393] 19. The method of claim 7, using additional syntax elements to handle affine mode MVD precision that differ from those used to handle non-affine mode MVD precision.

[0394] 20. The method of claim 7, wherein an indication of MVD accuracy for affine modes is selectively signaled.

[0395] 21. The method according to clause 20, wherein an indication of MVD precision for affine mode is signaled if the MVDs of all control point motion vectors (CPMVs) are non-zero.

[0396] 22. The method of claim 20, wherein an indication of MVD accuracy for an affine mode is signaled if the MVD for at least one CPMV is non-zero.

[0397] 23. The method of clause 20, wherein an indication of MVD accuracy for an affine mode is signaled if the MVD of one selected CPMV is non-zero.

[0398] 24. The method of claim 20, wherein an indication of MVD accuracy for the affine mode is signaled if the MVD of the first CPMV is not zero.

[0399] 25. The method of claim 20, wherein an indication of MVD accuracy for an affine mode is not signaled if one or more predetermined conditions are not met.

[0400] 26. The method according to clause 7, wherein syntax elements for MVD precision indication associated with either affine or non-affine mode are coded in a context that depends on the coded information of the current block.

[0401] 27. The method of claim 7, wherein the context selection of the syntax element for the MVD precision indication associated with either affine mode or non-affine mode depends on whether the current block is coded in affine mode.

[0402] 28. The method of claim 7, wherein one context is used for a syntax element for MVD precision indication for one affine coding block and another context is used for one non-affine coding block.

[0403] 29. The method of claim 7, determining a context for the MVD accuracy measure based on the size, shape, or MVD accuracy, temporal layer index, or prediction direction of neighboring blocks.

[0404] 30. The method according to clause 7, wherein enabling or disabling the use of multiple MVD precisions allowed for affine mode is signaled in a group of a sequence parameter set (SPS), a picture parameter set (PPS), a video parameter set (VPS), a sequence header, a picture header, a slice header, or a coding tree unit (CTU).

[0405] 31. The method of claim 7, wherein allowing or disallowing the use of multiple allowed MVD precisions for affine modes depends on one or more syntax elements.

[0406] 32. The method of claim 7, wherein the information on whether to allow or prohibit the use of the allowed multiple MVD precisions is signaled when the affine mode is allowed and is not signaled when the affine mode is prohibited.

[0407] 33. The method according to any one of clauses 7 to 32, wherein the one or more syntax elements are included at a slice level, a picture level, or a sequence level.

[0408] 34. The method of claim 5, 30, or 33, wherein the slices are replaced by tiles or tiles.

[0409] 35. The method of any one of clauses 1 to 34, wherein a syntax element in a VPS, SPS, PPS, slice header, or tile group header equal to one specifies a requirement for compliance with a coding representation and requires that a first syntax element for indicating whether a first set of multiple MVD precisions is valid in non-affine mode and a second syntax element for indicating whether a second set of multiple MVD precisions is valid in affine mode are both indicated as zero.

[0410] 36. The method according to any one of clauses 1 to 34, wherein a syntax element is signaled in a VPS, SPS, PPS, slice header, tile group header, or other video data unit.

[0411] 37. The method of claim 36, wherein a syntax element equal to 1 specifies a requirement for conformance with a coding representation, the requirement requiring that a syntax element for indicating whether multiple MVD precisions are enabled for affine mode be equal to 0.

[0412] 38. The method of any one of clauses 7 to 37, utilizing a motion vector predictor with the same MVD precision for affine coding blocks.

[0413] 39. The method of any one of clauses 7 to 37, wherein the final motion vector of the current block is used with the same MVD precision for the affine coding block.

[0414] 40. The method according to any one of clauses 1 to 39, wherein performing the transformation includes generating the coding representation from a current block.

[0415] 41. The method of any one of clauses 1 to 39, wherein performing the transformation includes generating the current block from the coding representation.

[0416] 42. A video system comprising a processing device and a non-transitory memory having instructions stored therein, the instructions being implemented by the processing device to cause the processing device to perform a method as described in any one of clauses 1 to 41.

[0417] 43. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing a method according to any one of clauses 1 to 41.

[0418] The second set of nodes employs some of the techniques described in the preceding sections, including, for example, sections 3, 4 and 12 of the previous section.

[0419] 1. A method of image processing comprising, for an image domain including one or more image blocks of an image and a coded representation of the image, determining to use a plurality of motion vector difference (MVD) precisions for transforming the one or more image blocks in the image domain, and performing the transform based on the determination.

[0420] 2. The method of claim 1, wherein the transformation of at least a portion of one or more video blocks is based on affine mode coding.

[0421] 3. The method of clause 1 or 2, wherein the use is indicated by a coding representation comprising a sequence parameter set (SPS), a picture parameter set (PPS), a video parameter set (VPS), a sequence header, a picture header, a slice header, or a coding tree unit (CTU).

[0422] 4. The method described in clause 3, where the use is indicated depending on the syntax element used to indicate the MVD precision.

[0423] 5. A video processing method comprising, for an image region including one or more video blocks of a video and a coding representation of the video, determining whether to apply adaptive motion vector resolution (AMVR) processing to a current video block to convert between the current video block and the coding representation of the video, and performing the conversion based on the determination.

[0424] 6. A method of video processing, comprising: for an image region including one or more video blocks of a video and a coding representation of the video, determining how to apply adaptive motion vector resolution (AMVR) processing to a current video block to convert between the current video block and the coding representation of the video, and performing the conversion based on the determination.

[0425] 7. The method of clause 5 or 6, wherein the transformation of the current video block is based on affine mode coding.

[0426] 8. The method of claim 7, wherein the determining depends on a reference picture of the current video block.

[0427] 9. The method of claim 8, wherein if the reference picture is the current picture, determining determines not to apply AMVR processing.

[0428] 10. The method of claim 5 or 6, wherein the determining depends on whether to apply intra block copy (IBC) to the current block.

[0429] 11. The method of claim 10, wherein determining determines to apply AMVR processing to a current block coded by IBC.

[0430] 12. The method of claim 11, wherein the MV (motion vector), MVD, or MVP (motion vector prediction) accuracy candidates for an IBC coded block are different from those used for other video blocks that are not IBC coded.

[0431] 13. The method of claim 11, in which the candidate MV (motion vector), MVD, or MVP (motion vector prediction) accuracy for an IBC coded block is different from that used for another video block coded in affine mode.

[0432] 14. The method according to any one of clauses 1 to 13, wherein performing the transformation includes generating the coding representation from a current block.

[0433] 15. The method according to any one of clauses 1 to 13, wherein performing the transformation includes generating the current block from the coding representation.

[0434] 16. A video system comprising a processing device and a non-transitory memory having instructions stored therein, the instructions being implemented by the processing device to cause the processing device to perform a method as described in any one of clauses 1 to 15.

[0435] 17. 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 one of clauses 1 to 15.

[0436] The third set of clauses employs some of the techniques described in the preceding sections, including, for example, clauses 5-10, and 13 of the previous section.

[0437] 1. A method for processing video, comprising: determining to use adaptive motion vector resolution (AMVR) to convert between a coding representation of a current block of a video and the current block based on a coding mode of a parent coding unit of a current coding unit that uses an affine coding mode or a distortion ratio (RD) cost of the affine coding mode; and performing the conversion based on a result of the determination.

[0438] 2. The method of claim 1, wherein if the coding mode of the parent coding unit is not AF_Inter mode or AF_MERGE mode, the determining disables the AMVR from being used for the current coding unit.

[0439] 3. The method of claim 1, wherein if the coding mode of the parent coding unit is not AF_Inter mode, determining causes the AMVR to be unavailable for the current coding unit.

[0440] 4. The method of claim 1, wherein if the RD of the affine coding mode is greater than the multiplication of the positive threshold and the RD cost of the advanced motion vector prediction (AMVP) mode, determining disables the AMVP from being used for the current coding unit.

[0441] 5. The method in Section 4, where the decision is applied to 1 / 4 pixel MV accuracy.

[0442] 6. The method of claim 1, wherein if the minimum RD cost is greater than a positive threshold multiplied by the RD cost of the merge mode, determining disables using AMVR for the current coding unit, and the minimum RD cost is the minimum of the RD cost of the affine coding mode and the RD cost of the advanced motion vector prediction (AMVP) mode.

[0443] 7. The method in Section 6, where the decision is applied to 1 / 4 pixel MV accuracy.

[0444] 8. A method for processing video, comprising: determining an amount of adaptive motion vector resolution (AMVR) usage for converting between a coding representation of a current block of a video and the current block using an advanced motion vector prediction (AMVP) coding mode based on a distortion ratio (RD) cost of the AMVP coding mode; and performing the conversion according to a result of the determination.

[0445] 9. The method of claim 8, wherein determining disables use of the AMVP if the RD cost of the AMVP coding mode is greater than a positive threshold multiplied by the RD cost of the affine mode.

[0446] 10. The method of section 8, where the decision is applied to 1 / 4 pixel MV accuracy.

[0447] 11. The method of claim 8, wherein if the minimum RD cost is greater than a positive threshold multiplied by the RD cost of the merge mode, determining disables use of AMVR, and the minimum RD cost is the minimum of the RD cost of the affine mode and the RD cost of the AMVP coding mode.

[0448] 12. The method of clause 11, where the decision is applied to 1 / 4 pixel MV accuracy.

[0449] 13. A method of processing video, comprising: generating a set of MV (motion vector) precisions using a four-parameter affine model or a six-parameter affine model to convert between a coding representation of a current block of video and the current block; and performing the conversion based on the set of MV precisions.

[0450] 14. The method described in Section 13, where the 4-parameter or 6-parameter affine models obtained at a single MV precision are used as candidate starting search points for other MV precisions.

[0451] 15. The method of claim 14, wherein the single MV precision includes 1 / 16 MV precision.

[0452] 16. The method of claim 14, wherein the single MV precision includes 1 / 4 MV precision.

[0453] 17. A method of video processing comprising: determining whether to perform a transformation using an adaptive motion vector resolution (AMVR) tool based on a coding mode of a parent block of a current block that uses an affine coding mode; using the AMVR tool to improve motion vector resolution during decoding; and performing the transformation based on a result of the determination.

[0454] 18. The method of claim 17, wherein the determining includes not checking the AMVR for the current block if the parent block of the current block is not in affine coding mode.

[0455] 19. A method of video processing, comprising: determining an end of MV precision distortion rate (RD) calculation for a current block using an affine coding mode to convert between a coding representation of the current block and the current block based on the use of the MV precision of a previous block previously coded using the affine coding mode; and performing the conversion based on a result of the determination.

[0456] 20. The method of claim 19, wherein the current block and the previous block are included in a current image segment and a previous image segment, respectively, and the current image segment and the previous image segment are a picture, a slice, a tile, or a coding tree unit (CTU) row.

[0457] 21. The method according to any one of clauses 1 to 20, wherein performing the transformation includes generating the coding representation from a current block.

[0458] 22. The method of any one of clauses 1 to 20, wherein performing the transformation includes generating the current block from the coding representation.

[0459] 23. A video system comprising a processing device and a non-transitory memory having instructions stored therein, the instructions being implemented by the processing device to cause the processing device to perform a method as described in any one of clauses 1 to 22.

[0460] 24. A computer program product stored on a non-transitory computer readable medium, comprising program code for performing the method according to any one of clauses 1 to 22.

[0461] While specific embodiments of the disclosed technology have been described above for purposes of illustration, it will be understood that various modifications may be made without departing from the scope of the invention. Accordingly, the disclosed technology is not to be limited except as by the appended claims.

[0462] Implementations of the subject matter and functional operations described in this patent specification, including the structures disclosed herein and their structural equivalents, may be implemented in various systems, digital electronic circuits, or computer software, firmware, or hardware, or one or more combinations thereof. Implementations of the subject matter described herein may be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a tangible, non-transportable computer-readable medium for execution by or for controlling the operation of a data processing device. The computer-readable medium may be a machine-readable storage device, a machine-readable storage substrate, a memory device, a composition of matter that provides a machine-readable propagated signal, or one or more combinations thereof. The term "data processing unit" or "data processing device" includes all apparatus, devices, and machines for processing data, including, for example, a programmable processing device, a computer, or multiple processing devices or computers. In addition to hardware, the apparatus may include code that creates an environment for the execution of the computer program, such as code that constitutes a processing device firmware, a protocol stack, a database management system, an operating system, or one or more combinations thereof.

[0463] A computer program (also called 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 as a stand-alone program or in any form containing modules, components, subroutines, or other units 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 recorded as part of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), may be stored in a single file dedicated to the program, or may be stored in multiple coordinating files (e.g., a file that stores one or more modules, subprograms, or code portions). A computer program can be deployed to run on one computer located at one site, or on multiple computers distributed across multiple sites and interconnected by a communication network.

[0464] The processes and logic flows described herein may be performed by one or more programmable processing devices executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows may also be performed by, and devices may be implemented as, special purpose logic circuits, such as an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).

[0465] Processing devices suitable for executing computer programs include, for example, both general purpose and special purpose microprocessors, as well as any one or more processing devices of any kind of digital computer. Typically, a processing device receives instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processing device for executing instructions and one or more memory devices for storing instructions and data. Typically, a computer may include one or more mass storage devices, e.g., magnetic, magneto-optical, or optical disks, for storing data, or may be operatively coupled to receive data from or transfer data to these mass storage devices. However, a computer need not have such devices. Computer-readable media suitable for storing computer program instructions and data include all types of non-volatile memory, media, and memory devices, including, for example, semiconductor memory devices such as EPROM, EEPROM, flash memory devices, and the like. The processing device and memory may be supplemented by, or incorporated in, special purpose logic circuitry.

[0466] This specification, together with the drawings, are for illustrative purposes only, and illustrative is intended to mean examples. As used herein, the use of "or" is intended to include "and / or" unless the context clearly indicates otherwise.

[0467] Although this patent specification contains many details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather as descriptions of features that may be specific to certain embodiments of a particular invention. Certain features described in this patent specification in the context of another embodiment may be implemented in combination in one example. Conversely, various features described in the context of a single example may be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may be described above as acting in a particular combination and initially claimed as such, one or more features from a claimed combination may, in some cases, be extracted from the combination, and the claimed combination may be directed to a subcombination or a variation of the subcombination.

[0468] Similarly, although operations are shown in a particular order in the figures, this should not be understood as requiring that such operations be performed in the particular order or sequential order shown, or that all of the operations shown be performed, to achieve desired results, nor should the separation of various system modules in the examples described in this patent specification be understood as requiring such separation in all embodiments.

[0469] Only some implementations and examples have been described; other embodiments, extensions and variations are possible based on what is described and illustrated in this patent specification.< / leftshift>

Claims

1. 1. A method for processing video data, comprising the steps of: determining that a coding mode of a first video block is an affine inter mode; determining a motion accuracy from a motion accuracy set including a plurality of motion accuracies for the motion information of the first video block; coding the first video block based on the determined coding mode and the determined motion accuracy; a plurality of syntax elements selectively present in the video bitstream for indicating the motion precision within the motion precision set; the plurality of syntax elements includes a first syntax element and a second syntax element; the second syntax element is present in the video bitstream if the first syntax element is present in the video bitstream with a particular value; the motion accuracy is related to the presence of one or more syntax elements of the plurality of syntax elements in the video bitstream; whether the first syntax element for the first video block is present in the video bitstream is based on at least one of: 1) a selection from multiple motion vector difference (MVD) precisions for an affine inter-coding block is enabled or disabled; or 2) a MVD of a control point motion vector for the first video block. method.

2. the semantics of at least one syntax element among the plurality of syntax elements differs between a non-affine inter mode and the affine inter mode; The method of claim 1.

3. the motion vector difference (MVD) of all control point motion vectors of the first image block is zero; multiple MVD precisions of the affine inter-coding block are invalid; and the first syntax element is not present in the video bitstream based on at least one of the following conditions being satisfied: The method according to claim 1 or 2.

4. multiple MVD precisions of the affine inter-coding block are available; and determining the coding mode of the first video block as the affine inter mode; and at least one motion vector difference of at least one control point motion vector of the first video block is non-zero; and the first syntax element is present in the video bitstream based on at least one of the following conditions being satisfied:

4. The method according to any one of claims 1 to 3.

5. the motion vector differences (MVDs) of the control point motion vectors of the first image block include MVDs in each valid prediction direction of each control point motion vector; If both the horizontal and vertical components of the MVD are zero, then the MVD is a zero MVD.

5. The method according to any one of claims 1 to 4.

6. the motion precision of the first video block is a first motion precision, which is a default precision, in response to the first syntax element being absent from the video bitstream or the first syntax element being equal to zero.

6. The method according to any one of claims 1 to 5.

7. the first motion precision is ¼ luma sample; The method according to claim 6.

8. the first syntax element being equal to non-zero; and the coding mode of the first video block is the affine inter mode; and the second syntax element is present in the video bitstream based on at least one of the following conditions being satisfied:

8. The method according to any one of claims 1 to 7.

9. the second syntax element being equal to zero corresponding to the motion precision being 1 / 16 luma samples and being equal to non-zero corresponding to the motion precision being an integer luma sample.

9. The method according to any one of claims 1 to 8.

10. the same value of the second syntax element indicates different motion accuracy for the block coded in affine inter mode and for the block coded in normal inter mode.

10. The method according to any one of claims 1 to 9.

11. the second syntax element is selectively present in the video bitstream to indicate a motion precision of a motion precision set for a block coded in an intra block copy mode; the first syntax element is skipped for a block coded in the intra block copy mode; 11. The method according to any one of claims 1 to 10.

12. the first syntax element is coded using a context-based coding including the use of at least one context model and at least one context; at least one same context model is used for the first syntax element for both the affine inter mode coded block and the normal inter mode coded block; the choice of context depends on whether the coding mode of the block is the affine inter mode or the regular inter mode.

12. The method according to any one of claims 1 to 11.

13. the second syntax element is coded using a context-based coding including the use of at least one context model and at least one context; at least one same context model and at least one same context are used for the second syntax element for both the block coded in affine inter mode and the block coded in normal inter mode.

13. The method according to any one of claims 1 to 12.

14. the motion information includes at least one of a motion vector difference (MVD), a motion vector predictor (MVP), and a motion vector (MV); 14. The method according to any one of claims 1 to 13.

15. the coding includes encoding the first video block into the video bitstream.

15. The method according to any one of claims 1 to 14.

16. The method of claim 1 , wherein the coding comprises decoding the first video block from a video bitstream.

17. 1. A video processing device comprising: a processor; and a non-transitory memory having instructions stored thereon, The instructions, when executed by the processing device, cause the processing device to: determining that a coding mode of a first video block is an affine inter mode; determining a motion accuracy from a motion accuracy set including a plurality of motion accuracies for the motion information of the first video block; coding the first video block based on the determined coding mode and the determined motion accuracy; a plurality of syntax elements selectively present in the video bitstream for indicating the motion precision within the motion precision set; the plurality of syntax elements includes a first syntax element and a second syntax element; the second syntax element is present in the video bitstream if the first syntax element is present in the video bitstream with a particular value; the motion accuracy is related to the presence of one or more syntax elements of the plurality of syntax elements in the video bitstream; whether the first syntax element for the first video block is present in the video bitstream is based on at least one of: 1) a selection from multiple motion vector difference (MVD) precisions for an affine inter-coding block is enabled or disabled; or 2) a MVD of a control point motion vector for the first video block. Image processing device.

18. A non-transitory computer-readable storage medium storing instructions, comprising: The instructions may be for causing a processor to: determining that a coding mode of a first video block is an affine inter mode; determining a motion accuracy from a motion accuracy set including a plurality of motion accuracies for the motion information of the first video block; coding the first video block based on the determined coding mode and the determined motion accuracy; a plurality of syntax elements selectively present in the video bitstream for indicating the motion precision within the motion precision set; the plurality of syntax elements includes a first syntax element and a second syntax element; the second syntax element is present in the video bitstream if the first syntax element is present in the video bitstream with a particular value; the motion accuracy is related to the presence of one or more syntax elements of the plurality of syntax elements in the video bitstream; whether the first syntax element for the first video block is present in the video bitstream is based on at least one of: 1) a selection from multiple motion vector difference (MVD) precisions for an affine inter-coding block is enabled or disabled; or 2) a MVD of a control point motion vector for the first video block. A non-transitory computer-readable storage medium.

19. 1. A method for storing a video bitstream, comprising the steps of: determining that a coding mode of a first video block is an affine inter mode; determining a motion accuracy from a motion accuracy set including a plurality of motion accuracies for the motion information of the first video block; coding the first video block based on the determined coding mode and the determined motion accuracy; storing the bitstream on a non-transitory computer readable recording medium; Including, a plurality of syntax elements selectively present in the video bitstream for indicating the motion precision within the motion precision set; the plurality of syntax elements includes a first syntax element and a second syntax element; the second syntax element is present in the video bitstream if the first syntax element is present in the video bitstream with a particular value; the motion accuracy is related to the presence of one or more syntax elements of the plurality of syntax elements in the video bitstream; whether the first syntax element for the first video block is present in the video bitstream is based on at least one of: 1) a selection from multiple motion vector difference (MVD) precisions for an affine inter-coding block is enabled or disabled; or 2) a MVD of a control point motion vector for the first video block. method.

Citation Information

Patent Citations

  • Image prediction method and image prediction device

    JP2018524918A

  • Affine motion prediction for video coding

    US20170332095A1

  • Motion vector prediction for affine motion models in video coding

    US20180098063A1

  • Adaptive motion vector precision for video coding

    US20180098089A1

  • Video signal processing method and apparatus using adaptive motion vector resolution

    WO2019235896A1

Cited By

  • Syntax reuse for affine mode with adaptive motion vector resolution

    US12278985B2