Patent Description:
The present document relates to video and image coding and decoding.

Digital video accounts for the largest bandwidth use on the internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, it is expected that the bandwidth demand for digital video usage will continue to grow. <NPL>, discusses the test results of DMVR related tests CE9. <NUM> and CE9. <NPL>; discloses two modifications on DMVR in the benchmark set (BMS).

It is therefore the object of the present invention to provide an improved method of processing video data using a DMVR scheme used to derive a refined motion information, a corresponding apparatus and corresponding computer-readable storage medium, as well as a corresponding method for storing bitstream of a video and a computer-readable recording medium storing a bitstream of a video which is generated by a corresponding method performed by a video processing apparatus.

The present document discloses video coding tools that, in one example aspect, improve coding efficiency of current coding tools related to ultimate motion vector expression or generalized bi-prediction.

The present document provides various techniques that can be used by a decoder of video bitstreams to improve the quality of decompressed or decoded digital video. Furthermore, a video encoder may also implement these techniques during the process of encoding in order to reconstruct decoded frames used for further encoding.

Section headings are used in the present document for ease of understanding and do not limit the embodiments and techniques to the corresponding sections. As such, embodiments from one section can be combined with embodiments from other sections.

This invention is related to video coding technologies. Specifically, it is related to the interaction of unequal weights applied to prediction blocks and motion vector refinement in video coding. It may be applied to the existing video coding standard like High Efficiency Video Coding HEVC, or the standard (Versatile Video Coding) to be finalized. It may be also applicable to future video coding standards or video codec.

Video coding standards have evolved primarily through the development of the well-known ITU-T and ISO/IEC standards. The ITU-T produced H. <NUM> and H. <NUM>, ISO/IEC produced MPEG-<NUM> and MPEG-<NUM> Visual, and the two organizations jointly produced the H. <NUM>/MPEG-<NUM> Video and H. <NUM>/MPEG-<NUM> Advanced Video Coding (AVC) and H. <NUM>/HEVC standards. <NUM>, the video coding standards are based on the hybrid video coding structure wherein temporal prediction plus transform coding are utilized. To explore the future video coding technologies beyond HEVC, Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in <NUM>. Since then, many new methods have been adopted by JVET and put into the reference software named Joint Exploration Model (JEM). In April <NUM>, the Joint Video Expert Team (JVET) between VCEG (Q6/<NUM>) and ISO/IEC JTC1 SC29/WG11 (MPEG) was created to work on the VVC standard targeting at <NUM>% bitrate reduction compared to HEVC.

The latest version of VVC draft, i.e., Versatile Video Coding (Draft <NUM>) could be found at: http://phenix. it-sudparis. eu/jvet/doc_end_user/documents/11_Ljubljana/wg11/JVET-K1001-v7. The latest reference software of VVC, named VTM, could be found at: https://vcgit. fraunhofer. de/jvet/VVCSoftware_VTM/tags/VTM-<NUM>.

Each inter-predicted PU has motion parameters for one or two reference picture lists. Motion parameters include a motion vector and a reference picture index. Usage of one of the two reference picture lists may also be signalled using inter_pred_idc. Motion vectors may be explicitly coded as deltas relative to predictors.

When a CU is coded with skip mode, one PU is associated with the CU, and there are no significant residual coefficients, no coded motion vector delta or reference picture index. A merge mode is specified whereby the motion parameters for the current PU are obtained from neighbouring PUs, including spatial and temporal candidates. The merge mode can be applied to any inter-predicted PU, not only for skip mode. The alternative to merge mode is the explicit transmission of motion parameters, where motion vector (to be more precise, motion vector differences (MVD) compared to a motion vector predictor), corresponding reference picture index for each reference picture list and reference picture list usage are signaled explicitly per each PU. Such a mode is named Advanced motion vector prediction (AMVP) in this disclosure.

When signaling indicates that one of the two reference picture lists is to be used, the PU is produced from one block of samples. This is referred to as 'uni-prediction'. Uni-prediction is available both for P-slices and B-slices.

When signaling indicates that both of the reference picture lists are to be used, the PU is produced from two blocks of samples. This is referred to as 'bi-prediction'. Bi-prediction is available for B-slices only.

The following text provides the details on the inter prediction modes specified in HEVC. The description will start with the merge mode.

In HEVC, the term inter prediction is used to denote prediction derived from data elements (e.g., sample values or motion vectors) of reference pictures other than the current decoded picture. <NUM>/AVC, a picture can be predicted from multiple reference pictures. The reference pictures that are used for inter prediction are organized in one or more reference picture lists. The reference index identifies which of the reference pictures in the list should be used for creating the prediction signal.

A single reference picture list, List <NUM>, is used for a P slice and two reference picture lists, List <NUM> and List <NUM> are used for B slices. It should be noted reference pictures included in List <NUM>/<NUM> could be from past and future pictures in terms of capturing/display order.

When a PU is predicted using merge mode, an index pointing to an entry in the merge candidates list is parsed from the bitstream and used to retrieve the motion information. The construction of this list is specified in the HEVC standard and can be summarized according to the following sequence of steps:.

These steps are also schematically depicted in <FIG>. For spatial merge candidate derivation, a maximum of four merge candidates are selected among candidates that are located in five different positions. For temporal merge candidate derivation, a maximum of one merge candidate is selected among two candidates. Since constant number of candidates for each PU is assumed at decoder, additional candidates are generated when the number of candidates obtained from step <NUM> does not reach the maximum number of merge candidate (MaxNumMergeCand) which is signalled in slice header. Since the number of candidates is constant, index of best merge candidate is encoded using truncated unary binarization (TU). If the size of CU is equal to <NUM>, all the PUs of the current CU share a single merge candidate list, which is identical to the merge candidate list of the 2N×2N prediction unit.

In the following, the operations associated with the aforementioned steps are detailed.

<FIG> shows example derivation process for merge candidates list construction.

In the derivation of spatial merge candidates, a maximum of four merge candidates are selected among candidates located in the positions depicted in <FIG>. The order of derivation is A<NUM>, B<NUM>, B<NUM>, A<NUM> and B<NUM>. Position B<NUM> is considered only when any PU of position A<NUM>, B<NUM>, B<NUM>, A<NUM> is not available (e.g. because it belongs to another slice or tile) or is intra coded. After candidate at position A<NUM> is added, the addition of the remaining candidates is subject to a redundancy check which ensures that candidates with same motion information are excluded from the list so that coding efficiency is improved. To reduce computational complexity, not all possible candidate pairs are considered in the mentioned redundancy check. Instead only the pairs linked with an arrow in <FIG> are considered and a candidate is only added to the list if the corresponding candidate used for redundancy check has not the same motion information. Another source of duplicate motion information is the "second PU" associated with partitions different from 2Nx2N. As an example, <FIG> depicts the second PU for the case of N×2N and 2N×N, respectively. When the current PU is partitioned as N×2N, candidate at position A<NUM> is not considered for list construction. In fact, by adding this candidate will lead to two prediction units having the same motion information, which is redundant to just have one PU in a coding unit. Similarly, position B<NUM> is not considered when the current PU is partitioned as 2N×N.

<FIG> shows example positions of spatial merge candidates.

<FIG> shows examples of candidate pairs considered for redundancy check of spatial merge candidates.

<FIG> show example positions for the second PU of N×2N and 2N×N partitions.

In this step, only one candidate is added to the list. Particularly, in the derivation of this temporal merge candidate, a scaled motion vector is derived based on co-located PU belonging to the picture which has the smallest POC difference with current picture within the given reference picture list. The reference picture list to be used for derivation of the co-located PU is explicitly signalled in the slice header. The scaled motion vector for temporal merge candidate is obtained as illustrated by the dotted line in <FIG>, which is scaled from the motion vector of the co-located PU using the POC distances, tb and td, where tb is defined to be the POC difference between the reference picture of the current picture and the current picture and td is defined to be the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of temporal merge candidate is set equal to zero. A practical realization of the scaling process is described in the HEVC specification. For a B-slice, two motion vectors, one is for reference picture list <NUM> and the other is for reference picture list <NUM>, are obtained and combined to make the bi-predictive merge candidate.

<FIG> is an illustration of motion vector scaling for temporal merge candidate.

In the co-located PU (Y) belonging to the reference frame, the position for the temporal candidate is selected between candidates C<NUM> and C<NUM>, as depicted in <FIG>. If PU at position C<NUM> is not available, is intra coded, or is outside of the current coding tree unit (CTU aka. LCU, largest coding unit) row, position C<NUM> is used. Otherwise, position C<NUM> is used in the derivation of the temporal merge candidate.

<FIG> shows an example of candidate positions for temporal merge candidate, C0 and C1.

Besides spatial and temporal merge candidates, there are two additional types of merge candidates: combined bi-predictive merge candidate and zero merge candidate. Combined bi-predictive merge candidates are generated by utilizing spatial and temporal merge candidates. Combined bi-predictive merge candidate is used for B-Slice only. The combined bi-predictive candidates are generated by combining the first reference picture list motion parameters of an initial candidate with the second reference picture list motion parameters of another. If these two tuples provide different motion hypotheses, they will form a new bi-predictive candidate. As an example, <FIG> depicts the case when two candidates in the original list (on the left), which have mvL0 and refIdxL0 or mvL1 and refIdxL1, are used to create a combined bi-predictive merge candidate added to the final list (on the right). There are numerous rules regarding the combinations which are considered to generate these additional merge candidates.

<FIG> shows an example of combined bi-predictive merge candidate.

Zero motion candidates are inserted to fill the remaining entries in the merge candidates list and therefore hit the MaxNumMergeCand capacity. These candidates have zero spatial displacement and a reference picture index which starts from zero and increases every time a new zero motion candidate is added to the list. Finally, no redundancy check is performed on these candidates.

AMVP exploits spatio-temporal correlation of motion vector with neighbouring PUs, which is used for explicit transmission of motion parameters. For each reference picture list, a motion vector candidate list is constructed by firstly checking availability of left, above temporally neighbouring PU positions, removing redundant candidates and adding zero vector to make the candidate list to be constant length. Then, the encoder can select the best predictor from the candidate list and transmit the corresponding index indicating the chosen candidate. Similarly with merge index signalling, the index of the best motion vector candidate is encoded using truncated unary. The maximum value to be encoded in this case is <NUM> (see <FIG>). In the following sections, details about derivation process of motion vector prediction candidate are provided.

<FIG> summarizes derivation process for motion vector prediction candidate.

In motion vector prediction, two types of motion vector candidates are considered: spatial motion vector candidate and temporal motion vector candidate. For spatial motion vector candidate derivation, two motion vector candidates are eventually derived based on motion vectors of each PU located in five different positions as depicted in <FIG>.

For temporal motion vector candidate derivation, one motion vector candidate is selected from two candidates, which are derived based on two different co-located positions. After the first list of spatio-temporal candidates is made, duplicated motion vector candidates in the list are removed. If the number of potential candidates is larger than two, motion vector candidates whose reference picture index within the associated reference picture list is larger than <NUM> are removed from the list. If the number of spatio-temporal motion vector candidates is smaller than two, additional zero motion vector candidates is added to the list.

In the derivation of spatial motion vector candidates, a maximum of two candidates are considered among five potential candidates, which are derived from PUs located in positions as depicted in <FIG>, those positions being the same as those of motion merge. The order of derivation for the left side of the current PU is defined as A<NUM>, A<NUM>,and scaled A<NUM>,scaled A<NUM>. The order of derivation for the above side of the current PU is defined as B<NUM>, B<NUM>, B<NUM>, scaled B<NUM>, scaled B<NUM>, scaled B<NUM>. For each side there are therefore four cases that can be used as motion vector candidate, with two cases not required to use spatial scaling, and two cases where spatial scaling is used. The four different cases are summarized as follows.

The no-spatial-scaling cases are checked first followed by the spatial scaling. Spatial scaling is considered when the POC is different between the reference picture of the neighbouring PU and that of the current PU regardless of reference picture list. If all PUs of left candidates are not available or are intra coded, scaling for the above motion vector is allowed to help parallel derivation of left and above MV candidates. Otherwise, spatial scaling is not allowed for the above motion vector.

<FIG> shows an illustration of motion vector scaling for spatial motion vector candidate.

In a spatial scaling process, the motion vector of the neighbouring PU is scaled in a similar manner as for temporal scaling, as depicted as <FIG>. The main difference is that the reference picture list and index of current PU is given as input; the actual scaling process is the same as that of temporal scaling.

Apart for the reference picture index derivation, all processes for the derivation of temporal merge candidates are the same as for the derivation of spatial motion vector candidates (see <FIG>). The reference picture index is signalled to the decoder.

Local Illumination Compensation (LIC) is based on a linear model for illumination changes, using a scaling factor a and an offset b. And it is enabled or disabled adaptively for each inter-mode coded coding unit (CU).

<FIG> shows examples of neighbouring samples used for deriving IC parameters.

When LIC applies for a CU, a least square error method is employed to derive the parameters a and b by using the neighbouring samples of the current CU and their corresponding reference samples. More specifically, as illustrated in <FIG>, the subsampled (<NUM>:<NUM> subsampling) neighbouring samples of the CU and the corresponding samples (identified by motion information of the current CU or sub-CU) in the reference picture are used.

The IC parameters are derived and applied for each prediction direction separately. For each prediction direction, a first prediction block is generated with the decoded motion information, then a temporary prediction block is obtained via applying the LIC model. Afterwards, the two temporary prediction blocks are utilized to derive the final prediction block.

When a CU is coded with merge mode, the LIC flag is copied from neighbouring blocks, in a way similar to motion information copy in merge mode; otherwise, an LIC flag is signalled for the CU to indicate whether LIC applies or not.

When LIC is enabled for a picture, additional CU level RD check is needed to determine whether LIC is applied or not for a CU. When LIC is enabled for a CU, mean-removed sum of absolute difference (MR-SAD) and mean-removed sum of absolute Hadamard-transformed difference (MR-SATD) are used, instead of SAD and SATD, for integer pel motion search and fractional pel motion search, respectively.

To reduce the encoding complexity, the following encoding scheme is applied in the JEM.

LIC is disabled for the entire picture when there is no obvious illumination change between a current picture and its reference pictures. To identify this situation, histograms of a current picture and every reference picture of the current picture are calculated at the encoder. If the histogram difference between the current picture and every reference picture 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.

There are several new coding tools for inter prediction improvement, such as Adaptive motion vector difference resolution (AMVR) for signaling MVD, affine prediction mode, Triangular prediction mode (TPM), Advanced TMVP (ATMVP, aka SbTMVP), Generalized Bi-Prediction (GBI), Bi-directional Optical flow (BIO or BDOF).

In VVC, a QuadTree/BinaryTree/MulitpleTree (QT/BT/TT) structure is adopted to divide a picture into square or rectangle blocks.

Besides QT/BT/TT, separate tree (a. Dual coding tree) is also adopted in VVC for I-frames. With separate tree, the coding block structure are signaled separately for the luma and chroma components.

In HEVC, motion vector differences (MVDs) (between the motion vector and predicted motion vector of a PU) are signalled in units of quarter luma samples when use_integer_mv_flag is equal to <NUM> in the slice header. In the VVC, a locally adaptive motion vector resolution (AMVR) is introduced. In the VVC, MVD can be coded in units of quarter luma samples, integer luma samples or four luma samples (i.e., ¼-pel, <NUM>-pel, <NUM>-pel). The MVD resolution is controlled at the coding unit (CU) level, and MVD resolution flags are conditionally signalled for each CU that has at least one non-zero MVD components.

For a CU that has at least one non-zero MVD components, a first flag is signalled to indicate whether quarter luma sample MV precision is used in the CU. When the first flag (equal to <NUM>) indicates that quarter luma sample MV precision is not used, another flag is signalled to indicate whether integer luma sample MV precision or four luma sample MV precision is used.

When the first MVD resolution flag of a CU is zero, or not coded for a CU (meaning all MVDs in the CU are zero), the quarter luma sample MV resolution is used for the CU. When a CU uses integer-luma sample MV precision or four-luma-sample MV precision, the MVPs in the AMVP candidate list for the CU are rounded to the corresponding precision.

In HEVC, only translation motion model is applied for motion compensation prediction (MCP). While in the real world, there are many kinds of motion, e.g. zoom in/out, rotation, perspective motions and the other irregular motions. In VVC, a simplified affine transform motion compensation prediction is applied with <NUM>-parameter affine model and <NUM>-parameter affine model. As shown <FIG>, the affine motion field of the block is described by two control point motion vectors (CPMVs) for the <NUM>-parameter affine model and <NUM> CPMVs for the <NUM>-parameter affine model.

<FIG> show simplified affine motion model for <NUM>-parameter affine and <NUM> parameter affine modes respectively.

The motion vector field (MVF) of a block is described by the following equations with the <NUM>-parameter affine model (wherein the <NUM>-parameter are defined as the variables a, b, e andf) in equation (<NUM>) and <NUM>-parameter affine model (wherein the <NUM>-parameter are defined as the variables a, b, c, d, e and f) in equation (<NUM>) respectively: <MAT> <MAT>
where (mvh<NUM>, mvh<NUM>) is motion vector of the top-left corner control point, and (mvh<NUM>, mvh<NUM>) is motion vector of the top-right corner control point and (mvh<NUM>, mvh<NUM>) is motion vector of the bottom-left corner control point, all of the three motion vectors are called control point motion vectors (CPMV), (x, y) represents the coordinate of a representative point relative to the top-left sample within current block and (mvh(x,y), mvv(x,y)) is the motion vector derived for a sample located at (x, y). The CP motion vectors may be signaled (like in the affine AMVP mode) or derived on-the-fly (like in the affine merge mode). w and h are the width and height of the current block. In practice, the division is implemented by right-shift with a rounding operation. In VTM, the representative point is defined to be the center position of a sub-block, e.g., when the coordinate of the left-top corner of a sub-block relative to the top-left sample within current block is (xs, ys), the coordinate of the representative point is defined to be (xs+<NUM>, ys+<NUM>). For each sub-block (i.e., 4x4 in VTM), the representative point is utilized to derive the motion vector for the whole sub-block.

In order to further simplify the motion compensation prediction, sub-block based affine transform prediction is applied. To derive motion vector of each M×N (both M and N are set to <NUM> in current VVC) sub-block, the motion vector of the center sample of each sub-block, as shown in <FIG>, is calculated according to Equation (<NUM>) and (<NUM>), and rounded to <NUM>/<NUM> fraction accuracy. Then the motion compensation interpolation filters for <NUM>/<NUM>-pel are applied to generate the prediction of each sub-block with derived motion vector. The interpolation filters for <NUM>/<NUM>-pel are introduced by the affine mode.

<FIG> shows an example of Affine MVF per sub-block.

After MCP, the high accuracy motion vector of each sub-block is rounded and saved as the same accuracy as the normal motion vector.

Similar to the translational motion model, there are also two modes for signaling the side information due affine prediction. They are AFFINE_INTER and AFFINE_MERGE modes.

For CUs with both width and height larger than <NUM>, AF_INTER mode can be applied. An affine flag in CU level is signalled in the bitstream to indicate whether AF_INTER mode is used.

In this mode, for each reference picture list (List <NUM> or List <NUM>), an affine AMVP candidate list is constructed with three types of affine motion predictors in the following order, wherein each candidate includes the estimated CPMVs of the current block. The differences of the best CPMVs found at the encoder side (such as mv<NUM> mv<NUM> mv<NUM> in <FIG>) and the estimated CPMVs are signalled. In addition, the index of affine AMVP candidate from which the estimated CPMVs are derived is further signalled.

The checking order is similar to that of spatial MVPs in HEVC AMVP list construction. First, a left inherited affine motion predictor is derived from the first block in {A1, A0} that is affine coded and has the same reference picture as in current block. Second, an above inherited affine motion predictor is derived from the first block in {B1, B0, B2} that is affine coded and has the same reference picture as in current block. The five blocks A1, A0, B1, B0, B2 are depicted in <FIG>.

Once a neighboring block is found to be coded with affine mode, the CPMVs of the coding unit covering the neighboring block are used to derive predictors of CPMVs of current block. For example, if A1 is coded with non-affine mode and A0 is coded with <NUM>-parameter affine mode, the left inherited affine MV predictor will be derived from A0. In this case, the CPMVs of a CU covering A0, as denoted by <MAT> for the top-left CPMV and <MAT> for the top-right CPMV in <FIG> are utilized to derive the estimated CPMVs of current block, denoted by <MAT> for the top-left (with coordinate (x0, y0)), top-right (with coordinate (x1, y1)) and bottom-right positions (with coordinate (x2, y2)) of current block.

A constructed affine motion predictor consists of control-point motion vectors (CPMVs) that are derived from neighboring inter coded blocks, as shown in <FIG>, that have the same reference picture. If the current affine motion model is <NUM>-paramter affine, the number of CPMVs is <NUM>, otherwise if the current affine motion model is <NUM>-parameter affine, the number of CPMVs is <NUM>. The top-left CPMV mv<NUM> is derived by the MV at the first block in the group {A, B, C} that is inter coded and has the same reference picture as in current block. The top-right CPMV mv<NUM> is derived by the MV at the first block in the group {D, E} that is inter coded and has the same reference picture as in current block. The bottom-left CPMV mv<NUM> is derived by the MV at the first block in the group {F, G} that is inter coded and has the same reference picture as in current block.

If the current affine motion model is <NUM>-parameter affine, then a constructed affine motion predictor is inserted into the candidate list only if both mv<NUM> and mv<NUM> are founded, that is, mv<NUM> and mv<NUM> are used as the estimated CPMVs for top-left (with coordinate (x0, y0)), top-right (with coordinate (x1, y1)) positions of current block.

If the current affine motion model is <NUM>-parameter affine, then a constructed affine motion predictor is inserted into the candidate list only if mv<NUM>, mv<NUM> and mv<NUM> are all founded, that is, mv<NUM>, mv<NUM> and mv<NUM> are used as the estimated CPMVs for top-left (with coordinate (x0, y0)), top-right (with coordinate (x1, y1)) and bottom-right (with coordinate (x2, y2)) positions of current block.

No pruning process is applied when inserting a constructed affine motion predictor into the candidate list.

The following applies until the number of affine motion predictors reaches the maximum.

Note that mvi is already derived in constructed affine motion predictor.

<FIG> show examples of <NUM>-paramenter affine model and <NUM>-parameter affine model, respectively.

<FIG> shows an MVP for AF_INTER for inherited affine candidates.

<FIG> shows an MVP for AF_INTER for constructed affine candidates.

<FIG> show examples of Candidates for AF_MERGE.

In AF_INTER mode, when <NUM>/<NUM>-parameter affine mode is used, <NUM>/<NUM> control points are required, and therefore <NUM>/<NUM> MVD needs to be coded for these control points, as shown in <FIG>. In JVET-K0337, it is proposed to derive the MV as follows, i.e., mvd<NUM> and mvd<NUM> are predicted from mvd<NUM>. <MAT> <MAT> <MAT>.

Wherein mvi, mvdi and mv<NUM> are the predicted motion vector, motion vector difference and motion vector of the top-left pixel (i = <NUM>), top-right pixel (i = <NUM>) or left-bottom pixel (i = <NUM>) respectively, as shown in FIG. Please note that the addition of two motion vectors (e.g., mvA(xA, yA) and mvB(xB, yB)) is equal to summation of two components separately, that is, newMV = mvA + mvB and the two components of newMV is set to (xA + xB) and (yA + yB), respectively.

When a CU is applied in AF_MERGE mode, it gets the first block coded with affine mode from the valid neighbour reconstructed blocks. And the selection order for the candidate block is from left, above, above right, left bottom to above left as shown in <FIG> (denoted by A, B, C, D, E in order). For example, if the neighbour left bottom block is coded in affine mode as denoted by A0 in <FIG>, element B, the Control Point (CP) motion vectors mv<NUM>N, mv<NUM>N and mv<NUM>N of the top left corner, above right corner and left bottom corner of the neighbouring CU/PU which contains the block A are fetched. And the motion vector mv<NUM>C, mv<NUM>C and mv<NUM>C (which is only used for the <NUM>-parameter affine model) of the top left corner/top right/bottom left on the current CU/PU is calculated based on mv<NUM>N, mv<NUM>N and mv<NUM>N. It should be noted that in VTM-<NUM>, sub-block (e.g. <NUM>×<NUM> block in VTM) located at the top-left corner stores mv0, the sub-block located at the top-right corner stores mv1 if the current block is affine coded. If the current block is coded with the <NUM>-parameter affine model, the sub-block located at the bottom-left corner stores mv2; otherwise (with the <NUM>-parameter affine model), LB stores mv2'. Other sub-blocks stores the MVs used for MC.

After the CPMV of the current CU mv<NUM>C, mv<NUM>C and mv<NUM>C are derived, according to the simplified affine motion model Equation (<NUM>) and (<NUM>), the MVF of the current CU is generated. In order to identify whether the current CU is coded with AF_MERGE mode, an affine flag is signalled in the bitstream when there is at least one neighbour block is coded in affine mode.

In JVET-L0142 and JVET-L0632, an affine merge candidate list is constructed with following steps:.

Inherited affine candidate means that the candidate is derived from the affine motion model of its valid neighbor affine coded block. The maximum two inherited affine candidates are derived from affine motion model of the neighboring blocks and inserted into the candidate list. For the left predictor, the scan order is {A0, A1}; for the above predictor, the scan order is {B0, B1, B2}.

If the number of candidates in affine merge candidate list is less than MaxNumAffineCand (e.g., <NUM>), constructed affine candidates are inserted into the candidate list. Constructed affine candidate means the candidate is constructed by combining the neighbor motion information of each control point.

<FIG> shows examples of Candidates position for affine merge mode.

The motion information of each control point is obtained according to the following priority order:.

If the number of candidates in affine merge candidate list is less than <NUM>, zero motion vectors with zero reference indices are insert into the candidate list, until the list is full.

More specifically, for the sub-block merge candidate list, a <NUM>-parameter merge candidate with MVs set to (<NUM>, <NUM>) and prediction direction set to uni-prediction from list <NUM> (for P slice) and bi-prediction (for B slice).

In JVET-L0054, ultimate motion vector expression (UMVE, also known as MMVD) is presented. UMVE is used for either skip or merge modes with a proposed motion vector expression method.

UMVE re-uses merge candidate as same as those included in the regular merge candidate list in VVC. Among the merge candidates, a base candidate can be selected, and is further expanded by the proposed motion vector expression method.

UMVE provides a new motion vector difference (MVD) representation method, in which a starting point, a motion magnitude and a motion direction are used to represent a MVD.

<FIG> shows an example of a UMVE Search Process.

<FIG> shows an example of a UMVE Search Point.

This proposed technique uses a merge candidate list as it is. But only candidates which are default merge type (MRG_TYPE_DEFAULT_N) are considered for UMVE's expansion.

Base candidate index defines the starting point. Base candidate index indicates the best candidate among candidates in the list as follows.

If the number of base candidate is equal to <NUM>, Base candidate IDX is not signaled.

Distance index is motion magnitude information. Distance index indicates the pre-defined distance from the starting point information. Pre-defined distance is as follows:.

Direction index represents the direction of the MVD relative to the starting point. The direction index can represent of the four directions as shown below.

UMVE flag is singnaled right after sending a skip flag or merge flag. If skip or merge flag is true, UMVE flag is parsed. If UMVE flage is equal to <NUM>, UMVE syntaxes are parsed. But, if not <NUM>, AFFINE flag is parsed. If AFFINE flag is equal to <NUM>, that is AFFINE mode, But, if not <NUM>, skip/merge index is parsed for VTM's skip/merge mode.

Additional line buffer due to UMVE candidates is not needed. Because a skip/merge candidate of software is directly used as a base candidate. Using input UMVE index, the supplement of MV is decided right before motion compensation. There is no need to hold long line buffer for this.

In current common test condition, either the first or the second merge candidate in the merge candidate list could be selected as the base candidate.

UMVE is also known as Merge with MV Differences (MMVD).

In bi-prediction operation, for the prediction of one block region, two prediction blocks, formed using a motion vector (MV) of list0 and a MV of list1, respectively, are combined to form a single prediction signal. In the decoder-side motion vector refinement (DMVR) method, the two motion vectors of the bi-prediction are further refined.

In JEM design, the motion vectors are refined by a bilateral template matching process. The bilateral template matching applied in the decoder to perform a distortion-based search between a bilateral template and the reconstruction samples in the reference pictures in order to obtain a refined MV without transmission of additional motion information. An example is depicted in <FIG>. The bilateral template is generated as the weighted combination (i.e. average) of the two prediction blocks, from the initial MV0 of list0 and MV1 of list1, respectively, as shown in <FIG>. The template matching operation consists of calculating cost measures between the generated template and the sample region (around the initial prediction block) in the reference picture. For each of the two reference pictures, the MV that yields the minimum template cost is considered as the updated MV of that list to replace the original one. In the JEM, nine MV candidates are searched for each list. The nine MV candidates include the original MV and <NUM> surrounding MVs with one luma sample offset to the original MV in either the horizontal or vertical direction, or both. Finally, the two new MVs, i.e., MV0' and MV1' as shown in <FIG>, are used for generating the final bi-prediction results. A sum of absolute differences (SAD) is used as the cost measure. Please note that when calculating the cost of a prediction block generated by one surrounding MV, the rounded MV (to integer pel) is actually used to obtain the prediction block instead of the real MV.

<FIG> shows an example of DMVR based on bilateral template matching.

For DMVR in VVC, MVD mirroring between list <NUM> and list <NUM> is assumed as shown in <FIG>, and bilateral matching is performed to refine the MVs, i.e., to find the best MVD among several MVD candidates. Denote the MVs for two reference picture lists by MVL0(L0X, L0Y), and MVL1(L1X, L1Y). The MVD denoted by (MvdX, MvdY) for list <NUM> that could minimize the cost function (e.g., SAD) is defined as the best MVD. For the SAD function, it is defined as the SAD between the reference block of list <NUM> derived with a motion vector (L0X +MvdX, L0Y+MvdY) in the list <NUM> reference picture and the reference block of list <NUM> derived with a motion vector (L1X-MvdX, L1Y-MvdY) in the list <NUM> reference picture.

The motion vector refinement process may iterate twice. In each iteration, at most <NUM> MVDs (with integer-pel precision) may be checked in two steps, as shown in <FIG>. In the first step, MVD (<NUM>, <NUM>), (-<NUM>, <NUM>), (<NUM>, <NUM>), (<NUM>, -<NUM>), (<NUM>, <NUM>) are checked. In the second step, one of the MVD (-<NUM>, -<NUM>), (-<NUM>, <NUM>), (<NUM>, -<NUM>) or (<NUM>, <NUM>) may be selected and further checked. Suppose function Sad(x, y) returns SAD value of the MVD (x, y). The MVD, denoted by (MvdX, MvdY), checked in the second step is decided as follows:
<IMG>.

In the first iteration, the starting point is the signaled MV, and in the second iteration, the starting point is the signaled MV plus the selected best MVD in the first iteration. DMVR applies only when one reference picture is a preceding picture and the other reference picture is a following picture, and the two reference pictures are with same picture order count distance from the current picture.

<FIG> shows an example of MVD (<NUM>, <NUM>) mirrored between list <NUM> and list <NUM> in DMVR.

<FIG> shows an example of MVs that may be checked in one iteration.

To further simplify the process of DMVR, JVET-M0147 proposed several changes to the design in JEM. More specifically, the adopted DMVR design to VTM-<NUM> (to be released soon) has the following main features:.

When the following conditions are all true, DMVR may be enabled:.

In JVET-LO100, multi-hypothesis prediction is proposed, wherein combined intra and inter prediction is one way to generate multiple hypotheses.

When the multi-hypothesis prediction is applied to improve intra mode, multi-hypothesis prediction combines one intra prediction and one merge indexed prediction. In a merge CU, one flag is signaled for merge mode to select an intra mode from an intra candidate list when the flag is true. For luma component, the intra candidate list is derived from <NUM> intra prediction modes including DC, planar, horizontal, and vertical modes, and the size of the intra candidate list can be <NUM> or <NUM> depending on the block shape. When the CU width is larger than the double of CU height, horizontal mode is exclusive of the intra mode list and when the CU height is larger than the double of CU width, vertical mode is removed from the intra mode list. One intra prediction mode selected by the intra mode index and one merge indexed prediction selected by the merge index are combined using weighted average. For chroma component, DM is always applied without extra signaling. The weights for combining predictions are described as follow. When DC or planar mode is selected, or the CB width or height is smaller than <NUM>, equal weights are applied. For those CBs with CB width and height larger than or equal to <NUM>, when horizontal/vertical mode is selected, one CB is first vertically/horizontally split into four equal-area regions. Each weight set, denoted as (w_intrai, w_interi), where i is from <NUM> to <NUM> and (w_intra<NUM>, w_inter<NUM>) = (<NUM>, <NUM>), (w_intra<NUM>, w_inter<NUM>) = (<NUM>, <NUM>), (w_intra<NUM>, w_inter<NUM>) = (<NUM>, <NUM>), and (w_intra<NUM>, w_inter<NUM>) = (<NUM>, <NUM>), will be applied to a corresponding region. (w_intra<NUM>, w_inter<NUM>) is for the region closest to the reference samples and (w_intra<NUM>, w_inter<NUM>) is for the region farthest away from the reference samples. Then, the combined prediction can be calculated by summing up the two weighted predictions and right-shifting <NUM> bits. Moreover, the intra prediction mode for the intra hypothesis of predictors can be saved for reference of the following neighboring CUs.

In JVET-M0481, symmetric motion vector difference (SMVD) is proposed for motion information coding in bi-prediction.

Firstly, in slice level, variables BiDirPredFlag, RefIdxSymL0 and RefIdxSymL1 are derived as follows:.

Secondly, in CU level, a symmetrical mode flag indicating whether symmetrical mode is used or not is explicitly signaled if the prediction direction for the CU is bi-prediction and BiDirPredFlag is equal to <NUM>.

When the flag is true, only mvp_l0_flag, mvp_l1_flag and MVD0 are explicitly signaled. The reference indices are set equal to RefIdxSymL0, RefIdxSymL1 for list <NUM> and list <NUM>, respectively. MVD1 is just set equal to -MVD0. The final motion vectors are shown in below formula.

<FIG> shows an example illustration for symmetrical mode.

The modifications in coding unit syntax are shown in Table <NUM> (in bold face italics).

The current decoder side motion vector derivation (DMVD) may have the following problems:.

The detailed techniques below should be considered as examples to explain general concepts. These techniques should not be interpreted in a narrow way. Furthermore, these techniques can be combined in any manner.

In this document, DMVD includes methods like DMVR and FRUC which perform motion estimation to derive or refine the block/sub-block motion information, and BIO which performs sample-wise motion refinement.

The unequal weights applied to prediction blocks may refer to that used in the GBI process, LIC process, weighted prediction process or other encoding/decoding process of a coding tool that need to apply additional operations to prediction blocks instead of average of two prediction blocks etc. al.

Suppose the reference picture in list <NUM> and list <NUM> are Ref0 and Ref1 respectively, the POC distance between the current picture and Ref0 is PocDist0 (i.e., POC of current picture minus POC of Ref0), and the POC distance between Ref1 and the current picture is PocDist1 (i.e., POC of Ref1 minus POC of current picture). In this patent document, PocDist1 is the same as PocDis1 and PocDist0 is the same as PocDis0. Denote width and height of the block as W and H respectively. Suppose function abs(x) returns the absolute value of x.

<FIG> is a block diagram of a video processing apparatus <NUM>. The apparatus <NUM> may be used to implement one or more of the methods described herein. The apparatus <NUM> may be embodied in a smartphone, tablet, computer, Internet of Things (IoT) receiver, and so on. The apparatus <NUM> may include one or more processors <NUM>, one or more memories <NUM> and video processing hardware <NUM>. The processor(s) <NUM> may be configured to implement one or more methods described in the present document. The memory (memories) <NUM> may be used for storing data and code used for implementing the methods and techniques described herein. The video processing hardware <NUM> may be used to implement, in hardware circuitry, some techniques described in the present document, and may be partly or completely be a part of the processors <NUM> (e.g., graphics processor core GPU or other signal processing circuitry).

In the present document, the term "video processing" may refer to video encoding, video decoding, video compression or video decompression. For example, video compression algorithms may be applied during conversion from pixel representation of a video to a corresponding bitstream representation or vice versa. The bitstream representation of a current video block may, for example, correspond to bits that are either co-located or spread in different places within the bitstream, as is defined by the syntax. For example, a macroblock may be encoded in terms of transformed and coded error residual values and also using bits in headers and other fields in the bitstream.

It will be appreciated that several techniques have been disclosed that will benefit video encoder and decoder embodiments incorporated within video processing devices such as smartphones, laptops, desktops, and similar devices by allowing the use of the techniques disclosed in the present document.

<FIG> is a flowchart for an example method <NUM> of video processing. The method <NUM> includes, at <NUM>, obtaining a refined motion information for a current video block of a video by implementing a decoder-side motion vector derivation (DMVD) scheme based on at least a weight parameter, where the weight parameter is applied to prediction blocks in a generation process for a final prediction block for the current video block. The method <NUM> includes, at <NUM> performing a conversion between the current video block and a bitstream representation of the video at least using the refined motion information and the weight parameter.

In some embodiments for method <NUM>, a field in the bitstream representation is indicative of the weight parameter. In some embodiments for method <NUM>, an indication of the weight parameter is signaled using a Bi-prediction with Coding unit Weights (BCW) technique. In some embodiments for method <NUM>, an indication of the weight parameter is signaled using a weighted prediction technique. In some embodiments for method <NUM>, the weight parameter is derived. In some embodiments for method <NUM>, the weight parameter is derived using a Local Illumination Compensation (LIC) technique. In some embodiments for method <NUM>, the weight parameter is associated with a reshaping process that maps a set of sample values to another set of sample values. In some embodiments for method <NUM>, the DMVD scheme is implemented by applying the weight parameter to prediction blocks of the current video block. In some embodiments for method <NUM>, the conversion includes calculating a predictive cost function for the current video block by first applying the weight parameter according to a Bi-prediction with Coding unit Weights (BCW) index to the prediction blocks and then calculating the predictive cost function.

In some embodiments for method <NUM>, the conversion includes calculating a predictive cost function for the current video block by first applying the weight parameter according to a weighted prediction scheme to the prediction blocks and then calculating the predictive cost function. In some embodiments for method <NUM>, the conversion includes calculating a predictive cost function for the current video block by first applying the weight parameter according to a Local Illumination Compensation (LIC) scheme to the prediction blocks and then calculating the predictive cost function. In some embodiments for method <NUM>, the predictive cost function is a gradient function. In some embodiments for method <NUM>, the predictive cost function is a sum of absolute difference (SAD) cost function. In some embodiments for method <NUM>, the predictive cost function is a mean-removed sum of absolute difference (MR-SAD) cost function.

In some embodiments for method <NUM>, the conversion includes calculating, for the current video block, temporal gradients and spatial gradients of a Bi-directional Optical flow (BIO) scheme by first applying the weight parameter according to a Bi-prediction with Coding unit Weights (BCW) index to the prediction blocks and then calculating the temporal gradients and the spatial gradients. In some embodiments for method <NUM>, the conversion includes calculating, for the current video block, temporal gradients and spatial gradients of a Bi-directional Optical flow (BIO) scheme by first applying the weight parameter according to a weighted prediction scheme to the prediction blocks and then calculating the temporal gradients and the spatial gradients.

In some embodiments for method <NUM>, the conversion includes calculating, for the current video block, temporal gradients and spatial gradients of a Bi-directional Optical flow (BIO) scheme by first applying the weight parameter according to a Local Illumination Compensation (LIC) scheme to the prediction blocks and then calculating the temporal gradients and the spatial gradients. In some embodiments for method <NUM>, the calculating of the predictive cost function or the temporal gradients or the spatial gradients is performed in a reshaped domain. In some embodiments for method <NUM>, a reshaping process is disabled for prediction blocks generated with the refined motion information for the current video block.

<FIG> is a flowchart for an example method <NUM> of video processing. The method <NUM> includes, at <NUM>, determining that use of a decoder-side motion vector derivation (DMVD) scheme is disabled for a conversion between a current video block of a video and a coded representation of the video due to use of a coding tool for the current video block. The method <NUM> includes, at <NUM>, performing the conversion between the current video block and a bitstream representation of the video based on the determining, where the coding tool includes applying unequal weighting factors to prediction blocks of the current video block. In some embodiments for method <NUM>, the coding tool is configured to use a weight factor in a sample prediction process.

In some embodiments for method <NUM>, the coding tool includes a Bi-prediction with Coding unit Weights (BCW) mode. In some embodiments for method <NUM>, two weighting factors used for two prediction blocks in the BCW mode are unequal. In some embodiments for method <NUM>, the weighting factor is indicated in a field in the bitstream representation with the current video block. In some embodiments, the DMVD scheme includes a decoder-side motion vector refinement (DMVR) coding mode which derives a refined motion information based on the predictive cost function. In some embodiments, the DMVD scheme includes a Bi-directional optical flow (BDOF) coding mode coding tool which derives a refined prediction based on the gradient calculation. In some embodiments for method <NUM>, the BCW mode being used by the current video block comprises using the field that represents a BCW index and an index of the weighting factor, and the BCW index is unequal to <NUM>.

In some embodiments for method <NUM>, the coding tool includes a weighted prediction mode. In some embodiments for method <NUM>, the weighted prediction mode being used by the current video block comprises applying weighted prediction to at least one of prediction block of the current video block. In some embodiments for method <NUM>, the coding tool includes a Local Illumination Compensation (LIC) mode. In some embodiments for method <NUM>, the coding tool includes a multi-hypothesis prediction mode. In some embodiments for method <NUM>, a first weight parameter for a first reference picture and a second weight parameter for a second reference picture are associated with the weighted prediction mode for the current video block, and the DMVD scheme is determined to be disabled for the current video block in response to the first weight parameter being different from the second weight parameter.

In some embodiments for method <NUM>, the first weight parameter and/or the second weight parameter are indicated in a field in the bitstream representation with a video unit including the current video block, the video unit comprises at least one of picture or a slice. In some embodiments for method <NUM>, a first linear model parameter for a first reference picture of the current video block and a second linear model parameter for a second reference picture of the current video block, and the DMVD scheme is determined to be disabled for the current video block in response to the first linear model parameter being different from the second linear model parameter.

<FIG> is a flowchart for an example method <NUM> of video processing. The method <NUM> includes, at <NUM>, determining, based on picture order count (POC) values of one or more reference pictures of a current video block of a video and a POC value of a current picture containing the current video block, whether to enable or disable one or more decoder-side motion vector derivation (DMVD) schemes for the current video block. The method <NUM> includes, at <NUM>, performing, according to the determining, a conversion between the current video block and a bitstream representation of the video.

In some embodiments for method <NUM>, the determining whether to enable or disable the one or more DMVD schemes is based on a relationship between a first POC distance (PocDis0) representing a first distance from a first reference picture of the current video block to the current picture and a second POC distance (PocDis1) representing a second distance from the current picture to a second reference picture of the current video block. In some embodiments for method <NUM>, the first reference picture is a reference picture list <NUM> of the current video block and the second reference picture is a reference picture list <NUM> of the current video block,.

In some embodiments for method <NUM>, the PocDist0 is set to a first POC value of the current picture minus a second POC value of the first reference picture, and the PocDist1 is set to a third POC value of the second reference picture minus the first POC value of the current picture. In some embodiments for method <NUM>, the one or more DMVD schemes are enabled in response to the PocDis0 being unequal to the PocDis1. In some embodiments for method <NUM>, the determining of whether to enable or disable more than one DMVD schemes among the one or more DMVD schemes is based on a same rule being applied with respect to the PocDis0 and the PocDis1. In some embodiments for method <NUM>, the one or more DMVD schemes are enabled in response to the PocDis0 being equal to the PocDis1.

In some embodiments for method <NUM>, the one or more DMVD schemes are disabled in response to the PocDis0 multiplied by the PocDis1 being less than zero. In some embodiments for method <NUM>, the one or more DMVD schemes are disabled in response to the PocDis0 being unequal to the PocDis1. In some embodiments for method <NUM>, the one or more DMVD schemes identify, during the conversion, two reference blocks using a first set of motion vector difference (MVD) for a first reference picture list and a second set of MVD for a second reference picture list, the first set of MVD is a mirrored version of the second set of MVD. In some embodiments for method <NUM>, the one or more DMVD schemes identify, during the conversion, two reference blocks using a first set of motion vector difference (MVD) for a first reference picture list and a second set of MVD for a second reference picture list, the second set of MVD is a mirrored version of the first set of MVD.

In some embodiments for method <NUM>, the one or more DMVD schemes identify, during the conversion, two reference blocks using a first set of motion vector difference (MVD) for a first reference picture list and a second set of MVD for a second reference picture list, the first set of MVD is an un-mirrored version of the second set of MVD. In some embodiments for method <NUM>, the first set of MVD is scaled to the second set of MVD according to the PocDis0 and the PocDis1. In some embodiments for method <NUM>, the first set of MVD including (MvdX, MvdY) is scaled to the second set of MVD that is calculated as follows: (-MvdX*PocDis1 / PocDis0, -MvdY*PocDis1 / PocDis0). In some embodiments for method <NUM>, the second set of MVD is scaled to the first set of MVD according to the PocDis0 and the PocDis1. In some embodiments for method <NUM>, the second set of MVD including (MvdX, MvdY) is scaled to the first set of MVD that is calculated as follows: (-MvdX*PocDis0 / PocDis1, -MvdY*PocDis0 / PocDis1).

In some embodiments for method <NUM>, a division operation for the scaled operation is implemented using a lookup table, multiple operations, or right-right operations. In some embodiments for method <NUM>, the one or more DMVD schemes determine, during a DMVD process, a first set of motion vector difference (MVD) for a first reference picture list and a second set of MVD for a second reference picture list for a current video block of a video, based on the POC values of reference pictures of the current video block and the POC value of a current picture containing the current video block. In some embodiments for method <NUM>, in response to a first absolute value of the PocDis0 being less than or equal to a second absolute value of the PocDis1, the first set of MVD is scaled to generate the second set of MVD according to the PocDis0 and the PocDis1. In some embodiments for method <NUM>, in response to a first absolute value of the PocDis0 being greater than or equal to a second absolute value of the PocDis1, the first set of MVD is scaled to generate the second set of MVD according to the PocDis0 and the PocDis1.

In some embodiments for method <NUM>, in response to a second absolute value of the PocDis1 being less than or equal to a first absolute value of the PocDis0, the second set of MVD is scaled to generate the first set of MVD according to the PocDis0 and the PocDis1. In some embodiments for method <NUM>, in response to a second absolute value of the PocDis1 being greater than or equal to a first absolute value of the PocDis0, the second set of MVD is scaled to generate the first set of MVD according to the PocDis0 and the PocDis1. In some embodiments for method <NUM>, in response to the two reference pictures including a first reference picture that precedes the current picture and a second reference picture that follows the current picture, the first set of MVD is mirrored to generate the second set of MVD and scaling is not performed for obtaining the first set of MVD or the second set of MVD. In some embodiments for method <NUM>, the determining whether to enable or disable the one or more DMVD schemes is based on a first sign of a first picture order count distance (PocDis0) representing a first distance from a first reference picture of the current video block to the current picture and a second sign of a second picture order count distance (PocDis1) representing a second distance from the current picture to a second reference picture of the current video block.

In some embodiments for method <NUM>, the one or more DMVD schemes is enabled in response to a result of the PocDis0 having the first sign multiplied by the PocDis1 having the second sign being less than zero. In some embodiments for method <NUM>, the one or more DMVD schemes is enabled in response to a result of the PocDis0 having the first sign multiplied by the PocDis1 having the second sign being greater than zero. In some embodiments for method <NUM>, the one or more DMVD schemes is disabled in response to a first picture order count distance (PocDis0) representing a first distance from a first reference picture of the current video block to the current picture being unequal to a second picture order count distance (PocDis1) representing a second distance from the current picture to a second reference picture of the current video block.

In some embodiments for method <NUM>, a motion information of the first reference picture list is refined using the first set of MVD and a motion information of the second reference picture list is refined using the second set of MVD. In some embodiments for method <NUM>, the first reference picture list is a reference picture list <NUM> and the second reference picture list is a reference picture list <NUM>.

<FIG> is a flowchart for an example method <NUM> of video processing. The method <NUM> includes, at <NUM>, obtaining a refined motion information for a current video block of a video by implementing a decoder-side motion vector derivation (DMVD) scheme for the current video block where a symmetric motion vector difference (SMVD) mode is enabled for the current video block. The method <NUM> includes, at <NUM>, performing a conversion between the current video block and a bitstream representation of the video using the refined motion information.

In some embodiments for method <NUM>, the bitstream representation includes a motion vector difference (MVD) for the refined motion information, and the MVD is decoded according to the SMVD mode and is further refined before being used to decode the current video block. In some embodiments for method <NUM>, where, in the SMVD mode, the DMVD scheme is used to refine a motion vector difference (MVD) for the refined motion information by changing a motion vector (MV) precision or a MVD precision from N-pel precision to an M-pel precision, N and M are equal to <NUM>/<NUM>, <NUM>/<NUM>, <NUM>/<NUM>, <NUM>/<NUM>, <NUM>, <NUM>, <NUM>, <NUM>, or <NUM>. In some embodiments for method <NUM>, the M is less than or equal to the N. In some embodiments for method <NUM>, the bitstream representation does not include a signaling for a motion vector difference (MVD) for the refined motion information in the SMVD mode, and the MVD is generated using the the DMVD scheme.

In some embodiments for method <NUM>, an Adaptive Motion Vector difference Resolution (AMVR) information is not signaled in the bitstream representation for a video block coded in SMVD mode, and a motion vector (MV) precision or a motion vector difference (MVD) precision for the refined motion information is derived according to a pre-defined value. In some embodiments for method <NUM>, the MV precision or the MVD precision is <NUM>/<NUM>-pel precision. In some embodiments for method <NUM>, the pre-defined value is signaled in a sequence, a picture, a tile group, a slice, a tile, a video data unit level in the bitstream representation. In some embodiments for method <NUM>, the pre-defined value depends on a mode information or a motion information. In some embodiments for method <NUM>, the mode information or the motion information includes an affine motion information or a non-affine motion information.

<FIG> is a flowchart for an example method <NUM> of video processing. The method <NUM> includes, at <NUM>, determining, based on a field in a bitstream representation for a video including a current video block, whether to enable or disable a decoder-side motion vector derivation (DMVD) scheme for the current video block, a symmetric motion vector difference (SMVD) mode is enabled for the current video block. The method <NUM> includes, at <NUM>, obtaining, after the determining that the DMVD scheme is enabled, a refined motion information for the current video block by implementing the DMVD scheme for the current video block. The method <NUM> includes, at <NUM>, performing a conversion between the current video block and a bitstream representation of the video using the refined motion information.

In some embodiments for method <NUM>, a motion vector difference (MVD) is not signaled in the bitstream representation in response to the DMVD scheme being enabled. In some embodiments for method <NUM>, the field indicating whether the DMVD scheme is enabled or disabled is present in the bitstream representation for one or more motion vector (MV) precisions or motion vector difference (MVD) precisions. In some embodiments for method <NUM>, the one or more MV precisions or MVD precisions include <NUM>-pel and/or <NUM>-pel precision.

In some embodiments for method <NUM>, the field indicating whether the DMVD scheme is enabled or disabled is present in the bitstream presentation in response to a first picture order count distance (PocDis0) representing a first distance from a first reference picture (Ref0) of the current video block to the current picture being equal to a second picture order count distance (PocDis1) representing a second distance from the current picture to a second reference picture (Ref1) of the current video block, and the first reference picture (Ref0) precedes the current picture and the second reference picture (Ref1) follows the current picture in a display order.

In some embodiments for method <NUM>, the field indicating whether the DMVD scheme is enabled or disabled is present in the bitstream presentation in response to a first picture order count distance (PocDis0) representing a first distance from a first reference picture (Ref0) of the current video block to the current picture being equal to a second picture order count distance (PocDis1) representing a second distance from the current picture to a second reference picture (Ref1) of the current video block, and the second reference picture (Ref1) precedes the current picture and the first reference picture (Ref0) follows the current picture in a display order.

In some embodiments for method <NUM>, the DMVD scheme is enabled in SMVD mode based on a coding information of the current video block and/or of one or more neighboring blocks. In some embodiments for method <NUM>, the DMVD scheme is enabled in SMVD mode based on a block dimensions of the current video block. In some embodiments for method <NUM>, the DMVD scheme is enabled in SMVD mode based on information related to reference pictures for the current video block. In some embodiments for method <NUM>, information related to the reference pictures includes picture order count (POC) information. In some embodiments for method <NUM>, the DMVD scheme is enabled in SMVD mode based on a signaling for a motion vector difference (MVD) information in the bitstream representation. In some embodiments for method <NUM>, the one or more DMVD schemes include a decoder-side motion vector refinement (DMVR) scheme. In some embodiments for methods <NUM> and <NUM>, the DMVD scheme include a decoder-side motion vector refinement (DMVR) scheme. In some embodiments for method <NUM>, the one or more DMVD schemes include a bi-directional optical flow (BDOF) scheme. In some embodiments for methods <NUM> and <NUM>, the DMVD scheme include a bi-directional optical flow (BDOF) scheme.

<FIG> is a flowchart for an example method <NUM> of video processing. The method <NUM> includes, at <NUM>, determining, based on a rule that uses a block dimension of a current video block of a video, whether a plurality of decoder-side motion vector derivation (DMVD) schemes are enabled or disabled for a conversion between the current video block and a bitstream representation of the video. The method <NUM> includes, at <NUM>, performing the conversion based on the determination.

In some embodiments for method <NUM>, the plurality of DMVD schemes are determined to be enabled in response to (W * H) >= T1 and H >= T2, where W and H are respectively width and height of the current video block and T1 and T2 are rational numbers. In some embodiments for method <NUM>, T1 is <NUM> and T2 is <NUM>. In some embodiments for method <NUM>, the plurality of DMVD schemes are determined to be enabled in response to H >= T1 and either W is not equal to T2 or H is not equal to T1, where W and H are respectively width and height of the current video block and T1 and T2 are rational numbers. In some embodiments for method <NUM>, T1 is <NUM> and T2 is <NUM>.

In some embodiments for method <NUM>, the plurality of DMVD schemes are determined to be disabled in response to a first number of samples of the current video block being less than a second number of samples. In some embodiments for method <NUM>, the plurality of DMVD schemes are determined to be disabled in response to a first number of samples of the current video block being greater than a second number of samples. In some embodiments for method <NUM>, the second number of samples is <NUM> luma samples or <NUM> luma samples or <NUM> luma samples or <NUM> luma samples. In some embodiments for method <NUM>, the plurality of DMVD schemes are determined to be disabled in response to a width of the current video block being less than a value.

In some embodiments for method <NUM>, the plurality of DMVD schemes are determined to be disabled in response to a height of the current video block being less than a value. In some embodiments for method <NUM>, the value is <NUM>. In some embodiments for method <NUM>, the plurality of DMVD schemes are determined to be disabled in response to a width of the current video block being greater than or equal to a first threshold and/or in response to a height of the current video block being greater than or equal to a second threshold. In some embodiments for method <NUM>, the width is <NUM> and the height is <NUM>. In some embodiments for method <NUM>, the width is greater than or equal to <NUM> and the height is <NUM>, or the width is <NUM> and the height is greater than or equal to <NUM>. In some embodiments for method <NUM>, the width is greater than or equal to <NUM> and the height is <NUM>, or the width is <NUM> and the height is greater than or equal to is <NUM>. In some embodiments for method <NUM>, the first threshold and the second threshold is <NUM>.

In some embodiments for method <NUM>, the plurality of DMVD schemes are determined to be disabled in response to a width of the current video block being less than or equal to a first threshold and/or in response to a height of the current video block being less than or equal to a second threshold. In some embodiments for method <NUM>, the first threshold and the second threshold are <NUM>. In some embodiments, the plurality of DMVD schemes include a decoder-side motion vector refinement (DMVR) scheme which derives a refined motion information based on a cost function. In some embodiments, the plurality of DMVD schemes include a bi-directional optical flow (BDOF) scheme which derives a refined motion information based on a gradient calculation.

<FIG> is a flowchart for an example method <NUM> of video processing. The method <NUM> includes, at <NUM>, determining whether to perform a plurality of decoder-side motion vector derivation (DMVD) schemes at a sub-block level or a block level for a current video block of a video. The method <NUM> includes, at <NUM>, obtaining, after the determining that the plurality of DMVD schemes are performed at a sub-block level, a refined motion information for the current video block by implementing the plurality of DMVD schemes at a same sub-block level for the current video block. The method <NUM> includes, at <NUM>, performing a conversion between the current video block and a bitstream representation of the video using the refined motion information.

In some embodiments for method <NUM>, the plurality of DMVD scheme includes decoder-side motion vector refinement (DMVR) schemes. In some embodiments for method <NUM>, the refined motion information is obtained by applying a bilateral matching in the DMVR scheme at the sub-block level for the current video block. In some embodiments for method <NUM>, the plurality of DMVD schemes includes bi-directional optical flow (BDOF) coding schemes. In some embodiments for method <NUM>, the BDOF coding scheme is determined to be enabled or disabled at the sub-block level for the current video block. In some embodiments for method <NUM>, the BDOF coding scheme is determined to be enabled and the refined motion information is obtained by performing a sample-wise refinement of the motion information performed at the sub-block level of the current video block in the BDOF coding scheme.

In some embodiments for method <NUM>, the BDOF coding scheme is determined to be enabled or disabled at the sub-block level of the current video block, and a sample-wise motion information refinement process in the BDOF coding scheme is determined to be performed at the sub-block level of the current video block. In some embodiments for method <NUM>, a width and a height of the sub-block are both equal to <NUM>. In some embodiments for method <NUM>, the current video block is split into multiple sub-blocks in response to: a first width of the current video block being greater than or equal to a value, or a first height of the current video block being greater than or equal to the value, or the first width being greater than or equal to the value and the first height being greater than or equal to the value.

In some embodiments for method <NUM>, each of the multiple sub-blocks is processed by one or more DMVD schemes in a same way as a coding block with size equal to a sub-block size. In some embodiments for method <NUM>, the value is <NUM>, and in response to the current video block either having the first width of <NUM> and the first height of <NUM> or having the first width of <NUM> and the first height of <NUM>, the current video block is split into two sub-blocks where each of the two sub-blocks has a second width and a second height of <NUM>. In some embodiments for method <NUM>, the value is <NUM>, and in response to the current video block having the first width of <NUM> and the first height of <NUM>, the current video block is split into four sub-blocks where each of the two sub-blocks has a second width and a second height of <NUM>.

In some embodiments for method <NUM>, the current video block is not split into sub-blocks in response to the current video block either having the first width of N and the first height of <NUM> or having the first width of <NUM> and the first height of N, where N is less than <NUM>. In some embodiments for method <NUM>, the value is <NUM>, and in response to the current video block either having the first width of N and the first height of <NUM> or having the first width of <NUM> and the first height of N where N is less than <NUM>, the current video block is split into two sub-blocks where each of the two sub-blocks either has a second width of N and a second height of <NUM> or has the second width of <NUM> and the second height of N.

In some embodiments for method <NUM>, the current video block is split vertically in response to a first width of the current video block is greater than a value, and a second width of a sub-block of the current video block is less than or equal to the value. In some embodiments for method <NUM>, the current video block is split horizontally in response to a first height of the current video block is greater than a value, and a second height of a sub-block of the current video block is less than or equal to the value. In some embodiments for method <NUM>, the value is <NUM>. In some embodiments for method <NUM>, the second width of a sub-block of the current video block is <NUM>. In some embodiments for method <NUM>, the second height of a sub-block of the current video block is <NUM>. In some embodiments for method <NUM>, the current video block is split into multiple sub-blocks in response to a first size of the current video block being greater than a first threshold value. In some embodiments for method <NUM>, each of the multiple sub-blocks is processed by one or more DMVD schemes in a same way as a coding block with a second size equal to a sub-block size.

In some embodiments for method <NUM>, each of the multiple sub-blocks has a same size that is less than or equal to the first threshold value. In some embodiments for methods <NUM> and <NUM>, the current video block is a luma video block. In some embodiments for method <NUM>, the determining whether to enable or disable the plurality of DMVD schemes is performed on the luma video block and shared by the associated chroma video blocks. In some embodiments for method <NUM>, the determining whether to perform the plurality of DMVD schemes at a sub-block level is performed on the luma video block and shared by the associated chroma video blocks. In some embodiments for method <NUM>, the current video block is determined not to be split horizontally or vertically into multiple sub-blocks in response to a height or a width of the current video block being less than or equal to a second threshold value. In some embodiments for method <NUM>, the first threshold value is <NUM> and the second threshold value is <NUM>.

In some embodiments for method <NUM>, the value is pre-defined or signaled in a sequence parameter set (SPS), a picture parameter set (PPS), a picture, a slice, a tile group, or tile level for the current video block. In some embodiments for method <NUM>, the value or the first threshold value or the second threshold value depends on coded information of the current video block. In some embodiments for method <NUM>, a determination of the sub-block size is same for the plurality of DMVD schemes. In some embodiments for method <NUM>, the coded information of the current video block includes a block size or a picture type or a temporal layer index of the current video block. In some embodiments for methods <NUM> and <NUM>, the plurality of DMVD for the current video block include all DMVD schemes for the current video block.

<FIG> is a flowchart for an example method <NUM> of video processing. The method <NUM> includes, at <NUM>, determining whether to enable or disable a decoder-side motion vector derivation (DMVD) scheme for a plurality of components of a current video block of a video. The method <NUM> includes, at <NUM>, obtaining, after the determining that the DMVD scheme is enabled, a refined motion information for the current video block by implementing the DMVD scheme. The method <NUM> includes, at <NUM>, performing, during the implementing of the DMVD scheme, a conversion between the current video block and a bitstream representation of the video.

In some embodiments for method <NUM>, the determining whether to enable or disable the DMVD scheme is performed once and shared by the plurality of components. In some embodiments for method <NUM>, the determining whether to enable or disable the DMVD is performed multiple times for the plurality of components. In some embodiments for method <NUM>, the determining whether to enable or disable the DMVD is first performed for one component of the plurality of components and is then either performed for or shared with one or more remaining components of the plurality of components. In some embodiments for method <NUM>, the one component is a luma component or a green component. In some embodiments for method <NUM>, the determining whether to enable or disable the DMVD is performed for one component of the plurality of components based on information of the one component. In some embodiments for method <NUM>, the one component is a luma component, a chroma component, a green component, a blue component, or a red component.

<FIG> is a block diagram showing an example video processing system <NUM> in which various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of the system <NUM>. The system <NUM> may include input <NUM> for receiving video content. The video content may be received in a raw or uncompressed format, e.g., <NUM> or <NUM> bit multi-component pixel values, or may be in a compressed or encoded format. The input <NUM> may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interface include wired interfaces such as Ethernet, passive optical network (PON), etc. and wireless interfaces such as Wi-Fi or cellular interfaces.

The system <NUM> may include a coding component <NUM> that may implement the various coding or encoding methods described in the present document. The coding component <NUM> may reduce the average bitrate of video from the input <NUM> to the output of the coding component <NUM> to produce a coded representation of the video. The coding techniques are therefore sometimes called video compression or video transcoding techniques. The output of the coding component <NUM> may be either stored, or transmitted via a communication connected, as represented by the component <NUM>. The stored or communicated bitstream (or coded) representation of the video received at the input <NUM> may be used by the component <NUM> for generating pixel values or displayable video that is sent to a display interface <NUM>. The process of generating user-viewable video from the bitstream representation is sometimes called video decompression. Furthermore, while certain video processing operations are referred to as "coding" operations or tools, it will be appreciated that the coding tools or operations are used at an encoder and corresponding decoding tools or operations that reverse the results of the coding will be performed by a decoder.

Examples of a peripheral bus interface or a display interface may include universal serial bus (USB) or high definition multimedia interface (HDMI) or Displayport, and so on. Examples of storage interfaces include SATA (serial advanced technology attachment), PCI, IDE interface, and the like. The techniques described in the present document may be embodied in various electronic devices such as mobile phones, laptops, smartphones or other devices that are capable of performing digital data processing and/or video display.

Some embodiments of the disclosed technology include making a decision or determination to enable a video processing tool or mode. In an example, when the video processing tool or mode is enabled, the encoder will use or implement the tool or mode in the processing of a block of video, but may not necessarily modify the resulting bitstream based on the usage of the tool or mode. That is, a conversion from the block of video to the bitstream representation of the video will use the video processing tool or mode when it is enabled based on the decision or determination. In another example, when the video processing tool or mode is enabled, the decoder will process the bitstream with the knowledge that the bitstream has been modified based on the video processing tool or mode. That is, a conversion from the bitstream representation of the video to the block of video will be performed using the video processing tool or mode that was enabled based on the decision or determination.

Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In an example, when the video processing tool or mode is disabled, the encoder will not use the tool or mode in the conversion of the block of video to the bitstream representation of the video. In another example, when the video processing tool or mode is disabled, the decoder will process the bitstream with the knowledge that the bitstream has not been modified using the video processing tool or mode that was disabled based on the decision or determination.

<FIG> is a block diagram that illustrates an example video coding system <NUM> that may utilize the techniques of this disclosure. As shown in <FIG>, video coding system <NUM> may include a source device <NUM> and a destination device <NUM>. Source device <NUM> generates encoded video data which may be referred to as a video encoding device. Destination device <NUM> may decode the encoded video data generated by source device <NUM> which may be referred to as a video decoding device. Source device <NUM> may include a video source <NUM>, a video encoder <NUM>, and an input/output (I/O) interface <NUM>.

Video source <NUM> may include a source such as a video capture device, an interface to receive video data from a video content provider, and/or a computer graphics system for generating video data, or a combination of such sources. The video data may comprise one or more pictures. Video encoder <NUM> encodes the video data from video source <NUM> to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. I/O interface <NUM> may include a modulator/demodulator (modem) and/or a transmitter. The encoded video data may be transmitted directly to destination device <NUM> via I/O interface <NUM> through network 130a. The encoded video data may also be stored onto a storage medium/server 130b for access by destination device <NUM>.

Destination device <NUM> may include an I/O interface <NUM>, a video decoder <NUM>, and a display device <NUM>.

I/O interface <NUM> may include a receiver and/or a modem. I/O interface <NUM> may acquire encoded video data from the source device <NUM> or the storage medium/ server 130b. Video decoder <NUM> may decode the encoded video data. Display device <NUM> may display the decoded video data to a user. Display device <NUM> may be integrated with the destination device <NUM>, or may be external to destination device <NUM> which be configured to interface with an external display device.

Video encoder <NUM> and video decoder <NUM> may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding(VVM) standard and other current and/or further standards.

<FIG> is a block diagram illustrating an example of video encoder <NUM>, which may be video encoder <NUM> in the system <NUM> illustrated in <FIG>.

Video encoder <NUM> may be configured to perform any or all of the techniques of this disclosure. In the example of <FIG>, video encoder <NUM> includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of video encoder <NUM>. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

The functional components of video encoder <NUM> may include a partition unit <NUM>, a predication unit <NUM> which may include a mode select unit <NUM>, a motion estimation unit <NUM>, a motion compensation unit <NUM> and an intra prediction unit <NUM>, a residual generation unit <NUM>, a transform unit <NUM>, a quantization unit <NUM>, an inverse quantization unit <NUM>, an inverse transform unit <NUM>, a reconstruction unit <NUM>, a buffer <NUM>, and an entropy encoding unit <NUM>.

In other examples, video encoder <NUM> may include more, fewer, or different functional components. In an example, predication unit <NUM> may include an intra block copy(IBC) unit. The IBC unit may perform predication in an IBC mode in which at least one reference picture is a picture where the current video block is located.

Furthermore, some components, such as motion estimation unit <NUM> and motion compensation unit <NUM> may be highly integrated, but are represented in the example of <FIG> separately for purposes of explanation.

Partition unit <NUM> may partition a picture into one or more video blocks. Video encoder <NUM> and video decoder <NUM> may support various video block sizes.

Mode select unit <NUM> may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra- or inter-coded block to a residual generation unit <NUM> to generate residual block data and to a reconstruction unit <NUM> to reconstruct the encoded block for use as a reference picture. In some example, Mode select unit <NUM> may select a combination of intra and inter predication (CIIP) mode in which the predication is based on an inter predication signal and an intra predication signal. Mode select unit <NUM> may also select a resolution for a motion vector (e.g., a sub-pixel or integer pixel precision) for the block in the case of inter-predication.

To perform inter prediction on a current video block, motion estimation unit <NUM> may generate motion information for the current video block by comparing one or more reference frames from buffer <NUM> to the current video block. Motion compensation unit <NUM> may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from buffer <NUM> other than the picture associated with the current video block.

Motion estimation unit <NUM> and motion compensation unit <NUM> may perform different operations for a current video block, for example, depending on whether the current video block is in an I slice, a P slice, or a B slice.

In some examples, motion estimation unit <NUM> may perform uni-directional prediction for the current video block, and motion estimation unit <NUM> may search reference pictures of list <NUM> or list <NUM> for a reference video block for the current video block. Motion estimation unit <NUM> may then generate a reference index that indicates the reference picture in list <NUM> or list <NUM> that contains the reference video block and a motion vector that indicates a spatial displacement between the current video block and the reference video block. Motion estimation unit <NUM> may output the reference index, a prediction direction indicator, and the motion vector as the motion information of the current video block. Motion compensation unit <NUM> may generate the predicted video block of the current block based on the reference video block indicated by the motion information of the current video block.

In other examples, motion estimation unit <NUM> may perform bi-directional prediction for the current video block, motion estimation unit <NUM> may search the reference pictures in list <NUM> for a reference video block for the current video block and may also search the reference pictures in list <NUM> for another reference video block for the current video block. Motion estimation unit <NUM> may then generate reference indexes that indicate the reference pictures in list <NUM> and list <NUM> containing the reference video blocks and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. Motion estimation unit <NUM> may output the reference indexes and the motion vectors of the current video block as the motion information of the current video block. Motion compensation unit <NUM> may generate the predicted video block of the current video block based on the reference video blocks indicated by the motion information of the current video block.

In some examples, motion estimation unit <NUM> may output a full set of motion information for decoding processing of a decoder.

In some examples, motion estimation unit <NUM> may do not output a full set of motion information for the current video. Rather, motion estimation unit <NUM> may signal the motion information of the current video block with reference to the motion information of another video block. For example, motion estimation unit <NUM> may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.

In one example, motion estimation unit <NUM> may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder <NUM> that the current video block has the same motion information as the another video block.

In another example, motion estimation unit <NUM> may identify, in a syntax structure associated with the current video block, another video block and a motion vector difference (MVD). The motion vector difference indicates a difference between the motion vector of the current video block and the motion vector of the indicated video block. The video decoder <NUM> may use the motion vector of the indicated video block and the motion vector difference to determine the motion vector of the current video block.

As discussed above, video encoder <NUM> may predictively signal the motion vector. Two examples of predictive signaling techniques that may be implemented by video encoder <NUM> include advanced motion vector predication (AMVP) and merge mode signaling.

Intra prediction unit <NUM> may perform intra prediction on the current video block. When intra prediction unit <NUM> performs intra prediction on the current video block, intra prediction unit <NUM> may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a predicted video block and various syntax elements.

Residual generation unit <NUM> may generate residual data for the current video block by subtracting (e.g., indicated by the minus sign) the predicted video block(s) of the current video block from the current video block. The residual data of the current video block may include residual video blocks that correspond to different sample components of the samples in the current video block.

In other examples, there may be no residual data for the current video block for the current video block, for example in a skip mode, and residual generation unit <NUM> may not perform the subtracting operation.

Transform processing unit <NUM> may generate one or more transform coefficient video blocks for the current video block by applying one or more transforms to a residual video block associated with the current video block.

After transform processing unit <NUM> generates a transform coefficient video block associated with the current video block, quantization unit <NUM> may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.

Inverse quantization unit <NUM> and inverse transform unit <NUM> may apply inverse quantization and inverse transforms to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. Reconstruction unit <NUM> may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the predication unit <NUM> to produce a reconstructed video block associated with the current block for storage in the buffer <NUM>.

After reconstruction unit <NUM> reconstructs the video block, loop filtering operation may be performed reduce video blocking artifacts in the video block.

Entropy encoding unit <NUM> may receive data from other functional components of the video encoder <NUM>. When entropy encoding unit <NUM> receives the data, entropy encoding unit <NUM> may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.

<FIG> is a block diagram illustrating an example of video decoder <NUM> which may be video decoder <NUM> in the system <NUM> illustrated in <FIG>.

The video decoder <NUM> may be configured to perform any or all of the techniques of this disclosure. In the example of <FIG>, the video decoder <NUM> includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video decoder <NUM>. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

In the example of <FIG>, video decoder <NUM> includes an entropy decoding unit <NUM>, a motion compensation unit <NUM>, an intra prediction unit <NUM>, an inverse quantization unit <NUM>,an inverse transformation unit <NUM> , and a reconstruction unit <NUM> and a buffer <NUM>. Video decoder <NUM> may, in some examples, perform a decoding pass generally reciprocal to the encoding pass described with respect to video encoder <NUM> (<FIG>).

Entropy decoding unit <NUM> may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data). Entropy decoding unit <NUM> may decode the entropy coded video data, and from the entropy decoded video data, motion compensation unit <NUM> may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. Motion compensation unit <NUM> may, for example, determine such information by performing the AMVP and merge mode.

Motion compensation unit <NUM> may produce motion compensated blocks, possibly performing interpolation based on interpolation filters. Identifiers for interpolation filters to be used with sub-pixel precision may be included in the syntax elements.

Motion compensation unit <NUM> may use interpolation filters as used by video encoder <NUM> during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. Motion compensation unit <NUM> may determine the interpolation filters used by video encoder <NUM> according to received syntax information and use the interpolation filters to produce predictive blocks.

Motion compensation unit <NUM> may uses some of the syntax information to determine sizes of blocks used to encode frame(s) and/or slice(s) of the encoded video sequence, partition information that describes how each macroblock of a picture of the encoded video sequence is partitioned, modes indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-encoded block, and other information to decode the encoded video sequence.

Intra prediction unit <NUM> may use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. Inverse quantization unit <NUM> inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit <NUM>. Inverse transform unit <NUM> applies an inverse transform.

Reconstruction unit <NUM> may sum the residual blocks with the corresponding prediction blocks generated by motion compensation unit <NUM> or intra-prediction unit <NUM> to form decoded blocks. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in buffer <NUM>, which provides reference blocks for subsequent motion compensation/intra predication and also produces decoded video for presentation on a display device.

From the foregoing, it will be appreciated that specific embodiments of the presently disclosed technology have been described herein for purposes of illustration, but that various modifications may be made without deviating from the scope of the invention. Accordingly, the presently disclosed technology is not limited except as by the appended claims.

The disclosed and other solutions, examples, embodiments, modules and the functional operations described in this document can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this document and their structural equivalents, or in combinations of one or more of them.

A non-transitory computer readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks.

While this patent document contains many specifics, these should not be construed as limitations on the scope of any subject matter or of what may be claimed, but rather as descriptions of features that may be specific to particular embodiments of particular techniques. Certain features that are described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment.

Claim 1:
A method of processing video data, comprising:
making, based on a rule that uses a block dimension of a current video block of a video, a first determination on whether a first scheme is enabled or disabled for a conversion between the current video block and a bitstream of the video, wherein the conversion includes encoding the current video block into the bitstream or decoding the current video block from the bitstream; wherein the first scheme is a Decoder-side Motion Vector Refinement, DMVR, scheme used to derive a refined motion information based on a cost between at least one reference sample of list <NUM> and at least one reference sample of list <NUM>;
making, based on the same rule, a second determination on whether a second scheme is enabled or disabled for the conversion, wherein the second scheme is a bi-directional optical flow scheme; and
performing the conversion based on the first determination and the second determination,
wherein the rule specifies that the first scheme and the second scheme are determined to be disabled in response to at least one of:
a first number of samples included in the current video block being less than a second number of samples, or
a width of the current video block being less than a value or a height of the current video block being less than the value.