Method, apparatus, and medium for video processing

The method improves coding efficiency and quality in video processing by determining target motion candidates based on reference picture lists and applying similarity thresholds, addressing limitations in existing video coding technologies.

WO2026086907A1PCT designated stage Publication Date: 2026-04-30DOUYIN VISION CO LTD +1
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
DOUYIN VISION CO LTD
Filing Date
2025-10-24
Publication Date
2026-04-30

AI Technical Summary

Technical Problem

Existing video coding technologies, such as MPEG-2, AVC, HEVC, and VVC, require improvements in coding efficiency and coding quality for digital video processing.

Method used

A method for video processing that involves determining a target motion candidate based on a set of motion vectors associated with a same reference picture list, selecting motion candidates from a motion candidate list based on a rule, and applying similarity thresholds to improve coding efficiency and quality.

Benefits of technology

Enhances coding efficiency and coding quality by optimizing motion vector selection and candidate determination in video processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025129746_30042026_PF_FP_ABST
    Figure CN2025129746_30042026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a solution for video processing. A method for video processing is proposed. The method comprises: selecting, for a conversion between a current block of a video and a bitstream of the video, a plurality of motion candidates from a motion candidate list for the current block based on a rule; determining a target motion candidate based on the plurality of motion candidates; and performing the conversion based on the target motion candidate, wherein determining the target motion candidate comprises: determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD, APPARATUS, AND MEDIUM FOR VIDEO PROCESSINGFIELDS

[0001] Embodiments of the present disclosure relates generally to video processing techniques, and more particularly, to video coding.BACKGROUND

[0002] In nowadays, digital video capabilities are being applied in various aspects of peoples’ lives. Multiple types of video compression technologies, such as motion picture expert group (MPEG) -2, MPEG-4, international telecommunication union -telecommunication standardization sector (ITU-T) H. 263, ITU-T H. 264 / MPEG-4 Part 10 advanced video coding (AVC) , ITU-T H. 265 high efficiency video coding (HEVC) standard, versatile video coding (VVC) standard, have been proposed for video encoding / decoding. However, coding efficiency and coding quality of video coding techniques is generally expected to be further improved.SUMMARY

[0003] Embodiments of the present disclosure provide a solution for video processing.

[0004] In a first aspect, a method for video processing is proposed. The method comprises: obtaining, for a conversion between a current block of a video and a bitstream of the video, a plurality of motion candidates for the current block; determining a target motion candidate based on the plurality of motion candidates; and performing the conversion based on the target motion candidate, where determining the target motion candidate comprises: determining, based on a reference picture condition, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) from the plurality of motion candidates; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0005] Based on the method in accordance with the first aspect of the present disclosure, a first MV of a target motion candidate for a first RPL is determined based on a reference picture condition and a set of MVs associated with a same first RPL from a plurality of motion candidates. Compared with the conventional solution, the proposed method can advantageously improve coding efficiency and coding quality.

[0006] In a second aspect, an apparatus for video processing is proposed. The apparatus comprises a processor and a non-transitory memory with instructions thereon. The instructions upon execution by the processor, cause the processor to perform a method in accordance with the first aspect of the present disclosure.

[0007] In a third aspect, a non-transitory computer-readable storage medium is proposed. The non-transitory computer-readable storage medium stores instructions that cause a processor to perform a method in accordance with the first aspect of the present disclosure.

[0008] In a fourth aspect, another non-transitory computer-readable recording medium is proposed. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: obtaining a plurality of motion candidates for a current block of the video; determining a target motion candidate based on the plurality of motion candidates; and generating the bitstream based on the target motion candidate, where determining the target motion candidate comprises: determining, based on a reference picture condition, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) from the plurality of motion candidates; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0009] In a fifth aspect, a method for storing a bitstream of a video is proposed. The method comprises: obtaining a plurality of motion candidates for a current block of the video; determining a target motion candidate based on the plurality of motion candidates; generating the bitstream based on the target motion candidate; and storing the bitstream in a non-transitory computer-readable recording medium, where determining the target motion candidate comprises: determining, based on a reference picture condition, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) from the plurality of motion candidates; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0010] In a sixth aspect, a method for video processing is proposed. The method comprises: selecting, for a conversion between a current block of a video and a bitstream of the video, a plurality of motion candidates from a motion candidate list for the current block based on a rule; determining a target motion candidate based on the plurality of motion candidates; and performing the conversion based on the target motion candidate, where determining the target motion candidate comprises: determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0011] Based on the method in accordance with the sixth aspect of the present disclosure, a plurality of motion candidates are selected from a motion candidate list for the current block based on a rule, and a first MV of a target motion candidate for a first RPL is determined based on MVs associated with a same RPL and referring to a same reference picture from the plurality of motion candidates. Compared with the conventional solution, the proposed method can advantageously improve coding efficiency and coding quality.

[0012] In a seventh aspect, an apparatus for video processing is proposed. The apparatus comprises a processor and a non-transitory memory with instructions thereon. The instructions upon execution by the processor, cause the processor to perform a method in accordance with the sixth aspect of the present disclosure.

[0013] In an eighth aspect, a non-transitory computer-readable storage medium is proposed. The non-transitory computer-readable storage medium stores instructions that cause a processor to perform a method in accordance with the sixth aspect of the present disclosure.

[0014] In a ninth aspect, another non-transitory computer-readable recording medium is proposed. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: selecting a plurality of motion candidates from a motion candidate list for a current block of the video based on a rule; determining a target motion candidate based on the plurality of motion candidates; and generating the bitstream based on the target motion candidate, where determining the target motion candidate comprises: determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0015] In a tenth aspect, a method for storing a bitstream of a video is proposed. The method comprises: selecting a plurality of motion candidates from a motion candidate list for a current block of the video based on a rule; determining a target motion candidate based on the plurality of motion candidates; generating the bitstream based on the target motion candidate; and storing the bitstream in a non-transitory computer-readable recording medium, where determining the target motion candidate comprises: determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0016] In an eleventh aspect, a method for video processing is proposed. The method comprises: determining, based on a first similarity threshold and for a conversion between a current block of a video and a bitstream of the video, a set of motion candidates for the current block that belongs to a motion category; constructing a motion candidate list for the current block by determining, based on a second similarity threshold, whether to add a motion candidate of the set of motion candidates into the motion candidate list, the first similarity threshold being larger than or equal to the second similarity threshold; and performing the conversion based on the motion candidate list.

[0017] Based on the method in accordance with the eleventh aspect of the present disclosure, a set of motion candidates for the current block that belongs to a motion category is determined based on the first similarity threshold, and a pruning process is applied on the set of motion candidates based on a second similarity threshold. Moreover, the first similarity threshold is required to be larger than or equal to the second similarity threshold. Compared with the conventional solution, the proposed method can advantageously improve coding efficiency and coding quality.

[0018] In a twelfth aspect, an apparatus for video processing is proposed. The apparatus comprises a processor and a non-transitory memory with instructions thereon. The instructions upon execution by the processor, cause the processor to perform a method in accordance with the eleventh aspect of the present disclosure.

[0019] In a thirteenth aspect, a non-transitory computer-readable storage medium is proposed. The non-transitory computer-readable storage medium stores instructions that cause a processor to perform a method in accordance with the eleventh aspect of the present disclosure.

[0020] In a fourteenth aspect, another non-transitory computer-readable recording medium is proposed. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: determining, based on a first similarity threshold, a set of motion candidates for a current block of the video that belongs to a motion category; constructing a motion candidate list for the current block by determining, based on a second similarity threshold, whether to add a motion candidate of the set of motion candidates into the motion candidate list, the first similarity threshold being larger than or equal to the second similarity threshold; and generating the bitstream based on the motion candidate list.

[0021] In a fifteenth aspect, a method for storing a bitstream of a video is proposed. The method comprises: determining, based on a first similarity threshold, a set of motion candidates for a current block of the video that belongs to a motion category; constructing a motion candidate list for the current block by determining, based on a second similarity threshold, whether to add a motion candidate of the set of motion candidates into the motion candidate list, the first similarity threshold being larger than or equal to the second similarity threshold; generating the bitstream based on the motion candidate list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0022] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Through the following detailed description with reference to the accompanying drawings, the above and other objectives, features, and advantages of example embodiments of the present disclosure will become more apparent. In the example embodiments of the present disclosure, the same reference numerals usually refer to the same components.

[0024] FIG. 1 illustrates a block diagram of an example video coding system in accordance with some embodiments of the present disclosure;

[0025] FIG. 2 illustrates a block diagram of an example video encoder in accordance with some embodiments of the present disclosure;

[0026] FIG. 3 illustrates a block diagram of an example video decoder in accordance with some embodiments of the present disclosure;

[0027] FIG. 4A and FIG. 4B illustrates control point based affine motion model, respectively;

[0028] FIG. 5 illustrates affine MVF per subblock;

[0029] FIG. 6 illustrates locations of inherited affine motion predictors;

[0030] FIG. 7 illustrates control point motion vector inheritance;

[0031] FIG. 8 illustrates locations of Candidates position for constructed affine merge mode;

[0032] FIG. 9 illustrates an illustration of motion vector usage for proposed combined method;

[0033] FIG. 10 illustrates subblock MV VSB and pixel Δv (i, j) ;

[0034] FIG. 11A and FIG. 11B illustrate the SbTMVP process in VVC, respectively;

[0035] FIG. 12A and FIG. 12B illustrate the first HPT and the second HPT, respectively;

[0036] FIG. 13A illustrates spatial neighbors for deriving inherited candidates;

[0037] FIG. 13B illustrates spatial neighbors for deriving the first type of constructed candidates;

[0038] FIG. 14 illustrates an illustration from non-adjacent neighbors to the first type of constructed affine merge / AMVP candidates;

[0039] FIG. 15 illustrates an illustration of the neighboring 4 x 4 subblocks that are used for RMVF parameter derivation;

[0040] FIG. 16A to FIG. 16C illustrate an illustration of possible MVs of the proposed mode, respectively;

[0041] FIG. 17 illustrates additional directions along k×π / 8 diagonal angles;

[0042] FIG. 18 illustrates positions of spatial merge candidate;

[0043] FIG. 19 illustrates candidate pairs considered for redundancy check of spatial merge candidates;

[0044] FIG. 20 illustrates an illustration of motion vector scaling for temporal merge candidate;

[0045] FIG. 21 illustrates candidate positions for temporal merge candidate, C0 and C1;

[0046] FIG. 22 illustrates spatial neighboring blocks used to derive the spatial merge candidates;

[0047] FIG. 23 illustrates an illustration of virtual block in the ith search round;

[0048] FIG. 24 illustrates the non-adjacent spatial neighboring blocks of the first two search rounds;

[0049] FIG. 25 illustrates subblock templates generation of SbTMVP;

[0050] FIG. 26 illustrates non-adjacent temporal neighboring blocks used to derive the non-adjacent temporal merge candidates;

[0051] FIG. 27 illustrates an example of derivation of CMVP candidate;

[0052] FIG. 28 illustrates the operation of referencing source and destination of tracing MVs in CMVP;

[0053] FIG. 29 illustrates template matching performs on a search area around initial MV;

[0054] FIG. 30 illustrates decoding side motion vector refinement;

[0055] FIG. 31 illustrates diamond regions in the search area;

[0056] FIG. 32 illustrates the extended CU region used in BDOF;

[0057] FIG. 33 illustrates the ramp function for the weights for GPM blending based on the displacement (d) from a predicted sample position to the GPM partitioning boundary and the blending area size (τ) ;

[0058] FIG. 34A to FIG. 34D illustrate GPM with inter and intra prediction, respectively;

[0059] FIG. 35 illustrates the edge on templates;

[0060] FIG. 36 illustrates template and reference samples of the template in reference pictures;

[0061] FIG. 37 illustrates template and reference samples of the template for block with sub-block motion using the motion information of the subblocks of the current block;

[0062] FIG. 38 illustrates proposed zero candidates exclusion of the ARMC process;

[0063] FIG. 39 illustrates an example of how to derive AR-BVP;

[0064] FIG. 40 illustrates the five positions in Bn (n is set to 1) ;

[0065] FIG. 41 illustrates padding candidates for the replacement of the zero-vector in the IBC list;

[0066] FIG. 42 illustrates IBC candidate clustering based on the L2 distance and the TM cost;

[0067] FIG. 43 illustrates intra template matching search area used;

[0068] FIG. 44 illustrates the use of IntraTMP block vector for IBC block;

[0069] FIG. 45 illustrates non-adjacent spatial neighboring candidates for OBIC mode;

[0070] FIG. 46 illustrates three EIP filter shapes;

[0071] FIG. 47A to FIG. 47C illustrate three types of reconstructed area for EIP filter;

[0072] FIG. 48 illustrates top and left neighboring blocks used in CIIP weight derivation;

[0073] FIG. 49A and FIG. 49B illustrate the division method for angular modes, respectively;

[0074] FIG. 50 illustrates spatial GPM candidates;

[0075] FIG. 51 illustrates a GPM template;

[0076] FIG. 52 illustrates a GPM blending;

[0077] FIG. 53 illustrates a flowchart of a method for video processing in accordance with some embodiments of the present disclosure;

[0078] FIG. 54 illustrates a flowchart of a method for video processing in accordance with some further embodiments of the present disclosure;

[0079] FIG. 55 illustrates a flowchart of a method for video processing in accordance with some other embodiments of the present disclosure; and

[0080] FIG. 56 illustrates a block diagram of a computing device in which various embodiments of the present disclosure can be implemented.

[0081] Throughout the drawings, the same or similar reference numerals usually refer to the same or similar elements.DETAILED DESCRIPTION

[0082] Principle of the present disclosure will now be described with reference to some embodiments. It is to be understood that these embodiments are described only for the purpose of illustration and help those skilled in the art to understand and implement the present disclosure, without suggesting any limitation as to the scope of the disclosure. The disclosure described herein can be implemented in various manners other than the ones described below.

[0083] In the following description and claims, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skills in the art to which this disclosure belongs.

[0084] References in the present disclosure to “one embodiment, ” “an embodiment, ” “an example embodiment, ” and the like indicate that the embodiment described may include a particular feature, structure, or characteristic, but it is not necessary that every embodiment includes the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an example embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.

[0085] It shall be understood that although the terms “first” and “second” etc. may be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element, and similarly, a second element could be termed a first element, without departing from the scope of example embodiments. As used herein, the term “and / or” includes any and all combinations of one or more of the listed terms.

[0086] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a” , “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” , “comprising” , “has” , “having” , “includes” and / or “including” , when used herein, specify the presence of stated features, elements, and / or components etc., but do not preclude the presence or addition of one or more other features, elements, components and / or combinations thereof. Example Environment

[0087] FIG. 1 is a block diagram that illustrates an example video coding system 100 that may utilize the techniques of this disclosure. As shown, the video coding system 100 may include a source device 110 and a destination device 120. The source device 110 can be also referred to as a video encoding device, and the destination device 120 can be also referred to as a video decoding device. In operation, the source device 110 can be configured to generate encoded video data and the destination device 120 can be configured to decode the encoded video data generated by the source device 110. The source device 110 may include a video source 112, a video encoder 114, and an input / output (I / O) interface 116.

[0088] The video source 112 may include a source such as a video capture device. Examples of the video capture device include, but are not limited to, an interface to receive video data from a video content provider, a computer graphics system for generating video data, and / or a combination thereof.

[0089] The video data may comprise one or more pictures. The video encoder 114 encodes the video data from the video source 112 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. The I / O interface 116 may include a modulator / demodulator and / or a transmitter. The encoded video data may be transmitted directly to destination device 120 via the I / O interface 116 through the network 130A. The encoded video data may also be stored onto a storage medium / server 130B for access by destination device 120.

[0090] The destination device 120 may include an I / O interface 126, a video decoder 124, and a display device 122. The I / O interface 126 may include a receiver and / or a modem. The I / O interface 126 may acquire encoded video data from the source device 110 or the storage medium / server 130B. The video decoder 124 may decode the encoded video data. The display device 122 may display the decoded video data to a user. The display device 122 may be integrated with the destination device 120, or may be external to the destination device 120 which is configured to interface with an external display device.

[0091] The video encoder 114 and the video decoder 124 may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding (VVC) standard and other current and / or further standards.

[0092] FIG. 2 is a block diagram illustrating an example of a video encoder 200, which may be an example of the video encoder 114 in the system 100 illustrated in FIG. 1, in accordance with some embodiments of the present disclosure.

[0093] The video encoder 200 may be configured to implement any or all of the techniques of this disclosure. In the example of FIG. 2, the video encoder 200 includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video encoder 200. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

[0094] In some embodiments, the video encoder 200 may include a partition unit 201, a prediction unit 202 which may include a mode select unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-prediction unit 206, a residual generation unit 207, a transform unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transform unit 211, a reconstruction unit 212, a buffer 213, and an entropy encoding unit 214.

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

[0096] Furthermore, although some components, such as the motion estimation unit 204 and the motion compensation unit 205, may be integrated, but are represented in the example of FIG. 2 separately for purposes of explanation.

[0097] The partition unit 201 may partition a picture into one or more video blocks. The video encoder 200 and the video decoder 300 may support various video block sizes.

[0098] The mode select unit 203 may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra-coded or inter-coded block to a residual generation unit 207 to generate residual block data and to a reconstruction unit 212 to reconstruct the encoded block for use as a reference picture. In some examples, the mode select unit 203 may select a combined inter and intra prediction (CIIP) mode in which the prediction is based on an inter prediction signal and an intra prediction signal. The mode select unit 203 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-prediction.

[0099] To perform inter prediction on a current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing one or more reference frames from buffer 213 to the current video block. The motion compensation unit 205 may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from the buffer 213 other than the picture associated with the current video block.

[0100] The motion estimation unit 204 and the motion compensation unit 205 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. As used herein, an “I-slice” may refer to a portion of a picture composed of macroblocks, all of which are based upon macroblocks within the same picture. Further, as used herein, in some aspects, “P-slices” and “B-slices” may refer to portions of a picture composed of macroblocks that are not dependent on macroblocks in the same picture.

[0101] In some examples, the motion estimation unit 204 may perform uni-directional prediction for the current video block, and the motion estimation unit 204 may search reference pictures of list 0 or list 1 for a reference video block for the current video block. The motion estimation unit 204 may then generate a reference index that indicates the reference picture in list 0 or list 1 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. The motion estimation unit 204 may output the reference index, a prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate the predicted video block of the current video block based on the reference video block indicated by the motion information of the current video block.

[0102] Alternatively, in other examples, the motion estimation unit 204 may perform bi-directional prediction for the current video block. The motion estimation unit 204 may search the reference pictures in list 0 for a reference video block for the current video block and may also search the reference pictures in list 1 for another reference video block for the current video block. The motion estimation unit 204 may then generate reference indexes that indicate the reference pictures in list 0 and list 1 containing the reference video blocks and motion vectors that indicate spatial displacements between the reference video blocks and the current video block. The motion estimation unit 204 may output the reference indexes and the motion vectors of the current video block as the motion information of the current video block. The motion compensation unit 205 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.

[0103] In some examples, the motion estimation unit 204 may output a full set of motion information for decoding processing of a decoder. Alternatively, in some embodiments, the motion estimation unit 204 may signal the motion information of the current video block with reference to the motion information of another video block. For example, the motion estimation unit 204 may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.

[0104] In one example, the motion estimation unit 204 may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder 300 that the current video block has the same motion information as the another video block.

[0105] In another example, the motion estimation unit 204 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 300 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.

[0106] As discussed above, video encoder 200 may predictively signal the motion vector. Two examples of predictive signaling techniques that may be implemented by video encoder 200 include advanced motion vector prediction (AMVP) and merge mode signaling.

[0107] The intra prediction unit 206 may perform intra prediction on the current video block. When the intra prediction unit 206 performs intra prediction on the current video block, the intra prediction unit 206 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.

[0108] The residual generation unit 207 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.

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

[0110] The transform unit 208 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.

[0111] After the transform unit 208 generates a transform coefficient video block associated with the current video block, the quantization unit 209 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.

[0112] The inverse quantization unit 210 and the inverse transform unit 211 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. The reconstruction unit 212 may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the prediction unit 202 to produce a reconstructed video block associated with the current video block for storage in the buffer 213.

[0113] After the reconstruction unit 212 reconstructs the video block, loop filtering operation may be performed to reduce video blocking artifacts in the video block.

[0114] The entropy encoding unit 214 may receive data from other functional components of the video encoder 200. When the entropy encoding unit 214 receives the data, the entropy encoding unit 214 may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.

[0115] FIG. 3 is a block diagram illustrating an example of a video decoder 300, which may be an example of the video decoder 124 in the system 100 illustrated in FIG. 1, in accordance with some embodiments of the present disclosure.

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

[0117] In the example of FIG. 3, the video decoder 300 includes an entropy decoding unit 301, a motion compensation unit 302, an intra prediction unit 303, an inverse quantization unit 304, an inverse transform unit 305, a reconstruction unit 306 and a buffer 307. The video decoder 300 may, in some examples, perform a decoding pass generally reciprocal to the encoding pass described with respect to video encoder 200.

[0118] The entropy decoding unit 301 may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data) . The entropy decoding unit 301 may decode the entropy coded video data, and from the entropy decoded video data, the motion compensation unit 302 may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 may, for example, determine such information by performing the AMVP and merge mode. AMVP is used, including derivation of several most probable candidates based on data from adjacent PBs and the reference picture. Motion information typically includes the horizontal and vertical motion vector displacement values, one or two reference picture indices, and, in the case of prediction regions in B slices, an identification of which reference picture list is associated with each index. As used herein, in some aspects, a “merge mode” may refer to deriving the motion information from spatially or temporally neighboring blocks.

[0119] The motion compensation unit 302 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.

[0120] The motion compensation unit 302 may use the interpolation filters as used by the video encoder 200 during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. The motion compensation unit 302 may determine the interpolation filters used by the video encoder 200 according to the received syntax information and use the interpolation filters to produce predictive blocks.

[0121] The motion compensation unit 302 may use at least part 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. As used herein, in some aspects, a “slice” may refer to a data structure that can be decoded independently from other slices of the same picture, in terms of entropy coding, signal prediction, and residual signal reconstruction. A slice can either be an entire picture or a region of a picture.

[0122] The intra prediction unit 303 may use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. The inverse quantization unit 304 inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit 301. The inverse transform unit 305 applies an inverse transform.

[0123] The reconstruction unit 306 may obtain the decoded blocks, e.g., by summing the residual blocks with the corresponding prediction blocks generated by the motion compensation unit 302 or intra-prediction unit 303. 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 the buffer 307, which provides reference blocks for subsequent motion compensation / intra prediction and also produces decoded video for presentation on a display device.

[0124] Some example embodiments of the present disclosure will be described in detailed hereinafter. It should be understood that section headings are used in the present document to facilitate ease of understanding and do not limit the embodiments disclosed in a section to only that section. Furthermore, while certain embodiments are described with reference to Versatile Video Coding or other specific video codecs, the disclosed techniques are applicable to other video coding technologies also. Furthermore, while some embodiments describe video coding steps in detail, it will be understood that corresponding steps decoding that undo the coding will be implemented by a decoder. Furthermore, the term video processing encompasses video coding or compression, video decoding or decompression and video transcoding in which video pixels are represented from one compressed format into another compressed format or at a different compressed bitrate. 1. Brief Summary The present disclosure is related to image / video coding, especially on motion candidate derivation, intra mode derivation, and parameter derivation. It may be applied to the existing video coding standard like HEVC, or the standard VVC (Versatile Video Coding) . It may be also applicable to future video coding standards or video codec. 2. Introduction Video coding standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. The ITU-T produced H. 261 and H. 263, ISO / IEC produced MPEG-1 and MPEG-4 Visual, and the two organizations jointly produced the H. 262 / MPEG-2 Video and H. 264 / MPEG-4 Advanced Video Coding (AVC) and H. 265 / HEVC standards. Since H. 262, 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, the Joint Video Exploration Team (JVET) was founded by VCEG and MPEG jointly in 2015. The JVET meeting is concurrently held once every quarter, and the new video coding standard was officially named as Versatile Video Coding (VVC) in the April 2018 JVET meeting, and the first version of VVC test model (VTM) was released at that time. The VVC working draft and test model VTM are then updated after every meeting. The VVC project achieved technical completion (FDIS) at the July 2020 meeting. In January 2021, JVET established an Exploration Experiment (EE) , targeting at enhanced compression efficiency beyond VVC capability with novel traditional algorithms. Soon later, ECM was built as the common software base for longer-term exploration work towards the next generation video coding standard. 2.1. Affine motion compensated prediction 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 block-based affine transform motion compensation prediction is applied. As shown FIG. 4A and FIG. 4B, the affine motion field of the block is described by motion information of two control point (4-parameter) or three control point motion vectors (6-parameter) . For 4-parameter affine motion model, motion vector at sample location (x, y) in a block is derived as: For 6-parameter affine motion model, motion vector at sample location (x, y) in a block is derived as: Where (mv0x, mv0y) is motion vector of the top-left corner control point, (mv1x, mv1y) is motion vector of the top-right corner control point, and (mv2x, mv2y) is motion vector of the bottom-left corner control point. In order to simplify the motion compensation prediction, block based affine transform prediction is applied. To derive motion vector of each 4×4 luma subblock, the motion vector of the center sample of each subblock, as shown in FIG. 5, is calculated according to above equations, and rounded to 1 / 16 fraction accuracy. Then the motion compensation interpolation filters are applied to generate the prediction of each subblock with derived motion vector. The subblock size of chroma-components is also set to be 4×4. The MV of a 4×4 chroma subblock is calculated as the average of the MVs of the top-left and bottom-right luma subblocks in the collocated 8x8 luma region. As done for translational motion inter prediction, there are also two affine motion inter prediction modes: affine merge mode and affine AMVP mode. 2.1.1. Affine merge prediction AF_MERGE mode can be applied for CUs with both width and height larger than or equal to 8. In this mode the CPMVs of the current CU is generated based on the motion information of the spatial neighboring CUs. There can be up to five CPMVP candidates and an index is signalled to indicate the one to be used for the current CU. The following three types of CPMV candidate are used to form the affine merge candidate list: – Inherited affine merge candidates that extrapolated from the CPMVs of the neighbour CUs; – Constructed affine merge candidates CPMVPs that are derived using the translational MVs of the neighbour CU; – Zero MVs. In VVC, there are maximum two inherited affine candidates, which are derived from affine motion model of the neighboring blocks, one from left neighboring CUs and one from above neighboring CUs. The candidate blocks are shown in FIG. 6. For the left predictor, the scan order is A1->A0, and for the above predictor, the scan order is B1->B0->B2. Only the first inherited candidate from each side is selected. No pruning check is performed between two inherited candidates. When a neighboring affine CU is identified, its control point motion vectors are used to derived the CPMVP candidate in the affine merge list of the current CU. As shown in FIG. 7, if the neighbour left bottom block A is coded in affine mode, the motion vectors v2 , v3 and v4 of the top left corner, above right corner and left bottom corner of the CU which contains the block A are attained. When block A is coded with 4-parameter affine model, the two CPMVs of the current CU are calculated according to v2, and v3. In case that block A is coded with 6-parameter affine model, the three CPMVs of the current CU are calculated according to v2 , v3 and v4. Constructed affine candidate means the candidate is constructed by combining the neighbor translational motion information of each control point. The motion information for the control points is derived from the specified spatial neighbors and temporal neighbor shown in FIG. 5. CPMVk (k=1, 2, 3, 4) represents the k-th control point. For CPMV1, the B2->B3->A2 blocks are checked and the MV of the first available block is used. For CPMV2, the B1->B0 blocks are checked and for CPMV3, the A1->A0 blocks are checked. For TMVP is used as CPMV4 if it’s available. After MVs of four control points are attained, affine merge candidates are constructed based on those motion information. The following combinations of control point MVs are used to construct in order: {CPMV1, CPMV2, CPMV3} , {CPMV1, CPMV2, CPMV4} , {CPMV1, CPMV3, CPMV4} , {CPMV2, CPMV3, CPMV4} , {CPMV1, CPMV2} , {CPMV1, CPMV3} . The combination of 3 CPMVs constructs a 6-parameter affine merge candidate and the combination of 2 CPMVs constructs a 4-parameter affine merge candidate. To avoid motion scaling process, if the reference indices of control points are different, the related combination of control point MVs is discarded. After inherited affine merge candidates and constructed affine merge candidate are checked, if the list is still not full, zero MVs are inserted to the end of the list. 2.1.2. Affine AMVP prediction Affine AMVP mode can be applied for CUs with both width and height larger than or equal to 16. An affine flag in CU level is signalled in the bitstream to indicate whether affine AMVP mode is used and then another flag is signalled to indicate whether 4-parameter affine or 6-parameter affine. In this mode, the difference of the CPMVs of current CU and their predictors CPMVPs is signalled in the bitstream. The affine AVMP candidate list size is 2 and it is generated by using the following four types of CPVM candidate in order: – Inherited affine AMVP candidates that extrapolated from the CPMVs of the neighbour CUs; – Constructed affine AMVP candidates CPMVPs that are derived using the translational MVs of the neighbour CUs; – Translational MVs from neighboring CUs; – Zero MVs. The checking order of inherited affine AMVP candidates is same to the checking order of inherited affine merge candidates. The only difference is that, for AVMP candidate, only the affine CU that has the same reference picture as in current block is considered. No pruning process is applied when inserting an inherited affine motion predictor into the candidate list. Constructed AMVP candidate is derived from the specified spatial neighbors shown in FIG. 5. The same checking order is used as done in affine merge candidate construction. In addition, reference picture index of the neighboring block is also checked. The first block in the checking order that is inter coded and has the same reference picture as in current CUs is used. There is only one When the current CU is coded with 4-parameter affine mode, and mv0 and mv1 are both availlalbe, they are added as one candidate in the affine AMVP list. When the current CU is coded with 6-parameter affine mode, and all three CPMVs are available, they are added as one candidate in the affine AMVP list. Otherwise, constructed AMVP candidate is set as unavailable. If affine AMVP list candidates is still less than 2 after valid inherited affine AMVP candidates and constructed AMVP candidate are inserted, mv0, mv1 and mv2 will be added, in order, as the translational MVs to predict all control point MVs of the current CU, when available. Finally, zero MVs are used to fill the affine AMVP list if it is still not full. 2.1.3. Affine motion information storage In VVC, the CPMVs of affine CUs are stored in a separate buffer. The stored CPMVs are only used to generate the inherited CPMVPs in affine merge mode and affine AMVP mode for the lately coded CUs. The subblock MVs derived from CPMVs are used for motion compensation, MV derivation of merge / AMVP list of translational MVs and deblocking. To avoid the picture line buffer for the additional CPMVs, affine motion data inheritance from the CUs from above CTU is treated differently to the inheritance from the normal neighboring CUs. If the candidate CU for affine motion data inheritance is in the above CTU line, the bottom-left and bottom-right subblock MVs in the line buffer instead of the CPMVs are used for the affine MVP derivation. In this way, the CPMVs are only stored in local buffer. If the candidate CU is 6-parameter affine coded, the affine model is degraded to 4-parameter model. As shown in FIG. 9, along the top CTU boundary, the bottom-left and bottom right subblock motion vectors of a CU are used for affine inheritance of the CUs in bottom CTUs. 2.1.4. Prediction refinement with optical flow for affine mode Subblock based affine motion compensation can save memory access bandwidth and reduce computation complexity compared to pixel based motion compensation, at the cost of prediction accuracy penalty. To achieve a finer granularity of motion compensation, prediction refinement with optical flow (PROF) is used to refine the subblock based affine motion compensated prediction without increasing the memory access bandwidth for motion compensation. In VVC, after the subblock based affine motion compensation is performed, luma prediction sample is refined by adding a difference derived by the optical flow equation. The PROF is described as following four steps: Step 1) The subblock-based affine motion compensation is performed to generate subblock prediction I (j, j) . Step2) The spatial gradients gx (i, j) and gy (i, j) of the subblock prediction are calculated at each sample location using a 3-tap filter [-1, 0, 1] . The gradient calculation is exactly the same as gradient calculation in BDOF. gx (i, j) = (I (i+1, j) >>shift1) - (I (i-1, j) >>shift1)  (2-3) gy (i, j) = (I (i, j+1) >>shift1) - (I (i, j-1) >>shift1)   (2-4) shift1 is used to control the gradient’s precision. The subblock (i.e. 4x4) prediction is extended by one sample on each side for the gradient calculation. To avoid additional memory bandwidth and additional interpolation computation, those extended samples on the extended borders are copied from the nearest integer pixel position in the reference picture. Step 3) The luma prediction refinement is calculated by the following optical flow equation. ΔI (i, j) = gx (i, j) *Δvx (i, j) +gy (i, j) *Δvy (i, j)   (2-5) where the Δv (i, j) is the difference between sample MV computed for sample location (i, j) , denoted by v (i, j) , and the subblock MV of the subblock to which sample (i, j) belongs, as shown in FIG. 10. The Δv (i, j) is quantized in the unit of 1 / 32 luam sample precision. Since the affine model parameters and the sample location relative to the subblock center are not changed from subblock to subblock, Δv (i, j) can be calculated for the first subblock, and reused for other subblocks in the same CU. Let dx (i, j) and dy (i, j) be the horizontal and vertical offset from the sample location (i, j) to the center of the subblock (xSB, ySB) , Δv (x, y) can be derived by the following equation, In order to keep accuracy, the enter of the subblock (xSB, ySB) is calculated as ( (WSB -1 )  / 2, (HSB -1 )  / 2 ) , where WSB and HSB are the subblock width and height, respectively. For 4-parameter affine model, For 6-parameter affine model, where (v0x, v0y) , (v1x, v1y) , (v2x, v2y) are the top-left, top-right and bottom-left control point motion vectors, w and h are the width and height of the CU. Step 4) Finally, the luma prediction refinement ΔI (i, j) is added to the subblock prediction I (i, j) . The final prediction I’ is generated as the following equation. I′ (i, j) = I (i, j) +ΔI (i, j)  PROF is not be applied in two cases for an affine coded CU: 1) all control point MVs are the same, which indicates the CU only has translational motion; 2) the affine motion parameters are greater than a specified limit because the subblock based affine MC is degraded to CU based MC to avoid large memory access bandwidth requirement. A fast encoding method is applied to reduce the encoding complexity of affine motion estimation with PROF. PROF is not applied at affine motion estimation stage in following two situations: a) if this CU is not the root block and its parent block does not select the affine mode as its best mode, PROF is not applied since the possibility for current CU to select the affine mode as best mode is low; b) if the magnitude of four affine parameters (C, D, E, F) are all smaller than a predefined threshold and the current picture is not a low delay picture, PROF is not applied because the improvement introduced by PROF is small for this case. In this way, the affine motion estimation with PROF can be accelerated. 2.1.5. Adaptive bypass of affine ME If enabled using the VTM encoder parameter AdaptBypassAffineMe, adaptive bypass of affine ME is used as an encoder only operation used to speed up encoding. Before performing affine ME for a CU, the coding modes of its five spatial neighbours (above, left, above-right, bottom-left, above-left) are checked. If the number of available neighbours is greater than or equal to 4 and none of them are coded as affine or SbTMVP mode, affine ME is bypassed. In addition following two conditions are considered. 1) If a CU is no larger than 16x16, affine ME is not bypassed. 2) If the best mode for a CU is affine merge so far, and the current picture does not have symmetric reference pair (SMVD condition) or the absolute temporal distance between the current picture and SMVD reference is larger than 1, affine ME is not bypassed. 2.1.6. Pixel based affine motion compensation The minimum affine subblock size is changed from 4x4 to 1x1 for both luma and chroma components, 1x1 subblock size allows pixel based affine MC. When affine subblock width or height is smaller than 4, PROF is disabled. 2.2. Subblock-based temporal motion vector prediction (SbTMVP) VVC supports the subblock-based temporal motion vector prediction (SbTMVP) method. Similar to the temporal motion vector prediction (TMVP) in HEVC, SbTMVP uses the motion field in the collocated picture to improve motion vector prediction and merge mode for CUs in the current picture. The same collocated picture used by TMVP is used for SbTVMP. SbTMVP differs from TMVP in the following two main aspects: – TMVP predicts motion at CU level but SbTMVP predicts motion at sub-CU level; – Whereas TMVP fetches the temporal motion vectors from the collocated block in the collocated picture (the collocated block is the bottom-right or center block relative to the current CU) , SbTMVP applies a motion shift before fetching the temporal motion information from the collocated picture, where the motion shift is obtained from the motion vector from one of the spatial neighboring blocks of the current CU. The SbTVMP process is illustrated in FIG. 11A and FIG. 11B. SbTMVP predicts the motion vectors of the sub-CUs within the current CU in two steps. In the first step, the spatial neighbor A1 in FIG. 11A is examined. If A1 has a motion vector that uses the collocated picture as its reference picture, this motion vector is selected to be the motion shift to be applied. If no such motion is identified, then the motion shift is set to (0, 0) . In the second step, the motion shift identified in Step 1 is applied (i.e. added to the current block’s coordinates) to obtain sub-CU level motion information (motion vectors and reference indices) from the collocated picture as shown in FIG. 11B. The example in FIG. 11B assumes the motion shift is set to block A1’s motion. Then, for each sub-CU, the motion information of its corresponding block (the smallest motion grid that covers the center sample) in the collocated picture is used to derive the motion information for the sub-CU. After the motion information of the collocated sub-CU is identified, it is converted to the motion vectors and reference indices of the current sub-CU in a similar way as the TMVP process of HEVC, where temporal motion scaling is applied to align the reference pictures of the temporal motion vectors to those of the current CU. In VVC, a combined subblock based merge list which contains both SbTVMP candidate and affine merge candidates is used for the signalling of subblock based merge mode. The SbTVMP mode is enabled / disabled by a sequence parameter set (SPS) flag. If the SbTMVP mode is enabled, the SbTMVP predictor is added as the first entry of the list of subblock based merge candidates, and followed by the affine merge candidates. The size of subblock based merge list is signalled in SPS and the maximum allowed size of the subblock based merge list is 5 in VVC. The sub-CU size used in SbTMVP is fixed to be 8x8, and as done for affine merge mode, SbTMVP mode is only applicable to the CU with both width and height are larger than or equal to 8. The encoding logic of the additional SbTMVP merge candidate is the same as for the other merge candidates, that is, for each CU in P or B slice, an additional RD check is performed to decide whether to use the SbTMVP candidate. 2.3. History-parameter-based affine model inheritance and non-adjacent affine mode History-parameter-based affine model inheritance (HAMI) allows the affine model to be inherited from a previously affine-coded block which may not be neighboring to the current block. Similar to the enhanced regular merge mode, non-adjacent affine mode (NA-AFF) is introduced. A first history-parameter table (HPT) is established. An entry of the first HPT stores a set of affine parameters: a, b, c and d, each of which is represented by a 16-bit signed integer. Entries in HPT is categorized by reference list and reference index. Five reference indices are supported for each reference list in HPT. In a formular way, the category of HPT (denoted as HPTCat) is calculated as HPTCat (RefList, RefIdx) = 5×RefList + min (RefIdx, 4) , wherein RefList and RefIdx represents a reference picture list (0 or 1) and a reference index, respectively. For each category, at most seven entries can be stored, resulting in 70 entries totally in HPT. At the beginning of each CTU row, the number of entries for each category is initialized as zero. After decoding an affine-coded CU with reference list RefListcur and RefIdxcur, the affine parameters are utilized to update entries in the category HPTCat (RefListcur, RefIdxcur) in a way similar to HMVP table updating. A history-affine-parameter-based candidate (HAPC) is derived from one of the seven neighbouring 4×4 blocks denoted as A0, A1, A2, B0, B1, B2 or B3 in FIG. 8 and a set of affine parameters stored in a corresponding entry in the first HPT. The MV of a neighbouring 4×4 block served as the base MV. In a formulating way, the MV of the current block at position (x, y) is calculated as: where (mvhbase, mvvbase) represents the MV of the neighbouring 4×4 block, (xbase, ybase) represents the center position of the neighbouring 4×4 block. (x, y) can be the top-left, top-right and bottom-left corner of the current block to obtain the corner-position MVs (CPMVs) for the current block, or it can be the center of the current block to obtain a regular MV for the current block. A second history-parameter table (HPT) with base MV information is also appended. There are nine entries in the second HPT, wherein an entry comprises a base MV, a reference index and four affine parameters for each reference list, and a base position. An additional merge HAPC can be generated from the second HPT with the base MV information the corresponding affine models stored in an entry. The difference between the first HPT and the second HPT is illustrated in FIG. 12A and FIG. 12B. Moreover, pair-wised affine merge candidates are generated by two affine merge candidates which are history-derived or not history-derived. A pair-wised affine merge candidates is generated by averaging the CPMVs of existing affine merge candidates in the list. As a response to new HAPCs being introduced, the size of sub-block-based merge candidate list is increased from five to fifteen, which are all involved in the ARMC process. In NA-AFF, the pattern of obtaining non-adjacent spatial neighbors is shown in FIG. 22. Same as the existing non-adjacent regular merge candidates, the distances between non-adjacent spatial neighbors and current coding block in the NA-AFF are also defined based on the width and height of current CU. The motion information of the non-adjacent spatial neighbors in FIG. 22 is utilized to generate additional inherited and constructed affine merge / AMVP candidates. Specifically, for inherited candidates, the same derivation process of the inherited affine merge / AMVP candidates in the VVC is kept unchanged except that the CPMVs are inherited from non-adjacent spatial neighbors. The non-adjacent spatial neighbors are checked based on their distances to the current block, i.e., from near to far. At a specific distance, only the first available neighbor (that is coded with the affine mode) from each side (e.g., the left and above) of the current block is included for inherited candidate derivation. As indicated by the red dash arrows in FIG. 13A, the checking orders of the neighbors on the left and above sides are bottom-to-up and right-to-left, respectively. For the first type of constructed candidates, as shown in the FIG. 13B, the positions of one left and above non-adjacent spatial neighbors are firstly determined independently; After that, the location of the top-left neighbor can be determined accordingly which can enclose a rectangular virtual block together with the left and above non-adjacent neighbors. Then, as shown in the FIG. 14, the motion information of the three non-adjacent neighbors is used to form the CPMVs at the top-left (A) , top-right (B) and bottom-left (C) of the virtual block, which is finally projected to the current CU to generate the corresponding constructed candidates. The NA-AFF candidates are inserted into the existing affine merge candidate list and affine AMVP candidate list according to the following orders:Affine merge mode: 1. SbTMVP candidate, if available; 2. Inherited from adjacent neighbors; 3. Inherited from non-adjacent neighbors; 4. Constructed from adjacent neighbors; 5. The first type of constructed affine candidates from non-adjacent neighbors; 6. Zero MVs.Affine AMVP mode: 1. Inherited from adjacent neighbors; 2. Constructed from adjacent neighbors; 3. Translational MVs from adjacent neighbors; 4. Translational MVs from temporal neighbors; 5. Inherited from non-adjacent neighbors; 6. The first type of constructed affine candidates from non-adjacent neighbors; 7. Zero MVs. Due to the inclusion of the additional candidates generated by NA-AFF, the size of the affine merge candidate list is increased from 5 to 15. The subgroup size of ARMC for the affine merge mode is increased from 3 to 15. In NA-AFF: 1. The area from where the non-adjacent neighbors come is restricted to be within the current CTU (i.e., no additional storage requirements for line buffer) . 2. The storage granularity for affine motion information, including CPMVs and reference indexes, is reduced from 8x8 to 16x16 (i.e., only the affine motion from the top-left 8x8 block is saved) . Additionally, the saved CPMVs are projected to each 16x16 block before storage, such that the position and size information are not needed. 3. Only the top-left and top-right CPMVs are stored (i.e., always using 4-parameter affine model for NA-AFF) . 2.4. Affine candidates derived from temporal collocated pictures It is proposed to add the affine candidates derived from temporal collocated pictures into current affine merge candidate list. The same sampling grid used by regular inter merge mode is reused to scan the predefined positions in the collocated pictures for deriving the proposed affine candidates. Specifically, if the scanned position belongs to one affine coded CU, one new affine candidate is derived by scaling its CPMVs to the current CU based on its position and block-size in the collocated picture. In the current design, the derived new affine candidates are inserted into the existing affine merge list and reordered together with the other affine merge candidates through the ARMC. The number of the final output affine merge candidates after the ARMC is kept unchanged. 2.5. Regression based affine candidate derivation The Regression based Motion Vector Field (RMVF) derivation method provides a new variety of subblock-based merge candidate. The motion vectors and center positions from the neighboring subblocks of the current CU, as illustrated in FIG. 15, are used as the input to the linear regression process to derive a set of linear model parameters. The subblock motion field from a previous coded affine CU and the motion vectors from the adjacent subblocks of current CU are used as the input for the regression process. The predicted CPMVs for current block are derived as output. The regression based affine merge candidates are derived and added to the affine merge list. Subblock motion field from a previously coded affine CU and motion information from adjacent subblocks of a current CU are used as the input to the regression process to derive proposed affine candidates. The previously coded affine CU can be identified from scanning through non-adjacent positions and the affine HMVP table. Adjacent subblock information of current CU is fetched from 4x4 sub-blocks represented by the grey zone as depicted in FIG. 15. For each sub-block, given a reference list, the corresponding motion vector and center coordinate of the sub-block may be used. For each affine CU, up to 2 affine candidates can be derived. One with adjacent subblock information and one without. All the linear-regression-generated candidates are pruned and collected into one candidate sub-group, TM cost based ARMC process is applied when ARMC is enabled. Afterwards, up to N linear-regression-generated candidates are added to the affine merge list when N affine CUs are found. The number of affine candidates for ARMC is 30, the output list size is 15. 2.6. Affine MMVD In affine MMVD, an affine merge candidate (which is called, base affine merge candidate) is selected, the MVs of the control points are further refined by the signalled MVD information. The MVD information for the MVs of all the control points are the same in one prediction direction. When the starting MVs is bi-prediction MVs with the two MVs point to the different sides of the current picture (i.e. the POC of one reference is larger than the POC of the current picture, and the POC of the other reference is smaller than the POC of the current picture) , the MV offset added to the list0 MV component of starting MV and the MV offset for the list1 MV has opposite value; otherwise, when the starting MVs is bi-prediction MVs with both lists point to the same side of the current picture (i.e. POCs of two references are both larger than the POC of the current picture, or are both smaller than the POC of the current picture) , the MV offset added to the list0 MV component of starting MV and the MV offset for the list1 MV are the same. 2.7. DMVR for affine merge coded blocks DMVR is applied to affine merge coded blocks (i.e., affine-DMVR mode) and affine MMVD coded blocks (i.e., affine-DMVR-MMVD mode) when DMVR condition is satisfied. It is also extended to adaptive BM merge mode (i.e., adaptive affine-DMVR mode) . An affine motion field is modelized as follows (6-parameters affine case) : wherein (mvx, mvy) is the motion vector at location (x, y) and (mv0x, mv0y) is the base MV representing the translation motion of the affine model. Parameters and represent the non-translation parameters (rotation, scaling) . Motion vectors (mv0x, mv0y) , (mv1x, mv1y) and (mv2x, mv2y) are called the control point motion vectors (CPMVs) of the considered affine coding unit. In the DMVR process applied to affine, the bilateral matching cost is calculated per subblock. Then, the subblock bilateral matching costs and refined subblock MVs are used to determine the overall best refined CPMVs for the affine block. More specific, the CPMVs are refined according to the following steps: 1) Perform integer-pel bilateral matching for subblocks. Accumulate the subblock bilateral matching cost to determine the best integer-pel MV offset. 2) Perform half-pel bilateral matching search using the best integer MV offset as initial offset and output the best MV offset that minimizes the bilateral matching cost for the same set of the subblocks of step 1. 3) Perform linear regression using the refined subblock MVs from step 1 as input and output a set of control-point motion vectors. 4) Compare the bilateral matching cost of the output of the steps 2 and 3 to select the one with the smallest cost. In addition, the non-translation parameters of affine model are refined after the base MV are determined. Each of CPMVs is fixed as base MV in turn, and an offset is added to the non-translation parameter of affine model by minimizing the bilateral matching cost, and then the other two CPMVs are calculated according to based MV and refined non-translation parameters. For affine merge and affine MMVD modes, both CPMVs and non-translation parameters refinements are applied. When applying to affine MMVD mode, the MMVD offset is added to the affine DMVR refined affine merge base candidate if the base candidate meets the affine DMVR refinement condition. For adaptive BM merge mode, an affine merge list that only contains affine merge candidates that meet the affine DMVR conditions are constructed and then CPMVs refinement and non-translation parameters refinment are applied. 2.8. Affine subblock BDOF refinement BDOF subblock MV refinement and sample adjustment is applied to an affine or SbTMVP coded block with subblock MC when BDOF condition is satisfied. An affine coded block, e.g. affine regular merge mode, affine BM merge mode, affine AMVP mode, derives MVs for each 4×4 subblock from the affine model. The BDOF process starts with the 4×4 subblocks grouping with identical MVs. The first iteration of BDOF MV refinement is processed in 8x8 subblock grid as in ECM-10.0. When the grouped subblock size is less than 256, the second iteration of BDOF MV refinement is processed in 4×4 subblock grid, and otherwise in 8×8 subblock grid. When the grouped subblock size is 4xN or Nx4, the first iteration of BDOF MV refinement is bypassed. 2.9. AMVP with SbTMVP mode The concept of SbTMVP mode is extended to AMVP. Given a CU coded in AMVP with SbTMVP mode, the CU is predicted in a similar way as that of SbTMVP in merge mode except that the motion shift is signaled in the bitstream instead of being derived from neighboring blocks The motion shift is obtained using MVP with a signaled MVD. The number of MVDs is determined according to the percentage of the area of the blocks coded in the the AMVP with SbTMVP mode in the previous coded picture with the same temporal layer as follows: - If the current picture is the first coded picture in a temporal layer, the number of MVD is set to 8, as shown in FIG. 16A. - Otherwise, if the percentage of the area of the proposed mode is smaller than 4%, the number of MVD is set to 4, as shown in FIG. 16B. - Otherwise, if the percentage of the area of the proposed mode is smaller than 7%, the number of MVD is set to 8, as shown in FIG. 16A. - Otherwise, the number of MVD is set to 12, as shown in FIG. 16C. Same as SbTMVP mode, the CU is split into 4x4 subblocks, and each subblock derives its own motion from a corresponding subblock in the collocated picture. One collocated picture is used for non-low delay pictures, whereas two collocated pictures are used for low delay pictures. When deriving the motion for subblocks, the reference pictures are fixed to the one with the reference picture index equal to 0. When the AMVP with SbTMVP mode is applied to the CU, LIC and MHP are always disabled, and OBMC is always enabled for the CU. Besides, the AMVR is enabled for picture resolution larger than or equal to 3840x2160 luma samples. When the AMVR is enabled for a AMVP with SbTMVP coded block, the MVD magnitudes are increased from {4, 8, 12} -pel to {16, 24, 32} -pel. 2.10. Subblock CIIP A subblock-based merge candidate may be used to generate the inter signal of CIIP, where the same subblock-based merge candidate list used by affine and sbTMVP is utilized. When CIIP flag is true and CIIP-TM flag is false, a subblock-based CIIP flag is signalled. If subblock-based CIIP flag is true, an index indicating specific candidate in the subblock-based merge list is signalled, and TIMD is used to generate intra signal by default thus no CIIP-PDPC flag signalled any more. 2.11. TM based reordering for MMVD and affine MMVD The MMVD offsets are extended for MMVD and affine MMVD modes. Additional refinement positions along k×π / 8 diagonal angles are added shown in FIG. 17, thus increasing the number of directions from 4 to 16. Second, based on the SAD cost between the template (one row above and one column left to the current block) and its reference for each refinement position, all the possible MMVD refinement positions (16×6) for each base candidate are reordered. Finally, the top 1 / 8 refinement positions with the smallest template SAD costs are kept as available positions, consequently for MMVD index coding. The MMVD index is binarized by the rice code with the parameter equal to 2. The affine MMVD reordering is extended, in which additional refinement positions along k×π / 4 diagonal angles are added. After reordering top 1 / 2 refinement positions with the smallest template SAD costs are kept. The first N motion candidates in the candidate list before being reordered are utilized as the base candidates for MMVD and affine MMVD. N is equal to 3 for MMVD, and [1, 3] depending on the neighboring block affine flags for affine MMVD. Two ways of adding MMVD offsets are allowed, including the ‘two-side’ and ‘one-side’ , depending on whether the offset of the other reference picture list is mirrored or directly set to zero. Which way is applied to one block is dependent on the TM cost. 2.12. Extended merge prediction In VVC, the merge candidate list is constructed by including the following five types of candidates in order: 1) Spatial MVP from spatial neighbour CUs; 2) Temporal MVP from collocated CUs; 3) History-based MVP from an FIFO table; 4) Pairwise average MVP; 5) Zero MVs. The size of merge list is signalled in sequence parameter set header and the maximum allowed size of merge list is 6. For each CU code in merge mode, an index of best merge candidate is encoded using truncated unary binarization (TU) . The first bin of the merge index is coded with context and bypass coding is used for other bins. The derivation process of each category of merge candidates is provided in this session. As done in HEVC, VVC also supports parallel derivation of the merging candidate lists for all CUs within a certain size of area. 2.12.1 Spatial candidates derivation The derivation of spatial merge candidates in VVC is same to that in HEVC except the positions of first two merge candidates are swapped. A maximum of four merge candidates are selected among candidates located in the positions depicted in FIG. 18. The order of derivation is B1, A1 B0, A0, and B2. Position B2 is considered only when one or more than one CUs of position B0, A0, B1, A1 are not available (e.g. because it belongs to another slice or tile) or is intra coded. After candidate at position A1 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. 19 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. 2.12.2 Temporal candidates derivation 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 CU belonging to the collocated reference picture. The reference picture list to be used for derivation of the co-located CU 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. 20, which is scaled from the motion vector of the co-located CU 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. The position for the temporal candidate is selected between candidates C0 and C1, as depicted in FIG. 21. If CU at position C0 is not available, is intra coded, or is outside of the current row of CTUs, position C1 is used. Otherwise, position C0 is used in the derivation of the temporal merge candidate. 2.12.3 History-based merge candidates derivation The history-based MVP (HMVP) merge candidates are added to merge list after the spatial MVP and TMVP. In this method, the motion information of a previously coded block is stored in a table and used as MVP for the current CU. The table with multiple HMVP candidates is maintained during the encoding / decoding process. The table is reset (emptied) when a new CTU row is encountered. Whenever there is a non-subblock inter-coded CU, the associated motion information is added to the last entry of the table as a new HMVP candidate. The HMVP table size S is set to be 6, which indicates up to 5 History-based MVP (HMVP) candidates may be added to the table. When inserting a new motion candidate to the table, a constrained first-in-first-out (FIFO) rule is utilized wherein redundancy check is firstly applied to find whether there is an identical HMVP in the table. If found, the identical HMVP is removed from the table and all the HMVP candidates afterwards are moved forward, and the identical HMVP is inserted to the last entry of the table. HMVP candidates could be used in the merge candidate list construction process. The latest several HMVP candidates in the table are checked in order and inserted to the candidate list after the TMVP candidate. Redundancy check is applied on the HMVP candidates to the spatial or temporal merge candidate. To reduce the number of redundancy check operations, the following simplifications are introduced: 1. The last two entries in the table are redundancy checked to A1 and B1 spatial candidates, respectively. 2. Once the total number of available merge candidates reaches the maximally allowed merge candidates minus 1, the merge candidate list construction process from HMVP is terminated. 2.12.4 Pair-wise average merge candidates derivation Pairwise average candidates are generated by averaging predefined pairs of candidates in the existing merge candidate list, using the first two merge candidates. The first merge candidate is defined as p0Cand and the second merge candidate can be defined as p1Cand, respectively. The averaged motion vectors are calculated according to the availability of the motion vector of p0Cand and p1Cand separately for each reference list. If both motion vectors are available in one list, these two motion vectors are averaged even when they point to different reference pictures, and its reference picture is set to the reference picture of p0Cand; if only one motion vector is available, use the one directly; if no motion vector is available, keep this list invalid. Also, if the half-pel interpolation filter indices of p0Cand and p1Cand are different, it is set to 0. When the merge list is not full after pair-wise average merge candidates are added, the zero MVPs are inserted in the end until the maximum merge candidate number is encountered. 2.13. New merge candidates 2.13.1. Non-adjacent spatial candidate The non-adjacent spatial merge candidates are inserted after the temporal motion vector prediction (TMVP) in the regular merge candidate list. The pattern of spatial merge candidates is shown in FIG. 22 as an example. The distances between non-adjacent spatial candidates and current coding block are based on the width and height of current coding block. The line buffer restriction is not applied. Current implementation: To derive the non-adjacent spatial candidates, it is needed to generate the virtual block. For each search round i (i>0) , a virtual block is generated based on the current block as follows: First, the relative position of the virtual block to the current block is calculated by: Offsetx =-i×gridX, Offsety = -i×gridY where the Offsetx and Offsety denote the offset of the top-left corner of the virtual block relative to the top-left corner of the current block, gridX and gridY are the width and height of the search grid. Second, the width and height of the virtual block are calculated by: newWidth = i×2×gridX+ currWidth newHeight = i×2×gridY + currHeight. where the currWidth and currHeight are the width and height of current block. The newWidth and newHeight are the width and height of new virtual block. gridX and gridY are currently set to currWidth and currHeight, respectively. FIG. 23 illustrates the relationship between the virtual block and the current block. After generating the virtual block, some spatial neighboring blocks of the virtual block are treated as the non-adjacent spatial neighboring blocks of the current block. In ECM, there are two parts of non-adjacent spatial candidates. For the first part of non-adjacent spatial candidates, there are 7 search rounds and 59 candidate positions. For the first search round, there are 5 candidate positions (candidate position 0~4) . For the remaining search rounds, there are 9 candidate positions (candidate position 0~8) . The candidate positions for search round i are as follows. candidate position 0: offsetX = offsetX0 = -currWidth*i -1; offsetY = offsetY0 = currHeight + currHeight*i -1; candidate position 1: offsetX = offsetX1 = currWidth + currWidth*i -1; offsetY = offsetY1 = -currHeight*i -1; candidate position 2: offsetX = currWidth / 2; offsetY = offsetY1; candidate position 3: offsetX = offsetX0; offsetY = currHeight / 2; candidate position 4: offsetX = offsetX0; offsetY = offsetY1; candidate position 5: offsetX = -1; offsetY = offsetY0; candidate position 6: offsetX = offsetX1; offsetY = -1; candidate position 7: offsetX = offsetX0 >> 1; offsetY = offsetY0; candidate position 8: offsetX = offsetX1; offsetY = offsetY1 >> 1; For the second part of non-adjacent spatial candidates, there are 7 search rounds and 28 candidate positions. For each search round, there are 4 candidate positions (candidate position 9~12) . The candidate positions for search round i are as follows. candidate position 9: offsetX = offsetX0 = -currWidth*i -1; offsetY = currHeight / 2 + ( (currHeight + currHeight*i -1 -currHeight / 2) >> 1) ; candidate position 10: offsetX = currWidth / 2 + ( (currWidth + currWidth*i -1 -currWidth / 2) >> 1) ; offsetY = offsetY0 = -currHeight*i -1; candidate position 11: offsetX = offsetX0; offsetY = offsetY0 + ( (currHeight / 2 -offsetY0) >> 1) ; candidate position 12: offsetX = offsetX0 + ( (currWidth / 2 -offsetX0) >> 1) ; offsetY = offsetY0; where the offsetX and offsetY denote the offset of the candidate position relative to the top-left corner of the current block. The non-adjacent spatial candidate block covers a candidate position. FIG. 24 illustrates the non-adjacent spatial neighboring blocks of the first two search rounds. 2.13.2. Temporal motion information derivation In VVC, the Temporal Motion Vector Prediction (TMVP) for the AMVP and merge mode is derived by fetching the motion information from the center or the bottom-right of the collocated block in a signaled collocated picture. Similarly, for the Subblock-based Temporal Motion Vector Prediction (SbTMVP) mode, the motion information from the left neighboring position is used as a motion shift, which is then employed to obtain TMVPs at sub-CU level. In ECM, to further improve the coding efficiency of TMVP, two aspects are modified. Firstly, two collocated pictures are utilized which are the two reference frames with the least POC distance relative to the to-be-coded frame. Secondly, the motion shift to locate TMVP is adaptively determined from multiple locations according to template costs. More specifically, two motion shift candidate lists are constructed respectively for the two collocated frames. The motion shifts with the minimum template matching cost are used to derive SbTMVP or TMVP candidates. At most 4 SbTMVP candidates are included in the sub-block-based merge list. The SbTMVP candidate with the least template matching cost derived from the first collocated frame is placed in the first entry without reordering, while other SbTMVP candidates are sorted together with affine candidates. In addition, the prediction direction of each subblock template is determined based on the center subblock. As illustrated in FIG. 25, if the center subblock is uni-predicted, then all the subblock templates are uni-predicted, and vice versa. If the motion vector of corresponding adjacent subblock at the determined reference list is not available for a subblock template, zero MV is used for that subblock template. 2.13.3. Non-adjacent temporal candidate The non-adjacent temporal positions are introduced as shown in FIG. 26 as an example, where non-adjacent temporal MVP positions locate in the same reference frame as the adjacent TMVP. The distances between non-adjacent temporal candidates and current coding block are based on the width and height of current coding block. 2.13.4. Chained motion vector prediction In this method, chained motion vector prediction (CMVP) is introduced as a new inter merge candidate list construction. As shown in FIG. 27, CMVP candidates can be derived as the accumulation of the recursively traced motion vectors (MVs) and block vectors (BVs) based on the pre-derived MVs. When deriving MVk (m) , all five-positions shown in FIG. 28 including the center, top-left, top-right, bottom-left, and bottom-right of the current block, are checked to find traced MVs or BVs. CMVP candidates are derived for each merge index, each list (i.e., L0 and L1) , and each trace depth, and they are inserted after HMVP candidates for the regular merge and TM merge. The number of traced depths to derive CMVPs is restricted to one (i.e., m=1) , the same design as auto-relocated block vector prediction (AR-BVP) . The traceable reference pictures are only within the reference picture list. Additional CMVP candidates are introduced before the zero padding candidates in the initial merge candidate list. The maximum size of the initial merge candidate list is increased by 4. The maximum number of the candidates before the original CMVP candidates is kept unchanged. When deriving the additional CMVP candidates, only the center position of the current block is checked to find traced MVs or BVs. It is proposed to add TMVP candidates with MV scaled to reference picture with index 0. The additional TMVP candidates are alco used to derive CMVP candidates. After TMVP and the related CMVP candidates are derived, ARMC reordering is performed to reduce the candidate number. It also proposes to derive CMVP candidates in BM Merge mode. 2.14. Template matching (TM) Template matching (TM) is a decoder-side MV derivation method to refine the motion information of the current CU by finding the closest match between a template (i.e., top and / or left neighbouring blocks of the current CU) in the current picture and a block (i.e., same size to the template) in a reference picture. As illustrated in FIG. 29, a better MV is searched around the initial motion of the current CU within a [–8, +8] -pel search range. The template matching method is used with the following modifications: search step size is determined based on AMVR mode and TM can be cascaded with bilateral matching process in merge modes. In AMVP mode, an MVP candidate is determined based on template matching error to select the one which reaches the minimum difference between the current block template and the reference block template, and then TM is performed only for this particular MVP candidate for MV refinement. TM refines this MVP candidate, starting from full-pel MVD precision (or 4-pel for 4-pel AMVR mode) within a [–8, +8] -pel search range by using iterative 16-point diamond search. The AMVP candidate may be further refined by using cross search with full-pel MVD precision (or 4-pel for 4-pel AMVR mode) , followed sequentially by half-pel and quarter-pel ones depending on AMVR mode as specified in Table 1. This search process ensures that the MVP candidate still keeps the same MV precision as indicated by the AMVR mode after TM process. In the search process, if the difference between the previous minimum cost and the current minimum cost in the iteration is less than a threshold that is equal to the area of the block, the search process terminates. Table 1. Search patterns of AMVR and merge mode with AMVR. In merge mode, similar search method is applied to the merge candidate indicated by the merge index. As Table 1 shows, TM may perform all the way down to 1 / 8-pel MVD precision or skipping those beyond half-pel MVD precision, depending on whether the alternative interpolation filter (that is used when AMVR is of half-pel mode) is used according to merged motion information. Besides, when TM mode is enabled, template matching may work as an independent process or an extra MV refinement process between block-based and subblock-based bilateral matching (BM) methods, depending on whether BM can be enabled or not according to its enabling condition check. When TM is applied to bi-predictive blocks, an iterative process is used. Specifically, the initial motion vectors of L0 and L1 are firstly refined and TM costs Cost0 and Cost1 are calculated for L0 and L1, respectively. When Cost0 is larger than Cost1, the refined motion vector of L1 (MV’ 1) is used to derive a further refined motion vector of L0 (MV’ 0) . Then, the MV’ 1 is further refined using MV’ 0. Similarly, when Cost0 is not larger than Cost1, the refined motion vector of L0 (MV’ 0) is used to derive a further refined motion vector of L1 (MV’ 1) , and the MV’ 0 is further refined using MV’ 1. Besides, TM for bi-prediction is enabled when DMVR condition is satisfied. 2.14.1 TM-based subblock motion refinement The template matching is applied to subblock based motion tools, including the affine and SbTMVP modes. More specifically, for an affine merge candidate, the control point motion vectors (CPMVs) are refined using TM.A same MV offset is assigned to all the CPMVs, and the TM cost of the affine candidate is calculated accordingly. The optimal CPMV offset with the minimum TM cost can be used to refine the corresponding affine candidate. Besides, a non-translation parameter refinement process is added to uni-predicted affine merge candidates. In the non-translation parameter refinement process, each of CPMVs is fixed as base MV in turn, and an offset is added to the non-translation parameter of affine model by minimizing the template matching cost. Then, the others CPMVs are calculated according to based MV and refined non-translation parameters. For a SbTMVP candidate, the initial motion shift is firstly refined with TM, and the refined motion shift will be utilized to derive subblock temporal motion information. Then, the subblock MVs are further refined with TM. During the refinement, one top row and one left column are used as the template and all the subblock MVs share the same MV offset. 2.15. Decoder side motion vector refinement (DMVR) In order to increase the accuracy of the MVs of the merge mode, a bilateral-matching (BM) based decoder side motion vector refinement is applied in VVC. In bi-prediction operation, a refined MV is searched around the initial MVs in the reference picture list L0 and reference picture list L1. The BM method calculates the distortion between the two candidate blocks in the reference picture list L0 and list L1. As illustrated in FIG. 30, the SAD between the red blocks based on each MV candidate around the initial MV is calculated. The MV candidate with the lowest SAD becomes the refined MV and used to generate the bi-predicted signal. In VVC, the application of DMVR is restricted and is only applied for the CUs which are coded with following modes and features: – CU level merge mode with bi-prediction MV; – One reference picture is in the past and another reference picture is in the future with respect to the current picture; – The distances (i.e. POC difference) from two reference pictures to the current picture are same; – Both reference pictures are short-term reference pictures; – CU has more than 64 luma samples; – Both CU height and CU width are larger than or equal to 8 luma samples; – BCW weight index indicates equal weight; – WP is not enabled for the current block; – CIIP mode is not used for the current block. The refined MV derived by DMVR process is used to generate the inter prediction samples and also used in temporal motion vector prediction for future pictures coding. While the original MV is used in deblocking process and also used in spatial motion vector prediction for future CU coding. The additional features of DMVR are mentioned in the following sub-clauses. 2.15.1 Searching scheme In DVMR, the search points are surrounding the initial MV and the MV offset obey the MV difference mirroring rule. In other words, any points that are checked by DMVR, denoted by candidate MV pair (MV0, MV1) obey the following two equations: MV0′=MV0+MV_offset MV1′=MV1-MV_offset Where MV_offset represents the refinement offset between the initial MV and the refined MV in one of the reference pictures. The refinement search range is two integer luma samples from the initial MV. The searching includes the integer sample offset search stage and fractional sample refinement stage. 25 points full search is applied for integer sample offset searching. The SAD of the initial MV pair is first calculated. If the SAD of the initial MV pair is smaller than a threshold, the integer sample stage of DMVR is terminated. Otherwise SADs of the remaining 24 points are calculated and checked in raster scanning order. The point with the smallest SAD is selected as the output of integer sample offset searching stage. To reduce the penalty of the uncertainty of DMVR refinement, it is proposed to favor the original MV during the DMVR process. The SAD between the reference blocks referred by the initial MV candidates is decreased by 1 / 4 of the SAD value. The integer sample search is followed by fractional sample refinement. To save the calculational complexity, the fractional sample refinement is derived by using parametric error surface equation, instead of additional search with SAD comparison. The fractional sample refinement is conditionally invoked based on the output of the integer sample search stage. When the integer sample search stage is terminated with center having the smallest SAD in either the first iteration or the second iteration search, the fractional sample refinement is further applied. In parametric error surface based sub-pixel offsets estimation, the center position cost and the costs at four neighboring positions from the center are used to fit a 2-D parabolic error surface equation of the following form E (x, y) =A (x-xmin) 2+B (y-ymin) 2+C where (xmin, ymin) corresponds to the fractional position with the least cost and C corresponds to the minimum cost value. By solving the above equations by using the cost value of the five search points, the (xmin, ymin) is computed as: xmin=(E (-1, 0) -E (1, 0) )  /  (2 (E (-1, 0) +E (1, 0) -2E (0, 0) ) ) ymin=(E (0, -1) -E (0, 1) )  /  (2 ( (E (0, -1) +E (0, 1) -2E (0, 0) ) ) The value of xmin and ymin are automatically constrained to be between -8 and 8 since all cost values are positive and the smallest value is E (0, 0) . This corresponds to half peal offset with 1 / 16th-pel MV accuracy in VVC. The computed fractional (xmin, ymin) are added to the integer distance refinement MV to get the sub-pixel accurate refinement delta MV. 2.15.2 Bilinear-interpolation and sample padding In VVC, the resolution of the MVs is 1 / 16 luma samples. The samples at the fractional position are interpolated using a 8-tap interpolation filter. In DMVR, the search points are surrounding the initial fractional-pel MV with integer sample offset, therefore the samples of those fractional position need to be interpolated for DMVR search process. To reduce the calculation complexity, the bi-linear interpolation filter is used to generate the fractional samples for the searching process in DMVR. Another important effect is that by using bi-linear filter is that with 2-sample search range, the DVMR does not access more reference samples compared to the normal motion compensation process. After the refined MV is attained with DMVR search process, the normal 8-tap interpolation filter is applied to generate the final prediction. In order to not access more reference samples to normal MC process, the samples, which is not needed for the interpolation process based on the original MV but is needed for the interpolation process based on the refined MV, will be padded from those available samples. 2.15.3 Maximum DMVR processing unit When the width and / or height of a CU are larger than 16 luma samples, it will be further split into subblocks with width and / or height equal to 16 luma samples. The maximum unit size for DMVR searching process is limit to 16x16. 2.16. Multi-pass decoder-side motion vector refinement A multi-pass decoder-side motion vector refinement is applied. In the first pass, bilateral matching (BM) is applied to the coding block. In the second pass, BM is applied to each 16x16 subblock within the coding block. In the third pass, MV in each 8x8 subblock is refined by applying bi-directional optical flow (BDOF) . The refined MVs are stored for both spatial and temporal motion vector prediction. 2.16.1 First pass –Block based bilateral matching MV refinement In the first pass, a refined MV is derived by applying BM to a coding block. Similar to decoder-side motion vector refinement (DMVR) , in bi-prediction operation, a refined MV is searched around the two initial MVs (MV0 and MV1) in the reference picture lists L0 and L1. The refined MVs (MV0_pass1 and MV1_pass1) are derived around the initiate MVs based on the minimum bilateral matching cost between the two reference blocks in L0 and L1. BM performs local search to derive integer sample precision intDeltaMV. The local search applies a 3×3 square search pattern to loop through the search range [–sHor, sHor] in horizontal direction and [–sVer, sVer] in vertical direction, wherein, the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8. The bilateral matching cost is calculated as: bilCost = mvDistanceCost + sadCost. When the block size cbW *cbH is greater than 64, MRSAD cost function is applied to remove the DC effect of distortion between reference blocks. When the bilCost at the center point of the 3×3 search pattern has the minimum cost, the intDeltaMV local search is terminated. Otherwise, the current minimum cost search point becomes the new center point of the 3×3 search pattern and continue to search for the minimum cost, until it reaches the end of the search range. The existing fractional sample refinement is further applied to derive the final deltaMV. The refined MVs after the first pass is then derived as: · MV0_pass1 = MV0 + deltaMV, · MV1_pass1 = MV1 –deltaMV. 2.16.2 Second pass –Subblock based bilateral matching MV refinement In the second pass, a refined MV is derived by applying BM to a 16×16 grid subblock. For each subblock, a refined MV is searched around the two MVs (MV0_pass1 and MV1_pass1) , obtained on the first pass, in the reference picture list L0 and L1. The refined MVs (MV0_pass2 (sbIdx2) and MV1_pass2 (sbIdx2) ) are derived based on the minimum bilateral matching cost between the two reference subblocks in L0 and L1. For each subblock, BM performs full search to derive integer sample precision intDeltaMV. The full search has a search range [–sHor, sHor] in horizontal direction and [–sVer, sVer] in vertical direction, wherein, the values of sHor and sVer are determined by the block dimension, and the maximum value of sHor and sVer is 8. The bilateral matching cost is calculated by applying a cost factor to the SATD cost between two reference subblocks, as: bilCost = satdCost *costFactor. The search area (2*sHor + 1) * (2*sVer + 1) is divided up to 5 diamond shape search regions shown on FIG. 31. Each search region is assigned a costFactor, which is determined by the distance (intDeltaMV) between each search point and the starting MV, and each diamond region is processed in the order starting from the center of the search area. In each region, the search points are processed in the raster scan order starting from the top left going to the bottom right corner of the region. When the minimum bilCost within the current search region is less than a threshold equal to sbW *sbH, the int-pel full search is terminated, otherwise, the int-pel full search continues to the next search region until all search points are examined. Additionally, if the difference between the previous minimum cost and the current minimum cost in the iteration is less than a threshold that is equal to the area of the block, the search process terminates. The existing VVC DMVR fractional sample refinement is further applied to derive the final deltaMV (sbIdx2) . The refined MVs at second pass is then derived as: · MV0_pass2 (sbIdx2) = MV0_pass1 + deltaMV (sbIdx2) , · MV1_pass2 (sbIdx2) = MV1_pass1 –deltaMV (sbIdx2) . 2.16.3 Third pass –Subblock based bi-directional optical flow MV refinement In the third pass, a refined MV is derived by applying BDOF to an 8×8 grid subblock. For each 8×8 subblock, BDOF refinement is applied to derive scaled Vx and Vy without clipping starting from the refined MV of the parent subblock of the second pass. The derived bioMv (Vx, Vy) is rounded to 1 / 16 sample precision and clipped between -32 and 32. The refined MVs (MV0_pass3 (sbIdx3) and MV1_pass3 (sbIdx3) ) at third pass are derived as: · MV0_pass3 (sbIdx3) = MV0_pass2 (sbIdx2) + bioMv, · MV1_pass3 (sbIdx3) = MV0_pass2 (sbIdx2) –bioMv. 2.17. Adaptive decoder side motion vector refinement Adaptive decoder side motion vector refinement method (also called adaptive BM merge mode) consists of the two new merge modes introduced to refine MV only in one direction, either L0 or L1, of the bi prediction for the merge candidates that meet the DMVR conditions. The multi-pass DMVR process is applied for the selected merge candidate to refine the motion vectors, however either MVD0 or MVD1 is set to zero in the 1st pass (i.e. PU level) DMVR. Like the regular merge mode, merge candidates for the proposed merge modes are derived from the spatial neighboring coded blocks, TMVPs, non-adjacent blocks, HMVPs, and pair-wise candidate. The difference is that only those meet DMVR conditions are added into the candidate list. The same merge candidate list is used by the two proposed merge modes and merge index is coded as in regular merge mode. 2.18. Bi-directional optical flow (BDOF) The bi-directional optical flow (BDOF) tool is included in VVC. BDOF, previously referred to as BIO, was included in the JEM. Compared to the JEM version, the BDOF in VVC is a simpler version that requires much less computation, especially in terms of number of multiplications and the size of the multiplier. BDOF is used to refine the bi-prediction signal of a CU at the 4×4 subblock level. BDOF is applied to a CU if it satisfies all the following conditions: – The CU is coded using “true” bi-prediction mode, i.e., one of the two reference pictures is prior to the current picture in display order and the other is after the current picture in display order; – The distances (i.e. POC difference) from two reference pictures to the current picture are same; – Both reference pictures are short-term reference pictures; – The CU is not coded using affine mode or the SbTMVP merge mode; – CU has more than 64 luma samples; – Both CU height and CU width are larger than or equal to 8 luma samples; – BCW weight index indicates equal weight; – WP is not enabled for the current CU; – CIIP mode is not used for the current CU. BDOF is only applied to the luma component. As its name indicates, the BDOF mode is based on the optical flow concept, which assumes that the motion of an object is smooth. For each 4×4 subblock, a motion refinement (vx, vy) is calculated by minimizing the difference between the L0 and L1 prediction samples. The motion refinement is then used to adjust the bi-predicted sample values in the 4x4 subblock. The following steps are applied in the BDOF process. First, the horizontal and vertical gradients,  and k=0, 1, of the two prediction signals are computed by directly calculating the difference between two neighboring samples, i.e., where I (k) (i, j) are the sample value at coordinate (i, j) of the prediction signal in list k, k=0, 1, and shift1 is calculated based on the luma bit depth, bitDepth, as shift1 = max (6, bitDepth-6) . Then, the auto-and cross-correlation of the gradients, S1, S2, S3, S5 and S6, are calculated as S1=∑ (i, j) ∈ΩAbs (ψx (i, j) ) , S3=∑ (i, j) ∈Ωθ (i, j) ·Sign (ψx (i, j) ) S5=∑ (i, j) ∈ΩAbs (ψy (i, j) ) , S6=∑ (i, j) ∈Ωθ (i, j) ·Sign (ψy (i, j) )  where θ (i, j) = (I (1) (i, j) >>nb) - (I (0) (i, j) >>nb) where Ω is a 6×6 window around the 4×4 subblock, and the values of na and nb are set equal to min (1, bitDepth -11 ) and min (4, bitDepth -8 ) , respectively. The motion refinement (vx, vy) is then derived using the cross-and auto-correlation terms using the following: where th′BIO=2max (5, BD-7) .  is the floor function, and Based on the motion refinement and the gradients, the following adjustment is calculated for each sample in the 4×4 subblock: Finally, the BDOF samples of the CU are calculated by adjusting the bi-prediction samples as follows: predBDOF(x, y) = (I (0) (x, y) +I (1) (x, y) +b (x, y) +ooffset) >>shift These values are selected such that the multipliers in the BDOF process do not exceed 15-bit, and the maximum bit-width of the intermediate parameters in the BDOF process is kept within 32-bit. In order to derive the gradient values, some prediction samples I (k) (i, j) in list k (k=0, 1) outside of the current CU boundaries need to be generated. As depicted in FIG. 32, the BDOF in VVC uses one extended row / column around the CU’s boundaries. In order to control the computational complexity of generating the out-of-boundary prediction samples, prediction samples in the extended area (white positions) are generated by taking the reference samples at the nearby integer positions (using floor () operation on the coordinates) directly without interpolation, and the normal 8-tap motion compensation interpolation filter is used to generate prediction samples within the CU (gray positions) . These extended sample values are used in gradient calculation only. For the remaining steps in the BDOF process, if any sample and gradient values outside of the CU boundaries are needed, they are padded (i.e. repeated) from their nearest neighbors. When the width and / or height of a CU are larger than 16 luma samples, it will be split into subblocks with width and / or height equal to 16 luma samples, and the subblock boundaries are treated as the CU boundaries in the BDOF process. The maximum unit size for BDOF process is limited to 16x16. For each subblock, the BDOF process could skipped. When the SAD of between the initial L0 and L1 prediction samples is smaller than a threshold, the BDOF process is not applied to the subblock. The threshold is set equal to (8 *W* (H >> 1 ) , where W indicates the subblock width, and H indicates subblock height. To avoid the additional complexity of SAD calculation, the SAD between the initial L0 and L1 prediction samples calculated in DVMR process is re-used here. If BCW is enabled for the current block, i.e., the BCW weight index indicates unequal weight, then bi-directional optical flow is disabled. Similarly, if WP is enabled for the current block, i.e., the luma_weight_lx_flag is 1 for either of the two reference pictures, then BDOF is also disabled. When a CU is coded with symmetric MVD mode or CIIP mode, BDOF is also disabled. 2.19. Adaptive cost function selection in merge mode It is proposed to use the merge index to indicate the cost function that is used to refine the corresponding merge candidate in a merge list. Two cost functions are alternately selected for every other candidate in a merge list. If the merge index is an even number, the first cost function is selected for the refinement process, otherwise the second cost function is selected. The proposed method applies to regular merge mode, template matching merge mode, bilateral matching merge mode, and affine merge mode. For bilateral matching merge and affine merge, the two cost functions are set to SATD and SAD. If the merge index is an even number, then SATD is selected, otherwise SAD is selected. For template matching merge, the two cost functions are set to weighted SAD and SAD. If the merge index is an even number, then weighted SAD is selected to refine the merge candidate, otherwise SAD is selected. 2.20. Geometric partitioning mode (GPM) 2.20.1 Geometric partitioning mode (GPM) with merge motion vector differences (MMVD) GPM in VVC is extended by applying motion vector refinement on top of the existing GPM uni-directional MVs. A flag is first signalled for a GPM CU, to specify whether this mode is used. If the mode is used, each geometric partition of a GPM CU can further decide whether to signal MVD or not. If MVD is signalled for a geometric partition, after a GPM merge candidate is selected, the motion of the partition is further refined by the signalled MVDs information. All other procedures are kept the same as in GPM. The MVD is signaled as a pair of distance and direction, similar as in MMVD. There are nine candidate distances (1 / 4-pel, 1 / 2-pel, 1-pel, 2-pel, 3-pel, 4-pel, 6-pel, 8-pel, 16-pel) , and eight candidate directions (four horizontal / vertical directions and four diagonal directions) involved in GPM with MMVD (GPM-MMVD) . In addition, when pic_fpel_mmvd_enabled_flag is equal to 1, the MVD is left shifted by 2 as in MMVD. Geometric partitioning mode (GPM) with adaptive blending In VVC, the final prediction samples are generated with by blending the prediction of the two prediction signals using weighted average. Two integer blending matrices (W0 and W1) are used. The weights in the GPM blending matrices are derived from the ramp function based on the displacement from a predicted sample position to the GPM partitioning boundary. The blending area size is fixed to two (2 samples on each side of the GPM partition split boundary) . The blending process in ECM is improved by adding four extra blending area sizes. A first candidate list of the four extra blending area sizes includes the quarter, half, double, and quadrupole of the existing area size as shown in FIG. 33. This list is applied when minimum of the block width and height is smaller than 32. On the other hand (if the minimum of the block width and height is no smaller than 32) , a second candidate list of the four extra blending area sizes includes half, double, quadrupole and octopole of the existing area size. A CU level index is coded to signal the selected blending area size is signalled. Furthermore, the extended weighting precision is utilized, in which the maximum value of the weighs is changed from 8 (in VVC) to 32 to accommodate the extended blending area sizes. 2.20.2 Geometric partitioning mode (GPM) with template matching (TM) Template matching is applied to GPM. When GPM mode is enabled for a CU, a CU-level flag is signaled to indicate whether TM is applied to both geometric partitions. Motion information for each geometric partition is refined using TM. When TM is chosen, a template is constructed using left, above or left and above neighboring samples according to partition angle, as shown in Table 2. The motion is then refined by minimizing the difference between the current template and the template in the reference picture using the same search pattern of merge mode with half-pel interpolation filter disabled. Table 2. Template for the 1st and 2nd geometric partitions, where A represents using above samples, L represents using left samples, and L+A represents using both left and above samples. A GPM candidate list is constructed as follows: 1. Interleaved List-0 MV candidates and List-1 MV candidates are derived directly from the regular merge candidate list, where List-0 MV candidates are higher priority than List-1 MV candidates. A pruning method with an adaptive threshold based on the current CU size is applied to remove redundant MV candidates. 2. Interleaved List-1 MV candidates and List-0 MV candidates are further derived directly from the regular merge candidate list, where List-1 MV candidates are higher priority than List-0 MV candidates. The same pruning method with the adaptive threshold is also applied to remove redundant MV candidates. 3. Zero MV candidates are padded until the GPM candidate list is full. The GPM-MMVD and GPM-TM are exclusively enabled to one GPM CU. This is done by firstly signaling the GPM-MMVD syntax. When both two GPM-MMVD control flags are equal to false (i.e., the GPM-MMVD are disabled for two GPM partitions) , the GPM-TM flag is signaled to indicate whether the template matching is applied to the two GPM partitions. Otherwise (at least one GPM-MMVD flag is equal to true) , the value of the GPM-TM flag is inferred to be false. 2.20.3 GPM with inter and intra prediction In GPM with inter and intra prediction, the final prediction samples are generated by weighting inter predicted samples and intra predicted samples for each GPM-separated region. The inter predicted samples are derived by inter GPM whereas the intra predicted samples are derived by an intra prediction mode (IPM) candidate list and an index signaled from the encoder. The IPM candidate list size is pre-defined as 3. The available IPM candidates are the parallel angular mode against the GPM block boundary (Parallel mode) , the perpendicular angular mode against the GPM block boundary (Perpendicular mode) , and the Planar mode as shown FIG. 34A to FIG. 34C, respectively. Furthermore, GPM with intra and intra prediction as shown FIG. 34D is restricted to reduce the signalling overhead for IPMs and avoid an increase in the size of the intra prediction circuit on the hardware decoder. In addition, a direct motion vector and IPM storage on the GPM-blending area is introduced to further improve the coding performance. In DIMD and neighboring mode based IPM derivation Parallel mode is registered first. Therefore, max two IPM candidates derived from the decoder-side intra mode derivation (DIMD) method and / or the neighboring blocks can be registered if there is not the same IPM candidate in the list. As for the neighboring mode derivation, there are five positions for available neighboring blocks at most, but they are restricted by the angle of GPM block boundary as shown in Table 3, which are already used for GPM with template matching (GPM-TM) . Table 3. The position of available neighboring blocks for IPM candidate derivation based on the angle of GPM block boundary. A and L denotes the above and left side of the prediction block. GPM-intra can be combined with GPM with merge with motion vector difference (GPM-MMVD) . TIMD is used for on IPM candidates of GPM-intra to further improve the coding performance. The Parallel mode can be registered first, then IPM candidates of TIMD, DIMD, and neighboring blocks. 2.20.4 GPM with inter prediction and intra block copy GPM with inter prediction and intra block copy (GPM-inter-IBC) was applied for screen content coding. In GPM-inter-IBC, the two geometric sub-partitions are predicted using inter prediction and IBC, individually. To generate the prediction signal of IBC, an IBC candidate list is constructed, and the index of the selected block vector is signalled. The prediction signal of IBC for one sub-partition can be blended with regular GPM, GPM-MMVD, and GPM-affine for the other sub-partition. 2.20.5 Template matching based reordering for GPM split modes In template matching based reordering for GPM split modes, given the motion information of the current GPM block, the respective TM cost values of GPM split modes are computed. Then, all GPM split modes are reordered in ascending ordering based on the TM cost values. Instead of sending GPM split mode, an index using Golomb-Rice code to indicate where the exact GPM split mode located in the reordering list is signaled. The reordering method for GPM split modes is a two-step process performed after the respective reference templates of the two GPM partitions in a coding unit are generated, as follows: · extending GPM partition edge into the reference templates of the two GPM partitions, resulting in 64 reference templates and computing the respective TM cost for each of the 64 reference templates; · reordering GPM split modes based on their TM cost values in ascending order and marking the best 32 split modes as available split modes. The edge on the template is extended from that of the current CU, as FIG. 35 illustrates, but GPM blending process is not used in the template area across the edge. After ascending reordering using TM cost, an index is signaled. 2.20.6 Bi-predictive GPM The GPM design in VVC relies on uni-predictive motion vectors to generate motion compensated prediction samples for each inter GPM partition. In ECM, such a design has been extended to allow usage of bi-predictive motion vectors. When constructing a GPM candidate list, the extraction process that extracts uni-predictive motion vectors from the initial merge list is invoked only for small blocks 8x8, 16x8 and 8x16. For larger blocks, the extraction process is bypassed, so the initial merge list (which may contain merged Bi-MVs) is directly used as the final GPM merge list. The generation of the initial merge list is the same as before (i.e., the normal merge list generation without any candidate reordering) except that when generating the initial merge list for larger blocks (i.e., blocks with the extraction process bypassed) , the motion vector difference threshold for controlling whether a candidate can be added into the list is increased to be one full sample distance. BDOF based motion vector refinement as in the multi-pass DMVR is used when generating motion compensated prediction samples. When GPM-MMVD is used for a GPM partition and its base motion vector is bi-predictive, for low-delay pictures, the signalled MVD is applied on top of the L0 and L1 motion vector as in the existing merge MMVD design. For non-low-delay pictures, the bi-predictive motion vector is converted into a uni-predictive motion vector first and then the MVD is applied on top. 2.20.7 AMC-GPM In ECM, the GPM is further extended to enable affine motion compensation (AMC) . Therefore, a GPM partition can be predicted by AMC inter-prediction, non-AMC inter-prediction or intra-prediction. In addition, a GPM partition predicted by AMC can be combined with the other GPM partition predicted by AMC, non-AMC, or intra-prediction. When AMC is applied, a uni-prediction affine merge candidate list is constructed from the subblock-based merge candidate list after discarding sub-TMVP candidates, similar to the uni-prediction merge candidate list construction for GPM in VVC. AMC is performed for a GPM partition using the control point motion vectors (CPMVs) of a merge candidate in the uni-prediction affine merge candidate list. The length of the uni-prediction affine merge candidate list is signalled in SPS. When ARMC is applicable, the uni-prediction affine merge candidate list is reordered according to the template costs. A gpm_affine_flag is signaled for each GPM partition to indicate whether AMC is applied for the GPM partition. A merge candidate index for the GPM partition is signaled using individual arithmetic context models depending on whether AMC or non-AMC is applied. AMC is not allowed for GPM-MMVD and GPM-TM. 2.20.8 Implicit GPM In the implicit GPM, the two integer blending matrices (W0 and W1) are derived from the template (1 line above, 1 column left) . The blending matrices are modelled as an affine linear function of the sample positions (x, y) in the current CU: W0 (x, y) = a. x + b. y + c and W1 (x, y) = 1 -W0 (x, y) The parameters (a, b, c) are derived from the reference template using the same solver (MSE minimization) as the one used for CCCM, GLM or GL-CCCM. A list of pair of candidates is built from the regular GPM candidates and re-ordered with the template cost. The GPM implicit mode is signaled by a CU-level flag (gpm_implicit_flag) . If gpm_implicit_flag is true, a merge-idx is coded to signal the pair of GPM candidates to be used. If gpm_implicit_flag is false, the regular GPM syntax elements are signaled. 2.21. Bilateral matching AMVP-merge mode The bi-directional predictor is composed of an AMVP predictor in one direction and a merge predictor in the other direction. The mode can be enabled to a coding block when the selected merge predictor and the AMVP predictor satisfy DMVR condition, where there is at least one reference picture from the past and one reference picture from the future relatively to the current picture and the distances from two reference pictures to the current picture are the same, the bilateral matching MV refinement is applied for the merge MV candidate and AMVP MVP as a starting point. Otherwise, if template matching functionality is enabled, template matching MV refinement is applied to the merge predictor or the AMVP predictor which has a higher template matching cost. AMVP part of the mode is signaled as a regular uni-directional AMVP, i.e. reference index and MVD are signaled, and it has a derived MVP index if template matching is used or MVP index is signaled when template matching is disabled. For AMVP direction LX, X can be 0 or 1, the merge part in the other direction (1 –LX) is implicitly derived by minimizing the bilateral matching cost between the AMVP predictor and a merge predictor, i.e., for a pair of the AMVP and a merge motion vectors. For every merge candidate in the merge candidate list which has that other direction (1 –LX) motion vector, the bilateral matching cost is calculated using the merge candidate MV and the AMVP MV. The merge candidate with the smallest cost is selected. The bilateral matching refinement is applied to the coding block with the selected merge candidate MV and the AMVP MV as a starting point. The third pass of multi pass DMVR which is sub-PU BDOF refinement of the multi-pass DMVR is enabled to AMVP-merge mode coded block. Sub-PU size of BDOF is adaptively selected depending on the width×height. For blocks smaller than 256, subblock size of 4×4, and otherwise 8×8 is used. In addition, the following high-precision equations to derive the BDOF MV refinement parameters are utilized: ∑Gx. Gx *vx + ∑Gx. Gy *vy = ∑dI . Gx → s1 *vx + s2 *vy = s3 ∑Gx. Gy *vx + ∑Gy. Gy *vy = ∑dI . Gy → s2 *vx + s5 *vy = s6 where Gx / Gy are the summation of the 2 horizontal / vertical gradients derived for each reference block. Summations (Σ) are weighted sums, where weights depend on the position in the target region Ω. The weights can also be applied to derive vx / vy in other cases. The mode is indicated by a flag, if the mode is enabled AMVP direction LX is further indicated by a flag. When bilateral matching (BM) AMVP-merge mode is used for the current block and template matching is enabled, MVD is not signalled. An additional pair of AMVP-merge MVPs is introduced. The merge candidate list is sorted based on the BM cost in increase order. An index (0 or 1) is signaled to indicate which merge candidate in the sorted merge candidate list to use. When there is only one candidate in merge candidate list, the pair of AMVP MVP and merge MVP without bilateral matching MV refinement is padded. 2.22. Adaptive reordering of merge candidates with template matching (ARMC-TM) The merge candidates are adaptively reordered with template matching (TM) . The reordering method is applied to regular merge mode, TM merge mode, and affine merge mode (excluding the SbTMVP candidate) . For the TM merge mode, merge candidates are reordered before the refinement process. An initial merge candidate list is firstly constructed according to given checking order, such as spatial, TMVPs, non-adjacent, HMVPs, pairwise, virtual merge candidates. Then the candidates in the initial list are divided into several subgroups. For the template matching (TM) merge mode, adaptive DMVR mode, each merge candidate in the initial list is firstly refined by using TM / multi-pass DMVR. Merge candidates in each subgroup are reordered to generate a reordered merge candidate list and the reordering is according to cost values based on template matching. The index of selected merge candidate in the reordered merge candidate list is signalled to the decoder. For simplification, merge candidates in the last but not the first subgroup are not reordered. All the zero candidates from the ARMC reordering process are excluded during the construction of Merge motion vector candidates list. The subgroup size is set to 5 for regular merge mode and TM merge mode. The subgroup size is set to 3 for affine merge mode. · Cost calculation The template matching cost of a merge candidate during the reordering process is measured by the SAD between samples of a template of the current block and their corresponding reference samples. The template comprises a set of reconstructed samples neighboring to the current block. Reference samples of the template are located by the motion information of the merge candidate. When a merge candidate utilizes bi-directional prediction, the reference samples of the template of the merge candidate are also generated by bi-prediction as shown in FIG. 36. · Refinement of the initial merge candidate list When multi-pass DMVR is used to derive the refined motion to the initial merge candidate list only the first pass (i.e., PU level) of multi-pass DMVR is applied in reordering. When template matching is used to derive the refined motion, the template size is set equal to 1. Only the above or left template is used during the motion refinement of TM when the block is flat with block width greater than 2 times of height or narrow with height greater than 2 times of width. TM is extended to perform 1 / 16-pel MVD precision. The first four merge candidates are reordered with the refined motion in TM merge mode. For subblock-based merge candidates with subblock size equal to Wsub × Hsub, the above template comprises several sub-templates with the size of Wsub × 1, and the left template comprises several sub-templates with the size of 1 × Hsub. As shown in FIG. 37, the motion information of the subblocks in the first row and the first column of current block is used to derive the reference samples of each sub-template. · Reordering criteria In the reordering process, a candidate is considered as redundant if the cost difference between a candidate and its predecessor is inferior to a lambda value e.g. |D1-D2| < λ, where D1 and D2 are the costs obtained during the first ARMC ordering and λ is the Lagrangian parameter used in the RD criterion at encoder side. The proposed algorithm is defined as the following: - Determine the minimum cost difference between a candidate and its predecessor among all candidates in the list. · If the minimum cost difference is superior or equal to λ, the list is considered diverse enough and the reordering stops. · If this minimum cost difference is inferior to λ, the candidate is considered as redundant, and it is moved at a further position in the list. This further position is the first position where the candidate is diverse enough compared to its predecessor. - The algorithm stops after a finite number of iterations (if the minimum cost difference is not inferior to λ) . This algorithm is applied to the Regular, TM, BM and Affine merge modes. A similar algorithm is applied to the Merge MMVD and sign MVD prediction methods which also use ARMC for the reordering. The value of λ is set equal to the λ of the rate distortion criterion used to select the best merge candidate at the encoder side for low delay configuration and to the value λ corresponding to a another QP for Random Access configuration. A set of λ values corresponding to each signaled QP offset is provided in the SPS or in the Slice Header for the QP offsets which are not present in the SPS. · Merge Mode modifications The following modifications have been applied to regular Merge list: - No ARMC reordering for sub-groups is performed. - Up to 4 pairwise candidates are added after the first ARMC reordering in a pairwise merge list for regular, TM and BM Merge modes. Only the candidates before the zero padding candidates after the first ARMC reordering can be used to derive the pairwise candidates. The pairwise candidate is also restricted to use only the average candidate when the reference frames of the first and second candidate to derive the pairwise candidate are the same. The first candidate to derive the pairwise candidate is set to be the first reordered candidate. After deriving the pairwise candidates, they will be reordered together with the candidates in the initial merge candidate list after the first ARMC reordering using a second ARMC reordering. Then diversity reordering is performed for the reordered candidates of the initial merge candidate list and pairwise merge list after all the first and second ARMC reordering. At last, the first N (e.g., N is 10 for regular merge mode, N is 4 for TM and BM merge mode) merge candidates of the initial merge candidate list and pairwise merge list after all the reordering are selected to generate the final merge candidate list. · Extension to AMVP modes The ARMC design is also applicable to the AMVP mode wherein the AMVP candidates are reordered according to the TM cost. For the template matching for advanced motion vector prediction (TM-AMVP) mode, an initial AMVP candidate list is constructed, followed by a refinement from TM to construct a refined AMVP candidate list. In addition, an MVP candidate with a TM cost larger than a threshold, which is equal to five times of the cost of the first MVP candidate, is skipped. Note, when wrap around motion compensation is enabled, the MV candidate shall be clipped with wrap around offset taken into consideration. It is proposed to exclude all the zero candidates from the ARMC reordering process during the construction of Merge motion vector candidates list as depicted in FIG. 38. This modification also reduces the number of ARMC computations. 2.23. MV candidate type based ARMC Merge candidates of one single candidate type, e.g., TMVP or non-adjacent MVP (NA-MVP) , are reordered based on the ARMC TM cost values. The reordered candidates are then added into the merge candidate list. The TMVP candidate type adds more TMVP candidates with more temporal positions and different inter prediction directions to perform the reordering and the selection. Moreover, NA-MVP candidate type is further extended with more spatially non-adjacent positions. The target reference picture of the TMVP candidate can be selected from any one of reference picture in the list according to scaling factor. The selected reference picture is the one whose scaling factor is the closest to 1. 2.24. Local illumination compensation (LIC) LIC is an inter prediction technique to model local illumination variation between current block and its prediction block as a function of that between current block template and reference block template. The parameters of the function can be denoted by a scale α and an offset β, which forms a linear equation, that is, α*p [x] +β to compensate illumination changes, where p [x] is a reference sample pointed to by MV at a location x on reference picture. When wrap around motion compensation is enabled, the MV shall be clipped with wrap around offset taken into consideration. Since α and β can be derived based on current block template and reference block template, no signaling overhead is required for them. The local illumination compensation proposed is used for inter-coded CUs with the following modifications. · Intra neighbor samples can be used in LIC parameter derivation. · LIC is disabled for blocks with less than 32 luma samples. · Samples of the reference block template are generated by using MC with the block MV without rounding it to integer-pel precision. 2.24.1 LIC flag determination An LIC flag is signaled for AMVP mode to indicate the use of LIC. For the merge mode, the LIC flag is not inherited from a merge candidate, instead, it is derived on-the-fly. More specifically, the LIC flag of a merge candidate is derived by comparing two template costs: a SAD-based template cost, denoted as C0, and a Mean Removal SAD (MRSAD) -based template cost, denoted as C1. The LIC flag is set to be false, if C0 <= C1 and is set to be true, if C0 > C1. To favor the inherited LIC flag, C0 is multiplied by α if the inherited LIC flag is false while C1 is multiplied by α if the inherited LIC flag is true, where α < 1. For inter-prediction merge modes, the LIC flag value could be either signalled for regular merge mode, affine merge mode and TM merge mode or inherited from a merge candidate. The signalled flag indicates if the original inherited LIC flag or the reverse LIC flag value is used for a merge candidate. Also, LIC is enabled with PU level BDMVR and BDOF. 2.24.2 LIC parameter derivation In addition to the LIC parameter derivation process using neighbouring samples, the following further apply: · For both non-subblock and affine modes, LIC parameter derivation is performed based on the template block samples corresponding to the current CU, instead of partial template block samples corresponding to first top-left 16x16 unit. · The LIC parameters could be adjusted instead of directly using the derived values. Similar to the slope adjustment of CCLM, an adjustment parameter for the uni-predicted LIC coded block is used to modify parameters of LIC. The adjustment parameter is signalled for AMVP mode. · For the bi-predictive inter CUs, two sets of LIC parameters are separately derived for L0 and L1 prediction samples. An iterative manner to derive the L0 and L1 LIC parameters is applied. Specifically, L0 LIC parameters are firstly derived by minimizing difference between L0 template prediction T0 and the template T and the samples in T are updated by subtracting the corresponding samples in T0. Then, the L1 parameters are calculated that minimizes the difference between L1 template prediction T1 and the updated template. Finally, the L0 parameter is refined again in the same way. · For the Geometric partitioning mode (GPM) mode, when the LIC flag js determined to be true, LIC model parameters from causally neighboring blocks could be inherited conditionally, addition to motion information during the construction process of GPM merge candidate list. · For regular merge modes, some new merge candidates that could inherit LIC model from causal neighborhood are competing jointly with all other merge candidates in the ARMC stage. 2.24.3 Non-local LIC Non-local illumination compensation (NLIC) is applied in ECM wherein the linear model is derived from the previously coded inter CUs by minimizing the difference between their reconstruction and prediction samples. When constructing the merge lists, up to 16 and 6 NLIC candidates (obtained from both spatial adjacent and non-adjacent positions) are inserted to the lists of regular merge and subblock merge respectively, and reordered with the existing merge candidates. The lengths of the output merge lists are kept unchanged. The same pattern used for non-adjacent merge mode is reused to locate the non-adjacent positions in the scheme. 2.25. IBC merge / AMVP list construction The IBC merge / AMVP list construction compared to VVC is modified as follows: · Only if an IBC merge / AMVP candidate is valid, it can be inserted into the IBC merge / AMVP candidate list. · Above-right, bottom-left, and above-left spatial candidates (belonging to the adjacent spatial candidate category) and one pairwise average candidate can be added into the IBC merge / AMVP candidate list. · Template based adaptive reordering (ARMC-TM) is applied to IBC merge list. · Candidates from non-adjacent spatial neighboring blocks (a.k.a., non-adjacent candidates) can be added to the candidate lists of IBC merge modes and IBC AMVP. These non-adjacent candidates are inserted between the adjacent spatial candidates and the history-based BVP (HBVP) candidates for both IBC merge and IBC AMVP. The same reference area of non-adjacent merge in regular inter mode is reused for the IBC. · Temporal BV candidates are added to the IBC merge / AMVP list after the non-adjacent BV candidates. The temporal BVs are derived from collocated positions and shifted collocated positions in the collocated pictures. The IBC merge / AMVP list size, the number of processes applied for template matching and the number of full RDO processes are kept unchanged. · Auto-relocated block vector prediction (AR-BVP) candidates are added to the IBC merge and AMVP candidate list right after the HBVP candidates. As shown in FIG. 39. An example of how to derive AR-BVP., a guiding block vector BV0, 1 (i.e., an existing BVP already in the candidate list) associated with the current block B0 points to a reference block B1. If B1 has a BV denoted as BV1, 2 pointing to a reference block B2, then BV0, 2, given by BV0, 2 = BV0, 1 +BV1, 2, is defined as the AR-BVP, guided by BV0, 1. When deriving BVn, n+1 guided by BV0, n, all five positions including top-left (e.g., LT in FIG. 40. The five positions in Bn (n is set to 1) . ) , top-right (e.g., RT in FIG. 40. The five positions in Bn (n is set to 1) . ) , center (e.g., Ctr in FIG. 40. The five positions in Bn (n is set to 1) . ) , bottom-left (e.g., LB in FIG. 40. The five positions in Bn (n is set to 1) . ) , and bottom-right (e.g., RB in FIG. 40. The five positions in Bn (n is set to 1) . ) positions of Bn are checked to find BVn, n+1. · Restriction that adjacent spatial candidates cannot be used for IBC merge of a 4x4 CU is removed. The HMVP table size for IBC is increased to 25. After up to 20 IBC merge candidates are derived with full pruning, they are reordered together. After reordering, the first 6 candidates with the lowest template matching costs are selected as the final candidates in the IBC merge list. The zero vectors’ candidates to pad the IBC Merge / AMVP list are replaced with a set of BVP candidates located in the IBC reference region. A zero vector is invalid as a block vector in IBC merge mode, and consequently, it is discarded as BVP in the IBC candidate list. Three candidates are located on the nearest corners of the reference region, and three additional candidates are determined in the middle of the three sub-regions (A, B, and C) , whose coordinates are determined by the width, and height of the current block and the ΔX and ΔY parameters, as is depicted in FIG. 41. During the IBC AMVP list construction, a clustering of the BVP candidates may be applied when both BV candidate components are non-zero. The clustering as shown in FIG. 42 with L2 distance is applied if there are more than 2 valid BV candidates and up to 6 candidates are clustered, the clustering radius is defined as Radius=log2 ( (cbWidth·cbHeight) >>MIN_PU_SIZE) The clustering method is applied in the candidate list order, and the candidates assigned to a group are removed from the list for the subsequent clusters. In each group, the BVP with a lowest TM cost is selected as the representative candidate of that group. Finally, the representative candidates of the two first groups are chosen as the candidates for the IBC AMVP list. Furthermore, if one of BV candidate components is zero or block is coded in RRIBC, a flag is signalled to indicate this case with a directional flag indicating horizontal or vertical component is non-zero. Instead of usual IBC AMVP list, two new BVP candidates are derived, and the sign of the non-zero BV component is derived at decoder side. The AMVP BVP0 is set to the nearest valid location to the current block (-cbWidth or -cbHeight) , so the non-zero BVD is always negative, pointing to the left for a BV with a zero vertical component or to the above for a BV with a zero horizontal component. Likewise, the AMVP BVP1 is set to the farthest position from the current block in the valid reference region, that is the left boundary or the top boundary of the IBC search region. Consequently, if the BVP1 is selected, the BVD is always positive, pointing to the right for BV with a zero vertical component or to the bottom for BV with a zero-horizontal component. Radius=log2 ( (cbWidth·cbHeight) >>MIN_PU_SIZE) The optimal IBC AMVP index is signalled, which allows deriving the sign of the non-zero BVD component at the decoder side. The absolute magnitude of non-zero BVD component is further signalled. In RRIBC, the direction of the flipping mode is derived from the signalled directional flag. 2.26. Combination of IBC with other coding tools 2.26.1. IBC merge mode with block vector differences (IBC-MBVD) Affine-MMVD and GPM-MMVD have been adopted to ECM as an extension of regular MMVD mode. It is natural to extend the MMVD mode to the IBC merge mode. In IBC-MBVD, the distance set is {1-pel, 2-pel, 4-pel, 8-pel, 12-pel, 16-pel, 24-pel, 32-pel, 40-pel, 48-pel, 56-pel, 64-pel, 72-pel, 80-pel, 88-pel, 96-pel, 104-pel, 112-pel, 120-pel, 128-pel} , and the BVD directions are two horizontal and two vertical directions. The base candidates are selected from the first five candidates in the reordered IBC merge list. And based on the SAD cost between the template (one row above and one column left to the current block) and its reference for each refinement position, all the possible MBVD refinement positions (20×4) for each base candidate are reordered. Finally, the top 8 refinement positions with the lowest template SAD costs are kept as available positions, consequently for MBVD index coding. The MBVD index is binarized by the rice code with the parameter equal to 1. In IBC-MBVD list derivation, adaptive BVD offsets along MVBD directions are enabled for IBC MBVD mode. The MBVD candidates search is a two-step process, which starts with checking template SAD costs of offsets added to BVP along each direction with the interval of 1-pel. The second step of the search checks template SAD costs with 1 / 4-pel interval for the candidates around the selected candidates from the first step. For the integer MBVD (when existed in ECM ph_fpel_mbvd_enabled_flag is 0) , those intervals are multiplied by 4. The candidates with the lowest TM cost are included into the final MBVD list. An IBC-MBVD coded block does not inherit flip type from a RR-IBC coded neighbor block. 2.26.2. Combined intra block copy and intra prediction Combined intra block copy and intra prediction (IBC-CIIP) is a coding tool for a CU which uses IBC and intra prediction to obtain two prediction signals, and the two prediction signals are weighted summed to generate the final prediction as follows: P=(wibc*Pibc+ ( (1<<shift) -wibc) *Pintra+ (1<< (shift-1) ) ) >>shift wherein Pibc and Pintra denote the IBC prediction signal and intra prediction signal. (wibc, shift) are set equal to (13, 4) and (1, 1) for IBC merge mode and IBC AMVP mode. An intra prediction mode (IPM) candidate list is used to generate the intra prediction signal, and the IPM candidate list size is pre-defined as 2. An IPM index is signalled to indicate which IPM is used. 2.26.3. IBC with Geometry Partitioning Intra block copy with geometry partitioning mode (IBC-GPM) is a coding tool which divides a CU into two sub-partitions geometrically. The prediction signals of the two sub-partitions are generated using IBC and intra prediction. IBC-GPM can be applied to regular IBC merge mode or IBC TM merge mode. An intra prediction mode (IPM) candidate list is constructed using the same method as GPM with inter and intra prediction for intra prediction, and the IPM candidate list size is pre-defined as 3. There are 48 geometry partitioning modes in total, which are divided into two geometry partitioning mode sets as follows: Table 4. Geometry partitioning modes in the first geometry partitioning mode set Table 5. Geometry partitioning modes in the second geometry partitioning mode set When IBC-GPM is used, an IBC-GPM geometry partitioning mode set flag is signalled to indicate whether the first or the second geometry partitioning mode set is selected, followed by the geometry partitioning mode index. An IBC-GPM intra flag is signalled to indicate whether intra prediction is used for the first sub-partition. When intra prediction is used for a sub-partition, an intra prediction mode index is signalled. When IBC is used for a sub-partition, a merge index is signalled. Here, the uni-predictive IBC GPM generates the prediction samples for each GPM partition using the IBC and intra mode, respectively. In bi-predictive IBC GPM, two flags are signalled to indicate the prediction modes of two partitions, the first flag indicates whether the first partition is intra predicted, and if not then the second flag is signalled to indicate whether intra prediction is used for the second partition. This method is applied to SCC only. 2.26.4. IBC BVP-merge and bi-predictive IBC merge IBC-BVP-merge is similar to AMVP-merge, derives one BV from IBC block vector prediction (BVP) and the second BV from IBC merge to form bi-prediction for IBC. Two different indices for the IBC BVP and the IBC merge candidates are signalled. Bi-predictive IBC merge is enabled together with MBVD and uni-merge. In bi-predictive IBC merge, two BVs from the existing IBC merge candidate list are derived, utilizing two different indices, which are signalled. Bi-predictive IBC merge is applied to IBC regular merge and IBC MBVD. Bi-predictive IBC merge, IBC MBVD, and IBC uni-merge are enabled for non-SCC classes. 2.26.5. IBC MBVD list derivation In the test 2.4a, adaptive BVD offsets along MVBD directions and enabled for IBC MBVD mode. The MBVD candidates search is a two-step process, which starts with checking template SAD costs of offsets added to BVP along each direction with the interval of 1-pel. The second step of the search checks template SAD costs with 1 / 4-pel interval for the candidates around the selected candidates from the first step. For the integer MBVD (when existed in ECM ph_fpel_mbvd_enabled_flag is 0) , those intervals are multiplied by 4. The candidates with the lowest TM cost are included into the final MBVD list. 2.26.6. IBC with Local Illumination Compensation Intra block copy with local illumination compensation (IBC-LIC) is a coding tool which compensates the local illumination variation within a picture between the CU coded with IBC and its prediction block with a linear equation. The parameters of the linear equation are derived same as LIC for inter prediction except that the reference template is generated using block vector in IBC-LIC. IBC-LIC can be applied to IBC AMVP mode and IBC merge mode. For IBC AMVP mode, an IBC-LIC flag is signalled to indicate the use of IBC-LIC. Top-only, left-only, or L-shape templates are allowed for deriving the single model parameters. MMLM is extended to IBC-LIC, which allows IBC-LIC to have two linear models in one CU. And only L-shape template is used in IBC-LIC MMLM. A mode index is signalled. For IBC merge mode, the IBC-LIC flag is inferred from the merge candidate. The IBC-LIC flag is inherited from an IBC HMVP candidate to harmonize IBC HMVP and IBC-LIC similar to the inter LIC case. 2.27. Intra template matching Intra template matching prediction (IntraTMP) is a special intra prediction mode that copies the best prediction block from the reconstructed part of the current frame, whose L-shaped template matches the current template. For a predefined search range, the encoder searches for the most similar template to the current template in a reconstructed part of the current frame and uses the corresponding block as a prediction block. The encoder then signals the usage of this mode, and the same prediction operation is performed at the decoder side. The prediction signal is generated by matching the L-shaped, Top-only or Left-Only causal neighbor of the current block with another block in a predefined search area in FIG. 43. There are 6 predefined search areas, i.e., R1 to R6 in FIG. 43 which contain the reconstructed samples from the top and left CTUs as well as part of the reconstructed samples within the current CTU that are located above, left, bottom-left and top-right to the current block. Sum of absolute differences (SAD) is used as a cost function. A given search order of the 6 regions is utilized, i.e., R4, R5, R6, R1, R2, and R3. Within each region, the decoder constructs a candidate list of up to “19” template matching block vectors that are ranked in ascending order according to the template cost (SAD) . The following modes are supported: 1-Single predictor: A single predictor is selected from the candidate list. 2-Fusion of multiple predictors: multiple predictors are blended multiple to derive the final prediction block. The blending weights are either computed from the template matching cost of each predictor, or with Wiener-filter based weight derivation method. 3-Sub-pel precision: When signle predictor is used, sub-pel precion can be used with 1 / 2-pel precision, 1 / 4-pel precision and 3 / 4-pel precision, each with 8 possible directions. 4-linear filter model: A linear filter can be learned between the reference template and current template and be applied the linear model to reference block. This mode can be used for signle predictor when sub-pel precision is not used. The dimensions of all regions (SearchRange_w, SearchRange_h) are set proportional to the block dimension (BlkW, BlkH) to have a fixed number of SAD comparisons per pixel. That is: SearchRange_w = min (64, a*BlkW) SearchRange_h = min (64, a*BlkH) Where ‘a’ is a constant that controls the gain / complexity trade-off. In practice, ‘a’ is equal to 5. To speed-up the template matching process, the search range of all search regions is subsampled by a factor of 3.. After finding the best match, a refinement process is performed. The refinement is done via a second template matching search around the best match with a reduced range. The Intra template matching tool is enabled for CUs with size less than or equal to 64 in width and height. This maximum CU size for Intra template matching is configurable. The Intra template matching prediction mode is signaled at CU level through a dedicated flag when DIMD is not used for current CU. 2.27.1. IntraTMP derived block vector candidates for IBC In this method block vector (BV) derived from the intra template matching prediction (IntraTMP) is used for intra block copy (IBC) . The stored IntraTMP BV of the neighbouring blocks along with IBC BV are used as spatial BV candidates in IBC candidate list construction. IntraTMP block vector is stored in the IBC block vector buffer and, the current IBC block can use both IBC BV and IntraTMP BV of neighbouring blocks as BV candidate for IBC BV candidate list as shown in FIG. 44. IntraTMP block vectors are added to IBC block vector candidate list as spatial candidates. IntraTMP block vectors are stored in quarter-pel resolution for coding of IBC block vectors and HMVP. 2.27.2. IntraTMP with merge candidates In the test, new candidates, consisting of block vectors from neighbouring PUs coded in IBC or IntraTMP mode, are added into IntraTMP search process. There are up to 25 local and non-local PUs that may be checked during the selection of the neighbouring candidates, those candidates are evaluated together with other candidates, and 30 best candidates (same as in ECM) are selected for further refinement. The neighbouring candidates may come from outside of IntraTMP search area and such outside candidates are prioritized. 2.27.3. AR-BVP for IntraTMP merge candidates This method proposes to add AR-BVP into the construction of IntraTMP merge candidate list. The AR-BVP candidates are inserted into the IntraTMP merge candidate list according to the following orders: 1. Inherited from adjacent neighbors; 2. Inherited from non-adjacent neighbors; 3. Constructed AR-BVP from existing candidates. The existing BVs in the list and the constructed AR-BVPs will be used as the guiding block vectors. For a certain guiding BV, five positions including top-left, top-right, center, bottom-left and bottom-right of reference block are checked to get a BV of reference block and construct AR-BVP. The construction process will end when no new AR-BVP is constructed or the list reaches the maximum size of fifty. The IntraTMP merge candidate list is further sorted based on template matching cost and the best ten candidates are kept. After this, the merge list will be used in the subsequent template matching process. 2.28. Occurrence-based intra coding (OBIC) The occurrence-based intra coding (OBIC) derives the intra prediction modes of the current block based on the sample-wise occurrence of the intra modes in the spatial neighborhood of the block. For this, adjacent and non-adjacent spatial neighboring blocks are checked and the intra prediction modes of the blocks are collected into an occurrence histogram. Instead of Histogram of Gradients (HoGs) as in DIMD, the OBIC method uses the Histogram of Occurrences, which consists of the intra modes and their sample-wise occurrences. The occurrence values are calculated based on the number of samples that are coded in a certain intra prediction mode in that neighborhood. For example, if a uiWidth × uiHeight block is coded with an IPM mode, the occurrence of the mode in that block is calculated as: Histogram [IPM] += uiWidth × uiHeight; Where uiWidth and uiHeight are the width and height of a spatial neighboring block. The occurrences of the existing modes from the spatial neighborhood blocks are accumulated into the histogram. FIG. 45 shows the non-adjacent spatial neighboring blocks that are used in OBIC mode’s histogram generation. Up to five angular modes with the highest occurrence along with the planar mode or block vector-based prediction (same as in DIMD) are selected from the histogram and used for final prediction by blending the prediction of the selected modes. Some blocks, mentioned below, use more than one intra mode for prediction. In such cases, all the intra modes of such blocks are selected and used when creating the OBIC histogram: · DIMD: up to 5 angular modes; · TIMD: up to 2 modes; · SGPM: 2 modes; · OBIC: up to 5 angular modes. Moreover, the virtual intra prediction modes (VIPMs) of following blocks are considered only in inter slices when creating the histogram of OBIC mode: · MIP block; · IntraTMP block; · EIP block. The blending weights are calculated similar to the DIMD mode, but instead of using gradient values from the template, the occurrence values are used for OBIC. Moreover, the planar mode’s weight is also decided similar to DIMD mode. The OBIC mode is used as a sub-mode of DIMD tool and is applied to only luma blocks. Moreover, the mode is disabled for blocks that have less than 64 samples. 2.29. Cross-Component Prediction (CCP) merge (a.k.a., non-local CCP) mode For chroma coding, a flag is signalled to indicate whether CCP mode (including the CCLM, CCCM, GLM and their variants) or non-CCP mode (conventional chroma intra prediction mode, fusion of chroma intra prediction mode) is used. If the CCP mode is selected, one more flag is signalled to indicate how to derive the CCP type and parameters, i.e., either from a CCP merge list or signalled / derived on-the-fly. A CCP merge candidate list is constructed from the spatial adjacent, temporal, spatial non-adjacent, history-based m or shifted temporal candidates. After including these candidates, default models are further included to fill the remaining empty positions in the merge list. In order to remove redundant CCP models in the list, pruning operation is applied. After constructing the list, the CCP models in the list are reordered depending on the SAD costs, which are obtained using the neighbouring template of the current block. More details are described below. Spatial adjacent and non-adjacent candidates The positions and inclusion order of the spatial adjacent and non-adjacent candidates are the same as those defined in ECM for regular inter merge prediction candidates. Temporal and shifted temporal candidates Temporal candidates are selected from the collocated picture. The position and inclusion order of the temporal candidates are the same as those defined in ECM for regular inter merge prediction candidates. The shifted temporal candidates are also selected from the collocated picture. The position of temporal candidates is shifted by a selected motion vector which is derived from motion vectors of neighboring blocks. History-based candidates A history-based table is maintained to include the recently used CCP models, and the table is reset at the beginning of each CTU row. If the current list is not full after including spatial adjacent and non-adjacent candidates, the CCP models in the history-based table are added into the list. Default candidates CCLM candidates with default scaling parameters are considered, only when the list is not full after including the spatial adjacent, spatial non-adjacent, or history-based candidates. If the current list has no candidates with the single model CCLM mode, the default scaling parameters are {0, 1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8, -3 / 8, 4 / 8, -4 / 8, 5 / 8, -5 / 8, 6 / 8} . Otherwise, the default scaling parameters are {0, the scaling parameter of the first CCLM candidate + {1 / 8, -1 / 8, 2 / 8, -2 / 8, 3 / 8, -3 / 8, 4 / 8, -4 / 8, 5 / 8, -5 / 8, 6 / 8} . It is noted that the LB-CCP flag is inherited from a CCP candidate in the CCP merge candidate list. 2.30. Extrapolation filter-based intra prediction (EIP) mode In the EIP mode, the samples in a CU are predicted from the top-left position to the bottom-right position by applying an extrapolation filter to neighboring reconstructed samples or predicted samples. The EIP mode uses a 15-tap filter for prediction as below: , where pred (x, y) is the predicted value at position (x, y) in the CU, ci is the filter coefficient, and the  is the reconstructed samples or predicted samples. Predicted sample values are clipped to the range of the reference samples instead of the full sample value range. Reference sample area used for determining the range is the same that is used when generating the filter coefficients. The EIP filter can be derived from the neighboring reconstructed samples or be inherited from the previous EIP coded blocks. There are three EIP filter shapes and three types of reconstructed area supported in ECM as shown in FIG. 46 and FIG. 47A to FIG. 47C, respectively. For a CU coded in the EIP mode, an EIP merge flag is signaled to indicate whether the EIP filter is inherited from previous blocks coded in EIP mode. When the EIP merge flag is true, an EIP merge list is constructed from the spatial adjacent, spatial non-adjacent, temporal and history candidates. The position and inclusion order of these candidates are the same as those used in CCP merge candidate list. An EIP merge index is further signaled to indicate which EIP merge candidate is selected. The filter shape and the filter coefficients of the selected candidate are then inherited to code the CU. When the EIP merge flag is false, the EIP filter is derived from the neighboring reconstructed samples and the relevant syntax element is signaled to indicate which one of the three types of reconstructed area and which one of the three filter shapes are used for the CU. The selected filter moves in the selected reconstructed area either horizontally or vertically with a one-pixel step to construct the auto-correlation matrix and the cross-correlation vector. The calculation of coefficients from the auto-correlation matrix and the cross-correlation vector is the same as that in CCCM. After generating the prediction samples of the CU using the EIP filter, an intra prediction mode is derived by applying the DIMD process to the prediction samples. Specifically, a horizontal gradient and a vertical gradient are calculated for each predicted sample to build a histogram of gradient. Then the intra prediction mode corresponding to the largest histogram count is used to determine the LFNST, NSPT or MTS transform set. 2.31. Combined inter and intra prediction (CIIP) In VVC, when a CU is coded in merge mode, if the CU contains at least 64 luma samples (that is, CU width times CU height is equal to or larger than 64) , and if both CU width and CU height are less than 128 luma samples, an additional flag is signalled to indicate if the combined inter / intra prediction (CIIP) mode is applied to the current CU. As its name indicates, the CIIP prediction combines an inter prediction signal with an intra prediction signal. The inter prediction signal in the CIIP mode Pinter is derived using the same inter prediction process applied to regular merge mode; and the intra prediction signal Pintra is derived following the regular intra prediction process with the planar mode. Then, the intra and inter prediction signals are combined using weighted averaging, where the weight value is calculated depending on the coding modes of the top and left neighbouring blocks (depicted in FIG. 48) as follows: – If the top neighbor is available and intra coded, then set isIntraTop to 1, otherwise set isIntraTop to 0; – If the left neighbor is available and intra coded, then set isIntraLeft to 1, otherwise set isIntraLeft to 0; – If (isIntraLeft + isIntraTop) is equal to 2, then wt is set to 3; – Otherwise, if (isIntraLeft + isIntraTop) is equal to 1, then wt is set to 2; – Otherwise, set wt to 1. The CIIP prediction is formed as follows: PCIIP= ( (4-wt) *Pinter+wt*Pintra+2) >>2 2.31.1. Subblock CIIP A subblock-based merge candidate may be used to generate the inter signal of CIIP, where the same subblock-based merge candidate list used by affine and sbTMVP is utilized. When CIIP flag is true and CIIP-TM flag is false, a subblock-based CIIP flag is signalled. If subblock-based CIIP flag is true, an index indicating specific candidate in the subblock-based merge list is signalled, and TIMD is used to generate intra signal by default thus no CIIP-PDPC flag signalled any more. 2.31.2. Combination of CIIP with TIMD and TM merge In CIIP mode, the prediction samples are generated by weighting an inter prediction signal predicted using CIIP-TM merge candidate and an intra prediction signal predicted using TIMD derived intra prediction mode. The method is only applied to coding blocks with an area less than or equal to 1024. The TIMD derivation method is used to derive the intra prediction mode in CIIP. Specifically, the intra prediction mode with the smallest SATD values in the TIMD mode list is selected and mapped to one of the 67 regular intra prediction modes. In addition, it is also proposed to modify the weights (wIntra, wInter) for the two tests if the derived intra prediction mode is an angular mode. For near-horizontal modes (2 <= angular mode index < 34) , the current block is vertically divided as shown in FIG. 49A; for near-vertical modes (34 <= angular mode index <= 66) , the current block is horizontally divided as shown in FIG. 49B. The (wIntra, wInter) for different sub-blocks are shown in Table 6. Table 6. The modified weights used for angular modes. With CIIP-TM, a CIIP-TM merge candidate list is built for the CIIP-TM mode. The merge candidates are refined by template matching. The CIIP-TM merge candidates are also reordered by the ARMC method as regular merge candidates. The maximum number of CIIP-TM merge candidates is equal to two. 2.32. Spatial Geometric partitioning mode (SGPM) SGPM is an intra mode that resembles the inter coding tool of GPM, where the two prediction parts are generated from intra predicted process. In this mode, a candidate list is built with each entry containing one partition split and two intra prediction modes as shown in FIG. 50.26 partition modes and 9 of intra prediction modes are used to form the combinations. the length of the candidate list is set equal to 16. The selected candidate index is signalled. The list is reordered using template (FIG. 51) where SAD between the prediction and reconstruction of the template is used for ordering. The template size is fixed to 1. For each partition mode, an IPM list is derived for each part using the same intra-inter GPM list derivation (Sec. 2.20.3) . The IPM list size is set to 3. In the list, TIMD derived mode is replaced by 2 derived modes with horizontal and vertical orientations. The list is further augmented with block-vector based prediction candidates obtained from the adjacent and non-adjacent merge candidates coded in IntraTMP or IBC mode. The template cost is employed to select the up to 6 block vectors. The final list contains up to 9 predictors: 3 regular intra modes and up to 6 block vectors based predictors. The SGPM mode is applied with a restricted blocks size: 4<=width<=64, 4<=height<=64, width<height*8, height<width*8, width*height>=32. A PPS flag is coded to indicate whether no blending of two intra predictions is allowed. When this PPS flag is set to false, the following adaptive blending is also used for spatial GPM, where blending depth τ shown in FIG. 52 is derived as follows: · If min (width, height) ==4, 1 / 2 τ is selected · else if min (width, height) ==8, τ is selected · else if min (width, height) ==16, 2 τ is selected · else if min (width, height) ==32, 4 τ is selected · else, 8 τ is selected. Otherwise (the PPS flag is set to true) , 1 / 4 τ is always used for spatial GPM coded blocks to make sure no blending is used when SGPM block has partition angle completely horizontal or vertical, and much narrower blending width is used when SGPM block has other partition angles. It is noted that the flag is set to true in current Common Test Conditions (CTC) for the screen content videos. 2.33. CCP merge for chroma inter blocks The cross-component prediction merge mode described in section 2.29 is extended to chroma inter coding. The CCP models including CCLM, MMLM, CCCM, GLM, chroma fusion, CCP merge modes, and inter CCCM are stored and inherited for the following coding chroma intra and inter blocks. Similar to the CCP merge for chroma intra blocks, a flag is signaled to indicate whether a chroma inter block is coded using this mode. When the root CBF is equal to 0, a CU-level flag is signalled. Otherwise, a TU-level flag is signalled. If the CCP merge mode is used, a CCP merge list is constructed in a similar way as that for chroma intra blocks except that additional shifted temporal candidates and on-the-fly derived candidates are included in the CCP merge list. The additional shifted temporal candidates are derived from the collocated picture without one-CTU-row buffer constraint. And the position of these candidates is the same as those defined in ECM for regular inter merge prediction candidates with a shift obtained from the motion vector of the current block. The on-the-fly derived candidates are only used for low delay pictures and are obtained using the neighboring reconstructed samples of the current block. At most 1 on-the-fly derived candidates including single / multi-model CCCM and single / multi-model CCLM are added to the CCP merge list. After the CCP merge list is constructed, the candidate with the lowest template cost is selected for the chroma inter block. The chroma inter block is then predicted in the same way as that of inter CCCM. That is, the motion compensation predicted samples are blended with the cross-component predicted samples to form the final prediction. 3. Problems Motion vector prediction (MVP) , block vector prediction (BVP) , intra mode prediction (IMP) and parameter prediction (PP) are important in the video coding. Optimizing the MVP can be used to improve the coding efficiency. 4. Detailed solutions The detailed solutions below should be considered as examples to explain general concepts. These embodiments should not be interpreted in a narrow way. Furthermore, these embodiments can be combined in any manner. In the following, one motion candidate is a duplicate of another motion candidate may be defined as: 1) The two motion candidates are totally the same in the reference directions, reference picture indices, affine model (for affine motion) and motion vectors or block vectors or partial or all CPMVs according to the motion type (inter or IBC / IntraTMP or affine) . Or 2) The two motion candidates are totally the same in the reference directions, reference picture indices, affine model (for affine motion) . But the difference of motion vectors or block vectors or partial or all CPMVs according to the motion type (inter or IBC / IntraTMP or affine) of the two motion candidates may be within a motion vector difference similarity threshold (i.e., mvdSimilarityThresh) . The difference of motion vectors may be defined as the absolute horizontal and / or vertical component of the motion vector difference of the two motion candidates in reference list 0 and / or reference list 1. The difference of block vectors may be defined as the absolute horizontal and / or vertical component of the block vector difference of the two motion candidates in reference list 0 and / or reference list 1. The difference of one CPMV may be defined as the absolute horizontal and / or vertical component of the motion vector difference of this CPMV of the two motion candidates in reference list 0 and / or reference list 1. The threshold may be adaptively set according to the coding mode of current block (e.g., TM merge, affine merge, regular merge, etc. ) , and / or current block size, and / or candidate type (e.g., adjacent spatial, adjacent temporal, non-adjacent spatial, non-adjacent temporal, HMVP, pairwise, chained MVP, or STMVP, etc. ) , and / or QP, and / or the reference index or the reference POC of current block, and / or other coding information of current block. In this disclosure, a motion candidate may refer to a MV candidate or a BV candidate. In this disclosure, a motion candidate list may refer to a MV candidate list or a BV candidate list. In one example, the picture types may be low delay and non-low delay pictures. In one example, the picture types may depend on whether backward inter-prediction is applied for a picture. In one example, the backward inter-prediction may refer to one current picture has a reference picture whose POC is larger than POC of the current picture. In one example, a picture with backward inter-prediction may be defined as a non-low delay picture. In one example, a picture without backward inter-prediction may be defined as a low delay picture. In one example, the picture type may be signalled in the bitstream (such as in the slice header or in the picture header) . Or it may be derived from the reference picture configuration of the current picture.Weighted-multiple motion candidate 1. In one example, when deriving the weighted-multiple motion candidate from multiple (e.g., N) motion candidates (e.g., cand1~candN) , if at least two motion vectors of the multiple motion candidates are available in one reference list, these available motion vectors may be weighted averaged when their reference picture condition is met to derive the motion vector (MV) of the weighted-multiple motion candidate (e.g., wMulCandMV) in the reference list; if only one motion vector is available in one reference list, use the available MV as wMulCandMV in the reference list directly; if no motion vector is available in one reference list, keep this reference list invalid. a. In one example, the “reference picture condition” may be that all the MVs of the multiple motion candidates to derive the weighted-multiple motion candidate must refer to the same reference picture. b. In one example, if all (i.e., N) motion vectors of the multiple motion candidates are available in one reference list and satisfy the reference picture condition, these available motion vectors may be weighted averaged to derive wMulCandMV in the reference list as wMulCandMV= (w1*cand1MV+ w2*cand2MV+…+ wN*candNMV +offset) >> shift. (a) In one example, offset = 1 << (shift -1) ; (b) Alternatively, the derivation method may be as follows: wMulCandMV= w1*cand1MV+ w2*cand2MV+…+ wN*candNMV; wMulCandMVHor= (wMulCandMVHor + offset - (wMulCandMVHor >= 0) ) >>shift; wMulCandMVVer = (wMulCandMVVer + offset - (wMulCandMVVer >= 0) ) >>shift; wherein, wMulCandMVHor and wMulCandMVVer are the horizontal and vertical components of wMulCandMV, respectively; and for (x>=0) function, it is 1 if x>=0 and it is 0 if x<0. (c) Alternatively, if at least two (e.g., M) motion vectors of the multiple motion candidates are available in one reference list and satisfy the reference picture condition, these available motion vectors may be weighted averaged to derive wMulCandMV in the reference list as wMulCandMV= (w1*cand1MV+ w2*cand2MV+…+ wM*candMMV +offset) >> shift. 1) In one example, offset = 1 << (shift -1) ; 2) Alternatively, the derivation method may be as follows: wMulCandMV= w1*cand1MV+ w2*cand2MV+…+ wM*candMMV; wMulCandMVHor= (wMulCandMVHor + offset - (wMulCandMVHor >=0) ) >> shift; wMulCandMVVer = (wMulCandMVVer + offset - (wMulCandMVVer >=0) ) >> shift; wherein, wMulCandMVHor and wMulCandMVVer are the horizontal and vertical components of wMulCandMV, respectively; and for (x>=0) function, it is 1 if x>=0 and it is 0 if x<0. (d) In one example, the weights (i.e., w1~wN) may be fixed. 1) In one example, w1 is 1, w2 is 1, w3 is 1, w4 is 1, shift is 2, N is 4. 2) In one example, w1 is 3, w2 is 2, w3 is 2, w4 is 1, shift is 3, N is 4. 3) In one example, w1 is 3, w2 is 3, w3 is 2, shift is 3, N is 3. 4) In one example, w1 is 3, w2 is 3, w3 is 2, shift is 3, M is 3. 5) In one example, w1 is 1, w2 is 1, shift is 1, M is 2. (e) In one example, the weights (i.e., w1~wN) may be derived according to the costs associated with the multiple motion candidates. 1) In one example, the cost may be measured by template matching cost. 2) In one example, wI = (sumCost-candICost)  /  ( (N-1) *sumCost) and 3) In one example, to favor the first M motion candidates to derive the weighted-multiple motion candidate, its cost may be multiplied by a factor. i. In one example, the factor may be smaller than 1. (i) In one example, the factor may be 0.9. (ii) In one example, the factor may be 0.95. (iii) In one example, the factor may be 0.85. ii. In one example, M may be the integer from 1 to (N-1) . (f) In one example, for affine mode, the weighted average operation is performed for the CPMVs of the multiple affine motion candidates. c. In one example, a weighted average candidate may be calculated with all multiple motion candidates satisfying the reference picture condition. (a) The weighted average candidate referring to reference picture X may be calculated with all multiple motion candidates referring to the reference picture X. 1) In one example, the reference picture X may be predefined. i. In one example, the reference picture X may be set to the reference picture of the first candidate. ii. In one example, the reference picture X may be set to the reference picture of one candidate from the multiple candidates. iii. In one example, the reference picture X may be with reference index 0. 2) In one example, the reference picture X may be derived online. d. In one example, a weighted average candidate may be calculated with some multiple motion candidates satisfying the reference picture condition. (a) The weighted average candidate referring to reference picture X may be calculated with two or several multiple motion candidates referring to the reference picture X. 1) In one example, the reference picture X may be predefined. i. In one example, the reference picture X may be set to the reference picture of the first candidate. ii. In one example, the reference picture X may be set to the reference picture of one candidate from the multiple candidates. iii. In one example, the reference picture X may be with reference index 0. 2) In one example, the reference picture X may be derived online. e. In one example, at least two motion vectors of the multiple motion candidates are available in one reference list may only involve all motion vectors of the multiple motion candidates are available in one reference list. f. In one example, at least two motion vectors of the multiple motion candidates are available in one reference list may only involve all or two motion vectors of the multiple motion candidates are available in one reference list. (a) In one example, two motion vectors of the multiple motion candidates are available in one reference list may only involve two motion vectors of the first two motion candidates (cand1 and cand2) are available in one reference list. (b) In one example, two motion vectors of the multiple motion candidates are available in one reference list may only involve the motion vector of the first motion candidate (cand1) and the motion vector of the S1th motion candidate (cands1, 1<S1≤N) are available in one reference list. 1) In one example, S1 may be the first motion candidate possessing motion vector and satisfying the reference picture condition in the reference list. (c) In one example, two motion vectors of the multiple motion candidates are available in one reference list may only involve two motion vectors of the first S2 (S2≤N) motion candidates (cand1~cands2) are available in one reference list. 1) In one example, S2 may be 3. 2) In one example, S2 may be 4. 3) In one example, the first paired candidates possessing motion vector and satisfying the reference picture condition in the reference list may be used. (d) In one example, the order may be checking whether all (i.e., N) motion vectors of the multiple motion candidates are available and satisfy the reference picture condition in one reference list, if the two conditions are both met, the weighted average operation are performed; otherwise, checking whether two motion vectors of the multiple motion candidates are available and satisfy the reference picture condition in one reference list, if the two conditions are both met, the weighted average operation are performed; otherwise, the weighted average operation are not performed. g. In one example, at least two motion vectors of the multiple motion candidates are available in one reference list may involve R (2≤R≤N) motion vectors of the multiple motion candidates are available in one reference list. (a) In one example, R motion vectors of the multiple motion candidates are available in one reference list may only involve R motion vectors of the first R motion candidates (cand1~candR) are available in one reference list. (b) In one example, R motion vectors of the multiple motion candidates are available in one reference list may only involve the motion vector of the first motion candidate (cand1) and the motion vectors of the other (R-1) motion candidates from the first S(R-1) (R≤S (R-1) ≤N) motion candidates are available in one reference list. 1) In one example, the first grouped candidates possessing motion vector and satisfying the reference picture condition in the reference list. (c) In one example, R motion vectors of the multiple motion candidates are available in one reference list may only involve R motion vectors of the first SR (R≤SR≤N) motion candidates are available in one reference list. 1) In one example, the first grouped candidates possessing motion vector and satisfying the reference picture condition in the reference list may be used. (d) In one example, the order may be checking whether all (i.e., N) motion vectors of the multiple motion candidates are available and satisfy the reference picture condition in one reference list, if the two conditions are both met, the weighted average operation are performed; otherwise, checking whether (N-1) motion vectors of the multiple motion candidates are available and satisfy the reference picture condition in one reference list, if the two conditions are both met, the weighted average operation are performed; until checking whether two motion vectors of the multiple motion candidates are available and satisfy the reference picture condition in one reference list, if the two conditions are both met, the weighted average operation are performed; otherwise, the weighted average operation are not performed. h. In one example, the reference picture condition may be that the reference pictures of all the candidates to derive the weighted-multiple candidate are the same. (a) Alternatively, the reference picture condition may be that the reference pictures of the first P candidates to derive the weighted-multiple candidate are the same. 1) In one example, P may be the integer from 2 to (N-1) . (b) Alternatively, the reference picture condition may be no condition, the multiple motion vectors may be weighted averaged directly. 1) In one example, the reference picture of the weighted-multiple candidate may be set to the reference picture of the first candidate. 2) In one example, the reference picture of the weighted-multiple candidate may be set to the reference picture of the second candidate. 3) In one example, the reference picture of the weighted-multiple candidate may be set to the reference picture of one candidate from the multiple candidates. 2. In one example, when deriving the weighted-multiple motion candidate from multiple (e.g., N) motion candidates (e.g., cand1~candN) , predefined combinations may be used. a. In one example, the first (N-1) candidates to derive the weighted-multiple candidates may be the first Q candidates in the initial motion candidate list. After the first (N-1) candidates are determined, for example, the (N-1) th candidate (i.e., cand (N-1) ) to derive the weighted-multiple candidate is the Kth candidate in the initial motion candidate list, the Nth candidate (i.e., candN) to derive the weighted-multiple candidate may be the Lth candidate in the initial motion candidate list, L may be the integer from (K+1) to max. (a) In one example, N may be 4, Q may be 3, max may be 4. (b) In one example, N may be 4, Q may be 3, max may be 6. (c) In one example, N may be 4, Q may be 4, max may be 6. (d) In one example, N may be 4, Q may be 3. (e) In one example, Q may be (max-1) . (f) In one example, max may be predefined. (g) In one example, max may be derived online. b. In one example, the first candidate (i.e., cand1) to derive the weighted-multiple candidates may be the L1th candidate in the initial motion candidate list, L1 may be the integer from 1 to max- (N-1) . (a) Alternatively, the first candidate (i.e., cand1) to derive the weighted-multiple candidates may be the L1th candidate in the initial motion candidate list, L1 may be 1. (b) Alternatively, the first candidate (i.e., cand1) to derive the weighted-multiple candidates may be the L1th candidate in the initial motion candidate list, L1 may be the integer from 1 to M1 and 1≤M1≤ (max- (N-1) ) . 1) In one example, M1 may be 2. (c) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, L1 may be 1. Otherwise, L1 may be the integer from 1 to max- (N-1) . (d) Alternatively, if the current picture is a low-delay picture, L1 may be 1. Otherwise, L1 may be the integer from 1 to max- (N-1) . (e) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, L1 may be 1. Otherwise, L1 may be the integer from 1 to M1 and 1≤M1≤ (max- (N-1)  ) . 1) In one example, M1 may be 2. (f) Alternatively, if the current picture is a low-delay picture, L1 may be 1. Otherwise, L1 may be the integer from 1 to M1 and 1≤M1≤ (max- (N-1) ) . 1) In one example, M1 may be 2. (g) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, L1 may be the integer from 1 to M1and 1≤M1 ≤ (max- (N-1) ) . Otherwise, L1 may be the integer from 1 to max- (N-1) . 1) In one example, M1 may be 2. (h) Alternatively, if the current picture is a low-delay picture, L1 may be the integer from 1 to M1 and 1≤M1≤ (max- (N-1) ) . Otherwise, L1 may be the integer from 1 to max- (N-1) . 1) In one example, M1 may be 2. c. In one example, the second candidate (i.e., cand2) to derive the weighted-multiple candidates may be the L2th candidate in the initial motion candidate list, L2 may be the integer from L1+1 to max- (N-2) . (a) Alternatively, the second candidate (i.e., cand2) to derive the weighted-multiple candidates may be the L2th candidate in the initial motion candidate list, L2 may be 2. (b) Alternatively, the second candidate (i.e., cand2) to derive the weighted-multiple candidates may be the L2th candidate in the initial motion candidate list, L2 may be the integer from L1+1 to M2 and 2≤M2≤ (max- (N-2) ) . 1) In one example, M2 may be L1+2. (c) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, L2 may be 2. Otherwise, L2 may be the integer from L1+1 to max- (N-2) . (d) Alternatively, if the current picture is a low-delay picture, L2 may be 2. Otherwise, L2 may be the integer from L1+1 to max- (N-2) . (e) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, L2 may be 2. Otherwise, L2 may be the integer from L1+1 to M2 and 2≤M2≤ (max- (N-2) ) . 1) In one example, M2 may be L1+2. (f) Alternatively, if the current picture is a low-delay picture, L2 may be 2. Otherwise, L2 may be the integer from L1+1 to M2 and 2≤M2≤ (max- (N-2) ) . 1) In one example, M2 may be L1+2. (g) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, L2 may be the integer from L1+1 to M2 and 2≤M2≤ (max- (N-2) ) . Otherwise, L2 may be the integer from L1+1 to max- (N-2) . 1) In one example, M2 may be L1+2. (h) Alternatively, if the current picture is a low-delay picture, L2 may be the integer from L1+1 to M2 and 2≤M2≤ (max- (N-2) ) . Otherwise, L2 may be the integer from L1+1 to max- (N-2) . 1) In one example, M2 may be L1+2. d. In one example, the mth candidate (i.e., candm, 1≤m≤M) to derive the weighted-multiple candidates may be the Lmth candidate in the initial motion candidate list, Lm may be the integer from L (m-1) +1 (e.g., L0=0) to max- (N-m) . (a) In one example, M may be 1, N may be 4. (b) In one example, M may be 2, N may be 4. (c) In one example, M=N. 1) In one example, M=N=4. (d) Alternatively, the mth candidate (i.e., candm) to derive the weighted-multiple candidates may be the Lmth candidate in the initial motion candidate list, Lm may be m. (e) Alternatively, the mth candidate (i.e., candm) to derive the weighted-multiple candidates may be the Lmth candidate in the initial motion candidate list, Lm may be the integer from L (m-1) +1 to Mm and m≤Mm≤ (max- (N-m) ) . 1) In one example, Mm may be L (m-1) +2. (f) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, Lm may be m. Otherwise, Lm may be the integer from L (m-1) +1 to max- (N-m) . (g) Alternatively, if the current picture is a low-delay picture, Lm may be m. Otherwise, Lm may be the integer from L (m-1) +1 to max- (N-m) . (h) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, Lm may be m. Otherwise, Lm may be the integer from L (m-1) +1 to Mm and m≤Mm≤ (max- (N-m) ) . 1) In one example, Mm may be L (m-1) +2. (i) Alternatively, if the current picture is a low-delay picture, Lm may be m. Otherwise, Lm may be the integer from L (m-1) +1 to Mm and m≤Mm≤ (max- (N-m) ) . 1) In one example, Mm may be L (m-1) +2. (j) Alternatively, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, Lm may be the integer from L (m-1) +1 to Mm and m≤Mm≤ (max- (N-m) ) . Otherwise, Lm may be the integer from L (m-1) +1 to max- (N-m) . 1) In one example, Mm may be L (m-1) +2. (k) Alternatively, if the current picture is a low-delay picture, Lm may be the integer from L (m-1) +1 to Mm and m≤Mm≤ (max- (N-m) ) . Otherwise, Lm may be the integer from L (m-1) +1 to max- (N-m) . 1) In one example, Mm may be L (m-1) +2. e. In one example, the nth candidate (i.e., candn, M<n≤N) to derive the weighted-multiple candidates may be the Lnth candidate in the initial motion candidate list, Ln may be the integer from L (n-1) +1 (e.g., L0=0) to max- (N-n) . (a) In one example, M may be 0, N may be 4. (b) In one example, M may be 1, N may be 4. (c) In one example, M may be 2, N may be 4. (d) In one example, M may be 3, N may be 4. (e) In one example, M may be 0. f. In one example, the multiple candidates (e.g., cand1~ candN) to derive the weighted-multiple candidate may be the first S candidates. (a) In one example, N may be 4, S may be 4. (b) In one example, N may be 4, S may be 6. g. In one example, max may be derived as follows. (a) In one example, max may be the maximum number of the candidates in the initial motion candidate list (e.g., maxNum1) . (b) In one example, max may be the maximum number of the candidates before the zero padding candidates in the initial motion candidate list (e.g., maxNum2) . (c) In one example, max may be the maximum number of the candidates in the finalized motion candidate list (e.g., maxNum3) . (d) In one example, max may be the maximum number of the candidates for ARMC (e.g., maxNum4) . (e) In one example, max may be the minimum value of the maximum number of the candidates in the initial motion candidate list and the maximum number of the candidates in the finalized motion candidate list. (f) In one example, max may be the minimum value of the maximum number of the candidates in the initial motion candidate list and the maximum number of the candidates for ARMC. (g) In one example, max may be the minimum value of the maximum number of the candidates before the zero padding candidates in the initial motion candidate list and the maximum number of the candidates in the finalized motion candidate list. (h) In one example, max may be the minimum value of the maximum number of the candidates before the zero padding candidates in the initial motion candidate list and the maximum number of the candidates for ARMC. (i) In one example, for template matching merge mode, max may be the minimum value of the maximum number of the candidates before the zero padding candidates in the initial motion candidate list and the maximum number of the candidates for ARMC; otherwise, max may be the minimum value of the maximum number of the candidates before the zero padding candidates in the initial motion candidate list and the maximum number of the candidates in the finalized motion candidate list. (j) In one example, max may be the minimum value of the maximum number of the candidates before the zero padding candidates in the initial motion candidate list, the maximum number of the candidates in the finalized motion candidate list, and a predefined maximum number (e.g., 15) of merge candidates. (k) In one example, max may be the minimum value of the maximum number of the candidates before the zero padding candidates in the initial motion candidate list, the maximum number of the candidates for ARMC, and a predefined maximum number (e.g., 15) of merge candidates. (l) In one example, for template matching merge mode, max may be the minimum value of the maximum number of the candidates before the zero padding candidates in the initial motion candidate list, the maximum number of the candidates for ARMC, and a predefined maximum number (e.g., 15) of merge candidates; otherwise, max may be the minimum value of the maximum number of the candidates before the zero padding candidates in the initial motion candidate list, the maximum number of the candidates in the finalized motion candidate list, and a predefined maximum number (e.g., 15) of merge candidates. 3. In one example, the weighted-multiple motion candidate may be derived by the multiple motion candidates after the first ARMC reordering in the initial motion candidate list. a. Alternatively, the weighted-multiple motion candidate may be derived by the multiple motion candidates without ARMC reordering in the initial motion candidate list. 4. In one example, the weighted-multiple motion candidate may be added after the pairwise motion candidate. a. Alternatively, the weighted-multiple motion candidate may be added before the pairwise motion candidate. b. In one example, the weighted-multiple motion candidate may be added in the pairwise merge list. (a) Alternatively, the weighted-multiple motion candidate may be added in the initial motion candidate list. c. In one example, P positions may be reserved for the weighted-multiple motion candidate in the pairwise merge list. (a) In one example, P may be 1. (b) In one example, P may be 2. (c) In one example, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, P may be 1. Otherwise, P may be 2. (d) In one example, if the current picture is a low-delay picture, P may be 1. Otherwise, P may be 2. 5. In one example, the maximum number of the weighted-multiple motion candidates may be R. a. In one example, R may be 1, 2, 3, or 4. b. In one example, R may be predefined. c. In one example, R may be derived online. 6. In one example, the weighted-multiple motion candidate may be only applied to non-low delay picture. 7. In one example, if the current picture is a low-delay picture and the POC distance between the nearest reference picture and the current picture is one, the weighted-multiple motion candidate may be not applied. Otherwise, the weighted-multiple motion candidate may be applied. 8. In one example, the weighted-multiple motion candidate may be used in at least one of regular inter merge / AMVP, inter-TM merge / AMVP, CIIP merge / AMVP, CIIP-TM merge, MMVD, regular GPM, GPM-MMVD, GPM-TM, GPM with inter and intra prediction, GPM with inter prediction and IBC, bi-predictive GPM, AMC-GPM, bilateral matching AMVP-merge mode, DMVR, multi-pass DMVR, adaptive DMVR, affine merge / AMVP, affine-TM merge / AMVP prediction, affine CIIP prediction, affine MMVD, affine-DMVR, affine-DMVR-MMVD, adaptive affine-DMVR mode,  non-local LIC, LIC flag signalling for merge modes (e.g., regular merge mode, affine merge mode and TM merge mode) , LIC model inheritance for merge modes (e.g., regular merge and GPM) or any other inter prediction mode. 9. In one example, the weighted-multiple motion candidate may be used in at least one of regular IBC merge / AMVP prediction, IBC-TM merge / AMVP prediction, RR-IBC merge / AMVP prediction, IBC-MBVD prediction, IBC-CIIP prediction, uni-predictive IBC-GPM prediction, bi-predictive IBC-GPM prediction, regular IntraTMP prediction, SGPM with IntraTMP and IBC, GPM with inter prediction and IBC, IntraTMP or IBC extension to DIMD, IntraTMP or IBC extension to TIMD, or any other IBC / IntraTMP prediction mode. 10. In one example, the weighted-multiple motion candidate may be not used for screen content. a. In one example, the natural content and screen content may be indicated at sequence level / group of pictures level / picture level / slice level / tile group level, such as in sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header. (a) In one example, the sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header flag may be set based on the hash block hit percentage at encoder and signaled to the decoder if the decoder uses the flag. If the hash block hit percentage of the video sequence / picture / slice / tile is larger than a threshold, the video sequence / picture / slice / tile may be interpreted as screen content; otherwise, the video sequence / picture / slice / tile may be interpreted as natural content. 1) In one example, if the hash block hit percentage of the first frame for entire sequence is larger than a threshold, the video sequence may be interpreted as screen content; otherwise, the video sequence may be interpreted as natural content. 2) In one example, if the hash block hit percentage of the first frame for one GOP is larger than a threshold, the GOP may be interpreted as screen content; otherwise, the GOP may be interpreted as natural content. 3) In one example, if the hash block hit percentage of one I-picture or I-slice is larger than a threshold, the I-picture or I-slice and its following pictures / slices before next I-picture or I-slice may be interpreted as screen content; otherwise, the I-picture or I-slice and its following pictures / slices before next I-picture or I-slice may be interpreted as natural content. 4) In one example, the threshold may be predefined. i. In one example, the threshold may be 19, 40, 56, or 59. (b) In one example, the sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header flag may be predefined. b. In one example, the natural content and screen content may be indicated at PB / TB / CB / PU / TU / CU / VPDU / CTU / CTU row / slice / tile / sub-picture / other kinds of region contain more than one sample or pixel. (a) In one example, the indication flag may be signalled. (b) In one example, the indication flag may be derived. 1) In one example, the indication flag may be derived according to the coding mode of some neighboring blocks of current block. i. In one example, the coding mode may be IBC or IntraTMP or other coding mode which has BV.Motion candidate similarity threshold 11. In one example, when constructing the motion candidate list, the motion vector difference similarity threshold (i.e., mvdSimilarityThresh) of motion candidates for each motion category may be larger than or equal to the motion vector difference similarity threshold of the corresponding motion candidate list. a. In one example, the motion category may be adjacent spatial, non-adjacent spatial, adjacent temporal, non-adjacent temporal, history-based, pairwise average, weighted-multiple, chained MVP.History-based table resetting 12. In one example, the history-based table resetting before coding each CTU row may be removed or relaxed. a. In one example, history-based table is only reset when starting coding / decoding a new slice. b. In one example, history-based table can store the information from some neighbor CTUs. (a) In one example, H neighbor CTUs’ history-based tables may be additionally used for affine and / or inter mode. 1) In one example, H may be 1, 2, or 3. 2) In on example, the checking order may be above-> above-right->left neighbor CTU’s history-based table. 3) In on example, the checking order may be above->left -> above-right neighbor CTU’s history-based table. 4) In one example, the affine mode may be at least one of regular affine merge mode, affine-TM merge mode, affine DMVR mode, or any other affine mode. 5) In one example, the inter mode may be at least one of regular inter merge mode, inter-TM merge mode, inter DMVR mode, non-local LIC, LIC flag signalling for merge modes (e.g., regular merge mode, affine merge mode and TM merge mode) , LIC model inheritance for merge modes (e.g., regular merge and GPM) or any other inter mode. (b) In one example, the neighbor CTU's history-based table may be checked after the original history-based table. c. In one example, the history-based table may involve at least one of the HMVP table, HBVP table, the first and second affine history-parameter table (HPT) , history-based CCP table, history-based EIP table.DMVR refinement cost 13. In one example, the refinement cost of decoder-side motion vector refinement (DMVR) may consider template matching cost. a. In one example, the block based DMVR refinement cost may consider template matching cost. (a) In one example, the block based DMVR refinement cost may be calculated as: blkDMVRCost = w1*mvDistanceCost + w2*bilCost+w3*tmCost. where mvDistanceCost refer to motion vector difference cost, bilCost refer to bilateral matching cost, and tmCost refer to template matching cost; w1, w2, and w3 are the corresponding weight factors. (b) In one example, the block based DMVR refinement cost considering template matching cost may replace the original block based bilateral matching (BM) refinement cost. (c) In one example, the block based DMVR refinement cost considering template matching cost may be used as the cost criterion of an extra MV refinement process. 1) In one example, the extra MV refinement process may be after block-based bilateral matching (BM) process. 2) In one example, the extra MV refinement process may be after block-based template matching (TM) process. 3) In one example, the extra MV refinement process may be before block-based bilateral matching (BM) process. 4) In one example, the extra MV refinement process may be before block-based template matching (TM) process. b. In one example, the subblock based DMVR refinement cost may consider template matching cost. (a) In one example, the subblock based DMVR refinement cost considering template matching cost may replace the original subblock based bilateral matching (BM) refinement cost. (b) In one example, the subblock based DMVR refinement cost considering template matching cost may be used as the cost criterion of an extra MV refinement process. 1) In one example, the extra MV refinement process may be after subblock-based bilateral matching (BM) process. 2) In one example, the extra MV refinement process may be before subblock-based bilateral matching (BM) process.General information 14. In one example, the above methods may be used for the block using any inter-prediction / intra-prediction / IBC-prediction / intraTMP-prediction mode, such as merge mode, AMVP mode, or IntraTMP mode. a. In one example, the IBC / IntraTMP prediction may be regular IBC merge / AMVP prediction, IBC-TM merge / AMVP prediction, RR-IBC merge / AMVP prediction, IBC-MBVD prediction, IBC-CIIP prediction, uni-predictive IBC-GPM prediction, bi-predictive IBC-GPM prediction, regular IntraTMP prediction, SGPM with IntraTMP and IBC, GPM with inter prediction and IBC, IntraTMP or IBC extension to DIMD, IntraTMP or IBC extension to TIMD, or any other IBC / IntraTMP prediction. b. In one example, the IBC prediction may not be RR-IBC merge / AMVP prediction. c. In one example, the inter prediction may be regular inter merge / AMVP prediction, inter-TM merge / AMVP prediction, BM, DMVR, multi-pass DMVR,  or ADMVR merge prediction, bilateral matching AMVP-merge prediction, MMVD prediction, CIIP prediction, CIIP-TM merge prediction, uni-predictive GPM prediction, GPM-MMVD, GPM-TM, GPM with inter and intra prediction, GPM with inter prediction and IBC, bi-predictive GPM prediction, regular affine merge / AMVP prediction, affine-TM merge / AMVP prediction, affine DMVR prediction, affine MMVD prediction, affine CIIP prediction, affine motion compensation (AMC) GPM(AMC-GPM) , affine-DMVR-MMVD, adaptive affine-DMVR mode, CCP merge for chroma inter blocks, non-local LIC, LIC flag signalling for merge modes (e.g., regular merge mode, affine merge mode and TM merge mode) , LIC model inheritance for merge modes (e.g., regular merge and GPM) or any other inter prediction. d. In one example, the intra prediction may be regular intra (e.g., intra prediction mode (IPM) candidate list construction) , GPM with inter and intra prediction, OBIC, Cross-Component Prediction (CCP) merge (a.k.a., non-local CCP) mode, Spatial Geometric partitioning mode (SGPM) , Extrapolation filter-based intra prediction (EIP) mode, or any other intra prediction. 15. In one example, when constructing the candidate list, all or partial candidates may be needed to perform full pruning to make sure there are no duplicate or similar candidates in the list. 16. A syntax element disclosed above may be binarized as a flag, a fixed length code, an EG (x) code, a unary code, a truncated unary code, a truncated binary code, etc. It can be signed or unsigned. 17. A syntax element disclosed above may be coded with at least one context model. Or it may be bypass coded. 18. A syntax element (SE) disclosed above may be signaled in a conditional way. a. The SE is signaled only if the corresponding function is applicable. 19. A syntax element disclosed above may be signaled at block level / sequence level / group of pictures level / picture level / slice level / tile group level, such as in coding structures of CTU / CU / TU / PU / CTB / CB / TB / PB, or sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header. 20. In above examples, the block may refer to the colour component / sub-picture / slice / tile / coding tree unit (CTU)  / CTU row / groups of CTU / coding unit (CU)  / prediction unit (PU)  / transform unit (TU)  / coding tree block (CTB)  / coding block (CB)  / prediction block (PB)  / transform block (TB)  / ablock / sub-block of a block / sub-region within a block / any other region that contains more than one sample or pixel. 21. Whether to and / or how to apply the disclosed methods above may be signalled at sequence level / group of pictures level / picture level / slice level / tile group level, such as in sequence header / picture header / SPS / VPS / DPS / DCI / PPS / APS / slice header / tile group header. 22. Whether to and / or how to apply the disclosed methods above may be signalled at PB / TB / CB / PU / TU / CU / VPDU / CTU / CTU row / slice / tile / sub-picture / other kinds of region contains more than one sample or pixel. 23. Whether to and / or how to apply the disclosed methods above may be dependent on coded information, such as block size, colour format, single / dual tree partitioning, colour component, slice / picture type.

[0125] More details of the embodiments of the present disclosure will be described below which are related to video coding. The embodiments of the present disclosure should be considered as examples to explain the general concepts and should not be interpreted in a narrow way. Furthermore, these embodiments can be applied individually or combined in any manner.

[0126] As used herein, the term “block” may represent a coding tree block (CTB) , a coding tree unit (CTU) , a coding block (CB) , a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a prediction block (PB) , a transform block (TB) , a subblock, a tile, a slice, a subpicture, a video processing unit comprising multiple samples / pixels, and / or the like. A block may be rectangular or non-rectangular.

[0127] Fig. 53 illustrates a flowchart of a method 5300 for video processing in accordance with embodiments of the present disclosure. The method 5300 is implemented during a conversion between a current block of a video and a bitstream of the video. As shown in FIG. 53, the method 5300 starts at 5310 where a plurality of motion candidates for the current block is obtained. By way of example rather than limitation, the plurality of motion candidates may be selected from an initial motion candidate list for the current block. The obtaining of the plurality of motion candidates will be described in details below with reference to FIG. 54.

[0128] At block 5320, a target motion candidate is determined based on the plurality of motion candidates. In order to determine the target motion candidate, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) is determined from the plurality of motion candidates based on a reference picture condition, and a first MV of the target motion candidate for the first RPL is determined based on the set of MVs. For example, if the set of MVs comprises only a single MV, the single MV is determined as the first MV. If the set of MVs comprises a plurality of MVs satisfying the reference picture condition, the first MV is determined based on the plurality of MVs. In one example, an average of the plurality of MVs may be determined as the first MV. Alternatively, a weighted average of the plurality of MVs may be determined as the first MV. In a further example, a weighted sum of the plurality of MVs may be determined as the first MV. The target motion candidate may also be referred to as “weighted-multiple motion candidate” .

[0129] In one example embodiment, the reference picture condition may comprise that all MVs used to derive one MV of the target motion candidate refer to a same reference picture. In another example embodiment, the reference picture condition may comprise that the first P MVs used to derive one MV of the target motion candidate refer to a same reference picture. In addition, P may be an integer in a range from 2 to (N-1) , inclusive, and N may represent the number of the plurality of motion candidates. In the above two cases, the same reference picture is set to be the reference picture for the derived MV (e.g., the first MV) .

[0130] In a further example embodiment, the reference picture condition may be no condition. In other words, a plurality of MVs that refer to different reference pictures may also be used to derive an MV. In this case, a reference picture for the derived MV (e.g., the first MV) may be set to be a reference picture of the first motion candidate of the plurality of motion candidates, a reference picture of the second motion candidate of the plurality of motion candidates, or a reference picture of one of the plurality of motion candidates.

[0131] It should be understood that the possible implementations of the reference picture condition described here are merely illustrative and therefore should not be construed as limiting the present disclosure in any way. For ease of discussion, the reference picture condition that all MVs used to derive one MV of the target motion candidate must refer to a same reference picture will be taken as an example for illustration.

[0132] At 5330, the conversion is performed based on the target motion candidate. In some embodiments, the conversion may include encoding the current block into the bitstream. Alternatively or additionally, the conversion may include decoding the current block from the bitstream. It should be understood that the above illustrations and / or examples are described merely for purpose of description. The scope of the present disclosure is not limited in this respect.

[0133] In view of the above, a first MV of a target motion candidate for a first RPL is determined based on a reference picture condition and a set of MVs associated with a same first RPL from a plurality of motion candidates. Compared with the conventional solution, the proposed method can advantageously improve coding efficiency and coding quality.

[0134] In some embodiments, if the plurality of motion candidates do not comprise an MV associated with a second RPL, the target motion candidate may not comprise a second MV for the second refence picture list.

[0135] In some example embodiments, an initial motion candidate list may be constructed for the current block. The initial motion candidate list may comprise spatial motion candidates, temporal motion candidates, and / or chained motion candidates for the current block. Then, N motion candidates may be selected from the initial motion candidate list. For example, N may be 3, 4, or the like. It should be understood that the specific values recited herein are intended to be examples rather than limiting the scope of the present disclosure.

[0136] At first, the N motion candidates will be checked for a first RPL. If the N motion candidates comprise N MVs associated with the same first RPL and referring a same reference picture, an average, a weighted average or a weighted sum of the N MVs may be determined to be the first MV of the target motion candidate for the first RPL. Otherwise, it will be checked whether the N motion candidates comprise an MV associated with the first RPL, if so, a single MV associated with the first RPL may be determined to be the first MV of the target motion candidate for the first RPL. If the N motion candidates do not comprise an MV associated with the first RPL, the target motion candidate may not comprise a first MV for the first RPL.

[0137] Then, the N motion candidates will be checked for a second RPL. If the N motion candidates comprise N MVs associated with the same second RPL and referring a same reference picture, an average, a weighted average or a weighted sum of the N MVs may be determined to be the second MV of the target motion candidate for the second RPL. Otherwise, it will be checked whether the N motion candidates comprise an MV associated with the second RPL, if so, a single MV associated with the second RPL may be determined to be the second MV of the target motion candidate for the second RPL. If the N motion candidates do not comprise an MV associated with the second RPL, the target motion candidate may not comprise a second MV for the second RPL.

[0138] It should be understood that the above illustrations are described merely for purpose of description. For another example, if it is determined that the N motion candidates do not comprise N MVs associated with the same second RPL and referring a same reference picture, it may be checked whether the N motion candidates comprise (N-1) MVs associated with the same second RPL and referring a same reference picture, if not, it may be checked whether the N motion candidates comprise (N-2) MVs associated with the same second RPL and referring a same reference picture, and so on. The scope of the present disclosure is not limited in this respect.

[0139] In some embodiments, the number of the plurality of motion candidates may be N. Additionally, if the plurality of motion candidates comprise N MVs associated with the same first RPL and referring to a same reference picture, the N MVs may be determined as the set of MVs.

[0140] In some embodiments, the first MV may be determined based on the N MVs as follows: wMulCandMV= (w1*cand1MV+ w2*cand2MV+…+ wN*candNMV +offset) >> shift, where wMulCandMV represents the first MV; cand1MV, cand2MV, …, candNMV represents the N MVs; w1, w2, …, wN represents weighting factors for the N MVs, offset represent an offset item, and shift represents a shift count. For example, the offset item offset may be determined to be 1 << (shift -1) .

[0141] In some embodiments, the first MV may be determined based on the N MVs as follows: Int_MV= w1*cand1MV+ w2*cand2MV+…+ wN*candNMV, wMulCandMVHor = (Int_MVHor + offset - (Int_MVHor >= 0) ) >> shift, wMulCandMVVer = (Int_MVVer + offset - (Int_MVVer >= 0) ) >> shift, where wMulCandMVHor and wMulCandMVVer represent a horizontal component and a vertical component of the first MV, respectively; Int_MVHor and Int_MVVer represents a horizontal component and a vertical component of Int_MV, respectively; cand1MV, cand2MV, …, candNMV represents the N MVs; w1, w2, …, wN represents weighting factors for the N MVs, offset represent an offset item, and shift represents a shift count.

[0142] In some embodiments, if the plurality of motion candidates comprise M MVs associated with the same first RPL and referring to a same reference picture, the M MVs may be determined as the set of MVs, and M is an integer larger than 1 and smaller than the number of the plurality of motion candidates.

[0143] In some embodiments, the first MV may be determined based on the M MVs as follows: wMulCandMV= (w1*cand1MV+ w2*cand2MV+…+ wM*candMMV +offset) >> shift, where wMulCandMV represents the first MV; cand1MV, cand2MV, …, candMMV represents the M MVs; w1, w2, …, wM represents weighting factors for the M MVs, offset represent an offset item, and shift represents a shift count. For example, the offset item offset may be determined to be 1 << (shift -1) .

[0144] In some embodiments, the first MV may be determined based on the M MVs as follows: Int_MV= w1*cand1MV+ w2*cand2MV+…+ wM*candMMV, wMulCandMVHor = (Int_MVHor + offset - (Int_MVHor >= 0) ) >> shift, wMulCandMVVer = (Int_MVVer + offset - (Int_MVVer >= 0) ) >> shift, where wMulCandMVHor and wMulCandMVVer represent a horizontal component and a vertical component of the first MV, respectively; Int_MVHor and Int_MVVer represents a horizontal component and a vertical component of Int_MV, respectively; cand1MV, cand2MV, …, candMMV represents the M MVs; w1, w2, …, wM represents weighting factors for the M MVs, offset represent an offset item, and shift represents a shift count.

[0145] In some embodiments, weights for determining the weighted average of the plurality of MVs may be fixed. In some embodiments, N may be 4, w1 may be 1, w2 may be 1, w3 may be 1, w4 may be 1, and shift may be 2. In some other embodiments, N may be 4, w1 may be 3, w2 may be 2, w3 may be 2, w4 may be 1, and shift may be 3. In some further embodiments, N may be 3, w1 may be 3, w2 may be 3, w3 may be 2, and shift may be 3. In some still further embodiments, M may be 3, w1 may be 3, w2 may be 3, w3 may be 2, and shift may be 3. In some still further embodiments, M may be 2, w1 may be 1, w2 may be 1, and shift may be 1.

[0146] In some embodiments, weights for determining the weighted average of the plurality of MVs may be determined based on costs associated with the plurality of MVs. By way of example, the costs may be template matching costs.

[0147] In some embodiments, a weight for the I-th MV of the plurality of MVs may be determined as follows: wI = (sumCost-candICost)  /  ( (N1-1) *sumCost) , where wI represents the I-th MV, candICost represents a cost of the I-th MV of the plurality of MVs, N1 represents the number of the plurality of MVs, and candJCost represents a cost of the J-th MV of the plurality of MVs.

[0148] In some embodiments, costs of the first M1 MVs of the plurality of MVs may be scaled with a scaling factor before being used to determining the weights, and M1 is an integer. For example, the scaling factor may be smaller than 1. In some other examples, the scaling factor may be 0.9, 0.95 or 0.85. In addition, M1 may be in a range from 1 to (N1-1) , inclusive, and N1 may represent the number of the plurality of MVs.

[0149] In some embodiments, if the current block is coded with an affine mode, the plurality of motion candidates may comprise a plurality of affine motion candidates, and the average operation or the weighted average operation is performed for control point motion vectors (CPMVs) of the plurality of affine motion candidates.

[0150] In some embodiments, the set of MVs may be determined to be all MVs of the plurality of motion candidates that are associated with the same first RPL and refer to a same first reference picture. By way of example rather than limitation, the first MV referring to the first reference picture may be determined with the all MVs of the plurality of motion candidates that are associated with the same first RPL and refer to the same first reference picture.

[0151] In some further embodiments, the set of MVs may be determined to be a part of MVs of the plurality of motion candidates that are associated with the same first RPL and refer to a same first reference picture. By way of example rather than limitation, the first MV referring to the first reference picture is determined with at least two MVs of the plurality of motion candidates that are associated with the same first RPL and refer to the same first reference picture.

[0152] In some embodiments, the first reference picture may be predetermined or derived on-the-fly.

[0153] In some further embodiments, the first reference picture may be determined to be one of the following: a reference picture of the first motion candidate among the plurality of motion candidates, a reference picture of one of the plurality of motion candidates, or a reference picture with a reference index 0 in the first RPL.

[0154] In some embodiments, the number of the plurality of motion candidates may be N, and determining the set of MVs may comprise: checking whether the plurality of motion candidates comprise N MVs associated with the same first RPL and referring to a same reference picture; if the plurality of motion candidates comprise N MVs associated with the same first RPL and referring to a same reference picture, determining the N MVs as the set of MVs, or if the plurality of motion candidates do not comprise N MVs associated with the same first RPL and referring to a same reference picture, determining, as the set of MVs, one MV associated with the first RPL from the plurality of motion candidates. Alternatively, in a case that the plurality of motion candidates do not comprise N MVs associated with the same first RPL and referring to a same reference picture, the set of MVs may be determined to be an empty set. In this case, the target motion candidate may not comprise a first MV for the first refence picture list.

[0155] In some further embodiments, the number of the plurality of motion candidates may be N, and determining the set of MVs may comprise: if the plurality of motion candidates comprise N MVs associated with the same first RPL and referring to a same reference picture, determining the N MVs as the set of MVs, or if the plurality of motion candidates do not comprise N MVs associated with the same first RPL and referring to a same reference picture, performing the following: checking whether the plurality of motion candidates comprise 2 MVs associated with the same first RPL and referring to a same reference picture if the plurality of motion candidates comprise 2 MVs associated with the same first RPL and referring to a same reference picture, determining the 2 MVs as the set of MVs, or if the plurality of motion candidates do not comprise 2 MVs associated with the same first RPL and referring to a same reference picture, determining, as the set of MVs, one MV associated with the first RPL from the plurality of motion candidates. Alternatively, in a case that the plurality of motion candidates do not comprise 2 MVs associated with the same first RPL and referring to a same reference picture, the set of MVs may be determined to be an empty set. In this case, the target motion candidate may not comprise a first MV for the first refence picture list.

[0156] In some embodiments, 2 MVs to be checked may comprise 2 MVs from the first 2 motion candidates of the plurality of motion candidates. In some further embodiments, 2 MVs to be checked may comprise one MV from the first motion candidate of the plurality of motion candidates and one MV from the S1-th motion candidate of the plurality of motion candidates, and S1 may be an integer larger than 1.

[0157] In some embodiments, the S1-th motion candidate may be the first motion candidate of the plurality of motion candidates that has an MV associated with the same first RPL and satisfies the reference picture condition.

[0158] In some embodiments, 2 MVs to be checked may comprise 2 MVs from the first S2 motion candidates of the plurality of motion candidates, and S2 is an integer. For example, S2 may be 3 or 4.

[0159] In some embodiments, the first 2 MVs that are determined to be associated with the same first RPL and referring to a same reference picture may be determined as the set of MVs.

[0160] In some embodiments, the number of the plurality of motion candidates is N, and determining the set of MVs may comprise: setting R to be N, performing following checking operations iteratively until R is 1: checking whether the plurality of motion candidates comprise R MVs associated with the same first RPL and referring to a same reference picture; if the plurality of motion candidates comprise R MVs associated with the same first RPL and referring to a same reference picture, determining the R MVs as the set of MVs, or if the plurality of motion candidates do not comprise N MVs associated with the same first RPL and referring to a same reference picture, setting R to be R-1.

[0161] In some embodiments, if the set of MVs is not determined with the checking operations, determining, as the set of MVs, one MV associated with the first RPL from the plurality of motion candidates. Alternatively, in a case that the set of MVs is not determined with the checking operations, the set of MVs may be determined to be an empty set. In this case, the target motion candidate may not comprise a first MV for the first refence picture list.

[0162] In some embodiments, R MVs to be checked may comprise R MVs from the first R motion candidates of the plurality of motion candidates. In some other embodiments, R MVs to be checked may comprise one MV from the first motion candidate of the plurality of motion candidates and (R-1) MVs from the first S (R-1) motion candidate of the plurality of motion candidates, and S (R-1) is an integer larger than or equal to R. In some further embodiments, R MVs to be checked comprise R MVs from the first SR motion candidates of the plurality of motion candidates, and SR is an integer larger than or equal to R.

[0163] In some embodiments, the first R MVs that are determined to be associated with the same first RPL and referring to a same reference picture may be determined as the set of MVs.

[0164] In some embodiments, the current block may be coded with at least one of the following: an inter prediction mode, an intra prediction mode, an intra block copy (IBC) -based mode, or an intra template matching prediction (IntraTMP) -based mode.

[0165] In some embodiments, the IBC-based mode may comprise at least one of the following: a regular IBC merge mode, a regular IBC advanced motion vector prediction (AMVP) mode, an IBC with template matching (IBC-TM) merge mode, an IBC-TM AMVP mode, a reconstruction-reordered IBC (RR-IBC) merge mode, an RR-IBC AMVP mode, an IBC merge mode with block vector differences (IBC-MBVD) mode, a combined intra block copy and intra prediction (IBC-CIIP) mode, a uni-predictive IBC with geometric partitioning mode (IBC-GPM) mode, a bi-predictive IBC-GPM mode, a spatial geometric partitioning mode (SGPM) with IntraTMP and IBC mode, a GPM with inter prediction and IBC, an IBC extension to decoder side intra mode derivation (DIMD) mode, an IBC extension to template-based intra mode derivation (TIMD) mode, or the IntraTMP-based mode comprises at least one of the following: a regular IntraTMP mode, a SGPM with IntraTMP and IBC, an IntraTMP extension to DIMD mode, or an IntraTMP extension to TIMD mode.

[0166] In some embodiments, the IBC-based mode may exclude an RR-IBC merge mode and an RR-IBC AMVP mode.

[0167] In some embodiments, the inter prediction mode may comprise at least one of the following: a regular inter merge mode, a regular inter AMVP mode, an inter-TM merge mode, an inter-TM AMVP mode, a bilateral matching (BM) mode, a decoder side motion vector refinement (DMVR) mode, a multi-pass DMVR mode, an adaptive decoder side motion vector refinement (ADMVR) merge mode, a bilateral matching AMVP-merge mode, a merge mode with motion vector difference (MMVD) mode, a CIIP mode, a CIIP-TM merge mode, a uni-predictive GPM mode, a GPM-MMVD mode, a GPM-TM mode, a GPM with inter and intra mode, a GPM with inter mode and IBC, a bi-predictive GPM mode, a regular affine merge mode, a regular affine AMVP mode, an affine-TM merge mode, an affine-TM AMVP mode, an affine DMVR mode, an affine MMVD mode, an affine CIIP mode, an affine motion compensation (AMC) GPM (AMC-GPM) mode, an affine-DMVR-MMVD mode, an adaptive affine-DMVR mode, a cross component prediction (CCP) merge for chroma inter blocks, a non-local local illumination compensation (LIC) mode, an LIC flag signaling for merge mode, an LIC model inheritance for merge mode.

[0168] In some embodiments, the intra prediction mode may comprise at least one of the following: a regular intra mode, a GPM with inter and intra prediction, an occurrence-based intra coding (OBIC) , a CCP merge mode, an SGPM mode, an extrapolation filter-based intra prediction (EIP) mode.

[0169] In some embodiments, a pruning process may be applied on at least a part of motion candidates for constructing a motion candidate list of the current block.

[0170] In some embodiments, a syntax element in the bitstream may be binarized as one of the following: a flag, a fixed length code, an exponential Golomb (EG) code, a unary code, a truncated unary code, or a truncated binary code, and the syntax element is signed or unsigned. In some embodiments, a syntax element in the bitstream may be coded with at least one context model or bypass coded.

[0171] In some embodiments, a syntax element may be included in the bitstream based on at least one condition, the at least one condition comprising a condition that a function associated with the syntax element is applicable for the conversion.

[0172] In some embodiments, a syntax element may be included at one of the following: a block level, a sequence level, a group of pictures level, a picture level, a slice level, a tile group level.

[0173] In some embodiments, a syntax element may be included in one of the following: a coding structure of a coding tree unit (CTU) , a coding structure of a coding unit (CU) , a coding structure of a prediction unit (PU) , a coding structure of a transform unit (TU) , a coding structure of a coding tree block (CTB) , a coding structure of a coding block (CB) , a coding structure of a transform block (TB) , a coding structure of a prediction block (PB) , a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a decoded parameter set (DPS) , decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter set (APS) , a slice header or a tile group header.

[0174] In some embodiments, a block may be one of the following: a color component, a sub-picture, a slice, a tile, a coding tree unit (CTU) , a CTU row, groups of CTU, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree block (CTB) , a coding block (CB) , a transform block (TB) , a prediction block (PB) , a block, a sub-block of a block, a sub-region within a block, or a region containing more than one sample or pixel.

[0175] In some embodiments, whether to and / or how to apply the method may be indicated in the bitstream at one of the following: a sequence level, a group of pictures level, a picture level, a slice level, a tile group level, a sequence header, a picture header, an SPS, a VPS, a DPS, DCI, a PPS, an APS, a slice header or a tile group header.

[0176] In some embodiments, whether to and / or how to apply the method may be indicated in the bitstream at one of the following: a prediction block (PB) , a transform block (TB) , a coding block (CB) , a prediction unit (PU) , a transform unit (TU) , a coding unit (CU) , a virtual pipeline data unit (VPDU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a subpicture, or a region containing more than one sample or pixel.

[0177] In some embodiments, whether to and / or how to apply the method may be based on coded information associated with the current block.

[0178] In some embodiments, the coded information may comprise at least one of the following: a block size, a color format, a single tree partitioning, a dual tree partitioning, a color component, a slice type, or a picture type.

[0179] According to further embodiments of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: obtaining a plurality of motion candidates for a current block of a video; determining a target motion candidate based on the plurality of motion candidates; and generating the bitstream based on the target motion candidate, where determining the target motion candidate comprises: determining, based on a reference picture condition, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) from the plurality of motion candidates; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0180] According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. The method comprises: obtaining a plurality of motion candidates for a current block of a video; determining a target motion candidate based on the plurality of motion candidates; generating the bitstream based on the target motion candidate; and storing the bitstream in a non-transitory computer-readable recording medium, wherein determining the target motion candidate comprises: determining, based on a reference picture condition, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) from the plurality of motion candidates; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0181] FIG. 54 illustrates a flowchart of a method 5400 for video processing in accordance with embodiments of the present disclosure. The method 5400 is implemented during a conversion between a current block of a video and a bitstream of the video. As shown in FIG. 54, the method 5400 starts at 5410 where a plurality of motion candidates are selected from a motion candidate list for the current block based on a rule. The rule will be described in details below.

[0182] At 5420, a target motion candidate is determined based on the plurality of motion candidates. In order to determine the target motion candidate, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture is determined from the plurality of motion candidates, and a first MV of the target motion candidate for the first RPL is determined based on the set of MVs. For example, if the set of MVs comprises a plurality of MVs, an average, a weighted average or a weighted sum of the plurality of MVs may be determined as the first MV. The determination of the target motion candidate has been described in details above with reference to FIG. 53.

[0183] At block 5430, the conversion is performed based on the target motion candidate. In some embodiments, the conversion may include encoding the current block into the bitstream. Alternatively or additionally, the conversion may include decoding the current block from the bitstream. It should be understood that the above illustrations and / or examples are described merely for purpose of description. The scope of the present disclosure is not limited in this respect.

[0184] In view of the above, a plurality of motion candidates are selected from a motion candidate list for the current block based on a rule, and a first MV of a target motion candidate for a first RPL is determined based on MVs associated with a same RPL and referring to a same reference picture from the plurality of motion candidates. Compared with the conventional solution, the proposed method can advantageously improve coding efficiency and coding quality.

[0185] In some embodiments, the rule may specify that the first (N-1) motion candidates of the plurality of motion candidates are selected from the first Q motion candidates of the motion candidate list, and the N-th motion candidate of the plurality of motion candidates is selected from the (K+1) -th motion candidate to the max-th motion candidate of the motion candidate list, and K is an index in the motion candidate list that corresponds to the (N-1) -th motion candidate of the plurality of motion candidates, and max is an integer, and N represents the number of the plurality of motion candidates, and Q is an integer. For example, Q may be equal to max-1. In some further embodiments, N may be 4, Q may be 3, and max may be 4. In some other embodiments, N may be 4, Q may be 3, and max may be 6. In still some other embodiments, N may be 4, Q may be 4, and max may be 6. In some still other embodiments, N may be 4, and Q may be 3. In some embodiments, max is predetermined. Alternatively, max is determined on-the-fly.

[0186] In some embodiments, the rule may specify that the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, and max is an integer and N represents the number of the plurality of motion candidates.

[0187] In some further embodiments, the rule may specify that the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list.

[0188] In some other embodiments, the rule may specify that the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list. In addition, M1 may be an integer in a range from 1 to max- (N-1) , inclusive, and max may be an integer and N may represent the number of the plurality of motion candidates.

[0189] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a picture order count (POC) distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list, or if the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, and max is an integer and N represents the number of the plurality of motion candidates.

[0190] In some further embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list, or if the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, and max is an integer and N represents the number of the plurality of motion candidates.

[0191] In some other embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list, or if the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and max is an integer and N represents the number of the plurality of motion candidates.

[0192] In some other embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list, or if the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and max is an integer and N represents the number of the plurality of motion candidates.

[0193] In some other embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and max is an integer and N represents the number of the plurality of motion candidates, or if the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, and max is an integer and N represents the number of the plurality of motion candidates.

[0194] In some still other embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and max is an integer and N represents the number of the plurality of motion candidates, or if the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, and max is an integer and N represents the number of the plurality of motion candidates.

[0195] By way of example, M1 may be 2.

[0196] In some embodiments, the rule may specify that the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and max is an integer and N represents the number of the plurality of motion candidates.

[0197] In some embodiments, the rule may specify that the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list.

[0198] In some embodiments, the rule may specify that the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, and max is an integer and N represents the number of the plurality of motion candidates.

[0199] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list, or if the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and max is an integer and N represents the number of the plurality of motion candidates.

[0200] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list, or if the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and max is an integer and N represents the number of the plurality of motion candidates.

[0201] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list, or if the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, and max is an integer and N represents the number of the plurality of motion candidates.

[0202] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list, or if the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, and max is an integer and N represents the number of the plurality of motion candidates.

[0203] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, or if the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and max is an integer and N represents the number of the plurality of motion candidates.

[0204] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, or if the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and max is an integer and N represents the number of the plurality of motion candidates.

[0205] By way of example, M2 may be L1+2.

[0206] In some embodiments, the rule may specify that the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.

[0207] In some further embodiments, the rule may specify that the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, and m is an integer in a range from 1 to M, inclusive, and M is an integer.

[0208] In some other embodiments, the rule may specify that the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max-(N-m) , inclusive, and m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.

[0209] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, or if the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.

[0210] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, or if the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.

[0211] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, or if the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, and m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.

[0212] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, or if the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, and m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.

[0213] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1. Additionally, the rule may specify that: if the condition is met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, or if the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.

[0214] In some embodiments, the rule may specify that: a condition to be checked is that a current picture comprising the current block is a low-delay picture. Additionally, the rule may specify that: if the condition is met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, or if the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.

[0215] By way of example, Mm may be L (m-1) +2. In some embodiments, M may be 1 and N may be 4, alternatively, M may be 2 and N may be 4. In some further embodiments, M may be equal to N. In some other embodiments, M may be 4 and N may be 4.

[0216] In some embodiments, the rule may specify that the n-th motion candidate of the plurality of motion candidates is selected from the (L (n-1) +1) -th motion candidate to the (max- (N-n) ) -th motion candidate of the motion candidate list, L (n-1) is an index in the motion candidate list that corresponds to the (n-1) -th motion candidate of the plurality of motion candidates, and n is an integer in a range from M to N, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates. By way of example, M may be 0 and N may be 4. In some embodiments, M may be 1 and N may be 4, alternatively, M may be 2 and N may be 4. In some further embodiments, M may be 3 and N may be 4. In some other embodiments, M may be 0.

[0217] In some embodiments, the rule may specify that the plurality of motion candidates are selected from the first S motion candidates of the motion candidate list, and S is an integer.

[0218] In some further embodiments, the number of the plurality of motion candidates may be 4, and S may be 4, alternatively, the number of the plurality of motion candidates may be 4, and S may be 6.

[0219] In some embodiments, max may be the number of motion candidates of an initial motion candidate list for the current block.

[0220] In some further embodiments, max may be the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block.

[0221] In some other embodiments, max may be the number of motion candidates of a final motion candidate list for the current block.

[0222] In some still other embodiments, max may be the number of motion candidates for adaptive reordering of merge candidates (ARMC) .

[0223] In some embodiments, max may be the minimum value among the following: the number of motion candidates of an initial motion candidate list for the current block, and the number of motion candidates of a final motion candidate list for the current block.

[0224] In some further embodiments, max may be the minimum value among the following: the number of motion candidates of an initial motion candidate list for the current block, and the number of motion candidates for ARMC.

[0225] In some other embodiments, max may be the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, and the number of motion candidates of a final motion candidate list for the current block.

[0226] In some still other embodiments, max may be the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, and the number of motion candidates for ARMC.

[0227] In some embodiments, if the motion candidate list is for a template matching merge mode, max may be the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, and the number of motion candidates for ARMC. Alternatively, if the motion candidate list is not for a template matching merge mode, max may be the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, and the number of motion candidates of a final motion candidate list for the current block.

[0228] In some embodiments, max may be the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, the number of motion candidates of a final motion candidate list for the current block, and a predetermined maximum number of motion candidates.

[0229] In some further embodiments, max may be the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, the number of motion candidates for ARMC, and a predetermined maximum number of motion candidates.

[0230] In some embodiments, if the motion candidate list is for a template matching merge mode, max may be the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, the number of motion candidates for ARMC, and a predetermined maximum number of motion candidates. Alternatively, if the motion candidate list is not for a template matching merge mode, max may be the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, the number of motion candidates of a final motion candidate list for the current block, and a predetermined maximum number of motion candidates.

[0231] In some embodiments, the motion candidate list may be obtained by performing an ARMC reordering on an initial motion candidate list for the current block.

[0232] In some embodiments, the motion candidate list may be an initial motion candidate list for the current block without ARMC reordering.

[0233] In some embodiments, the target motion candidate may be added into a list and follows a pairwise average motion candidate in the list. Alternatively, the target motion candidate may be added into a list and precedes a pairwise average motion candidate in the list. In one example embodiment, the list may be the above-mentioned motion candidate list, such as an initial motion candidate list. In another example embodiment, the list may be a pairwise merge list, or the like.

[0234] In some embodiments, the target motion candidate may be added into an initial motion candidate list for the current block.

[0235] In some further embodiments, the target motion candidate may be added into a pairwise merge list.

[0236] In some embodiments, the target motion candidate may belong to a first type of motion candidates, and at least one position in the pairwise merge list may be reserved for at least one motion candidate of the first type.

[0237] In some embodiments, the number of the at least one position may be 1 or 2.

[0238] In some embodiments, a condition to be checked may be that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, and if the condition is met, the number of the at least one position may be 1, alternatively, if the condition is not met, the number of the at least one position may be 2.

[0239] In some embodiments, a condition to be checked may be that a current picture comprising the current block is a low-delay picture, and if the condition is met, the number of the at least one position may be 1, alternatively, if the condition is not met, the number of the at least one position may be 2.

[0240] In some embodiments, the target motion candidate may belong to a first type of motion candidates, and the maximum number of motion candidates of the first type may be 1, 2, 3, or 4.

[0241] In some further embodiments, the target motion candidate may belong to a first type of motion candidates, and the maximum number of motion candidates of the first type may be predetermined or determined on-the-fly.

[0242] In some embodiments, the method may be allowed to be applied to a non-low-delay picture.

[0243] In some embodiments, a condition to be checked may be that a first picture is a low-delay picture and a POC distance between the first picture and the nearest reference picture of the first picture is 1, and if the condition is met, the method is disallowed to be applied on the first picture, alternatively, if the condition is not met, the method is allowed to be applied on the first picture.

[0244] In some embodiments, the method may be applied in at least one of the following: a regular inter merge mode, a regular inter AMVP mode, an inter-TM merge mode, an inter-TM AMVP mode, a bilateral matching (BM) mode, a decoder side motion vector refinement (DMVR) mode, a multi-pass DMVR mode, an adaptive decoder side motion vector refinement (ADMVR) merge mode, a bilateral matching AMVP-merge mode, a merge mode with motion vector difference (MMVD) mode, a CIIP mode, a CIIP-TM merge mode, a uni-predictive GPM mode, a GPM-MMVD mode, a GPM-TM mode, a GPM with inter and intra mode, a GPM with inter mode and IBC, a bi-predictive GPM mode, a regular affine merge mode, a regular affine AMVP mode, an affine-TM merge mode, an affine-TM AMVP mode, an affine DMVR mode, an affine MMVD mode, an affine CIIP mode, an affine motion compensation (AMC) GPM (AMC-GPM) mode, an affine-DMVR-MMVD mode, an adaptive affine-DMVR mode, a cross component prediction (CCP) merge for chroma inter blocks, a non-local local illumination compensation (LIC) mode, an LIC flag signaling for merge mode, an LIC model inheritance for merge mode.

[0245] In some embodiments, the method may be applied in at least one of the following: a regular IBC merge mode, a regular IBC advanced motion vector prediction (AMVP) mode, an IBC with template matching (IBC-TM) merge mode, an IBC-TM AMVP mode, a reconstruction-reordered IBC (RR-IBC) merge mode, an RR-IBC AMVP mode, an IBC merge mode with block vector differences (IBC-MBVD) mode, a combined intra block copy and intra prediction (IBC-CIIP) mode, a uni-predictive IBC with geometric partitioning mode (IBC-GPM) mode, a bi-predictive IBC-GPM mode, a regular IntraTMP mode, a spatial geometric partitioning mode (SGPM) with IntraTMP and IBC mode, a GPM with inter prediction and IBC, an IBC extension to decoder side intra mode derivation (DIMD) mode, an IntraTMP extension to DIMD mode, an IBC extension to template-based intra mode derivation (TIMD) mode, or an IntraTMP extension to TIMD mode.

[0246] In some embodiments, the method may be disallowed to be applied for screen content.

[0247] In some embodiments, type information regarding whether a video region belongs to natural content or screen content may be indicated at one of the following: a sequence level, a group of pictures level, a picture level, a slice level, or a tile group level. For example, the video region may be a video sequence, a picture, a slice, a tile, and / or the like.

[0248] In some embodiments, the type information may be indicated in a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a decoded parameter set (DPS) , decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter set (APS) , a slice header or a tile group header.

[0249] In some embodiments, the type information may be determined based on a hash block hit percentage at encoder and the type information may be indicated in the bitstream. For example, in order to encode a block in the current frame, the encoder tries to find a very similar block in a previously encoded frame. To speed this up, an encoder may calculate a hash value for every block in the reference frame. The encoder stores these hash values in a lookup table, along with the location of the block they came from. For a block in the current frame, the encoder calculates its hash and then instantly looks it up in the table of reference frame hashes. If the hash matches ( "Hit" ) –i.e., a very similar (or identical) block exists in the reference frame –the encoder can simply point to that block’s location using a motion vector instead of storing all the new pixel data. If the hash doesn't match ( "Miss" ) , the encoder must fall back to slower, traditional methods to find a match, or give up and encode the block from scratch by using intra coding. The hash block hit percentage is the metric that quantifies the success rate of this fast lookup process, and it may be calculated as follows: Hash Block Hit Percentage = (Number of Successful Hits  / Total Number of Blocks Checked) × 100%.

[0250] A high percentage indicates that a large portion of the frame could be efficiently predicted by simply reusing data from elsewhere in the video. It should be understood that the possible implementations of the hash block hit percentage described here are merely illustrative and therefore should not be construed as limiting the present disclosure in any way.

[0251] In some embodiments, if the hash block hit percentage of a video sequence is larger than a threshold, the video sequence may be determined to be belonging to the screen content, or if the hash block hit percentage of the video sequence is not larger than the threshold, the video sequence may be determined to be belonging to the natural content. Alternatively, if the hash block hit percentage of a picture is larger than a threshold, the picture may be determined to be belonging to the screen content, or if the hash block hit percentage of the picture is not larger than the threshold, the picture may be determined to be belonging to the natural content. Alternatively, if the hash block hit percentage of a slice is larger than a threshold, the slice may be determined to be belonging to the screen content, or if the hash block hit percentage of the slice is not larger than the threshold, the slice may be determined to be belonging to the natural content. Alternatively, if the hash block hit percentage of a tile is larger than a threshold, the tile may be determined to be belonging to the screen content, or if the hash block hit percentage of the tile is not larger than the threshold, the tile may be determined to be belonging to the natural content.

[0252] In some embodiments, if the hash block hit percentage of the first frame of a video sequence is larger than a threshold, the video sequence may be determined to be belonging to the screen content, or if the hash block hit percentage of the first frame of the video sequence is not larger than the threshold, the video sequence may be determined to be belonging to the natural content.

[0253] In some further embodiments, if the hash block hit percentage of the first frame of a group of pictures (GOP) is larger than a threshold, the GOP may be determined to be belonging to the screen content, or if the hash block hit percentage of the first frame of the GOP is not larger than the threshold, the GOP may be determined to be belonging to the natural content.

[0254] In some embodiments, if the hash block hit percentage of an intra picture (I-picture) is larger than a threshold, a set of pictures are determined to be belonging to the screen content, the set of pictures may comprise the I-picture and one or more pictures following the I-picture and preceding a next I-picture, or if the hash block hit percentage of the I-picture is not larger than the threshold, the set of pictures may be determined to be belonging to the natural content.

[0255] In some further embodiments, if the hash block hit percentage of an intra slice (I-slice) is larger than a threshold, a set of slices are determined to be belonging to the screen content, the set of slices may comprise the I-slice and one or more slices following the I-slice and preceding a next I-slice, or if the hash block hit percentage of the I-slice is not larger than the threshold, the set of slices may be determined to be belonging to the natural content.

[0256] In some embodiments, the threshold may be predetermined. By way of example, the threshold may be 19%, 40%, 56%, or 59%. It should be understood that the specific values recited herein are intended to be examples rather than limiting the scope of the present disclosure.

[0257] In some embodiments, the type information may be predetermined. In this case, a video region may be treated as screen content by default. Alternatively, the video region may be treated as natural content by default.

[0258] In some embodiments, type information regarding whether a video block belongs to natural content or screen content may be indicated at one of the following: a prediction block (PB) , a transform block (TB) , a coding block (CB) , a prediction unit (PU) , a transform unit (TU) , a coding unit (CU) , a virtual pipeline data unit (VPDU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a subpicture, or a region containing more than one sample or pixel.

[0259] In some embodiments, the type information may be indicated in the bitstream. Alternatively, the type information may be derived. For example, the type information may be derived based on a coding mode of at least one neighboring block of the video block. In one example embodiment, the type information may be derived based on whether a coding mode of at least one neighboring block of the video block is a block vector (BV) based coding mode. By way of example rather than limitation, the BV-based coding mode may comprise an IBC mode, an intraTMP mode, and / or the like. For example, if the number of neighboring blocks of the video block that are coded with the BV-based coding mode is larger than a threshold (such as 2, 3 or the like) , the video block may be determined to be belonging to screen content. Otherwise, the video block may be determined to be belonging to natural content. It should be understood that the above examples are described merely for purpose of description. The scope of the present disclosure is not limited in this respect.

[0260] In some embodiments, the current block may be coded with at least one of the following: an inter prediction mode, an intra prediction mode, an intra block copy (IBC) -based mode, or an intra template matching prediction (IntraTMP) -based mode.

[0261] In some embodiments, the IBC-based mode may comprise at least one of the following: a regular IBC merge mode, a regular IBC advanced motion vector prediction (AMVP) mode, an IBC with template matching (IBC-TM) merge mode, an IBC-TM AMVP mode, a reconstruction-reordered IBC (RR-IBC) merge mode, an RR-IBC AMVP mode, an IBC merge mode with block vector differences (IBC-MBVD) mode, a combined intra block copy and intra prediction (IBC-CIIP) mode, a uni-predictive IBC with geometric partitioning mode (IBC-GPM) mode, a bi-predictive IBC-GPM mode, a spatial geometric partitioning mode (SGPM) with IntraTMP and IBC mode, a GPM with inter prediction and IBC, an IBC extension to decoder side intra mode derivation (DIMD) mode, an IBC extension to template-based intra mode derivation (TIMD) mode, or the IntraTMP-based mode comprises at least one of the following: a regular IntraTMP mode, a SGPM with IntraTMP and IBC, an IntraTMP extension to DIMD mode, or an IntraTMP extension to TIMD mode.

[0262] In some embodiments, the IBC-based mode may exclude an RR-IBC merge mode and an RR-IBC AMVP mode.

[0263] In some embodiments, the inter prediction mode may comprise at least one of the following: a regular inter merge mode, a regular inter AMVP mode, an inter-TM merge mode, an inter-TM AMVP mode, a bilateral matching (BM) mode, a decoder side motion vector refinement (DMVR) mode, a multi-pass DMVR mode, an adaptive decoder side motion vector refinement (ADMVR) merge mode, a bilateral matching AMVP-merge mode, a merge mode with motion vector difference (MMVD) mode, a CIIP mode, a CIIP-TM merge mode, a uni-predictive GPM mode, a GPM-MMVD mode, a GPM-TM mode, a GPM with inter and intra mode, a GPM with inter mode and IBC, a bi-predictive GPM mode, a regular affine merge mode, a regular affine AMVP mode, an affine-TM merge mode, an affine-TM AMVP mode, an affine DMVR mode, an affine MMVD mode, an affine CIIP mode, an affine motion compensation (AMC) GPM (AMC-GPM) mode, an affine-DMVR-MMVD mode, an adaptive affine-DMVR mode, a cross component prediction (CCP) merge for chroma inter blocks, a non-local local illumination compensation (LIC) mode, an LIC flag signaling for merge mode, an LIC model inheritance for merge mode.

[0264] In some embodiments, the intra prediction mode may comprise at least one of the following: a regular intra mode, a GPM with inter and intra prediction, an occurrence-based intra coding (OBIC) , a CCP merge mode, an SGPM mode, an extrapolation filter-based intra prediction (EIP) mode.

[0265] In some embodiments, a pruning process may be applied on at least a part of motion candidates for constructing a motion candidate list of the current block.

[0266] In some embodiments, a syntax element in the bitstream may be binarized as one of the following: a flag, a fixed length code, an exponential Golomb (EG) code, a unary code, a truncated unary code, or a truncated binary code, and the syntax element is signed or unsigned.

[0267] In some embodiments, a syntax element in the bitstream may be coded with at least one context model or bypass coded.

[0268] In some embodiments, a syntax element may be included in the bitstream based on at least one condition, the at least one condition comprising a condition that a function associated with the syntax element is applicable for the conversion.

[0269] In some embodiments, a syntax element may be included at one of the following: a block level, a sequence level, a group of pictures level, a picture level, a slice level, a tile group level.

[0270] In some embodiments, a syntax element may be included in one of the following: a coding structure of a coding tree unit (CTU) , a coding structure of a coding unit (CU) , a coding structure of a prediction unit (PU) , a coding structure of a transform unit (TU) , a coding structure of a coding tree block (CTB) , a coding structure of a coding block (CB) , a coding structure of a transform block (TB) , a coding structure of a prediction block (PB) , a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a decoded parameter set (DPS) , decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter set (APS) , a slice header or a tile group header.

[0271] In some embodiments, a block may be one of the following: a color component, a sub-picture, a slice, a tile, a coding tree unit (CTU) , a CTU row, groups of CTU, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree block (CTB) , a coding block (CB) , a transform block (TB) , a prediction block (PB) , a block, a sub-block of a block, a sub-region within a block, or a region containing more than one sample or pixel.

[0272] In some embodiments, whether to and / or how to apply the method may be indicated in the bitstream at one of the following: a sequence level, a group of pictures level, a picture level, a slice level, a tile group level, a sequence header, a picture header, an SPS, a VPS, a DPS, DCI, a PPS, an APS, a slice header or a tile group header.

[0273] In some embodiments, whether to and / or how to apply the method may be indicated in the bitstream at one of the following: a prediction block (PB) , a transform block (TB) , a coding block (CB) , a prediction unit (PU) , a transform unit (TU) , a coding unit (CU) , a virtual pipeline data unit (VPDU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a subpicture, or a region containing more than one sample or pixel.

[0274] In some embodiments, whether to and / or how to apply the method may be based on coded information associated with the current block.

[0275] In some embodiments, the coded information may comprise at least one of the following: a block size, a color format, a single tree partitioning, a dual tree partitioning, a color component, a slice type, or a picture type.

[0276] According to further embodiments of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: selecting a plurality of motion candidates from a motion candidate list for a current block of the video based on a rule; determining a target motion candidate based on the plurality of motion candidates; and generating the bitstream based on the target motion candidate, where determining the target motion candidate comprises: determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0277] According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. The method comprises: selecting a plurality of motion candidates from a motion candidate list for a current block of the video based on a rule; determining a target motion candidate based on the plurality of motion candidates; generating the bitstream based on the target motion candidate; and storing the bitstream in a non-transitory computer-readable recording medium, where determining the target motion candidate comprises: determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

[0278] FIG. 55 illustrates a flowchart of a method 5500 for video processing in accordance with embodiments of the present disclosure. The method 5500 is implemented during a conversion between a current block of a video and a bitstream of the video. As shown in FIG. 55, the method 5500 starts at 5510 where a set of motion candidates for the current block that belongs to a motion category is determined based on a first similarity threshold. This first similarity threshold may be used in a manner similar to the motion vector difference similarity threshold (i.e., mvdSimilarityThresh) mentioned in the above section 4. For example, if a difference between a motion vector (MV) of a first motion candidate for the current block that belongs to the motion category and an MV of a second motion candidate of the set of motion candidates is smaller than the first similarity threshold and all the other motion information (such as reference direction, reference picture index, and / or the like) of the first motion candidate is the same as the second motion candidate, the first motion candidate may be considered to be a duplicate of the second motion candidate and the first motion candidate may be not added into the set of motion candidates. Otherwise, the first motion candidate may be considered to be different from the second motion candidate, and compared with a further motion candidate of the set of motion candidates in a similar manner.

[0279] At 5520, a motion candidate list for the current block is constructed by determining, based on a second similarity threshold, whether to add a motion candidate of the set of motion candidates into the motion candidate list. The first similarity threshold is larger than or equal to the second similarity threshold. For example, the second similarity threshold may correspond to the motion vector difference similarity threshold (i.e., mvdSimilarityThresh) mentioned in the above section 4. If a difference between an MV of a third motion candidate of the set of motion candidates and an MV of a fourth motion candidate of the motion candidate list is smaller than the second similarity threshold and all the other motion information of the third motion candidate is the same as the fourth motion candidate, the third motion candidate may be considered to be a duplicate of the fourth motion candidate and the third motion candidate may be not added into the motion candidate list. Otherwise, the third motion candidate may be considered to be different from the fourth motion candidate, and compared with a further motion candidate of the motion candidate list in a similar manner.

[0280] At block 5530, the conversion is performed based on the motion candidate list. In some embodiments, the conversion may include encoding the current block into the bitstream. Alternatively or additionally, the conversion may include decoding the current block from the bitstream. It should be understood that the above illustrations and / or examples are described merely for purpose of description. The scope of the present disclosure is not limited in this respect.

[0281] In view of the above, a set of motion candidates for the current block that belongs to a motion category is determined based on the first similarity threshold, and a pruning process is applied on the set of motion candidates based on a second similarity threshold. Moreover, the first similarity threshold is required to be larger than or equal to the second similarity threshold. Compared with the conventional solution, the proposed method can advantageously improve coding efficiency and coding quality.

[0282] In some embodiments, the motion category may comprise at least one of the following: an adjacent spatial motion candidate, a non-adjacent spatial motion candidate, an adjacent temporal motion candidate, a non-adjacent temporal motion candidate, a history-based motion candidate, a pairwise average motion candidate, a weighted-multiple motion candidate, or a chained motion vector prediction (MVP) .

[0283] In some embodiments, a rule that a history-based table is to be reset before coding a new coding tree unit (CTU) may be removed or relaxed.

[0284] In some embodiments, a history-based table may be reset only when starting to code a new slice.

[0285] In some embodiments, a history-based table may be allowed to store information from neighboring CTU of a current CTU comprising the current block.

[0286] In some embodiments, a history-based table of at least one neighboring CTU of the current CTU may be allowed to be used for applying an affine mode and / or an inter mode on the current block.

[0287] In some embodiments, the number of the at least one neighboring CTU may be 1, 2 or 3.

[0288] In some embodiments, a checking order of history-based tables of neighboring CTUs in an order from first to last may be as follows: a history-based table of an above neighboring CTU, a history-based table of an above-right neighboring CTU, and a history-based table of a left neighboring CTU.

[0289] In some further embodiments, a checking order of history-based tables of neighboring CTUs in an order from first to last may be as follows: a history-based table of an above neighboring CTU, a history-based table of a left neighboring CTU, and a history-based table of an above-right neighboring CTU.

[0290] In some embodiments, the affine mode may comprise at least one of the following: a regular affine merge mode, an affine template matching (affine-TM) merge mode, an affine decoder side motion vector refinement (DMVR) mode.

[0291] In some further embodiments, the inter mode may comprise at least one of the following: a regular inter merge mode, an inter-TM merge mode, an inter DMVR mode, a non-local local illumination compensation (LIC) , an LIC flag signaling for merge mode, or an LIC model inheritance for merge mode.

[0292] In some embodiments, the history-based table of the at least one neighboring CTU may be checked after a history-based table of the current block.

[0293] In some embodiments, the history-based table may comprise at least one of the following: a history-based motion vector prediction (HMVP) table, history-based block vector prediction (HMVP) table, a first affine history-parameter table (HPT) , a second affine HPT, a history-based cross component prediction (CCP) table, or a history-based extrapolation filter-based intra prediction (EIP) table.

[0294] In some embodiments, a refinement cost for applying an DMVR process on the current block may be determined based on a template matching cost.

[0295] In some embodiments, a block-based DMVR refinement cost may be determined based on the template matching cost. In some further embodiments, the block-based DMVR refinement cost may be determined based on a weighed sum of a motion vector difference cost, a bilateral matching cost, and the template matching cost.

[0296] In some embodiments, a block-based bilateral matching (BM) refinement cost may be replaced with the block-based DMVR refinement cost.

[0297] In some embodiments, the block-based DMVR refinement cost may be used as a cost metric of an MV refinement process of the DMVR process.

[0298] In some embodiments, the MV refinement process may be performed after a block-based bilateral matching process, or the MV refinement process may be performed after a block-based template matching process, or the MV refinement process may be performed before the block-based bilateral matching process, or the MV refinement process may be performed before a block-based template matching process.

[0299] In some embodiments, a subblock-based DMVR refinement cost may be determined based on the template matching cost.

[0300] In some embodiments, a subblock-based bilateral matching refinement cost may be replaced with the subblock-based DMVR refinement cost.

[0301] In some embodiments, the subblock-based DMVR refinement cost may be used as a cost metric of an MV refinement process of the DMVR process.

[0302] In some embodiments, the MV refinement process may be performed after a subblock-based bilateral matching process, alternatively, the MV refinement process is performed before the subblock-based bilateral matching process.

[0303] In some embodiments, the current block may be coded with at least one of the following: an inter prediction mode, an intra prediction mode, an intra block copy (IBC) -based mode, or an intra template matching prediction (IntraTMP) -based mode.

[0304] In some embodiments, the IBC-based mode may comprise at least one of the following: a regular IBC merge mode, a regular IBC advanced motion vector prediction (AMVP) mode, an IBC with template matching (IBC-TM) merge mode, an IBC-TM AMVP mode, a reconstruction-reordered IBC (RR-IBC) merge mode, an RR-IBC AMVP mode, an IBC merge mode with block vector differences (IBC-MBVD) mode, a combined intra block copy and intra prediction (IBC-CIIP) mode, a uni-predictive IBC with geometric partitioning mode (IBC-GPM) mode, a bi-predictive IBC-GPM mode, a spatial geometric partitioning mode (SGPM) with IntraTMP and IBC mode, a GPM with inter prediction and IBC, an IBC extension to decoder side intra mode derivation (DIMD) mode, an IBC extension to template-based intra mode derivation (TIMD) mode, or the IntraTMP-based mode comprises at least one of the following: a regular IntraTMP mode, a SGPM with IntraTMP and IBC, an IntraTMP extension to DIMD mode, or an IntraTMP extension to TIMD mode.

[0305] In some embodiments, the IBC-based mode may exclude an RR-IBC merge mode and an RR-IBC AMVP mode.

[0306] In some embodiments, the inter prediction mode may comprise at least one of the following: a regular inter merge mode, a regular inter AMVP mode, an inter-TM merge mode, an inter-TM AMVP mode, a bilateral matching (BM) mode, a decoder side motion vector refinement (DMVR) mode, a multi-pass DMVR mode, an adaptive decoder side motion vector refinement (ADMVR) merge mode, a bilateral matching AMVP-merge mode, a merge mode with motion vector difference (MMVD) mode, a CIIP mode, a CIIP-TM merge mode, a uni-predictive GPM mode, a GPM-MMVD mode, a GPM-TM mode, a GPM with inter and intra mode, a GPM with inter mode and IBC, a bi-predictive GPM mode, a regular affine merge mode, a regular affine AMVP mode, an affine-TM merge mode, an affine-TM AMVP mode, an affine DMVR mode, an affine MMVD mode, an affine CIIP mode, an affine motion compensation (AMC) GPM (AMC-GPM) mode, an affine-DMVR-MMVD mode, an adaptive affine-DMVR mode, a cross component prediction (CCP) merge for chroma inter blocks, a non-local local illumination compensation (LIC) mode, an LIC flag signaling for merge mode, an LIC model inheritance for merge mode.

[0307] In some embodiments, the intra prediction mode may comprise at least one of the following: a regular intra mode, a GPM with inter and intra prediction, an occurrence-based intra coding (OBIC) , a CCP merge mode, an SGPM mode, an extrapolation filter-based intra prediction (EIP) mode.

[0308] In some embodiments, a pruning process may be applied on at least a part of motion candidates for constructing a motion candidate list of the current block.

[0309] In some embodiments, a syntax element in the bitstream may be binarized as one of the following: a flag, a fixed length code, an exponential Golomb (EG) code, a unary code, a truncated unary code, or a truncated binary code, and the syntax element is signed or unsigned.

[0310] In some embodiments, a syntax element in the bitstream may be coded with at least one context model or bypass coded.

[0311] In some embodiments, a syntax element may be included in the bitstream based on at least one condition, the at least one condition comprising a condition that a function associated with the syntax element is applicable for the conversion.

[0312] In some embodiments, a syntax element may be included at one of the following: a block level, a sequence level, a group of pictures level, a picture level, a slice level, a tile group level.

[0313] In some embodiments, a syntax element may be included in one of the following: a coding structure of a coding tree unit (CTU) , a coding structure of a coding unit (CU) , a coding structure of a prediction unit (PU) , a coding structure of a transform unit (TU) , a coding structure of a coding tree block (CTB) , a coding structure of a coding block (CB) , a coding structure of a transform block (TB) , a coding structure of a prediction block (PB) , a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a decoded parameter set (DPS) , decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter set (APS) , a slice header or a tile group header.

[0314] In some embodiments, a block may be one of the following: a color component, a sub-picture, a slice, a tile, a coding tree unit (CTU) , a CTU row, groups of CTU, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree block (CTB) , a coding block (CB) , a transform block (TB) , a prediction block (PB) , a block, a sub-block of a block, a sub-region within a block, or a region containing more than one sample or pixel.

[0315] In some embodiments, whether to and / or how to apply the method may be indicated in the bitstream at one of the following: a sequence level, a group of pictures level, a picture level, a slice level, a tile group level, a sequence header, a picture header, an SPS, a VPS, a DPS, DCI, a PPS, an APS, a slice header or a tile group header.

[0316] In some embodiments, whether to and / or how to apply the method may be indicated in the bitstream at one of the following: a prediction block (PB) , a transform block (TB) , a coding block (CB) , a prediction unit (PU) , a transform unit (TU) , a coding unit (CU) , a virtual pipeline data unit (VPDU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a subpicture, or a region containing more than one sample or pixel.

[0317] In some embodiments, whether to and / or how to apply the method may be based on coded information associated with the current block.

[0318] In some embodiments, the coded information may comprise at least one of the following: a block size, a color format, a single tree partitioning, a dual tree partitioning, a color component, a slice type, or a picture type.

[0319] According to further embodiments of the present disclosure, a non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video which is generated by a method performed by an apparatus for video processing. The method comprises: determining, based on a first similarity threshold, a set of motion candidates for a current block of the video that belongs to a motion category; constructing a motion candidate list for the current block by determining, based on a second similarity threshold, whether to add a motion candidate of the set of motion candidates into the motion candidate list, the first similarity threshold being larger than or equal to the second similarity threshold; and generating the bitstream based on the motion candidate list.

[0320] According to still further embodiments of the present disclosure, a method for storing bitstream of a video is provided. The method comprises: determining, based on a first similarity threshold, a set of motion candidates for a current block of the video that belongs to a motion category; constructing a motion candidate list for the current block by determining, based on a second similarity threshold, whether to add a motion candidate of the set of motion candidates into the motion candidate list, the first similarity threshold being larger than or equal to the second similarity threshold; generating the bitstream based on the motion candidate list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0321] In view of the above, the solutions in accordance with some embodiments of the present disclosure can advantageously improve coding efficiency and coding quality.

[0322] Implementations of the present disclosure can be described in view of the following clauses, the features of all of the following clauses can be combined in any reasonable manner. For example, a feature (s) from clause section A, a feature (s) from clause section B, and / or a feature (s) from clause section C can be combined with each other in any suitable manner. The division of the three clause sections A, B, and C are merely for clarity, and therefore should not be construed as limiting the present disclosure in any way.

[0323] Clause A1. A method for video processing, comprising: obtaining, for a conversion between a current block of a video and a bitstream of the video, a plurality of motion candidates for the current block; determining a target motion candidate based on the plurality of motion candidates; and ...

Claims

1.A method for video processing, comprising:selecting, for a conversion between a current block of a video and a bitstream of the video, a plurality of motion candidates from a motion candidate list for the current block based on a rule;determining a target motion candidate based on the plurality of motion candidates; andperforming the conversion based on the target motion candidate,wherein determining the target motion candidate comprises:determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; anddetermining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.2.The method of claim 1, wherein in accordance with that the set of MVs comprises a plurality of MVs, an average or a weighted average of the plurality of MVs is determined as the first MV.3.The method of any of claims 1-2, wherein the rule specifies that the first (N-1) motion candidates of the plurality of motion candidates are selected from the first Q motion candidates of the motion candidate list, and the N-th motion candidate of the plurality of motion candidates is selected from the (K+1) -th motion candidate to the max-th motion candidate of the motion candidate list, and K is an index in the motion candidate list that corresponds to the (N-1) -th motion candidate of the plurality of motion candidates, and max is an integer, and wherein N represents the number of the plurality of motion candidates, and Q is an integer.4.The method of claim 3, wherein Q is equal to max-1.5.The method of claim 3, wherein N is 4, Q is 3, and max is 4, orwherein N is 4, Q is 3, and max is 6,wherein N is 4, Q is 4, and max is 6,wherein N is 4, and Q is 3.6.The method of any of claims 3-5, wherein max is predetermined.7.The method of any of claims 3-4, wherein max is determined on-the-fly.8.The method of any of claims 1-7, wherein the rule specifies that the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, and wherein max is an integer and N represents the number of the plurality of motion candidates.9.The method of any of claims 1-7, wherein the rule specifies that the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list.10.The method of any of claims 1-7, wherein the rule specifies that the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and wherein max is an integer and N represents the number of the plurality of motion candidates.11.The method of any of claims 1-7, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a picture order count (POC) distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list, orin accordance with that the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, and wherein max is an integer and N represents the number of the plurality of motion candidates.12.The method of any of claims 1-7, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list, orin accordance with that the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, and wherein max is an integer and N represents the number of the plurality of motion candidates.13.The method of any of claims 1-7, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list, orin accordance with that the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and wherein max is an integer and N represents the number of the plurality of motion candidates.14.The method of any of claims 1-7, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the first motion candidate of the plurality of motion candidates is the first motion candidate of the motion candidate list, orin accordance with that the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and wherein max is an integer and N represents the number of the plurality of motion candidates.15.The method of any of claims 1-7, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and wherein max is an integer and N represents the number of the plurality of motion candidates, orin accordance with that the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, andwherein max is an integer and N represents the number of the plurality of motion candidates.16.The method of any of claims 1-7, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the first motion candidate of the plurality of motion candidates is selected from the first M1 motion candidates of the motion candidate list, and M1 is an integer in a range from 1 to max- (N-1) , inclusive, and wherein max is an integer and N represents the number of the plurality of motion candidates, orin accordance with that the condition is not met, the first motion candidate of the plurality of motion candidates is selected from the first (max- (N-1) ) motion candidates of the motion candidate list, andwherein max is an integer and N represents the number of the plurality of motion candidates.17.The method of any of claims 10 and 13-16, wherein M1 is 2.18.The method of any of claims 8-17, wherein the rule specifies that the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and wherein max is an integer and N represents the number of the plurality of motion candidates.19.The method of any of claims 8-17, wherein the rule specifies that the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list.20.The method of any of claims 8-17, wherein the rule specifies that the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, and wherein max is an integer and N represents the number of the plurality of motion candidates.21.The method of any of claims 8-17, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list, orin accordance with that the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and wherein max is an integer and N represents the number of the plurality of motion candidates.22.The method of any of claims 8-17, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list, orin accordance with that the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and wherein max is an integer and N represents the number of the plurality of motion candidates.23.The method of any of claims 8-17, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list, orin accordance with that the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, and wherein max is an integer and N represents the number of the plurality of motion candidates.24.The method of any of claims 8-17, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the second motion candidate of the plurality of motion candidates is the second motion candidate of the motion candidate list, orin accordance with that the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, and wherein max is an integer and N represents the number of the plurality of motion candidates.25.The method of any of claims 8-17, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, orin accordance with that the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, andwherein max is an integer and N represents the number of the plurality of motion candidates.26.The method of any of claims 8-17, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the M2-th motion candidate of the motion candidate list, L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, and M2 is an integer in a range from 2 to max- (N-2) , inclusive, orin accordance with that the condition is not met, the second motion candidate of the plurality of motion candidates is selected from the (L1+1) -th motion candidate to the (max- (N-2) ) -th motion candidate of the motion candidate list, and L1 is an index in the motion candidate list that corresponds to the first motion candidate of the plurality of motion candidates, andwherein max is an integer and N represents the number of the plurality of motion candidates.27.The method of any of claims 20 and 23-26, wherein M2 is L1+2.28.The method of any of claims 8-27, wherein the rule specifies that the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and wherein m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.29.The method of any of claims 8-27, wherein the rule specifies that the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, and wherein m is an integer in a range from 1 to M, inclusive, and M is an integer.30.The method of any of claims 8-27, wherein the rule specifies that the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, and wherein m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.31.The method of any of claims 8-27, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, orin accordance with that the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, andwherein m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.32.The method of any of claims 8-27, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, orin accordance with that the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, andwherein m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.33.The method of any of claims 8-27, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, orin accordance with that the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, andwherein m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.34.The method of any of claims 8-27, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the m-th motion candidate of the plurality of motion candidates is the m-th motion candidate of the motion candidate list, orin accordance with that the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, andwherein m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.35.The method of any of claims 8-27, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, orin accordance with that the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, andwherein m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.36.The method of any of claims 8-27, wherein the rule specifies that:a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the Mm-th motion candidate of the motion candidate list, L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, and Mm is an integer in a range from m to max- (N-m) , inclusive, orin accordance with that the condition is not met, the m-th motion candidate of the plurality of motion candidates is selected from the (L (m-1) +1) -th motion candidate to the (max- (N-m) ) -th motion candidate of the motion candidate list, and L (m-1) is an index in the motion candidate list that corresponds to the (m-1) -th motion candidate of the plurality of motion candidates, andwherein m is an integer in a range from 1 to M, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.37.The method of any of claims 30 and 33-36, wherein Mm is L (m-1) +2.38.The method of any of claims 28-37 , wherein M is 1 and N is 4, or wherein M is 2 and N is 4.39.The method of any of claims 28-37, wherein M is equal to N.40.The method of claim 39, wherein M is 4 and N is 4.41.The method of any of claims 8-40, wherein the rule specifies that the n-th motion candidate of the plurality of motion candidates is selected from the (L (n-1) +1) -th motion candidate to the (max- (N-n) ) -th motion candidate of the motion candidate list, L (n-1) is an index in the motion candidate list that corresponds to the (n-1)-th motion candidate of the plurality of motion candidates, and wherein n is an integer in a range from M to N, inclusive, M is an integer, max is an integer and N represents the number of the plurality of motion candidates.42.The method of claim 41, wherein M is 0 and N is 4.43.The method of claim 41, wherein M is 1 and N is 4, orwherein M is 2 and N is 4,wherein M is 3 and N is 4,wherein M is 0.44.The method of any of claims 1-2, wherein the rule specifies that the plurality of motion candidates are selected from the first S motion candidates of the motion candidate list, and S is an integer.45.The method of claim 44, wherein the number of the plurality of motion candidates is 4, and S is 4, orwherein the number of the plurality of motion candidates is 4, and S is 6.46.The method of any of claims 3-41, wherein max is the number of motion candidates of an initial motion candidate list for the current block.47.The method of any of claims 3-41, wherein max is the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block.48.The method of any of claims 3-41, wherein max is the number of motion candidates of a final motion candidate list for the current block.49.The method of any of claims 3-41, wherein max is the number of motion candidates for adaptive reordering of merge candidates (ARMC) .50.The method of any of claims 3-41, wherein max is the minimum value among the following:the number of motion candidates of an initial motion candidate list for the current block, andthe number of motion candidates of a final motion candidate list for the current block.51.The method of any of claims 3-41, wherein max is the minimum value among the following:the number of motion candidates of an initial motion candidate list for the current block, andthe number of motion candidates for ARMC.52.The method of any of claims 3-41, wherein max is the minimum value among the following:the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, andthe number of motion candidates of a final motion candidate list for the current block.53.The method of any of claims 3-41, wherein max is the minimum value among the following:the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, andthe number of motion candidates for ARMC.54.The method of any of claims 3-41, wherein in accordance with that the motion candidate list is for a template matching merge mode, max is the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, and the number of motion candidates for ARMC, orin accordance with that the motion candidate list is not for a template matching merge mode, max is the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, and the number of motion candidates of a final motion candidate list for the current block.55.The method of any of claims 3-41, wherein max is the minimum value among the following:the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block,the number of motion candidates of a final motion candidate list for the current block, anda predetermined maximum number of motion candidates.56.The method of any of claims 3-41, wherein max is the minimum value among the following:the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block,the number of motion candidates for ARMC, anda predetermined maximum number of motion candidates.57.The method of any of claims 3-41, wherein in accordance with that the motion candidate list is for a template matching merge mode, max is the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, the number of motion candidates for ARMC, and a predetermined maximum number of motion candidates, orin accordance with that the motion candidate list is not for a template matching merge mode, max is the minimum value among the following: the number of motion candidates before a zero padding candidate in an initial motion candidate list for the current block, the number of motion candidates of a final motion candidate list for the current block, and a predetermined maximum number of motion candidates.58.The method of any of claims 1-57, wherein the motion candidate list is obtained by performing an ARMC reordering on an initial motion candidate list for the current block.59.The method of any of claims 1-57, wherein the motion candidate list is an initial motion candidate list for the current block without ARMC reordering.60.The method of any of claims 1-59, wherein the target motion candidate is added into a list and follows a pairwise average motion candidate in the list.61.The method of any of claims 1-59, wherein the target motion candidate is added into a list and precedes a pairwise average motion candidate in the list.62.The method of any of claims 1-59, wherein the target motion candidate is added into an initial motion candidate list for the current block.63.The method of any of claims 1-59, wherein the target motion candidate is added into a pairwise merge list.64.The method of claim 63, wherein the target motion candidate belongs to a first type of motion candidates, and at least one position in the pairwise merge list is reserved for at least one motion candidate of the first type.65.The method of claim 64, wherein the number of the at least one position is 1 or 2.66.The method of claim 64, wherein a condition to be checked is that a current picture comprising the current block is a low-delay picture and a POC distance between the current picture and the nearest reference picture of the current picture is 1, andin accordance with that the condition is met, the number of the at least one position is 1, orin accordance with that the condition is not met, the number of the at least one position is 2.67.The method of claim 64, wherein a condition to be checked is that a current picture comprising the current block is a low-delay picture, andin accordance with that the condition is met, the number of the at least one position is 1, orin accordance with that the condition is not met, the number of the at least one position is 2.68.The method of any of claims 1-67, wherein the target motion candidate belongs to a first type of motion candidates, and the maximum number of motion candidates of the first type is 1, 2, 3, or 4.69.The method of any of claims 1-67, wherein the target motion candidate belongs to a first type of motion candidates, and the maximum number of motion candidates of the first type is predetermined or determined on-the-fly.70.The method of any of claims 1-69, wherein the method is allowed to be applied to a non-low-delay picture.71.The method of any of claims 1-70, wherein a condition to be checked is that a first picture is a low-delay picture and a POC distance between the first picture and the nearest reference picture of the first picture is 1, andin accordance with that the condition is met, the method is disallowed to be applied on the first picture, orin accordance with that the condition is not met, the method is allowed to be applied on the first picture.72.The method of any of claims 1-71, wherein the method is applied in at least one of the following: a regular inter merge mode, a regular inter AMVP mode, an inter-TM merge mode, an inter-TM AMVP mode, a bilateral matching (BM) mode, a decoder side motion vector refinement (DMVR) mode, a multi-pass DMVR mode, an adaptive decoder side motion vector refinement (ADMVR) merge mode, a bilateral matching AMVP-merge mode, a merge mode with motion vector difference (MMVD) mode, a CIIP mode, a CIIP-TM merge mode, a uni-predictive GPM mode, a GPM-MMVD mode, a GPM-TM mode, a GPM with inter and intra mode, a GPM with inter mode and IBC, a bi-predictive GPM mode, a regular affine merge mode, a regular affine AMVP mode, an affine-TM merge mode, an affine-TM AMVP mode, an affine DMVR mode, an affine MMVD mode, an affine CIIP mode, an affine motion compensation (AMC) GPM (AMC-GPM) mode, an affine-DMVR-MMVD mode, an adaptive affine-DMVR mode, a cross component prediction (CCP) merge for chroma inter blocks, a non-local local illumination compensation (LIC) mode, an LIC flag signaling for merge mode, an LIC model inheritance for merge mode.73.The method of any of claims 1-71, wherein the method is applied in at least one of the following: a regular IBC merge mode, a regular IBC advanced motion vector prediction (AMVP) mode, an IBC with template matching (IBC-TM) merge mode, an IBC-TM AMVP mode, a reconstruction-reordered IBC (RR-IBC) merge mode, an RR-IBC AMVP mode, an IBC merge mode with block vector differences (IBC-MBVD) mode, a combined intra block copy and intra prediction (IBC-CIIP) mode, a uni-predictive IBC with geometric partitioning mode (IBC-GPM) mode, a bi-predictive IBC-GPM mode, a regular IntraTMP mode, a spatial geometric partitioning mode (SGPM) with IntraTMP and IBC mode, a GPM with inter prediction and IBC, an IBC extension to decoder side intra mode derivation (DIMD) mode, an IntraTMP extension to DIMD mode, an IBC extension to template-based intra mode derivation (TIMD) mode, or an IntraTMP extension to TIMD mode.74.The method of any of claims 1-73, wherein the method is disallowed to be applied for screen content.75.The method of claim 74, wherein type information regarding whether a video region belongs to natural content or screen content is indicated at one of the following: a sequence level, a group of pictures level, a picture level, a slice level, or a tile group level.76.The method of claim 75, wherein the type information is indicated in a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a decoded parameter set (DPS) , decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter set (APS) , a slice header or a tile group header.77.The method of any of claims 75-76, wherein the type information is determined based on a hash block hit percentage at encoder and indicated in the bitstream.78.The method of claim 77, wherein in accordance with that the hash block hit percentage of a video sequence is larger than a threshold, the video sequence is determined to be belonging to the screen content, or in accordance with that the hash block hit percentage of the video sequence is not larger than the threshold, the video sequence is determined to be belonging to the natural content, orin accordance with that the hash block hit percentage of a picture is larger than a threshold, the picture is determined to be belonging to the screen content, or in accordance with that the hash block hit percentage of the picture is not larger than the threshold, the picture is determined to be belonging to the natural content, orin accordance with that the hash block hit percentage of a slice is larger than a threshold, the slice is determined to be belonging to the screen content, or in accordance with that the hash block hit percentage of the slice is not larger than the threshold, the slice is determined to be belonging to the natural content, orin accordance with that the hash block hit percentage of a tile is larger than a threshold, the tile is determined to be belonging to the screen content, or in accordance with that the hash block hit percentage of the tile is not larger than the threshold, the tile is determined to be belonging to the natural content.79.The method of claim 77, wherein in accordance with that the hash block hit percentage of the first frame of a video sequence is larger than a threshold, the video sequence is determined to be belonging to the screen content, orin accordance with that the hash block hit percentage of the first frame of the video sequence is not larger than the threshold, the video sequence is determined to be belonging to the natural content.80.The method of claim 77, wherein in accordance with that the hash block hit percentage of the first frame of a group of pictures (GOP) is larger than a threshold, the GOP is determined to be belonging to the screen content, orin accordance with that the hash block hit percentage of the first frame of the GOP is not larger than the threshold, the GOP is determined to be belonging to the natural content.81.The method of claim 77, wherein in accordance with that the hash block hit percentage of an intra picture (I-picture) is larger than a threshold, a set of pictures are determined to be belonging to the screen content, the set of pictures comprises the I-picture and one or more pictures following the I-picture and preceding a next I-picture, orin accordance with that the hash block hit percentage of the I-picture is not larger than the threshold, the set of pictures are determined to be belonging to the natural content.82.The method of claim 77, wherein in accordance with that the hash block hit percentage of an intra slice (I-slice) is larger than a threshold, a set of slices are determined to be belonging to the screen content, the set of slices comprises the I-slice and one or more slices following the I-slice and preceding a next I-slice, orin accordance with that the hash block hit percentage of the I-slice is not larger than the threshold, the set of slices are determined to be belonging to the natural content.83.The method of any of claims 78-82, wherein the threshold is predetermined.84.The method of claim 83, wherein the threshold is 19%, 40%, 56%, or 59%.85.The method of any of claims 75-76, wherein the type information is predetermined.86.The method of claim 74, wherein type information regarding whether a video block belongs to natural content or screen content is indicated at one of the following: a prediction block (PB) , a transform block (TB) , a coding block (CB) , a prediction unit (PU) , a transform unit (TU) , a coding unit (CU) , a virtual pipeline data unit (VPDU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a subpicture, or a region containing more than one sample or pixel.87.The method of claim 86, wherein the type information is indicated in the bitstream.88.The method of claim 87, wherein the type information is derived.89.The method of claim 88, wherein the type information is derived based on a coding mode of at least one neighboring block of the video block.90.The method of claim 89, wherein the type information is derived based on whether a coding mode of at least one neighboring block of the video block is a block vector (BV) based coding mode.91.The method of claim 90, wherein the BV-based coding mode comprises at least one of: an IBC mode, or an intraTMP mode.92.The method of any of claims 1-91, wherein the current block is coded with at least one of the following: an inter prediction mode, an intra prediction mode, an intra block copy (IBC) -based mode, or an intra template matching prediction (IntraTMP) -based mode.93.The method of claim 92, wherein the IBC-based mode comprises at least one of the following: a regular IBC merge mode, a regular IBC advanced motion vector prediction (AMVP) mode, an IBC with template matching (IBC-TM) merge mode, an IBC-TM AMVP mode, a reconstruction-reordered IBC (RR-IBC) merge mode, an RR-IBC AMVP mode, an IBC merge mode with block vector differences (IBC-MBVD) mode, a combined intra block copy and intra prediction (IBC-CIIP) mode, a uni-predictive IBC with geometric partitioning mode (IBC-GPM) mode, a bi-predictive IBC-GPM mode, a spatial geometric partitioning mode (SGPM) with IntraTMP and IBC mode, a GPM with inter prediction and IBC, an IBC extension to decoder side intra mode derivation (DIMD) mode, an IBC extension to template-based intra mode derivation (TIMD) mode, orwherein the IntraTMP-based mode comprises at least one of the following: a regular IntraTMP mode, a SGPM with IntraTMP and IBC, an IntraTMP extension to DIMD mode, or an IntraTMP extension to TIMD mode.94.The method of claim 92, wherein the IBC-based mode excludes an RR-IBC merge mode and an RR-IBC AMVP mode.95.The method of any of claims 92-94, wherein the inter prediction mode comprises at least one of the following: a regular inter merge mode, a regular inter AMVP mode, an inter-TM merge mode, an inter-TM AMVP mode, a bilateral matching (BM) mode, a decoder side motion vector refinement (DMVR) mode, a multi-pass DMVR mode, an adaptive decoder side motion vector refinement (ADMVR) merge mode, a bilateral matching AMVP-merge mode, a merge mode with motion vector difference (MMVD) mode, a CIIP mode, a CIIP-TM merge mode, a uni-predictive GPM mode, a GPM-MMVD mode, a GPM-TM mode, a GPM with inter and intra mode, a GPM with inter mode and IBC, a bi-predictive GPM mode, a regular affine merge mode, a regular affine AMVP mode, an affine-TM merge mode, an affine-TM AMVP mode, an affine DMVR mode, an affine MMVD mode, an affine CIIP mode, an affine motion compensation (AMC) GPM (AMC-GPM) mode, an affine-DMVR-MMVD mode, an adaptive affine-DMVR mode, a cross component prediction (CCP) merge for chroma inter blocks, a non-local local illumination compensation (LIC) mode, an LIC flag signaling for merge mode, an LIC model inheritance for merge mode.96.The method of any of claims 92-95, wherein the intra prediction mode comprises at least one of the following: a regular intra mode, a GPM with inter and intra prediction, an occurrence-based intra coding (OBIC) , a CCP merge mode, an SGPM mode, an extrapolation filter-based intra prediction (EIP) mode.97.The method of any of claims 1-96, wherein a pruning process is applied on at least a part of motion candidates for constructing a motion candidate list of the current block.98.The method of any of claims 1-97, wherein a syntax element in the bitstream is binarized as one of the following: a flag, a fixed length code, an exponential Golomb (EG) code, a unary code, a truncated unary code, or a truncated binary code, and the syntax element is signed or unsigned.99.The method of any of claims 1-98, wherein a syntax element in the bitstream is coded with at least one context model or bypass coded.100.The method of any of claims 1-99, wherein a syntax element is included in the bitstream based on at least one condition, the at least one condition comprising a condition that a function associated with the syntax element is applicable for the conversion.101.The method of any of claims 1-99, wherein a syntax element is included at one of the following: a block level, a sequence level, a group of pictures level, a picture level, a slice level, a tile group level.102.The method of any of claims 1-101, wherein a syntax element is included in one of the following: a coding structure of a coding tree unit (CTU) , a coding structure of a coding unit (CU) , a coding structure of a prediction unit (PU) , a coding structure of a transform unit (TU) , a coding structure of a coding tree block (CTB) , a coding structure of a coding block (CB) , a coding structure of a transform block (TB) , a coding structure of a prediction block (PB) , a sequence header, a picture header, a sequence parameter set (SPS) , a video parameter set (VPS) , a decoded parameter set (DPS) , decoding capability information (DCI) , a picture parameter set (PPS) , an adaptation parameter set (APS) , a slice header or a tile group header.103.The method of any of claims 1-102, wherein a block is one of the following: a color component, a sub-picture, a slice, a tile, a coding tree unit (CTU) , a CTU row, groups of CTU, a coding unit (CU) , a prediction unit (PU) , a transform unit (TU) , a coding tree block (CTB) , a coding block (CB) , a transform block (TB) , a prediction block (PB) , a block, a sub-block of a block, a sub-region within a block, or a region containing more than one sample or pixel.104.The method of any of claims 1-103, wherein whether to and / or how to apply the method is indicated in the bitstream at one of the following: a sequence level, a group of pictures level, a picture level, a slice level, a tile group level, a sequence header, a picture header, an SPS, a VPS, a DPS, DCI, a PPS, an APS, a slice header or a tile group header.105.The method of any of claims 1-104, wherein whether to and / or how to apply the method is indicated in the bitstream at one of the following: a prediction block (PB) , a transform block (TB) , a coding block (CB) , a prediction unit (PU) , a transform unit (TU) , a coding unit (CU) , a virtual pipeline data unit (VPDU) , a coding tree unit (CTU) , a CTU row, a slice, a tile, a subpicture, or a region containing more than one sample or pixel.106.The method of any of claims 1-105, wherein whether to and / or how to apply the method is based on coded information associated with the current block.107.The method of claim 106, wherein the coded information comprises at least one of the following: a block size, a color format, a single tree partitioning, a dual tree partitioning, a color component, a slice type, or a picture type.108.The method of any of claims 1-107, wherein the conversion includes encoding the current block into the bitstream.109.The method of any of claims 1-107, wherein the conversion includes decoding the current block from the bitstream.110.An apparatus for video processing comprising a processor and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform a method in accordance with any of claims 1-109.111.A non-transitory computer-readable storage medium storing instructions that cause a processor to perform a method in accordance with any of claims 1-109.112.A non-transitory computer-readable recording medium storing a bitstream of a video which is generated by a method performed by an apparatus for video processing, wherein the method comprises:selecting a plurality of motion candidates from a motion candidate list for a current block of the video based on a rule;determining a target motion candidate based on the plurality of motion candidates; andgenerating the bitstream based on the target motion candidate,wherein determining the target motion candidate comprises:determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; anddetermining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.113.A method for storing a bitstream of a video, comprising:selecting a plurality of motion candidates from a motion candidate list for a current block of the video based on a rule;determining a target motion candidate based on the plurality of motion candidates;generating the bitstream based on the target motion candidate; andstoring the bitstream in a non-transitory computer-readable recording medium,wherein determining the target motion candidate comprises:determining, from the plurality of motion candidates, a set of motion vectors (MVs) associated with a same first reference picture list (RPL) and referring to a same reference picture; and determining, based on the set of MVs, a first MV of the target motion candidate for the first RPL.

Citation Information

Patent Citations

  • Inter-frame prediction method, video encoding method, video decoding method and device

    CN114339261A

  • Method and apparatus of inter prediction using average motion vector for video coding

    US20180324454A1

  • Image encoding / decoding method and recording medium for same

    US20190141334A1

  • Method for setting motion vector list and apparatus using same

    US20210368201A1

  • Video coding and decoding

    WO2023052489A1