Method and device for video processing and medium

Through the sorting method based on template matching cost and time-domain motion information of multiple homogeneous frames, the problem of inefficient encoding and codec in traditional video encoding and codec technology is solved, and more efficient MVP candidate list construction and motion prediction are achieved.

CN119769091APending Publication Date: 2025-04-04DOUYIN VISION CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380057818.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-08-05
Filing Date
2023-08-03
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The encoding and decoding efficiency of traditional video encoding and decoding technology is low, and it is difficult to effectively utilize time domain motion information, resulting in inefficient construction of MVP candidate lists.

Method used

MVP list is constructed by a sorting method based on template matching costs, multiple homogeneous frames provide more efficient time-domain motion information, and multiple TMVPs are introduced during video encoding and decoding to improve the accuracy of motion prediction.

Benefits of technology

It improves the encoding and codec efficiency and effectiveness of video encoding and codec, enhances the construction efficiency of MVP candidate list, and makes more efficient use of time domain motion information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119769091A_ABST
    Figure CN119769091A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video processing scheme. A method for video processing is presented. The method comprises: for conversion between a current video block of a video and a bitstream of the video, determining whether a candidate frame associated with the current video block is a co-located frame based on time domain information including a current frame of the current video block, the co-located frame being located at the same location as the current frame; and performing the conversion based on the determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure generally relate to video coding techniques, and more particularly, to video coding based on co-located frames. Background Art

[0002] Nowadays, digital video capabilities are being applied to all aspects of people's lives. A variety of video compression technologies have been proposed for video encoding / decoding, such as MPEG-2, MPEG-4, ITU-TH.263, ITU-TH.264 / MPEG-4 Part 10 Advanced Video Codec (AVC), ITU-TH.265 High Efficiency Video Codec (HEVC) standard, and Versatile Video Codec (VVC) standard. However, the encoding and decoding efficiency of traditional video coding and decoding technologies is usually very low, which is not ideal. Summary of the invention

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

[0004] In a first aspect, a method for video processing is provided. The method includes: for conversion between a current video block of a video and a bitstream of the video, based on temporal information of a current frame including the current video block, determining whether a candidate frame associated with the current video block is a co-located frame, the co-located frame being co-located with the current frame; and performing conversion based on the determination. In this manner, based on the temporal information, the candidate frame can be determined to be a co-located frame, thereby improving the coding effectiveness and coding efficiency.

[0005] In a second aspect, another method for video processing is provided. The method includes: for conversion between a current video block of a video and a bitstream of the video, determining a set of co-located frames associated with the current video block, the current video block being in a current frame co-located with a plurality of co-located frames, the number of co-located frames in the set of co-located frames being based on codec information associated with the current video block; and performing conversion based on the set of co-located frames. The method according to the second aspect of the present disclosure determines the number of co-located frames based on the codec information, thereby improving codec validity and codec efficiency.

[0006] In a third aspect, another method for video processing is proposed. The method includes: for conversion between a current video block of a video and a bitstream of the video, determining a motion shift list of the current video block, wherein the motion shift candidates in the motion shift list have a target precision; and performing conversion based on the motion shift list. The method according to the third aspect of the present disclosure uses motion shifting with target precision, thereby improving codec effectiveness and codec efficiency.

[0007] In a fourth aspect, another method for video processing is proposed. The method includes: determining a motion shift list of the current video block for conversion between a current video block of the video and a bitstream of the video; performing a pruning process on the motion shift list based on a pruning threshold; and performing conversion based on the pruned motion shift list. The method according to the fourth aspect of the present disclosure prunes the motion shift list, thereby improving the coding effectiveness and coding efficiency.

[0008] In a fifth aspect, another method for video processing is proposed. The method includes: for conversion between a current video block of a video and a bitstream of the video, determining a motion shift list of the current video block by traversing a plurality of motion shift candidates in a predefined order; and performing conversion based on the motion shift list. The method according to the fifth aspect of the present disclosure determines the motion shift list by traversing the motion shift candidates in a predefined order, thereby improving the coding effectiveness and coding efficiency.

[0009] In the sixth aspect, another method for video processing is proposed. The method includes: for the conversion between the current video block of the video and the bitstream of the video, determining a motion vector prediction (MVP) candidate list of the current video block, the MVP candidate list includes at least a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates, and the plurality of SbTMVP candidates are determined based on a plurality of motion shift candidates in at least one motion shift list; determining a plurality of metrics of the candidates in the MVP candidate list, at least one metric of the plurality of metrics being adjusted; reordering the MVP candidate list based on the plurality of metrics; and performing conversion based on the reordered MVP candidate list. The method according to the sixth aspect of the present disclosure adjusts the metrics of the candidates in the MVP candidate list, and reorders the MVP candidate list, thereby improving the coding effectiveness and coding efficiency.

[0010] In a seventh aspect, a device for processing video data is provided. The device for processing video data includes a processor and a non-volatile memory having instructions thereon. The instructions, when executed by the processor, cause the processor to perform the method according to the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect of the present disclosure.

[0011] In an eighth aspect, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores instructions for causing a processor to execute the method according to the first aspect, the second aspect, the third aspect, the fourth aspect, the fifth aspect, or the sixth aspect of the present disclosure.

[0012] In a ninth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video, the bitstream being generated by a method performed by an apparatus for video processing. The method comprises: determining whether a candidate frame associated with a current video block of the video is a co-located frame based on temporal information of a current frame including the current video block, the co-located frame being co-located with the current frame; and generating a bitstream based on the determination.

[0013] In a tenth aspect, a method for storing a bitstream of a video is provided. The method includes: determining whether a candidate frame associated with a current video block of the video is a co-located frame based on temporal information of a current frame including the current video block, the co-located frame being co-located with the current frame; generating a bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0014] In an eleventh aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video, the bitstream being generated by a method performed by an apparatus for video processing. The method includes: determining a set of collocated frames associated with a current video block of the video, the current video block being in a current frame collocated with a plurality of collocated frames, the number of collocated frames in the set of collocated frames being based on codec information associated with the current video block; and generating a bitstream based on the set of collocated frames.

[0015] In a twelfth aspect, a method for storing a bitstream of a video is provided. The method includes: determining a set of collocated frames associated with a current video block of the video, the current video block being in a current frame collocated with a plurality of collocated frames, the number of collocated frames in the set of collocated frames being based on codec information associated with the current video block; generating a bitstream based on the set of collocated frames; and storing the bitstream in a non-transitory computer-readable recording medium.

[0016] In a thirteenth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining a motion shift list of a current video block of the video, wherein the motion shift candidates in the motion shift list have a target accuracy; and generating a bitstream based on the motion shift list.

[0017] In a fourteenth aspect, a method for storing a bitstream of a video is provided, the method comprising: determining a motion shift list of a current video block of the video, wherein the motion shift candidates in the motion shift list have a target accuracy; generating a bitstream based on the motion shift list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0018] In a fifteenth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video, the bitstream being generated by a method performed by an apparatus for video processing. The method includes: determining a motion shift list of a current video block of the video; performing a pruning process on the motion shift list based on a pruning threshold; and generating a bitstream based on the pruned motion shift list.

[0019] In a sixteenth aspect, a method for storing a bitstream of a video is provided. The method includes: determining a motion shift list of a current video block of the video; performing a pruning process on the motion shift list based on a pruning threshold; generating a bitstream based on the pruned motion shift list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0020] In a seventeenth aspect, another non-transitory computer-readable recording medium is provided. The non-transitory computer-readable recording medium stores a bitstream of a video, and the GIA bitstream is generated by a method performed by an apparatus for video processing. The method includes: determining a motion shift list of a current video block of the video by traversing a plurality of motion shift candidates in a predefined order; and generating a bitstream based on the motion shift list.

[0021] In an eighteenth aspect, a method for storing a bitstream of a video is provided. The method comprises: determining a motion shift list of a current video block of the video by traversing a plurality of motion shift candidates in a predefined order; generating a bitstream based on the motion shift list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0022] In the nineteenth 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 a device for video processing. The method includes: determining a motion vector prediction (MVP) candidate list of a current video block of the video, the MVP candidate list at least including a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates, the plurality of SbTMVP candidates being determined based on a plurality of motion shift candidates in at least one motion shift list; determining a plurality of metrics of the candidates in the MVP candidate list, at least one metric of the plurality of metrics being adjusted; reordering the MVP candidate list based on the plurality of metrics; and generating a bitstream based on the reordered MVP candidate list.

[0023] In a twentieth aspect, a method for storing a bitstream of a video is proposed. The method includes: determining a motion vector prediction (MVP) candidate list of a current video block of the video, the MVP candidate list at least including a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates, the plurality of SbTMVP candidates being determined based on a plurality of motion shift candidates in at least one motion shift list; determining a plurality of metrics of the candidates in the MVP candidate list, at least one metric of the plurality of metrics being adjusted; reordering the MVP candidate list based on the plurality of metrics; generating a bitstream based on the reordered MVP candidate list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0024] 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

[0025] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become more apparent through the following detailed description with reference to the accompanying drawings.In the exemplary embodiments of the present disclosure, the same reference numerals generally refer to the same components.

[0026] Figure 1 A block diagram showing an example video encoding and decoding system according to some embodiments of the present disclosure is shown;

[0027] Figure 2 A block diagram illustrating a first example video encoder according to some embodiments of the present disclosure is shown;

[0028] Figure 3 A block diagram of an example video decoder according to some embodiments of the present disclosure is shown;

[0029] Figure 4 The positions of spatial and temporal neighboring blocks used in Advanced Motion Vector Prediction (AMVP) or merge candidate list structure are shown;

[0030] Figure 5 An example diagram illustrating the locations of non-neighboring candidates in an ECM is shown;

[0031] Figure 6 An example diagram showing template matching of a search area around an initial MV;

[0032] Figure 7 An example diagram showing a template and a corresponding reference template;

[0033] Figure 8An example diagram showing a template of a block with sub-block motion and a reference template using motion information of a sub-block of a current block is shown;

[0034] Fig. 9 An example diagram showing an example of locations of non-adjacent temporal motion vector prediction (TMVP) candidates is shown;

[0035] Fig.10 shows deriving a sub-CU motion field obtained by applying motion shifting based on neighboring motion information;

[0036] Fig.11 An example diagram showing an example of a display template;

[0037] Fig.12 A flowchart of a method for video processing according to some embodiments of the present disclosure is shown;

[0038] Fig.13 Another flow chart of a method for video processing according to some embodiments of the present disclosure is shown;

[0039] Fig.14 Another flow chart of a method for video processing according to some embodiments of the present disclosure is shown;

[0040] Fig.15 Another flow chart of a method for video processing according to some embodiments of the present disclosure is shown;

[0041] Fig.16 A flowchart of a method for video processing according to an embodiment of the present disclosure is shown;

[0042] Fig.17 A flowchart showing a method for video processing according to an embodiment of the present disclosure is shown; and

[0043] Fig.18 A block diagram of a computing device is shown in which various embodiments of the present disclosure may be implemented.

[0044] Throughout the drawings, same or similar reference numbers generally refer to same or similar elements. DETAILED DESCRIPTION

[0045] The principle of the present disclosure will now be described with reference to some embodiments. It should be understood that these embodiments are described only for the purpose of illustrating and helping those skilled in the art to understand and implement the present disclosure, and do not imply any limitation on the scope of the present disclosure. The disclosure described herein can be implemented in various ways different from the modes described below.

[0046] 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 skill in the art to which this disclosure belongs.

[0047] References in this disclosure to "one embodiment," "an embodiment," "an example embodiment," etc. indicate that the described embodiment may include a particular feature, structure, or characteristic, but not every embodiment must include the particular feature, structure, or characteristic. Furthermore, these phrases do not necessarily refer to the same embodiment. Furthermore, when a particular feature, structure, or characteristic is described in conjunction with an example embodiment, whether or not explicitly described, it is considered to be within the knowledge of those skilled in the art to affect such feature, structure, or characteristic in relation to other embodiments.

[0048] It should be understood that although the terms "first" and "second" etc. can be used to describe various elements, these elements should not be limited to these terms. These terms are only used to distinguish one element from another element. For example, a first element can be referred to as a second element, and similarly, a second element can be referred to as a first element without departing from the scope of the exemplary embodiments. As used herein, the term "and / or" includes any and all combinations of one or more of the listed terms.

[0049] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments. As used herein, the singular forms "a", "an", and "the" are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms "including", "comprising", and / or "having" when used herein indicate the presence of the features, elements, and / or components, etc., but do not exclude the presence or addition of one or more other features, elements, components, and / or combinations thereof. Example Environment

[0050] Figure 1 1 is a block diagram illustrating an example video codec system 100 that may utilize the techniques of the present disclosure. As shown, the video codec system 100 may include a source device 110 and a destination device 120. The source device 110 may also be referred to as a video encoding device, and the destination device 120 may also be referred to as a video decoding device. In operation, the source device 110 may be configured to generate encoded video data, and the destination device 120 may 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.

[0051] Video source 112 may include a source such as a video capture device. Examples of a video capture device include, but are not limited to, an interface that receives video data from a video content provider, a computer graphics system for generating video data, and / or combinations thereof.

[0052] The video data may include 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 bit sequence that forms a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded pictures are coded representations of pictures. The associated data may include sequence parameter sets, picture parameter sets, and other grammatical structures. The I / O interface 116 may include a modulator / demodulator and / or a transmitter. The coded video data may be directly transmitted to the destination device 120 via the network 130A via the I / O interface 116. The coded video data may also be stored on a storage medium / server 130B for access by the destination device 120.

[0053] 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 obtain 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 the user. The display device 122 may be integrated with the destination device 120, or may be outside the destination device 120, which is configured to be connected to an external display device interface.

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

[0055] Figure 2 is a block diagram showing an example of a video encoder 200 according to some embodiments of the present disclosure, which may be Figure 1 An example of a video encoder 114 in the system 100 is shown.

[0056] Video encoder 200 may be configured to implement any or all of the techniques of this disclosure. Figure 2 In the example of , video encoder 200 includes multiple functional components. The techniques described in this disclosure can be shared between the various components of video encoder 200. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.

[0057] In some embodiments, the video encoder 200 may include a partitioning unit 201, a prediction unit 202, a residual generation unit 207, a transformation unit 208, a quantization unit 209, an inverse quantization unit 210, an inverse transformation unit 211, a reconstruction unit 212, a buffer 213 and an entropy coding unit 214, and the prediction unit 202 may include a mode selection unit 203, a motion estimation unit 204, a motion compensation unit 205 and an intra-frame prediction unit 206.

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

[0059] Furthermore, although some components (such as the motion estimation unit 204 and the motion compensation unit 205) may be integrated, for the purpose of explanation, these components are described in detail below. Figure 2 are shown separately in the example.

[0060] The partitioning 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.

[0061] The mode selection unit 203 may select one of a plurality of coding modes (intra-frame coding or inter-frame coding), for example, based on the error result, and provide the generated intra-frame coding block or inter-frame coding block to the residual generation unit 207 to generate residual block data, and to the reconstruction unit 212 to reconstruct the coding block for use as a reference picture. In some examples, the mode selection unit 203 may select a combination of intra-frame and inter-frame prediction (CIIP) modes, where the prediction is based on an inter-frame prediction signal and an intra-frame prediction signal. In the case of inter-frame prediction, the mode selection unit 203 may also select a resolution for the motion vector (e.g., sub-pixel precision or integer pixel precision) for the block.

[0062] To perform inter-frame prediction on the current video block, the motion estimation unit 204 may generate motion information for the current video block by comparing the current video block with one or more reference frames from the buffer 213. 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.

[0063] The motion estimation unit 204 and the motion compensation unit 205 may perform different operations on the 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 consisting of macroblocks, all of which are based on macroblocks within the same picture. Furthermore, as used herein, in some aspects, a "P slice" and a "B slice" may refer to a portion of a picture consisting of macroblocks that are independent of macroblocks in the same picture.

[0064] In some examples, the motion estimation unit 204 may perform unidirectional prediction on the current video block, and the motion estimation unit 204 may search the reference pictures of list 0 or list 1 to find the reference video block for the current video block. The motion estimation unit 204 may then generate a reference index and a motion vector, the reference index indicating the reference picture in list 0 or list 1 containing the reference video block, and the motion vector indicating the spatial displacement between the current video block and the reference video block. The motion estimation unit 204 may output the reference index, the prediction direction indicator, and the motion vector as the motion information of the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the reference video block indicated by the motion information of the current video block.

[0065] Alternatively, in other examples, the motion estimation unit 204 may perform bidirectional prediction on 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 a plurality of reference indexes and a plurality of motion vectors, the plurality of reference indexes indicating a plurality of reference pictures in list 0 and list 1 containing a plurality of reference video blocks, and the plurality of motion vectors indicating a plurality of spatial displacements between the plurality of reference video blocks and the current video block. The motion estimation unit 204 may output the plurality of reference indexes and the plurality of motion vectors of the current video block as motion information of the current video block. The motion compensation unit 205 may generate a predicted video block for the current video block based on the plurality of reference video blocks indicated by the motion information of the current video block.

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

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

[0068] In another example, the motion estimation unit 204 may identify another video block and a motion vector difference (MVD) in a syntax structure associated with the current video block. The motion vector difference indicates the 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.

[0069] As discussed above, the video encoder 200 may signal motion vectors in a predictive manner.Two examples of prediction signaling techniques that may be implemented by the video encoder 200 include Advanced Motion Vector Prediction (AMVP) and merge mode signaling.

[0070] 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 prediction video block and various syntax elements.

[0071] The residual generation unit 207 may generate residual data for the current video block by subtracting (e.g., indicated by a minus sign) the prediction 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 corresponding to different sample portions of samples in the current video block.

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

[0073] Transform processing unit 208 may generate one or more transform coefficient video blocks for a current video block by applying one or more transforms to the residual video block associated with the current video block.

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

[0075] The inverse quantization unit 210 and the inverse transform unit 211 may apply inverse quantization and inverse transform 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 prediction video blocks generated by the prediction unit 202 to generate a reconstructed video block associated with the current video block for storage in the buffer 213.

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

[0077] The entropy coding unit 214 may receive data from other functional components of the video encoder 200. When the entropy coding unit 214 receives the data, the entropy coding unit 214 may perform one or more entropy coding operations to generate entropy coded data and output a bitstream including the entropy coded data.

[0078] Figure 3 is a block diagram showing an example of a video decoder 300 according to some embodiments of the present disclosure, which may be Figure 1 An example of a video decoder 124 in the system 100 is shown.

[0079] Video decoder 300 may be configured to perform any or all of the techniques of this disclosure. Figure 3 In the example of , video decoder 300 includes multiple functional components. The techniques described in this disclosure can be shared between the various components of video decoder 300. In some examples, a processor can be configured to perform any or all of the techniques described in this disclosure.

[0080] exist Figure 3 In the example of , 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, and a reconstruction unit 306 and a buffer 307. In some examples, the video decoder 300 can perform a decoding process that is generally opposite to the encoding process described with respect to the video encoder 200.

[0081] The entropy decoding unit 301 can retrieve the encoded bitstream. The encoded bitstream may include entropy encoded video data (e.g., encoded video data blocks). The entropy decoding unit 301 can decode the entropy encoded video data, and the motion compensation unit 302 can determine motion information from the entropy decoded video data, the motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. The motion compensation unit 302 can determine the information, for example, by performing AMVP and merge mode. AMVP is used, including deriving several most likely candidates based on data and reference pictures of neighboring PBs. The motion information typically includes horizontal and vertical motion vector displacement values, one or two reference picture indexes, and in the case of prediction areas in B strips, also includes an identification of which reference picture list is associated with each index. As used herein, in some aspects, "merge mode" may refer to deriving motion information from blocks that are adjacent in the spatial or temporal domain.

[0082] The motion compensation unit 302 may generate a motion compensated block, possibly performing interpolation based on interpolation filtering.An identifier for the interpolation filter used with sub-pixel precision may be included in the syntax element.

[0083] The motion compensation unit 302 may calculate interpolated values ​​for sub-integer pixels of a reference block using interpolation filtering used by the video encoder 200 during encoding of the video block. The motion compensation unit 302 may determine the interpolation filtering used by the video encoder 200 based on received syntax information, and the motion compensation unit 302 may use the interpolation filtering to generate a prediction block.

[0084] The motion compensation unit 302 may use at least part of the syntax information to determine the size of blocks used to encode (multiple) frames and / or (multiple) slices of the encoded video sequence, partition information describing how each macroblock of a picture of the encoded video sequence is partitioned, a mode indicating how each partition is encoded, one or more reference frames (and reference frame lists) for each inter-frame coding block, and other information for decoding the encoded video sequence. As used herein, in some aspects, a "slice" may refer to a data structure that can be decoded independently of other slices of the same picture in terms of entropy coding, signal prediction, and residual signal reconstruction. A slice may be an entire picture, or it may be a region of a picture.

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

[0086] The reconstruction unit 306 may obtain the decoded block, for example, by adding the residual block to the corresponding prediction block generated by the motion compensation unit 302 or the intra prediction unit 303. If necessary, a deblocking filter may also be applied to filter the decoded block in order to remove blocking artifacts. The decoded video block is then stored in a buffer 307, which provides reference blocks for subsequent motion compensation / intra prediction, and the buffer 307 also generates the decoded video for presentation on a display device.

[0087] Some exemplary embodiments of the present disclosure will be described in detail below. It should be noted that the section titles used in this document are for ease of understanding, rather than limiting the embodiments disclosed in the section to that section. In addition, although some embodiments are described with reference to general video codecs or other specific video codecs, the disclosed technology is also applicable to other video codec technologies. In addition, although some embodiments describe the video coding and decoding steps in detail, it should be understood that the corresponding decoding steps of the uncoding will be implemented by the decoder. In addition, the term video processing includes video encoding or compression, video decoding or decompression, and video transcoding, in which video pixels are represented from one compression format to another compression format or at different compression bit rates. 1. Brief Overview The present disclosure relates to video coding technology. Specifically, it is about a motion vector prediction (MVP) construction method in video coding. This concept can be applied to any video coding standard or non-standard video codec alone or in various combinations. 2. Introduction The exponential growth of multimedia data has brought severe challenges to video coding and decoding. In order to meet the growing demand for more efficient compression technology, ITU-T and ISO / IEC have developed a series of video coding and decoding standards in the past few decades. In particular, ITU-T developed H.261 and H.263, ISO / IEC developed MPEG-1 and MPEG-4 video, and the two organizations jointly developed H.262 / MPEG-2 video, H.264 / MPEG-4 Advanced Video Codec (AVC), H.265 / HEVC and the latest VVC standards. Starting with H.262 / MPEG-2, a hybrid video coding and decoding framework was adopted, in which intra / inter prediction plus transform coding and decoding were used. 2.1. MVP in video encoding and decoding Inter-frame prediction aims to remove the temporal redundancy between adjacent frames and is an indispensable part of the hybrid video coding framework. Specifically, inter-frame prediction uses the content specified by the motion vector (MV) as the predicted version of the current block to be coded, so that only the residual signal and motion information are transmitted in the bitstream. In order to reduce the cost of MV signaling, motion vector prediction (MVP) has emerged as an effective mechanism for transmitting motion information. Early strategies simply use the MV of the specified neighboring block or the median MV of the neighboring block as the MVP. In H.265 / HEVC, a competition mechanism is involved, that is, the best MVP is selected from multiple candidates through rate-distortion optimization (RDO). In particular, the advanced MVP (AMVP) mode and the merge mode are designed to have different motion information signaling strategies. In the AMVP mode, the reference index, the reference AMVP candidate list, and the MVP candidate index of the motion vector difference (MVD) are transmitted by signal. As for the merge mode, only the merge index of the reference merge candidate list is transmitted by signal, and all motion information associated with the merge candidate is inherited. Both the AMVP mode and the merge mode need to construct the MVP candidate list, and the details of the construction process of these two modes are described as follows. AMVP mode: AMVP uses the spatial and temporal correlation of motion vectors with neighboring blocks for explicit transmission of motion parameters. For each reference picture list, the availability of the left and upper temporal neighboring positions is first checked, redundant candidates are removed, and zero vectors are added to make the candidate list length constant, thereby constructing a motion vector candidate list. Figure 4 An example diagram 400 showing the locations of spatial and temporal neighboring blocks used in AMVP / merge candidate list construction is shown. For spatial motion vector candidate derivation, Figure 4 As shown in FIG. 1 , two motion vector candidates are finally derived based on the motion vectors of blocks located at five different positions. The five neighboring blocks located at B0, B1, B2 and A0, A1 are divided into two groups, where group A contains the three spatial neighboring blocks above and group B contains the two spatial neighboring blocks on the left. In a predefined order, the two motion vector candidates are derived from the first available candidates in group A and group B, respectively. For the derivation of temporal motion vector candidates, as shown in FIG. Figure 4 As shown, a motion vector candidate is derived based on two different co-located positions (lower right (C0) and center (C1)) examined in sequence. To avoid MV candidate redundancy, repeated motion vector candidates in the list are discarded. If the number of potential candidates is less than two, an additional zero motion vector candidate is added to the list. Merge mode: Similar to AMVP mode, the MVP candidate list for merge mode also includes spatial candidates and temporal candidates. For spatial motion vector candidate derivation, after performing availability and redundancy checks, up to four candidates are selected in the order of A1, B1, B0, A0 and B2. For temporal merge candidate (TMVP) derivation, at most one candidate is selected from two temporal neighboring blocks (C0 and C1). When there are not enough merge candidates with spatial candidates and temporal candidates, the combined bidirectional prediction merge candidate and zero MV candidate are added to the MVP candidate list. Once the number of available merge candidates reaches the maximum allowed number transmitted by signal, the merge candidate list construction process is terminated. In VVC, the construction process for merge mode is further improved by introducing history-based MVP (HMVP), which combines the motion information of previously coded blocks that may be far away from the current block. In VVC, HMVP merge candidates are appended to the merge list after spatial MVP and TMVP. In this method, the motion information of previously coded blocks is stored in a table and used as the MVP for the current CU. During the encoding / decoding process, a table with multiple HMVP candidates is maintained using a first-in-first-out strategy. Whenever there is a non-sub-block inter-coded CU, the associated motion information is added to the last entry of the table as a new HMVP candidate. During the VVC standardization process, non-adjacent MVP was proposed to facilitate better motion information derivation by employing non-adjacent regions. Figure 5 An example diagram 500 showing the location of non-adjacent candidates in ECM is shown. In the ECM software, non-adjacent MVPs are inserted between TMVP and HMVP, where the distance between the non-adjacent spatial candidates and the current codec block is based on the width and height of the current codec block, such as Figure 5 shown. 2.2. Interpolation Filters in VVC In VVC, interpolation filters are used in intra-frame and inter-frame coding and decoding processes. Intra-frame coding uses interpolation filters to generate fractional positions in angular prediction mode. In HEVC, a 2-tap linear interpolation filter is used to generate intra-frame prediction blocks in directional prediction mode (i.e., excluding plane and DC predictors). In VVC, a four-tap intra-frame interpolation filter is used to improve the accuracy of angular intra-frame prediction. Specifically, two sets of 4-tap interpolation filters are used in VVC intra-frame coding and decoding, which are DCT-based interpolation filters (DCTIF) and smoothing interpolation filters (SIF). DCTIF is constructed in the same way as used for chroma component motion compensation in HEVC and VVC. SIF is obtained by convolving a 2-tap linear interpolation filter with a [1 2 1] / 4 filter. In VVC, the highest precision of motion vectors explicitly signaled is one quarter luma sample. In some inter prediction modes (such as affine mode), motion vectors are derived with 1 / 16 luma sample precision, and motion compensated prediction is performed with 1 / 16 sample precision. VVC allows different MVD precisions, ranging from 1 / 16 luma sample to 4 luma samples. For half luma sample precision, a 6-tap interpolation filter is used. For other fractional precisions, a default 8-tap filter is used. In addition, a bilinear interpolation filter is used to generate fractional samples for the search process of decoder-side motion vector refinement (DMVR) in VVC. 2.3. Template Matching Merge / AMVP Mode in ECM Template Matching (TM) Merging / AMVP mode is a decoder-side MV derivation method that refines the motion information of the current CU by finding the closest match between a template in the current picture (i.e., the neighboring blocks above and / or to the left of the current CU) and a block in the reference picture (i.e., the same size as the template). Figure 6 An example diagram 600 is shown showing template matching performed on a search area around an initial MV. Figure 6 As shown, a better MV is searched around the initial motion of the current CU within the [-8, +8] pixel search range. In AMVP mode, MVP candidates are determined based on template matching error to select the MVP candidate that achieves the minimum difference between the current block and the reference block template, and then TM performs MV refinement only for this specific MVP candidate. TM refines this MVP candidate starting from full-pixel MVD accuracy (or 4-pixel AMVR mode) in the [–8, +8] pixel search range using iterative diamond search. The AMVP candidate can be further refined by using a cross search with full-pixel MVD accuracy (or 4-pixel AMVR mode), followed by half-pixel and quarter-pixel searches according to the AMVR mode. This search process ensures that the MVP candidate still maintains the same MV accuracy as indicated by the adaptive motion vector resolution (AMVR) mode after TM processing. In merge mode, a similar search method is applied to the merge candidates indicated by the merge index. TM merging can be performed all the way down to 1 / 8 pixel MVD accuracy, or skip accuracy beyond half-pixel MVD accuracy, depending on whether the motion information is merged using an alternative interpolation filter (used when AMVR is in half-pixel mode). In addition, when TM mode is enabled, template matching can be performed as an independent process between block-based and sub-block-based bilateral matching (BM) methods or as an additional MV refinement process, depending on whether BM can be enabled according to the enable condition check. When BM and TM are enabled on a CU at the same time, the search process of TM will stop at half-pixel MVD accuracy, and the resulting MV will be further refined by using the same model-based MVD derivation method as in DMVR. 2.4. Adaptive Reordering of Merge Candidates (ARMC) Inspired by the spatial correlation between reconstructed neighboring pixels and the current codec block, an adaptive reordering of merged candidates (ARMC) is proposed to refine the candidate order in a given candidate list. The basic assumption is that candidates with lower template matching cost have a higher probability of being selected by the RDO process and should therefore be placed at the front of the list to reduce signaling cost. The re-ranking method is applied to the normal merge mode, the template matching (TM) merge mode and the affine merge mode (excluding SbTMVP candidates). For the TM merge mode, the merge candidates are re-ranked before the refinement process. After constructing the merge candidate list, the merge candidates are divided into several subgroups. The subgroup size is set to 5. The merge candidates in each subgroup are reordered in ascending order according to the cost value based on template matching. For simplicity, the merge candidates in the last subgroup but not in the first subgroup are not reordered. Figure 7 An example diagram 700 showing a template 720 and a corresponding reference template 710 is shown. The template matching cost is measured by the sum of absolute differences (SAD) between the samples of the template of the current block and its corresponding reference template. The template 720 includes a set of reconstructed samples adjacent to the current block, while the reference template 710 is located by the same motion information of the current block, such as Figure 7 When the merge candidate uses bidirectional prediction, the reference sample of the template of the merge candidate is also generated by group prediction. For the sub-block based merging candidates with sub-block size equal to Wsub*Hsub, the upper template includes several sub-templates with size of Wsub×1, and the left template includes several sub-templates with size of 1×Hsub. Figure 8 An example diagram 800 showing a template of a block with sub-block motion using motion information of a sub-block of a current block and a reference template is shown. Figure 8As shown, the motion information of the sub-block in the first row and first column of the current block is used to derive the reference sample of each sub-template. 2.5. Sub-block based temporal motion vector prediction (SbTMVP) VVC supports the sub-block-based temporal motion vector prediction (SbTMVP) method. Similar to TMVP, SbTMVP utilizes the motion field in the co-located picture to facilitate more accurate MVP derivation. The same co-located picture used by TMVP is used for SbTVMP. SbTMVP differs from TMVP mainly in two aspects. First, SbTMVP enables sub-CU level motion prediction, while TMVP predicts motion at the CU level; secondly, compared with TMVP, which extracts the temporal MV from the co-located block in the co-located picture (the co-located block is the lower right or center block relative to the current CU), SbTMVP applies motion shifting before extracting the temporal motion information from the co-located picture, where the motion shifting is obtained by using the MV of one of the spatial neighboring blocks from the current CU. Fig.10 Diagram 1000 is shown for deriving a sub-CU motion field obtained by applying motion shifting based on neighboring motion information. Fig.10 The derivation process of the sub-block level motion field of SbTMVP is shown. Specifically, the motion information of the left bottom sub-block A1 is first extracted. If any of the MVs in reference list 0 and list 1 points to the same frame, the corresponding MV will be identified as motion shift. Otherwise, zero mv will be used as motion shift. Once the motion shift is determined, the sub-block level motion field is derived using the specified region in the collocated frame. Assume that A1' motion is used as the motion shift, such as Fig.10 Then, for each sub-CU, the motion information of its corresponding block (the smallest motion grid covering the center sample) in the co-located picture is extracted to provide motion information, where an MV scaling operation is first performed to align the reference frame of the temporal motion vector with the reference frame of the current CU. In VVC and ECM, in addition to the CU-level MVP candidate list, a sub-CU-level MVP candidate list is constructed to provide more accurate motion prediction for the current CU, which includes motion fields generated by both SbTMVP and affine methods. Specifically, only one SbTMVP candidate is included and is always placed in the first entry of the constructed sub-CU-level MVP candidate list, while after performing template matching-based reordering, multiple affine candidates are included in the list, among which those affine candidates with smaller costs are placed in the front position. 2.6.Co-location frame and TMVP candidate list in ECM-5.0 In ECM-5.0, only one co-located frame is used to provide the TMVP required in the MVP list construction process, which is derived from the reference frame list. Specifically, if only one reference list is maintained during the encoding and decoding process, the reference frame with index zero is used as the co-located frame. Otherwise, if the frame to be encoded and decoded has two reference frame lists as in random access and low delay B configuration, the quantization parameter (QP) values ​​of the reference frames with index zero in the two lists are compared, and the frame with the larger QP will be selected as the co-located frame of the current frame. For the conventional merge and adaptive DMVR modes in ECM-5.0, the derivation of TMVP in the final MVP list is further optimized, where a TMVP candidate list is first constructed to include TMVPs in different positions within the co-located frame. Specifically, adjacent and non-adjacent positions in the lower right direction are used to provide multiple TMVP candidates. When constructing the TMVP list, the template matching cost is calculated for each candidate, and the list is sorted in descending order of such cost. Finally, the candidate with the minimum template matching cost will be inserted into the final MVP list. Regarding the TMVP derivation for AMVP and affine modes, no TMVP list is required and only one TMVP is derived based on two different co-located positions (lower right (C0) and center (C1)) checked sequentially. 2.7. Enhanced MVP Candidate Derivation (EMCD) An EMCD based on template matching cost re-ranking is proposed. Instead of constructing the MVP list based on a predefined traversal order, a method is studied to optimize the MVP selection by utilizing the matching cost in the reconstructed template region so that more suitable candidates are included in the list. It should be noted that the proposed MVP list construction strategy can be used in both normal merging and AMVP list construction processes, and can also be easily extended to other modules that require MVP derivation, such as merged motion vector differences (MMVD), affine motion compensation, sub-block-based temporal motion vector prediction (SbTMVP), etc. Non-adjacent TMVP 1. It is proposed to use TMVP in non-adjacent areas to further improve the effectiveness of the MVP list. a) In one example, the non-adjacent region may be any block (eg, a 4×4 block) in the reference picture and is neither located inside the co-located block in the reference picture of the current block nor adjacent to the co-located block of the current block. b) Fig. 9 An example diagram 900 showing an example of the locations of non-adjacent TMVP candidates is shown. In one example, The positions of non-adjacent TMVP candidates are as follows: Fig. 9 As shown, black blocks represent potential non-adjacent TMVP positions. It should be noted that this figure only provides examples of non-adjacent TMVPs and the locations are not limited to the blocks indicated. In other cases, the non-adjacent TMVP may be located at any other position in one or more reconstructed frames. 2. The maximum number of non-adjacent TMVPs allowed in the MVP list may be signaled in the bitstream. a) In one example, the maximum allowed number may be signaled in the SPS or PPS. 3. Non-neighboring TMVP candidates may be located in the most recently reconstructed frame, but they may also be located in other reconstructed frames. a) Alternatively, non-neighboring TMVP candidates may be located in collocated pictures. b) Alternatively, signal the pictures where non-neighboring TMVP candidates may be located. 4. Non-adjacent TMVP candidates may be located in multiple reference pictures. 5. The distance between non-adjacent regions associated with the TMVP candidate and the current codec block may be related to properties of the current block. a) In one example, the distance depends on the width and height of the current codec block. b) In other cases, the distance may be signaled as a constant in the bitstream. Template definition 6. The template represents the reconstructed region, which can be used to estimate the priority of MVP candidates and can be located at different locations with variable shapes. Fig.11 An example diagram 1100 showing an example of a template is shown. a) In one example, the template can represent the reconstruction area in three positions, namely, the top pixel, the left pixel and the top-left pixel, as shown in Fig.11 shown. b) It should be noted that the template does not have to be rectangular in shape, it can be any shape, such as a triangle or a polygon. c) In one example, template regions can be used individually or in combination. d) A template may include samples from only one component (eg luma) or from multiple components, eg luma and chroma. 7. The template does not have to be located in the current frame, it can be located in any other reconstructed frame. 8. In one example, MV can be used to locate a reference template region having the same shape as the template of the current block, such as Figure 7 shown. 9. In one example, the template may not necessarily be located in the adjacent area, it may be located in a non-adjacent area far away from the current block. 10. In one example, the template may not necessarily contain all pixels in a particular region, it may contain a portion of the pixels in the region. MVP candidate ranking based on template matching 11. In the embodiment of the present disclosure, the template matching cost associated with a certain MVP candidate is used as a metric to evaluate the consistency of the candidate with the true motion information. Based on this metric, a more effective order is generated by sorting the priority of each MVP candidate. a) In one example, the template matching cost C is evaluated using the mean squared error (MSE), calculated as follows: Where T represents the template area, RT represents the corresponding reference template area specified by the MV in the MVP candidate ( Figure 7 ), N is the number of pixels in the template. b) In one example, the template matching cost may be evaluated using squared error (SSE), sum of absolute difference (SAD), sum of absolute transformed difference (SATD), or any other criterion that can measure the difference between two regions. 12. Sort all candidate MVPs in ascending order according to the corresponding template matching cost, and traverse the candidate sequence in the sorted order to build the MVP list until the number of MVPs reaches the maximum allowed number. In this way, candidates with lower matching costs have higher priority to be included in the final MVP list. a) In one example, a ranking process may be performed on all MVP candidates. b) Alternatively, this process can also be applied to parts of candidates, such as non-neighboring MVP candidates, HMVP candidates or any other group of candidates. c) Alternatively, furthermore, the category of MVP candidates that should be reordered (e.g., non-adjacent MVP candidates belong to one category, HMVP candidates belong to another category) and / or the type of candidate groups that should be reordered may depend on decoded information, such as block size / coding method (e.g., CIIP / MMVD) and / or how many MVP candidates are available before reordering for a given category / group. 1. In one example, the ranking process may be performed on a joint group MVP candidate containing only one category. 2. In one example, a ranking process may be performed for a joint group MVP candidate containing more than one category. a) In one example, for a first encoding / decoding method (eg, conventional / CIIP / MMVD / GPM / TPM / sub-block merge mode), the sorting process can be performed for the joint group non-adjacent MVP, non-adjacent TMVP and HMVP candidates. For the second encoding and decoding method (e.g., template matching merge mode), the sorting process can be performed for the joint group adjacent MVP, non-adjacent TMVP, non-adjacent MVP and HMVP candidates. b) Alternatively, for the first encoding and decoding method (eg, conventional / CIIP / MMVD / GPM / TPM / sub-block merge mode), the joint group non-adjacent MVP and HMVP candidates can be sorted. For the second encoding and decoding method (e.g., template matching merge mode), the sorting process can be performed for the joint group adjacent MVP, non-adjacent MVP and HMVP candidates. 3. In one example, a ranking process may be performed for a portion of available joint group MVP candidates within the inclusion category. a) In one example, for normal / CIIP / MMVD / TM / GPM / TPM / sub-block merging modes, or for normal / affine AMVP modes, a ranking process may be performed for all or part of the joint group candidates from one or more categories. 4. In the above example, the categories could be: i. Adjacent neighboring MVP; ii. adjacent neighboring MVPs at a specific location; iii.TMVP MVP; iv.HMVP MVP; v. Non-adjacent MVP; vi. Constructed MVP (e.g. paired MVP); vii. Inherited affine MV candidates; viii. Construct affine MV candidates; ix.SbTMVP candidate. d) In one example, this process can be performed multiple times for different candidate sets. 1. For example, a set of candidates (such as non-adjacent MVP candidates) can be sorted, and the N non-adjacent MVP candidates with the lowest cost can be put into a candidate list. After the entire candidate list is constructed, the cost of the candidates in the list can be calculated, and the candidates can be re-sorted based on the cost. 13. It is proposed that the MVP list construction process may involve re-ranking of single groups / categories and joint groups containing candidates from more than one category. a) In one example, the joint group may include candidates from the first category and the second category. 1. Alternatively, furthermore, the first category and the second category may be defined as non-adjacent MVP categories and HMVP categories. 2. Alternatively, furthermore, the first category and the second category may be defined as non-adjacent MVP category and HMVP category, and the joint group may include candidates from a third category (eg, TMVP category). b) In one example, a single group may include candidates from the fourth category. 1. Alternatively, in addition, a fourth category may be defined as the adjacent MVP category. 14. Multiple groups or categories can be reordered separately to build the MVP list. a) In one example, only a single group (all candidates belong to one category, eg, adjacent MVP, non-adjacent MVP, HMVP, etc.) is constructed and re-ranked during the MVP list construction process. b) In one example, only one joint group (containing some or all candidates from multiple categories) is constructed and re-ranked during the MVP list construction process. c) In one example, more than one group (either singly or jointly) is separately constructed and reordered during the MVP list construction process. 1. In one example, two or more individual groups are separately constructed and reordered during the MVP list construction process. 2. In one example, two or more joint groups are constructed and reordered separately during the MVP list construction process. 3. In one example, one or more single groups and one or more joint groups are reordered separately during the MVP list construction process. a) In one example, a single group and a joint group are constructed to construct the MVP list. b) In one example, a single group and multiple joint groups are constructed to construct the MVP list. c) In one example, a plurality of single groups and a joint group are respectively constructed to construct the MVP list. d) In one example, a plurality of single groups and a plurality of joint groups are respectively constructed to construct the MVP list. d) In one example, candidates belonging to the same category may be divided into different groups and re-ranked in the corresponding groups, respectively. e) In one example, only some of the candidates in a specific category are put into a single group or a joint group, and the remaining candidates in the category are not re-ranked. f) In the above example, the categories could be: 1. Adjacent MVP; 2. Adjacent neighboring MVPs at a specific location; 3.TMVP MVP; 4.HMVP MVP; 5. Non-adjacent MVPs; 6. Constructed MVP (such as paired MVP); 7. Inherit affine MV candidates; 8. Construct affine MV candidates; 9.SbTMVP candidate. 15. The proposed ranking method can also be applied to the AMVP model. a) In one example, the MVP in the AMVP mode may be extended with non-adjacent MVP, non-adjacent TMVP, and HMVP. b) In one example, the MVP list for AMVP mode includes K candidates selected from M categories, such as adjacent MVP, non-adjacent MVP, non-adjacent TMVP, and HMVP, where K and M are integers. 1. In one example, K may be less than M, or equal to M, or greater than M. 2. In one example, one candidate is selected from each category. 3. Alternatively, for a given category, no candidate is selected. 4. Alternatively, for a given category, more than 1 candidate is selected. 5. In one example, the MVP list for the AMVP mode includes 4 candidates, selected from adjacent MVP, non-adjacent MVP, non-adjacent TMVP and HMVP. 6. In one example, the MVP candidates for each category are ranked separately using the template matching cost, and the MVP candidate with the minimum cost in the corresponding category is selected and included in the MVP list. 7. Alternatively, the adjacent MVP candidates and the joint group non-adjacent MVP, non-adjacent TMVP and HMVP candidates are sorted by template matching cost respectively. One adjacent candidate with the minimum template matching cost is selected from the adjacent MVP candidates, and the other three candidates are derived by traversing the candidates in the joint group in ascending order of template matching cost. 8. In one example, the MVP list for AMVP mode includes 2 candidates, one from adjacent MVP and the other from non-adjacent MVP, non-adjacent TMVP or HMVP. Specifically, the adjacent MVP candidates and the joint group non-adjacent MVP, non-adjacent TMVP and HMVP candidates are sorted together using the template matching cost, and the MVP candidate with the minimum cost in the corresponding category (or group) is included in the MVP list. 16. The proposed sorting method can be applied to other coding and decoding methods, for example, to construct a list of block vectors for blocks coded and decoded by IBC. a) In one example, it can be used for affine coded blocks. b) Alternatively, furthermore, how the template cost is defined may depend on the encoding and decoding method. 17. The use of this method can be controlled by different codec level syntax, including but not limited to one or more of PU, CU, CTU, slice, picture, sequence level. 18. About how to insert the sorted candidates into the MVP list. a) In one example, the candidates in the joint group or the independent group included into the MVP list depend on the ranking result of the template matching cost. b) In one example, whether to put candidates in the independent group or the joint group into the MVP list depends on the ranking result of the template matching cost. c) In one example, how many candidates within the independent group or the joint group are included in the MVP list depends on the ranking result of the template matching cost. 1. In one example, only one candidate with the minimum template matching cost is included in the MVP list. 2. In a group, the top N candidates in ascending order of template matching cost are included in the MVP list, where N is the maximum allowed number of candidates that can be inserted into the MVP list in the corresponding single group or joint group. a) In one example, for each single group or joint group, N may be a predefined constant. b) Alternatively, N can be adaptively derived based on the template matching cost within a single group or a joint group. c) Alternatively, N may be signaled in the bitstream. d) In one example, different candidate groups share the same N value. e) Alternatively, different single groups or joint groups may have different N values. Pruning of MVP candidates 19. Pruning of MVP candidates aims to increase the diversity within the MVP list, which can be achieved by using an appropriate threshold TH. a) In one example, if two candidates point to the same reference frame, both may be included in the MVP list only if the absolute difference between the corresponding X and Y components is greater than (or not less than) TH. 20. The pruning threshold may be signaled in the bitstream. b) In one example, the pruning threshold may be signaled in PU, CU, CTU or slice level. 21. The pruning threshold may depend on the characteristics of the current block. c) In one example, the threshold may be derived by analyzing the diversity among the candidates. d) In one example, the optimal threshold can be derived through RDO. 22. Pruning of MVP candidates can be performed first within a single group or a joint group before classification. a) Alternatively, furthermore, for two candidates belonging to two different groups or one belonging to a joint group and the other not belonging to a joint group, no pruning between the two MVP candidates is performed before sorting. b) Alternatively, furthermore, pruning between groups may be applied after sorting. 23. Pruning of MVP candidates may be performed first among multiple groups, and ranking may be further applied to one or more single / joint groups. a) Alternatively, the MVP list may be pruned first among the available MVP candidates involved. Then, sorting may be further applied to re-order one or more single / joint groups. b) Alternatively, furthermore, for two MVP candidates belonging to two different groups or one belonging to a joint group and the other not belonging to the joint group, pruning between the two MVP candidates is performed before sorting. Interaction with other codecs 24. After applying the MVP list of the above sorting method, the Adaptive Reorder Merging Candidates (ARMC) process can also be applied. a) In one example, the template costs used in the sorting process during MVP list construction can be further utilized in ARMC. b) In another example, different template costs may be used in the classification process and the ARMC process. 1. In one example, the templates may be different for the sequencing and ARMC processes. 25. Whether and / or how the sorting process is enabled may depend on the codec tool. a) In one example, when a certain tool (eg, MMVD or affine mode) is enabled for a block, sorting is disabled. b) In one example, the ordering rules may be different for two different tools (eg, applied to different groups or different template settings). 2.8. Simplification of video encoding and decoding methods based on template matching The video coding method based on template matching is optimized in two aspects. First, the reference template derivation process is modified, and the interpolation process in the prediction block generation process is replaced by a different way. Second, several fast strategies are designed to accelerate the tools related to template matching. It should be noted that the proposed method can be used for ARMC, EMCD and template matching MV refinement, and can also be easily extended to other potential uses that require a template matching process, such as template matching-based candidate reordering for merging with motion vector differences (MMVD), affine motion compensation, sub-block-based temporal motion vector prediction (SbTMVP), etc. In yet another example, the proposed method can be applied to other codec tools that require a motion information refinement process, such as codec tools based on bilateral matching. The following detailed implementation examples should be considered as examples for explaining the general concept. These embodiments should not be interpreted narrowly. In addition, these embodiments can be combined in any way. Combinations between the embodiments of the present disclosure and other embodiments are also applicable. 1. It is proposed to use other methods to replace the interpolation filtering process involved in the motion compensation process of the inter-frame prediction signal generation process in the reference template generation process. a) It is proposed to exclude the interpolation filtering process to generate reference templates even if the motion vectors point to fractional positions. i. In one example, it is proposed to use integer precision to generate a reference template. ii. In one example, if the motion vector points to a fractional position, it is first rounded to an integer MV. 1. In one example, fractional positions are rounded towards zero (ie, negative motion vector predictors are rounded towards positive infinity, and positive motion vector predictors are rounded towards negative infinity). 2. In one example, the rounding interval can be greater than 1. b) It is proposed to use different interpolation filters to generate reference templates for motion vectors pointing to fractional positions. i. In one example, a simplified interpolation filter may be applied. 1. In one example, the simplified interpolation filter may be a 2-tap bilinear, or it may also be a 4-tap, 6-tap, or 8-tap filter of DCT, DST, Lanczos, or any other interpolation type. ii. In one example, a more complex interpolation filter (eg, with longer filter taps) may be applied. c) The above method can be used to reorder the merge candidates for template matching merge mode. i. In one example, integer precision can be used in ARMC, EMCD, LIC, and any other potential scenarios. ii. The above method can be used to reorder candidates for regular merge mode. 1. In one example, integer precision can be used to reorder candidates for normal merge mode. d) In one example, is the above approach used (e.g., integer precision, different interpolation filters) And / or how the above methods are used may be signaled in the bitstream or determined on the fly based on decoded information. i. In one example, the method to be applied may depend on the codec tool. ii. In one example, the method to be applied may depend on the block size. iii. In one example, integer precision may be used for a given color component (eg, luma only). iv. Alternatively, integer precision can be used for all three components. 2. Whether and / or how to perform EMCD before being added to the candidate list may be based on the maximum allowed number of candidates and / or the number of available candidates within the candidate list. a) In one example, assuming that the number of available candidates (valid candidates that can be used to construct the candidate list) is NAVAL, and the maximum allowed number of candidates is NMAX (i.e., at most NMAX candidates can be included in the final merged list), EMCD is enabled only when NAVAL-NMAX is greater than a constant or adaptively derived threshold T. 3. Propose to organize the available merge candidates into subgroups. a) In one example, the available candidates can be classified into subgroups, each subgroup contains a fixed or adaptively derived number of candidates, and each subgroup selects a fixed number of candidates into the list. At the decoder side, only the candidates within the selected subgroup need to be reordered. b) In one example, the candidates may be classified into subgroups according to their categories, such as non-neighborhood MVP, time domain MVP (TMVP), or HMVP, etc. 4. It is proposed that a piece of information calculated by a first codec tool using at least one template cost can be reused by a second codec tool using at least one template cost. a) It is proposed to build a unified storage shared by ARMC, EMCD and any other potential tools to store the information of each merge candidate. b) In one example, the storage may be a map, table, or other data structure. c) In one example, the stored information may be the template matching cost. d) In one example, EMCD first traverses all MVs associated with available candidates and stores the corresponding information (including but not limited to template matching cost) in the storage. ARMC and / or other potential tools can then simply access the required information from the shared storage without performing repeated calculations. 3. Question 1) Existing MVP candidate list construction methods usually use a uniform threshold in the candidate pruning process, which does not fully utilize the unique importance of potential MVP candidates, resulting in inefficiency of the constructed MVP list. 2) In the existing MVP candidate list construction method, the neighboring MVP has the highest priority to be included in the final list. However, the neighboring MVP may not always be better than other candidates, i.e., non-neighboring MVP, HMVP, etc. Therefore, it is beneficial to reduce the priority of those low-quality neighboring candidates. 3) In existing video coding standards, since only one co-located frame is used, temporal motion information has not been fully utilized. It is expected that multiple co-located frames will facilitate inter-frame coding and decoding by providing more efficient MVP. 4) In existing video codec standards, temporal motion vector predictions for certain codecs (e.g., AMVP, Affine, etc.) are derived by extracting motion information from some predefined positions in the same frame. And a similar strategy is also applied to the SbTMVP method, where motion information from fixed neighboring positions is used as motion shift. Such mechanism designs are not optimal because they are difficult to ensure consistency between the trajectory of the predefined position and the current CU. Therefore, flexible strategies are expected to promote more efficient temporal motion information derivation. 4. Detailed solution The present disclosure proposes an optimized MVP list derivation method based on template matching cost sorting. An optimized MVP selection method is studied by utilizing the matching cost in the reconstructed template region, rather than constructing the MVP list based on a predefined traversal order, so that more suitable candidates are included in the list. It should be noted that the proposed strategy for MVP list construction can be used in both conventional merging and AMVP list construction processes, and can also be easily extended to other modules that require MVP export, for example, merging with motion vector difference (MMVD), affine motion compensation, sub-block based temporal motion vector prediction (SbTMVP), etc. In the following discussion, a category indicates the affiliation of an MVP candidate, for example, non-adjacent MVP candidates belong to one category and HMVP candidates belong to another category. A group represents an MVP candidate set containing one or more MVP candidates. In one example, a single group represents an MVP candidate set in which all candidates belong to one category, for example, adjacent MVP, non-adjacent MVP, HMVP, etc. In another example, a joint group represents an MVP candidate set containing candidates from multiple categories. The list can be an MVP candidate MVP candidate list, a TMVP candidate list, a motion shift candidate list, or a sub-CU level MVP candidate list, where the MVP candidate list represents a group of MVP candidates that can be selected as MVP during the video encoding and decoding process. The TMVP candidate list represents a group of TMVPs, in which each candidate in the group may be selected as a candidate in the MVP candidate list. The motion shift candidate list represents a group of MV candidates pointing to the same frame during the video encoding and decoding process. The sub-CU level MVP candidate list represents a group of motion candidates that provide a sub-CU level motion field, including SbTMVP candidates, affine candidates, etc. The following detailed embodiments should be considered as examples for explaining the general concept. These embodiments should not be interpreted narrowly. In addition, these embodiments can be combined in any way. Combinations between this disclosure and other disclosures are also applicable. 1. Multiple thresholds can be used in the candidate pruning process to determine whether a candidate can be added to the candidate list. a) A threshold may be used to determine whether a potential candidate can be placed in a candidate list. i. For example, if the absolute difference between at least one component of the MV of a potential candidate and at least one component of the MV of a candidate present in the candidate list is less than a threshold, the potential candidate is not put into the list. ii. For example, if the absolute difference between all components of the MV of a potential candidate and all components of the MV of a candidate present in the candidate list is less than a threshold, the potential candidate is not put into the list. b) In one example, the candidate is an MVP candidate, the candidate pruning process is an MVP candidate pruning process, and the candidate list is a motion candidate list. i. In one example, the motion candidate list is a merge candidate list. ii. In one example, the sports candidate list is an AMVP candidate list. iii. In one example, the motion candidate list is an extended merge or AMVP list, such as a sub-block merge candidate list, an affine merge candidate list, an MMVD list, a GPM list, a template matching merge list, a bilateral matching merge list, etc. c) In one example, the pruning threshold may be different for two groups, where the group may be a single group (containing candidates of only one category) or a joint group (containing candidates of at least two categories). d) Alternatively, only one threshold is used for all potential MVP candidates, regardless of category and / or group. e) In one example, N (eg, N=2) thresholds are used in the pruning process. i. Assuming A is an MVP set containing all available MVP candidates, regardless of category, in one example, a first threshold is used for a first subset of candidates in set A, and a second threshold is used for a second subset of candidates in set A (e.g., excluding the remaining candidates in the first subset). ii. In one example, a first threshold is used for a single group represented by A, and a second threshold is used for another group (single or joint) / multiple other groups / remaining candidates that do not have the same category as those in A. 1) In one example, a first threshold is used for a single group of adjacent candidates, and a second threshold is used for the remaining candidates, including but not limited to non-adjacent MVPs, HMVPs, paired MVPs, and zero MVPs. iii. The first threshold may be greater or less than the second threshold. f) Alternatively, furthermore, the threshold of the MVP category or group may depend on decoded information, such as block size / coding method (eg CIIP / MMVD) and / or variance of motion information within the category or group. 2. Multiple reordering passes can be performed to build the MVP list. a) In one example, multiple passes may involve different reordering criteria. b) In one example, multiple passes of reordering may be performed on multiple single / joint groups, where at least two of the single / joint groups may have overlapping MVP candidates. c) In one example, K passes (eg, K=2) of reordering are used to construct the MVP list table. i. In one example, in a first pass, a single / joint group A is first reordered based on a first cost (e.g., template matching cost) ranking, and the candidate with the largest cost (CL) in A is identified and then transferred to another single / joint group B (e.g., B may include the remaining candidates that do not have the same category as the candidates in A). Subsequently, group B is reordered for 2 to K passes based on the first cost (or other cost metric) ranking. Finally, candidates in groups A (excluding CL) and B (including CL) are included in the MVP list according to the order of sorting. ii. In one example, group A in the above case is a single group of neighboring candidates, and group B is a joint group of non-neighboring candidates and HMVPs. iii. Alternatively, groups A and B may be any other single or joint candidate groups. iv. In one example, in a first pass, one or more single / joint groups are first reordered based on a first cost (e.g., template matching cost) ranking. Then, a preliminary MVP list is constructed by inserting some candidates in each group into a list with a sorted order. Subsequently, the preliminary MVP The list performs a second reordering to select some candidates into the final MVP list. 1) In one example, different single / joint groups may have overlapping candidates. 2) In one example, all candidates in the preliminary MVP list are selected from the sorted single / joint group. 3) Alternatively, select some of the candidates in the preliminary MVP list from the sorted group, and include the remaining candidates in a list with other rules. 4) In one example, in the second pass, based on the cost (e.g., template matching cost) All candidates in the preliminary list are ranked regardless of the corresponding categories, and a limited number of candidates are included in the final MVP list based solely on the ranked order. a) Alternatively, in addition, all candidates in the preliminary MVP list are included in the final MVP list according to the sorted order. 5) Costs calculated in a previous pass (e.g., template matching costs) can be reused in later passes. a) In one example, when the cost of a certain candidate is calculated in a previous pass, it will be saved in a variable or any other data structure in case the same cost is needed in a later pass. b) In one example, in a later pass, if the cost of a certain candidate is needed, it will first be checked whether the cost has been calculated before. If the cost has been calculated and / or saved before the current pass, and / or is accessible in the current pass, it will be obtained in the current pass instead of being calculated again. 3. At least one virtual candidate (eg, Paired MVP and Zero MVP) may involve at least one group. a) In one example, all virtual candidates are treated as one joint group. i. Alternatively, treat the virtual candidates of each category as a single group. ii. In one example, paired MVPs and / or zero MVPs are included in a single / joint group. iii. Alternatively, in addition, the groups containing virtual candidates are reordered and then put into the candidate list. b) Alternatively, virtual candidates (eg, Paired MVPs and / or Zero MVPs) are not included in any single / joint group. i. Alternatively, furthermore, the re-ranking process is not applied to the virtual candidates. 1) Alternatively, in addition, they may be further appended to the candidate list. ii. In one example, one or more single / joint groups are constructed, where some or all of the groups are reordered. In this case, at least one position in the MVP list is reserved for a virtual candidate (e.g., a paired MVP and / or a zero MVP), which is appended to the MVP list as the last or any other entry. iii. In one example, further, a single group of adjacent candidates is first included in the MVP list, and then the joint group of non-adjacent candidates and HMVPs is reordered and subsequently appended to the MVP list. In this case, at least one position is reserved for virtual candidates (e.g., paired MVPs and / or zero MVPs), And the dummy candidate is appended to the MVP list as the last or any other entry. iv. Furthermore, in one example, a joint group of neighbor candidates, non-neighbor candidates, and HMVPs are reordered and then appended to the MVP list, and virtual candidates (eg, paired MVPs and / or zero MVPs) are appended to the MVP list as the last or any other entry. c) Alternatively, virtual candidates of one category (eg, pairwise MVPs) are included in a single / joint group, and virtual candidates of another category are not included. d) In one example, when a reordering operation is performed for MVP list construction, virtual candidates (eg, paired MVPs and / or zero MVPs) do not appear in the final MVP list. 4. The number of candidates for a single / joint group may not be allowed to exceed the maximum number of candidates. a) In one example, a single / joint group is constructed with a finite number of candidates constrained by a maximum number Ni, where i∈[0,1,…,K] is the index of the corresponding group. Ni may or may not be the same for different i. b) In one example, the partial candidates in a single / joint group are restricted by a maximum number Ni. i. In one example, candidates for one or more categories in a group are constructed to have a finite number of Ni, while other categories in the same group can include any number. 1) In one example, categories include but are not limited to adjacent candidates, non-adjacent candidates, HMVP, paired candidates, etc. c) Alternatively, the first single / joint group may be constructed to have a maximum of Ni MVP candidates, while the second single / joint group may not have this constraint. d) In one example, Ni is a fixed value shared by both the encoder and the decoder. i. Alternatively, N i is determined by the encoder and signaled in the bitstream. And the decoder decodes N i value, and then construct the corresponding with up to N i candidate i-th single / joint group. ii. Alternatively, N is derived in both the encoder and decoder with the same operation i , so that there is no need to send N i value. 1) In one example, the encoder and decoder can derive N based on the variance of all available motion information of the i-th group i value. 2) Alternatively, the encoder and decoder can derive N based on the number of all available candidates in the i-th group. i value. 3) In one example, the encoder and decoder can derive N based on the number of available neighboring candidates. i value. a) In one example, N i is set to NN ADJ , where N is a constant, N ADJ is the number of available neighboring candidates. 4) Alternatively, in addition, the encoder and decoder may derive N based on any information that the encoder / decoder has access to when constructing the MVP list. i value. e) In one example, all or part of a single / joint group may share the same maximum number of candidates N. 5. The construction of a single / joint group may depend on the maximum number constraint N i . a) In one example, all available MVP candidates for the i-th group are included in the group according to a specific order. Once the number of candidates in the current group reaches N i , the construction of group i is terminated. b) In one example, in the above case, the order for group construction may be derived based on the distance between the CU to be encoded and the MVP candidate, where closer MVP candidates are assigned higher priorities. c) Alternatively, the order may be derived based on cost (eg, template matching), where MVPs with lower costs have higher priority. d) In one example, construction of a single / joint group is performed using at least one pruning operation within or between at least one group. e) In one example, the constructed single / joint group is further re-ranked based on at least one cost method (eg, template matching cost), and then some or all candidates in the group may be included in the MVP list. i. Alternatively, the candidates in the constructed single / joint group will not be further reordered, and some or all candidates in the group are included into the MVP list in the same order as they were included in the group. 6. About how to prune MVP candidates. a) In one example, K passes (eg, K=2) of pruning are performed to build the MVP list. 1) In one example, a first pass pruning may be performed within at least one single / joint group, and a second pass pruning may be performed between at least two candidates belonging to different groups. a) In one example, in the first pass of pruning, the pruning thresholds for the two single / joint groups may be the same, or may be different. b) In one example, furthermore, in the first pass of pruning, some of the single / joint groups may share the same threshold, while other single / joint groups may use different thresholds. 2) In one example, furthermore, the threshold for a particular pass or group is determined by decoding information including, but not limited to, block size, used codec tools (e.g., TM, DMVR, Adaptive DMVR, CIIP, AFFINE, AMVP merge). a) Alternatively, the threshold may be determined by at least one syntax element signaled to the decoder. 7. It is proposed to introduce K (eg, K=2) co-located frames in the video encoding and decoding process. a) In one example, a motion vector stored in at least one of the K co-located frames may be used to encode / decode the current frame. b) In one example, these co-located frames may be any reconstructed frames in the decoded picture buffer (DPB). c) In one example, these co-located frames can be any reconstructed frames in any reference list. i. In one example, if the current frame to be encoded and decoded has one or more reference lists, a co-located frame may be selected from the one or more lists. 1) In one example, if the reference frames with index N (eg, N=0) in each list are not the same (eg, have different POC values), then these reference frames are selected as co-located frames. a) In another example, after performing a redundancy check, the reference frames with the first N indices in each list are selected as the co-located frames. b) Alternatively, any reference frame in any list may be selected as the co-located frame. 2) In one example, if the current frame to be encoded has one or more reference lists, the selected co-located frame may only come from one reference list. a) In one example, if the content in each reference list is the same (eg, low-delay case), the selected co-located frame may come from only one reference list. 8. How to select the co-located frame. Let S represent the set of all available reconstructed frames in the DPB or reference list, and SK is any candidate in S. Then: a) SK may be selected as the co-located frame depending on the POC distance between the to-be-coded frame and SK. i. In one example, all candidates in S are sorted based on the POC distance between the frame to be coded and each candidate, and then the first N (N>0) candidates with the smallest distance are selected as the co-located frames. ii. In one example, only when the distance between SK and the frame to be coded is less than or greater than a threshold value T (T> 0), SK can be selected as the co-located frame. b) The selection of SK as the co-located frame may depend on the quantization parameter (QP) value. i. In one example, all candidates in S are sorted based on QP value, and then the top N (N>0) candidates with the minimum or maximum QP are selected as the co-located frames. ii. In one example, all candidates in S are sorted based on the absolute QP distance between the frame to be coded and each candidate, and then the first N (N>0) candidates with the smallest distance are selected as the co-located frames. iii. In one example, only when the absolute QP difference between it and the frame to be coded is less than or greater than a threshold When T (T>0), SK is selected as the co-located frame. c) The SK may be selected as the co-located frame may depend on the frame type. i. In one example, if SK is an I frame or a P frame, SK may not be selected as a co-located frame. 1) Alternatively, even if SK is an I frame or a P frame, SK may be selected as a co-located frame. d) The SK may be selected as the co-located frame depending on the temporal layer or Tid of the frame to be coded. i. In one example, if the Tid or time domain layer of the frame to be encoded is less than (or greater than or equal to) the threshold T (T>0), SK may not be selected as the co-located frame. ii. In one example, the maximum allowed number of co-located frames that can be used may depend on the Tid or temporal layer of the frame to be encoded. 1) In one example, if the Tid or time domain layer of the frame to be coded is less than (or equal to) a threshold T (T>0), at most N (N>0) co-located frames may be used. 2) In one example, if the Tid or time domain layer of the frame to be coded is greater than (or equal to) a threshold T (T>0), at most M (M>0) co-located frames may be used. 3) In one example, M and N in the above examples may be the same value or different values. e) In one example, multiple metrics are combined to determine which one is used as the co-located frame. i. In one example, if N (N>1) frames in the reference list or DPB have equal POC distances relative to the frame to be encoded, those frames with larger (or smaller) QP (or absolute QP distance relative to the frame to be encoded) have higher priority to be selected as the co-located frames. ii. In one example, if N (N>1) frames in the reference list or DPB have equal QP, those frames with larger (or smaller) POC (or absolute QP distance relative to the frame to be encoded) have higher priority to be selected as the co-located frames. iii. In one example, alternatively, if N (N>1) frames in the reference list or DPB have equal absolute QP distances relative to the frame to be encoded and decoded, then the frame with a smaller (or larger) QP (or POC distance relative to the frame to be encoded and decoded) has a higher priority to be selected as the co-located frame. 9. The selected co-located frame may be signaled in the bitstream, including but not limited to a slice header or SPS or PPS or picture parameter header. a) Alternatively, both the encoder and the decoder derive the co-located frames based on predefined rules, which does not require the transmission of additional information. b) In one example, some co-located frames need to be signaled by syntax elements, while other co-located frames are derived based on predefined rules, so that no additional information needs to be transmitted. c) In one example, information indicates which list the co-located frame is from (eg, it is from list 0), and the corresponding reference index is signaled in the syntax element. i. In one example, specifically, if the number of reference frames in any reference list is zero, information indicating the reference list may not need to be signaled. ii. In one example, specifically, if there is only one frame in the corresponding list, the reference index may not need to be signaled. d) In one example, the number of co-located frames may be encoded in the bitstream (denoted as N). e) In one example, an indication of N co-located frames may be signaled after the number N is signaled. f) In one example, the co-located frame may be indicated by a reference list and / or a reference index. g) In one example, the signaling of the first co-location frame may be dependent on the previously signaled second co-location frame. h) More than one co-located frame can be jointly encoded and decoded. i) The syntax elements used to signal the co-located frame may be binarized using fixed length codec unary code, truncated unary code, exponential Golomb code or any other codec method. j) In one example, information related to the co-location frame may be signaled only if TMVP is enabled. 10. Multiple syntax elements may be signaled in the bitstream to identify multiple co-located frames, where each syntax element may specify a different co-located frame. a) In one example, when checking a new candidate, it needs to first check whether the same frame has been selected before (e.g., with the same POC number). If such a frame has not been selected before, it can be selected as the co-located frame if it meets certain conditions. b) Alternatively, two or more syntax elements may identify the same co-located frame. i. In one example, if at least K (k>=0) co-located frames need to be selected, and the number of available different frames is less than K, redundant frames can be used as co-located frames. ii. In one example, the same co-located frame may be identified by different syntax elements that may be in different reference frame lists. iii. In one example, the same co-located frame can be identified by different syntax elements, which can also provide different time domain information if the co-located frame is used more than once. 1) In one example, when the same co-located frame is used more than twice, MVs in different reference frame lists may be used. a) In one example, an MV in list 0 or list 1 is used. b) In one example, the MVs in both lists are used in combination. 11. How many co-location frames are used may depend on the codec configuration. a) In one example, the number of co-located frames used in different codec configurations may be different. i. In one example, the coding configuration may include random access (RA), low delay B (LDB) or Low Latency P (LDP) or any other configuration. ii. In one example, the maximum allowed number of co-location frames used in the RA configuration may be greater than (or less than or equal to) the maximum allowed number of co-location frames of the LDB or LDP configuration. 1) In one example, a maximum of K (eg, K=2) co-location frames are used in the RA configuration, and a maximum of M (eg, M=1) co-location frames are used in the LDB / LDP configuration. 2) In one example, M and K in the above example may be the same value or different values. 12. How many co-located frames are used may depend on the state of the reference frame list. a) In one example, the number of co-located frames used in the encoding and decoding process may depend on whether the POC values ​​of all reference frames are smaller than (or larger than) the POC value of the frame to be encoded and decoded. i. In one example, if all reference frames have POC values ​​that are smaller (or larger) than the POC value of the frame to be coded, at most M (eg, M=1) co-located frames may be used. ii. In one example, if some reference frames have a POC value smaller than the POC value of the frame to be coded, and some other reference frames have a POC value larger than the POC value of the frame to be coded, then at most K (eg, K=2) co-located frames. iii. In the above examples, M and K can be the same value or different values. b) In one example, whether a reference frame can be used as a co-located frame may depend on the POC distance between the reference frame and the frame to be coded. i. In one example, if the POC distance between the reference frame and the frame to be coded is greater than (or less than or equal to) a threshold T, the reference frame may not be used as the co-located frame. 1) In one example, in the above examples, T may be a constant or an adaptively determined value. ii. In one example, for each reference frame in the reference frame list, the POC distance between it and the current frame is calculated, and if the minimum POC distance value is less than a threshold T, no co-located frame is used for the current frame. 1) In one example, in the above examples, T may be a constant or an adaptively determined value. 2) In one example, specifically, in this case, there is no TMVP (or sbTMVP / time-domain AFFINE control point) in the corresponding candidate list. 13. In one example, the determination of the co-located frames (such as the number of co-located frames and whether the reference frame is a co-located frame) may depend on the codec information of at least one reference frame. a) In one example, if the reference frame is an I-frame, it cannot be used as a co-located frame. b) In one example, if the number of intra-coded blocks in the reference frame is greater than a threshold, the reference frame may not be used as a co-located frame. 14. How many co-located frames are used and / or which reference frames are used (as co-located frames) may depend on certain characteristics of the codec block. a) In one example, for any two codec blocks belonging to the same frame / slice / tile, the co-located frames used may be the same or different. i. In one example, for any two codec blocks belonging to the same frame / slice / tile, the maximum allowed number of co-located frames that can be used may be the same or different. ii. In one example, for any two codec blocks belonging to the same frame / slice / tile, how many co-located frames are used and / or which reference frame(s) are used (as co-located frames) may be the same or different. b) In one example, for certain codec blocks, how many co-located frames are used or / and which reference frames are used (as co-located frames) may depend on the characteristics of the codec block. i. In one example, the characteristics may be: 1) Block size, 2) Qp, 3) Prediction information (eg, unidirectional prediction or bidirectional prediction). c) In one example, for certain codec blocks, how many co-located frames are used and / or which reference frames are used (as co-located frames) may depend on the use of some codec tools. i. In one example, the codec tools may include but are not limited to: 1) Conventional / TM / CIIP / MMVD / GPM / TPM / sub-block merging mode, 2) AMVP, 3) AMVP merger, 4) AFFINE, 5) BDOF, 6) LIC. 15. It is proposed to introduce K (k>=1) TMVPs in the video encoding and decoding process, which can be in one or more co-located frames. a) In one example, at most C (C>=0) TMVPs are inserted into the MVP / TMVP candidate list, regardless of whether they are from one or more co-located frames, where C is a constant or adaptively determined number. b) In one example, in the MVP / TMVP candidate list, the maximum allowed The number of TMVPs is constrained by a constant or adaptively determined number. c) In one example, the encoder traverses all co-located frames in a predefined or adaptively determined order to obtain a total of C (C>=0) TMVPs, and for each co-located frame, obtains a maximum of D (D>=0) TMVPs, where D can be different from one co-located frame to another co-located frame. The traversal process terminates when the total number of TMVPs reaches C, or all co-located frames have been traversed. d) In one example, the number of TMVPs to be used in the list may be signaled in the bitstream, such as in the SPS / PPS / picture header / slice header / etc. 16. Different priorities can be assigned to different parity frames. a) In one example, the priorities of co-located frames are determined based on the corresponding QP values, where co-located frames with larger QPs have higher priorities. i. Alternatively, co-located frames with smaller QPs are assigned higher priority. b) In one example, the co-located frames are prioritized based on their temporal distance relative to the current frame, where those with smaller distances have higher priority. i. Alternatively, co-located frames with a larger distance are assigned a higher priority. c) In one example, the priority of the co-located frames is determined based on the index in the corresponding reference list. i. In one example, reference frames with smaller indices have higher priority. d) In one example, this priority is associated with the TMVP construction process and any other process in the video codec. i. In one example, all co-position frames are traversed in descending order of priority. When any co-position frame Fi is selected, K (K>=0) positions are traversed to include the TMVP in the TMVP / MVP candidate list, where K can be the same for each co-position frame, or different from each other. Once the number of existing TMVPs reaches the maximum allowed number M (M>=0), the iteration terminates and the co-position frame with a lower priority is skipped. Otherwise, all co-position frames are traversed to build the TMVP / MVP candidate list. ii. In another example, K (K>=0) positions are checked separately according to some specific order to obtain TMVP candidates. For the i-th position checked, the specific positions in all co-located frames are traversed in descending order of priority, and the available TMVPs are included in the list. Once the number of existing TMVP candidates reaches the maximum allowed number M (M>=0), the iteration is terminated and static positions and co-located frames with lower priorities are skipped. Otherwise, all positions and co-located frames are traversed to build a TMVP / MVP candidate list. 1) Alternatively, in the above case, for a certain TMVP position, the list includes at most N (N>=0) TMVPs. a) In one example, for a certain TMVP position, if N (N>=0) TMVPs in a high priority co-located frame have been included in the list, the same position in a low priority co-located frame will not be checked. b) Alternatively, for a certain TMVP position, regardless of the priority, any N (N>=0) TMVPs are included in the list. e) In one example, a co-located frame with a lower priority is used as a backup, which is activated only when there is no TMVP or any other information in the high priority co-located frame. i. In one example, for a certain position in different co-located frames, if the required information (e.g., TMVP) is available in a high-priority co-located frame, the information is used in the encoding and decoding process, and the checking process for the following co-located frames is skipped. Otherwise, the same position in a low-priority co-located frame is checked. And if corresponding information exists, the corresponding information is used. ii. Alternatively, in the above case, information in a lower priority co-located frame is also used even if information of a higher priority co-located frame exists. f) Alternatively, different co-located frames are assigned equal priority. i. In one example, a set of TMVP candidates is constructed to include all or part of the potential TMVPs that may be in any of the co-located frames, which are then sorted in a specific order (e.g., template matching cost), and the top N (N>=0) candidates in the sorted list will be selected as the final TMVP. g) In one example, different co-located frames may come from different reference frame lists. i. In one example, high priority co-located frames can only be selected from reference list 0 (or list 1). 1) In one example, alternatively, high priority co-located frames can only be selected from reference list 1 (or list 0). ii. In one example, whether the low priority co-located frame is selected from list 0 or list 1 may depend on the high priority co-located frame. 1) In one example, if the high priority co-located frame is from list 0, the low priority co-located frame can be from list 0 or list 1. 2) In one example, if the high priority co-located frame is from list 1, the low priority co-located frame can only be from list 1. 3) In one example, alternatively, if the high priority co-located frame is from list 1, the low priority co-located frame may be from list 0 or list 1. 17. The proposed co-located frame can be used in any codec tool in the video coding process, including but not limited to conventional / CIIP / MMVD / GPM / TPM / sub-block merging, AMVP, affine, adaptive DMVR, etc. a) In one example, M (M>=0) TMVPs are selected from N (N>=0) co-located frames, where an equal number of TMVPs are selected for each co-located frame. b) In one example, a TMVP candidate list is first constructed, and then all or part of the candidates in the TMVP list are included in the final MVP list. i. In one example, S (S>=0) TMVP candidate lists are first constructed, and then sorted according to some specific metrics (e.g., template matching cost), and the top M (M>=0) candidates in each TMVP list are included in the final merged candidate list, where K can be the same or different constants for all co-located frames. ii. In one example, a TMVP candidate list is constructed for each of the co-located frames, each list including all or part of the available TMVP candidates in the corresponding co-located frame, and then they are sorted by a specific metric (e.g., template matching cost), and the top M (M>=0) candidates are included in the final merged candidate list, where K can be the same or different constants for all co-located frames. iii. In one example, alternatively, only one TMVP candidate list is constructed to include all or a constant number of available TMVP candidates in all co-located frames, which are then sorted by a specific metric (e.g., template matching cost), and the top M (M>=0) candidates are included in the final merged candidate list. iv. In one example, the above ranking metric may also be the distance between a candidate and the current block. c) In one example, alternatively, there is no need to construct a TMVP candidate list, and TMVPs associated with some specific positions in one or more co-located frames are directly included in the MVP list. d) In one example, alternatively, H (H>=0) TMVP candidates are first included in a joint candidate group containing multiple types of MVP candidates, and then the top M (M>=0) TMVP candidates are selected according to some specific metrics. candidates are included in the final merge candidate list. i. The types of MVP candidates in the joint group include but are not limited to adjacent candidates, non-adjacent candidates, HMVP, zero candidate, constructed candidate, etc. ii. H (H>=0) TMVP candidates may be collected from part or all of the co-located frames. iii. In one example, the ranking metric may be the template matching cost or the bilateral matching cost. 18. In one example, at least two TMVPs, which may be from different co-located frames, may be used together to generate the final prediction. a) In one example, an average or weighted average of two or more TMVPs may be used as the MV or MVP of the current block. b) In one example, predictions generated by two or more TMVPs may be averaged or weighted averaged to generate a prediction for the current block. 19. It is proposed to construct at least one motion shift list to derive the motion shift of SbTMVP / AFFINE control points / TMVP. a) In one example, each candidate in the motion shift list is a MV pointing to a corresponding co-located frame. b) In one example, each candidate in the motion shift list is a MV that positions the SbTMVP / AFFINE control point / TMVP in the corresponding co-located frame. c) In one example, a motion shift candidate may be included in the motion shift list before or after it is rounded to a certain precision. i. In one example, in particular, a motion shift candidate may be included in the motion shift list before or after it is rounded to integer precision. d) In one example, whether to construct a motion shift list may depend on the availability of templates, such as Figure 7 shown. i. In one example, if the corresponding template of the current CU does not exist or is available, there may be no need to construct a motion shift list. e) In one example, the motion shift candidates in the list may be obtained from a specific block, such as a coded CU. i. In one example, the motion information of the coded CU is first obtained. If the corresponding MV points to a co-located frame, the MV is inserted into the motion shift list after performing a redundancy check. ii. In one example, specifically, the motion shift candidate may be a neighboring candidate obtained from a neighboring CU. 1) In one example, only some fixed positions may be used to obtain neighboring candidates. 2) Alternatively, any neighboring positions may be used to obtain neighboring candidates. iii. In one example, specifically, the motion shift candidate may be a non-neighboring candidate, which is obtained from a non-neighboring CU. 1) In one example, only some fixed positions may be used to obtain non-neighboring candidates. 2) Alternatively, any non-adjacent positions may be used to obtain non-adjacent candidates. iv. In one example, specifically, the motion shift candidate may be acquired from an MV list that holds the MV of the CU in history. 1) In one example, motion shift candidates are obtained from a history-based MVP (HMVP) list. v. In one example, specifically, the motion shift candidate may be a virtual candidate. 1) In one example, the motion candidate may be a null candidate or a constructed candidate. vi. Alternatively, the motion shift candidate can be any MV pointing to the co-located frame. f) In one example, the MVP candidate list constructed for some certain codec modes (eg, conventional / CIIP / MMVD / GPM / TPM) can be reused to obtain motion shift candidates. 20. A motion shift list can be constructed together with the pruning process. a) In one example, a pruning process is used to avoid duplicate or redundant motion shift lists, which can be achieved by using an appropriate threshold TH. b) In one example, if two motion shift candidates point to the same co-located frame, both can be included in the motion shift list only if the absolute difference between the corresponding X and Y components is greater than (or not less than) TH. c) The pruning threshold may be signaled in the bitstream. i. In one example, the pruning threshold may be signaled in PU, CU, CTU or slice level. d) The pruning threshold may depend on the characteristics of the current block. i. In one example, the threshold can be derived by analyzing the diversity among candidates. ii. In one example, the optimal threshold can be derived through RDO. iii. In one example, the threshold value may be the lamda value used in the RDO process, or some other value derived based on the lamda value. 21. K (K>=1) motion shift lists can be constructed to derive at least one SbTMVP / AFFINE control point / TMVP candidate. a) In one example, the number of candidates in each list may not exceed a certain constant. b) In one example, the motion shift list is constructed by traversing the motion candidates in a predetermined order. i. In one example, a motion candidate may be: 1) adjacent neighboring MVPs; 2) adjacent neighboring MVPs at a specific location; 3) TMVP MVP; 4) HMVP MVP; 5) Non-adjacent MVP; 6) Constructed MVPs (such as paired MVPs); 7) Inherited affine MV candidates; 8) constructed affine MV candidates; 9)SbTMVP candidate. c) In one example, if the number of candidates in the list reaches the maximum allowed number K, the construction of the motion shift list is terminated. d) In one example, only M (M>=0) motion shift lists are constructed to derive SbTMVP / AFFINE control point / TMVP candidates. e) In one example, D (D>=0) motion shifts are selected from each list, where D can be the same or different value for any motion candidate list. f) In one example, the number of motion shift lists to be constructed may depend on the number of co-located frames. i. In one example, only one motion shift list is constructed for all co-located frames. 1) In one example, specifically, the motion information of the potential motion shift candidate is first obtained, and if the corresponding MV in any reference picture list points to any one of M (M>=1) co-located frames, the MV is inserted into the motion shift list after performing a redundancy check. ii. In one example, the number of lists may be equal to the number of co-located frames, with one motion shift list being constructed for each of the co-located frames. 1) In one example, for each of the collocated frames, a corresponding motion shift list is constructed by including motion candidates with MVs in any reference list pointing to the current collocated frame. Specifically, motion information of potential motion shift candidates is first obtained, and if the corresponding MV points to the current collocated frame, the MV is inserted into the motion shift list constructed for the current collocated frame after performing a redundancy check. 22. The constructed motion shift list may be sorted based on at least one specific metric. a) In one example, the metric may be the template matching cost or the bilateral matching cost. b) In one example, the reference template is located in the co-located frame, and the current template is located in the frame to be encoded and decoded, and then the template matching cost is calculated for some or all motion shift candidates. c) In one example, the motion shift list can be sorted based on template matching of motion shift candidates within the list. d) In one example, a Q (Q >= 1) reordering process can be performed on the motion shift list. i. The Q reordering process can be performed in a cascaded manner or in a parallel manner. ii. In one example, for some types of candidates, candidate groups are first constructed, and then the first K (0 < K < Q) passes of reordering are performed to select some candidates in the motion shift list. The last pass of reordering is performed to reorder all candidates in the motion shift list. e) In one example, alternatively, it may not be necessary to sort the motion shift list. i. In one example, the motion shift list is constructed by traversing the motion candidates in a predetermined order. ii. In one example, if the number of candidates in the list reaches the maximum allowed number K, the construction of the motion shift list terminates. 23. H (H >= 1) SbTMVP / AFFINE control points / TMVP candidates can be included in the sub - CU / CU - level MVP candidate list. a) In one example, some or all candidates in the motion shift list are used to derive SbTMVP / AFFINE control points / TMVP candidates. b) In one example, at most Q (Q > 0) motion shifts are used to derive SbTMVP / AFFINE control points / TMVP candidates in a motion shift list. c) In one example, motion shifts are not used to derive SbTMVP / AFFINE control points / TMVP candidates in some motion shift lists. 24. The top M (M > 0) candidates with the minimum metric cost in each motion shift list can be used to derive SbTMVP / AFFINE control points / TMVP candidates. a) In one example, M can be the same value or different values for each list. b) In one example, the temporal motion information (e.g., MV, reference index, etc.) at the position specified by the motion shift is used by the current block. i. In one example, the MV at the position specified by the motion shift can first perform a scaling process, and then the scaled MV is used by the current block. ii. In one example, alternatively, the MV at the position specified by the motion shift can be directly used by the current block without performing a scaling process. iii. In one example, the MV scaling process may be performed based on the POC distance between the frame to be encoded and the co-located frame and the distance between the co-located frame and the corresponding reference frame. iv. In one example, specifically, temporal motion information may be used to derive TMVP, SbTMVP or any other motion information. c) In one example, the constructed SbTMVP / AFFINE control point / TMVP candidates based on motion shift may be further re-ordered. i. In one example, the first K in the sorted SbTMVP / AFFINE control point / TMVP set (K>0) candidates are included in the sub-CU / CU level MVP candidate list. d) In one example, the costs of motion shift candidates belonging to different motion shift lists may be compared to determine which one may be used to derive the SbTMVP / AFFINE control point / TMVP candidate. i. In one example, the cost of its motion shift candidate in list A can be compared with the cost of the first The costs of the j candidates are compared and the candidate with the smaller cost will be used to derive the SbTMVP / AFFINE control point / TMVP candidate. 25. Before motion shifting is used to derive SbTMVP / AFFINE control points / TMVP candidates, it can first be refined through a template matching process. 26. New motion shifts can be constructed from existing motion shifts in the list. a) In one example, the motion shift can be constructed by averaging any K (K>1) shifts in the list. b) In one example, the constructed motion shifts are reordered together with the motion shifts in the motion candidate list. i. In one example, if the SbTMVP candidate meets certain conditions as other normal shift candidates, the constructed motion shift can be used to derive the SbTMVP candidate. 27. Reordering of SbTMVP candidates. Once the SbTMVP is derived based on a motion shift selected from one or more motion shift lists, it is included in the sub-CU level MVP candidate list and then may be reordered according to certain metrics. a) In one example, the metric may be the template matching cost or the bilateral matching cost. b) In one example, a metric (eg, template matching cost) is calculated for some or all of the SbTMVP and AFFINE candidates in the list, and then some or all of the candidates are reordered in descending (or ascending) order of the metric. i. In one example, for all or part of the candidates, the metric may be further adjusted before re-ranking. 1) In an example, let C ori represents the original metric value of a candidate, then the adjusted metric value C adj Calculated as: C adj =a*C ori +b, Where a and b can be fixed constants or adaptively determined values. 2) In one example, for a certain candidate, whether the matrix value is adjusted may depend on the candidate category. a) In one example, only some (or all) AFFINE (or sbTMVP) candidates need to perform metric value adjustment. 3) In one example, for a certain candidate, whether the metric value is adjusted may depend on whether it is unidirectional prediction or bidirectional prediction. ii. In one example, all SbTMVP candidates are re-ranked based on some metrics, and then all ranked SbTMVP candidates can be placed in front of (or behind) all or part of the affine candidates. iii. In one example, some SbTMVP candidates are re-ranked together with all affine candidates, where other SbTMVP candidates will always be placed in a fixed position in the list. 1) In one example, specifically, which SbTMVP candidates are reordered may depend on the co-located frame. a) In one example, which SbTMVP candidate is reordered may depend on the priority of the co-located frame in which it is located. i. In one example, co-located frames that are closer to the frame to be encoded are assigned higher priority. ii. In one example, all or part of the SbTMVP candidates in the co-located frame with the highest priority will not be re-ordered. 1. In one example, the SbTMVP candidates may always be placed in the frontmost position in the list. 2. In one example, alternatively, these SbTMVP candidates can be placed in any fixed positions in the list. 3. Alternatively, these SbTMVP candidates can be placed anywhere in the list. 2) In one example, specifically, which SbTMVP candidates are reordered may depend on the rank of the corresponding motion shift in the motion shift list. a) In one example, the SbTMVP candidates with motion shifts having higher (or lower) ranks may not be reordered but placed in the front position in the list. 3) In one example, specifically, which SbTMVP candidates are reordered may depend on the corresponding ranks of the motion shifts in the motion shift list and their located co-located frames. a) In one example, if the SbTMVP is located in the top M (M>0) highest priority frames and the associated motion shift is ranked in the top N in the corresponding motion shift list (N>0), the SbTMVP can be placed in the first (or any other) position in the sorted sub-CU level MVP candidate list. 28. In one example, the motion shift extracted from the motion shift list may be refined before being used to locate the position in at least one co-located frame of the TMVP or sbTMVP. a) In one example, the motion shift can be refined by template matching. b) In one example, the motion shift can be refined by bilateral matching. c) In one example, the motion shift may be refined by adding delta MVs. d) In one example, the motion shift can be refined by clipping. e) In one example, the motion shift can be refined by shifting. 29. In one example, multiple motion shifts (denoted as SM0, SM1, and SMn) can be used together to derive a final motion shift (denoted as SMf) to locate the position in at least one co-located frame for TMVP or sbTMVP. For example, SMf=F(SM0, SM1, ..., SMn). a) In one example, SMf = (SM0 + SM1 + ... + SMn) / n. b) In one example, SMf=max(SM0, SM1, ..., SMn). c) In one example, SMf=min(SM0, SM1, ..., SMn). d) In one example, SMf = middle (SM0, SM1, ..., SMn). e) In one example, SMf = (W1*SM0+W*SM1+W2+W3*SMn) / (W1+W2+··+Wn). 5. Examples In one example, when the encoder / decoder starts to build an MVP candidate list for merge mode, different methods are used for different merge modes. Specifically, if the current mode is normal / CIIP / MMVD / GPM / TPM / sub-block merge mode, adjacent candidates are first placed in the MVP candidate list with a smaller pruning threshold T1. Then, a joint group containing one or more categories of MVP candidates (e.g., non-adjacent and HMVP candidates, note that the joint group can also include different parts or combinations of candidates) is constructed, and a pruning operation with a larger threshold T2 is performed within the joint group. Specifically, a maximum of M (e.g., 20) candidates are included in the joint group, where closer MVP positions have a higher priority to be included. If the number of candidates in the joint group reaches M, the construction of the joint group is terminated. Subsequently, the template matching cost associated with each candidate added to the group is calculated. Thereafter, the encoder / decoder will append the MVP list by traversing the candidates in the joint group in ascending order of template matching cost until all candidates in the joint group are traversed or the MVP list reaches Nmax-1, where Nmax-1=Nmax-1, and Nmax is the maximum allowed number of candidates in the MVP list. If all candidates in the joint group are traversed and the MVP list still has free positions, the remaining candidates that do not belong to the joint group will be included in the MVP list in a predefined order until the list reaches Nmax-1. Finally, pair MVPs and / or zero MVPs are appended to the MVP list. If the current merge mode is the template matching merge mode, a joint group containing different categories of MVP candidates (e.g., adjacent, non-adjacent, and HMVP candidates, note that the joint group can also include different partial or combined candidates) is first constructed, and then the pruning process and template matching cost derivation are performed in the same way as the regular / CIIP / MMVD / GPM / TPM / sub-block merge mode, where a smaller threshold is used for adjacent candidates and a larger threshold is used for other candidates. Specifically, at most K (e.g., 20) candidates are included in the joint group, where closer MVP positions have higher priority to be included. If the number of candidates in the joint group reaches K, the construction of the joint group is terminated. The encoder / decoder will then build an MVP list by traversing the candidates in the joint group in ascending order of template matching cost until all candidates in the joint group are traversed, or the MVP list reaches N. max-1 If all candidates within a joint group are traversed and the MVP list still has free positions, the remaining candidates that do not belong to the joint group will be included in the MVP list in a predefined order until the list reaches N max-1 . Finally, append the Paired MVPs and / or Zero MVPs to the MVP list. In another example, when the encoder / decoder starts to construct the MVP candidate list for merge mode, different methods are used for different merge modes. Specifically, if the current mode is normal / CIIP / MMVD / GPM / TPM / sub-block merge mode, a single group of adjacent MVPs is constructed with a smaller pruning threshold T1, and the template matching cost associated with each candidate in the single group is calculated. Afterwards, all candidates in the single group are put into the MVP list, except for the one with the largest template matching cost (called C Largest Then, a joint group containing one or more categories of MVP candidates (e.g., non-adjacent and HMVP candidates, note that the joint group can also include different parts or combinations of candidates) is constructed, and a pruning operation with a larger threshold T2 is performed within the joint group. Specifically, first C Largest As the first entry is included in the joint group. And at most M (e.g. 20) candidates are included in the joint group, where closer MVP positions have higher priority to be included. If the number of candidates in the joint group reaches M, the construction of the joint group is terminated. Subsequently, the template matching cost associated with each candidate added to the group is calculated. Thereafter, the encoder / decoder will append the MVP list by traversing the candidates in the joint group in ascending order of template matching cost until all candidates in the joint group are traversed, or the MVP list reaches N. max-1 If all candidates within a joint group are traversed and the MVP list still has free positions, the remaining candidates that do not belong to the joint group will be included in the MVP list in a predefined order until the list reaches N max-1 . Finally, append the Paired MVPs and / or Zero MVPs to the MVP list. In one example, K (e.g., K=2) co-located frames are derived before the frame to be coded initiates the coding process, which is achieved by selecting the first M (e.g., M=1) frames with the smallest reference index in each reference frame list. It should be noted that in terms of TMVP derivation, the selected co-located frames are assigned different priorities, where those frames with larger QP (or closer POC distance / absolute QP distance relative to the current frame) are assigned higher priorities. Then, for conventional / CIIP / MMVD / GPM / TPM / sub-block merge mode, AMVP / affine mode / adaptive DMVR mode, or any other codec mode that requires MVP list construction, these K co-located frames can be used to provide N (N>=0) TMVPs. Specifically, for certain codec modes (e.g., conventional / CIIP / MMVD / GPM / TPM / sub-block merge mode and AMVP), each co-located frame will construct a TMVP candidate list containing all or part of the TMVP candidates therein, thereby generating a total of K TMVP candidate lists. These TMVP lists are then reordered based on the template or bilateral matching cost, respectively. Then, S (S>0) rounds of iterations are performed to include up to N (N>=0) TMVPs in the final MVP candidate list. Specifically, during the i-th (i<S) iteration, the i-th candidate in each sorted TMVP list is traversed in descending order of priority associated with the corresponding co-located frame, and will be included in the final MVP list after performing a redundancy check. In one example, when M (e.g., M=2) co-located frames are collected in a reference frame list, list 0 is first checked in ascending order of reference frame index (or distance relative to the current frame), and the first non-I frame is selected as the first (or high priority) co-located frame. If there is no qualified frame in list 0, list 1 (if present) will be checked in a similar manner as in list 0. When the first co-located frame F1 is collected, list 1 of the second co-located frame will be checked, where the first frame with a different POC value is collected. If the number of co-located frames does not reach a predefined (or signaling) value, some reference frames, such as those with index 0, are used as co-located frames even if they are I frames or have the same POC value as an existing frame. In another example, K (e.g., K=2) co-located frames are derived before the frame to be coded initiates the coding process, which is achieved by selecting the first M (e.g., M=1) frames with the smallest reference index in each reference frame list. It should be noted that in terms of TMVP derivation, the selected co-located frames are assigned equal priority. Then, for the regular / CIIP / MMVD / GPM / TPM / sub-block merge mode, the AMVP / affine mode / adaptive DMVR mode, or any other codec mode that requires the construction of an MVP list, these K reference frames can be utilized to provide N (N >= 0) TMVP. Specifically, for some codec modes (e.g., regular / CIIP / MMVD / GPM / TPM / sub-block merge mode and AMVP), only one TMVP candidate list and a redundancy check process are constructed for all reference frames. The constructed list contains all or part of the TMVP candidates, which can be in any one of the reference frames, and then they are re-ordered based on the template or bilateral matching cost. Then, the top N candidates with the lowest cost are included in the final MVP list. In one example, when constructing the sub-CU level MVP candidate list, if M (e.g., M = 2) reference frames are utilized during the codec process, M (e.g., M = 2) motion shift candidate lists are constructed separately for each of the reference frames. Specifically, when constructing the motion shift list L i for the i-th reference frame C i , adjacent motion candidates, non-adjacent motion candidates, HMVP candidates, and virtual motion candidates are sequentially collected. Specifically, a set of non-adjacent candidates containing at most F (F > 0) candidates is first constructed. Then, this set of candidates is re-ordered based on the template matching cost, and the top S (0 < S < F) candidates with the lowest cost are selected in the motion shift list. For some candidates, if the MV in any reference list points to C i , then this MV will be included in L i after the pruning process. The constructed motion shift lists for each reference frame are re-ordered based on the template matching cost, and the top T candidates with the lowest cost are used to derive the SbTMVP candidates, and then the SbTMVP candidates are included in the sub-CU level MVP candidate list. Once all the SbTMVP candidates are included in the list, the re-ordering process begins. Specifically, the SbTMVP candidate derived from the motion shift of the highest priority reference frame is identified, and the motion shift in the corresponding shift list that is ranked first is not re-ordered and will be placed in the first position in the final MVP list, and all other SbTMVP candidates are sorted together with the affine candidates.

[0088] Fig.12 FIG. 14 shows a flowchart of a method 1200 for video processing according to an embodiment of the present disclosure. The method 1200 can be implemented for the conversion between a current video block of a video and the bitstream of the video.

[0089] At block 1210, a determination is made whether a candidate frame associated with the current video block is a co-located frame based on temporal information of the current frame including the current video block. The co-located frame is co-located with the current frame.

[0090] At block 1220, a conversion is performed based on the determination. In some embodiments, the conversion may include encoding the current video block into a bitstream. Alternatively or additionally, in some embodiments, the conversion may include decoding the current video block from a bitstream.

[0091] The method 1200 enables the determination of the co-located frame based on the time domain information. In this way, the determined co-located frame can be used to improve the coding efficiency and coding effectiveness.

[0092] In some embodiments, the time domain information of the current frame includes at least one of the following: an index value of a time domain layer of the current frame, or a value of a time domain identifier such as Tid of the current frame.

[0093] In some embodiments, determining whether the candidate frame is a co-located frame includes determining whether the candidate frame is a co-located frame based on a comparison between the time domain information and a threshold.

[0094] In some embodiments, the method 1200 further includes: determining a threshold number based on time domain information of the current frame, the number of co-located frames of the current frame being less than or equal to the threshold number.

[0095] In some embodiments, if at least one of the following is less than or equal to the threshold, the threshold number may be determined as a first number: a value of a time domain identifier indicated by the time domain information or an index value of a time domain layer indicated by the time domain information. If at least one of the following is greater than the threshold, the threshold number may be determined as a second number: a value of a time domain identifier or an index value of a time domain layer.

[0096] In some embodiments, the first threshold number and the second threshold number are the same, or wherein the first threshold number and the second threshold number are different.

[0097] According to another embodiment 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, and the bitstream is generated by a method performed by an apparatus for video processing. In the method, based on temporal information of a current frame including a current video block, it is determined whether a candidate frame associated with a current video block of the video is a co-located frame. The co-located frame is co-located with the current frame. A bitstream is generated based on the determination.

[0098] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a candidate frame associated with a current video block of the video is determined to be a co-located frame based on temporal information of a current frame including the current video block. The co-located frame is co-located with the current frame. A bitstream is generated based on the determination. The bitstream is stored in a non-transitory computer-readable recording medium.

[0099] Fig.13 A flow chart of a method 1300 for video processing according to an embodiment of the present disclosure is shown. The method 1300 may be implemented for conversion between a current video block of a video and a bit stream of the video.

[0100] At block 1310, a set of co-located frames associated with a current video block is determined. The current video block is in a current frame that is co-located with a plurality of co-located frames. The number of co-located frames in the set of co-located frames is based on codec information associated with the current video block.

[0101] At block 1320, conversion is performed based on a set of co-located frames. In some embodiments, conversion may include encoding the current video block into a bitstream. Alternatively or additionally, in some embodiments, conversion may include decoding the current video block from a bitstream.

[0102] The method 1300 enables determining how many co-located frames to be used based on codec information. In this way, a determined number of co-located frames can be used to improve codec effectiveness and codec efficiency.

[0103] In some embodiments, the codec information associated with the current video block includes a codec configuration. In some embodiments, the codec configuration includes at least one of the following: a random access (RA) configuration, a low delay B (LDB) configuration, or a low delay P (LDP) configuration.

[0104] In some embodiments, the method 1300 further includes: if the codec configuration includes a first codec configuration, determining the number of co-located frames to be a first number; and if the codec configuration includes a second codec configuration, determining the number of co-located frames to be a second number.

[0105] In some embodiments, the first number is different from the second number. Alternatively, in some embodiments, the first number is the same as the second number.

[0106] In some embodiments, the first codec configuration includes a random access (RA) configuration, and the second codec configuration includes at least one of: a low delay B (LDB) configuration, or a low delay P (LDP) configuration.

[0107] In some embodiments, the codec information associated with the current video block includes a status of a reference frame list associated with the current video block.

[0108] In some embodiments, the number of co-located frames is based on a comparison between a picture order count (POC) value of the current frame and a plurality of POC values ​​of a plurality of reference frames in the reference frame list.

[0109] In some embodiments, if the POC value of the current frame is less than or greater than a plurality of POC values ​​of a plurality of reference frames, the number of co-located frames is determined to be a first number.

[0110] In some embodiments, if the POC value of the current frame is less than a subset of the multiple POC values ​​of the multiple reference frames, and if the POC value of the current frame is greater than another subset of the multiple POC values ​​of the multiple reference frames, the number of co-located frames is determined to be a second number. In some embodiments, the first number and the second number are the same or different.

[0111] In some embodiments, the method 1300 further comprises: determining whether a reference frame in the reference frame list is a co-located frame of the current frame based on a picture order count (POC) distance between the reference frame and the current frame.

[0112] In some embodiments, determining whether the reference frame is a co-located frame includes determining whether the reference frame is a co-located frame based on a comparison between a POC distance and a threshold distance.

[0113] In some embodiments, if the corresponding POC distances between the current frame and a plurality of reference frames in the reference frame list are less than a threshold distance, then there is no co-located frame for the current frame.

[0114] In some embodiments, no temporal motion vector prediction (TMVP), no sub-block based TMVP (SbTMVP), or no temporal affine control point is in the candidate list for the current video block.

[0115] In some embodiments, the threshold distance is predefined or determined during the transition.

[0116] In some embodiments, the method 1300 further includes determining the number of co-located frames based on codec information of at least one reference frame associated with the current video block.

[0117] In some embodiments, the method 1300 further includes: determining whether the reference frame is a co-located frame of the current frame based on the coding information of the reference frame.

[0118] In some embodiments, if the reference frame comprises an I-frame, the reference frame is not a co-located frame.

[0119] In some embodiments, if the number of intra-coded blocks in the reference frame is greater than a threshold number, the reference frame is not a co-located frame.

[0120] In some embodiments, method 1300 further includes determining the number of co-located frames based on characteristics of the current video block.

[0121] In some embodiments, method 1300 further includes: determining whether the reference frame is a co-located frame of the current frame based on characteristics of the current video block.

[0122] In some embodiments, the characteristic of the current video block includes at least one of the following: a block size of the current video block, a quantization parameter (Qp) of the current video block, or prediction information of the current video block. For example, the prediction information indicates unidirectional prediction or bidirectional prediction of the current video block.

[0123] In some embodiments, the method 1300 further includes: determining the number of co-located frames based on a codec tool of the current video block.

[0124] In some embodiments, method 1300 further includes: determining whether the reference frame is a co-located frame of the current frame based on a codec tool of the current video block. That is, for some codec tools, how many co-located frames and / or which reference frames are used as co-located frames may depend on the use of some codec tools.

[0125] In some embodiments, the codec of the current video block includes at least one of the following: a conventional codec, a template matching codec, a combined inter-frame and intra-frame prediction (CIIP) codec, a merge with motion vector difference (MMVD) codec, a geometric partitioning mode (GPM) codec, a triangular partitioning mode (TPM) codec, a sub-block merge mode codec, an advanced motion vector prediction (AMVP) codec, an AMVP merge codec, an affine codec, a bidirectional optical flow (BDOF) codec, or a local illumination compensation (LIC) codec. It should be understood that these example codecs are for illustrative purposes only and do not imply any limitation. Any suitable codec can be applied. The scope of the present disclosure is not limited in this regard.

[0126] In some embodiments, the first co-located frame associated with the current video block is a co-located frame associated with another video block, the current video block and the other video block being in at least one of: a current frame, a same slice, or a same tile.

[0127] In some embodiments, the first co-located frame associated with the current video block is not a co-located frame associated with another video block, the current video block and the other video block being in at least one of: a current frame, a same slice, or a same tile.

[0128] In some embodiments, the number of co-located frames associated with the current video block is the same as or different from a second number of co-located frames associated with another video block, the current video block and the other video block being in at least one of: a current frame, a same slice, or a same tile.

[0129] In some embodiments, a first reference frame associated with a current video block is the same as or different from a second reference frame associated with another video block, the first reference frame is a first co-located frame associated with the current video block, the second reference frame is a second co-located frame associated with the other video block, and the current video block and the other video block are in at least one of the following: a current frame, a same slice, or a same tile.

[0130] According to another embodiment 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 generated by a method performed by an apparatus for video processing. In the method, a set of collocated frames associated with a current video block of the video is determined. The current video block is in a current frame collocated with a plurality of collocated frames. The number of collocated frames in the set of collocated frames is based on codec information associated with the current video block. A bitstream is generated based on the set of collocated frames.

[0131] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a set of collocated frames associated with a current video block of the video is determined. The current video block is in a current frame collocated with a plurality of collocated frames. The number of collocated frames in the set of collocated frames is based on codec information associated with the current video block. A bitstream is generated based on the set of collocated frames. The bitstream is stored in a non-transitory computer-readable recording medium.

[0132] Fig.14 A flow chart illustrating a method 1400 for video processing according to an embodiment of the present disclosure. The method 1400 may be implemented for conversion between a current video block of a video and a bitstream of the video.

[0133] At block 1410, a motion shift list for the current video block is determined. The motion shift candidates in the motion shift list have a target precision. For example, the motion shift candidates may be rounded to the target precision before being included in the motion shift list.

[0134] At block 1420, a conversion is performed based on the motion shift list. In some embodiments, the conversion may include encoding the current video block into a bitstream. Alternatively or additionally, in some embodiments, the conversion may include decoding the current video block from a bitstream.

[0135] The method 1400 enables maintaining motion shift candidates in the motion shift list with a certain accuracy. In this way, the coding effectiveness and coding efficiency can be improved.

[0136] In some embodiments, the motion shift candidates are included in the motion shift list before or after rounding to a target precision. The target precision may be a certain precision.

[0137] In some embodiments, the target precision comprises integer precision.

[0138] In some embodiments, method 1400 further comprises determining a target motion shift for the current video block based on the motion shift list, the target motion shift being associated with at least one of: an affine control point, a temporal MVP (TMVP), or a sub-block based TMVP (SbTMVP).

[0139] In some embodiments, method 1400 further includes determining whether to determine the motion shift list based on the availability of the template of the current video block. Figure 7 As shown. It can be determined Figure 7 Availability of templates in .

[0140] In some embodiments, if the template of the current video block is not available, the motion shift list is not determined. That is, if the corresponding template of the current CU does not exist or is available, it may not be necessary to construct a motion shift list.

[0141] According to another embodiment 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 generated by a method performed by a device for video processing. In the method, a motion shift list of a current video block of the video is determined. The motion shift candidates in the motion shift list have a target accuracy. A bitstream is generated based on the motion shift list.

[0142] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a motion shift list of a current video block of the video is determined. The motion shift candidates in the motion shift list have a target accuracy. A bitstream is generated based on the motion shift list. The bitstream is stored in a non-transitory computer-readable recording medium.

[0143] Fig.15 A flow chart of a method 1500 for video processing according to an embodiment of the present disclosure is shown. The method 1500 may be implemented for conversion between a current video block of a video and a bit stream of the video.

[0144] At block 1510, a motion shift list for a current video block is determined. At block 1520, a pruning process is performed on the motion shift list based on a pruning threshold.

[0145] At block 1530, a conversion is performed based on the pruned motion shift list. In some embodiments, the conversion may include encoding the current video block into a bitstream. Alternatively or additionally, in some embodiments, the conversion may include decoding the current video block from a bitstream.

[0146] The method 1500 enables pruning of the motion shift list before using it in the conversion. In this way, the coding effectiveness and coding efficiency can be improved.

[0147] In some embodiments, the pruning threshold is associated with a value used in a rate-distortion optimization (RDO) process. For example, the pruning threshold may be a lamda value used in the RDO process. For another example, the pruning threshold may be some other value derived based on the lamda value.

[0148] In some embodiments, a pruning process is performed based on a pruning threshold to remove redundant motion shift candidates in the motion shift list. That is, the pruning process is used to avoid duplicate or redundant motion shift lists, which can be achieved by using an appropriate pruning threshold.

[0149] According to another embodiment 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, and the bitstream is generated by a method performed by a device for video processing. In the method, a motion shift list of a current video block of the video is determined. A pruning process is performed on the motion shift list based on a pruning threshold. A bitstream is generated based on the pruned motion shift list.

[0150] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a motion shift list of a current video block of the video is determined. A pruning process is performed on the motion shift list based on a pruning threshold. A bitstream is generated based on the pruned motion shift list. The bitstream is stored in a non-transitory computer-readable recording medium.

[0151] Fig.16 Flowchart illustrating a method 1600 for video processing according to an embodiment of the present invention. The method 1600 may be implemented for conversion between a current video block of a video and a bitstream of the video.

[0152] At block 1610 , a motion shift list for the current video block is determined by traversing a plurality of motion shift candidates in a predefined order.

[0153] At block 1620, a conversion is performed based on the motion shift list. In some embodiments, the conversion may include encoding the current video block into a bitstream. Alternatively or additionally, in some embodiments, the conversion may include decoding the current video block from a bitstream.

[0154] The method 1600 enables determining a motion shift list by traversing motion shift candidates in a predetermined order. In this way, coding effectiveness and coding efficiency can be improved.

[0155] In some embodiments, the plurality of motion shift candidates include at least one of: an adjacent neighboring motion vector prediction (MVP), an adjacent neighboring MVP at a predefined position, a temporal MVP (TMVP), a history-based MVP, a non-adjacent MVP, a constructed MVP, a paired MVP, an inherited affine motion vector (MV) candidate, a constructed affine MV candidate, or a sub-block-based TMVP (SbTMVP). It should be understood that these example candidate categories are for illustrative purposes only and do not imply any limitation. Any other suitable motion shift candidates may be applied. The scope of the present application is not limited in this regard.

[0156] In some embodiments, if the number of motion shift candidates in the motion shift list exceeds a threshold number, the determination of the motion shift list is terminated. The threshold number may also be referred to as a maximum allowed number. For example, if the number of candidates in the motion shift list reaches the maximum allowed number, the construction of the motion shift list is terminated.

[0157] In some embodiments, the motion shift list is unsorted. For example, the motion shift list may be unsorted based on at least one particular metric.

[0158] In some embodiments, method 1600 further comprises determining a candidate for the current video block based on the motion shift list, the candidate comprising at least one of: an affine control point candidate, a temporal motion vector prediction (TMVP) candidate, or a sub-block based TMVP (SbTMVP) candidate.

[0159] In some embodiments, determining the candidate for the current video block based on the motion shift list comprises determining the candidate based on temporal motion information of a position associated with the motion shift candidate in the motion shift list.

[0160] In some embodiments, the temporal motion information includes at least one of the following: a motion vector (MV) of a position, or a reference index of a position. For example, the temporal motion information (eg, MV, reference index, etc.) of a position specified by a motion shift may be used by the current block.

[0161] In some embodiments, the MV of the location is scaled, and the candidate is determined based on the scaled MV.

[0162] In some embodiments, candidates are determined based on the MV without scaling the MV.

[0163] In some embodiments, method 1600 further includes determining whether to scale the MV of the position based on a first picture order count (POC) distance between a current frame including the current video block and a co-located frame co-located with the current frame and based on a second POC distance between the co-located frame and a reference frame associated with the current video block, the co-located frame being associated with the motion shift candidate.

[0164] In some embodiments, the method 1600 further includes: determining another motion information of the current video block based on the temporal motion information.

[0165] According to another embodiment 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, and the bitstream is generated by a method performed by a device for video processing. In the method, a motion shift list of a current video block of the video is determined by traversing a plurality of motion shift candidates in a predefined order. A bitstream is generated based on the motion shift list.

[0166] According to some further embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a motion shift list of a current video block of the video is determined by traversing a plurality of motion shift candidates in a predefined order. The bitstream is stored in a non-transitory computer-readable recording medium.

[0167] Fig.17 A flow chart of a method 1700 for video processing according to an embodiment of the present disclosure is shown. The method 1700 may be implemented for conversion between a current video block of a video and a bit stream of the video.

[0168] At block 1710, a motion vector prediction (MVP) candidate list for a current video block is determined. The MVP candidate list includes at least a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates. The plurality of SbTMVP candidates are determined based on a plurality of motion shift candidates in at least one motion shift list.

[0169] At block 1720, a plurality of metrics of candidates in the MVP candidate list are determined. At least one metric of the plurality of metrics is adjusted. At block 1730, the MVP candidate list is reordered based on the plurality of metrics.

[0170] At block 1740, a conversion is performed based on the reordered MVP candidate list. In some embodiments, the conversion may include encoding the current video block into a bitstream. Alternatively or additionally, in some embodiments, the conversion may include decoding the current video block from a bitstream.

[0171] Method 1700 enables further adjustment of the metrics of the MVP candidates before reordering the MVP candidate list. In this way, the coding effectiveness and coding efficiency can be improved.

[0172] In some embodiments, at least one metric is adjusted to be the sum of a weighted value of at least one metric and a predefined offset value. For example, assuming that Cori represents a certain candidate original metric value, the adjusted metric value Cadj is calculated as Cadj=a*Cori+b, where a and b can be fixed constants or adaptively determined values.

[0173] In some embodiments, the MVP candidate list also includes at least one affine candidate.

[0174] In some embodiments, method 1700 further includes: determining whether to adjust a metric of a candidate in the MVP candidate list based on the candidate category of the candidate.

[0175] In some embodiments, at least one metric of at least one affine candidate in the MVP candidate list or at least one SbTMVP candidate in the MVP candidate list is to be adjusted. For example, only some or all affine candidates or SbTMVP candidates need to perform metric value adjustment.

[0176] In some embodiments, the method 1700 further includes: determining whether to adjust the metric of the candidate in the MVP candidate list based on the candidate prediction type. In some embodiments, the candidate prediction type includes at least one of the following: a unidirectional prediction type, or a bidirectional prediction type.

[0177] In some embodiments, the MVP candidate list is at a sub-codec unit (sub-CU) level.

[0178] In some embodiments, the plurality of metrics comprises a plurality of template matching costs or a plurality of bilateral matching costs.

[0179] According to another embodiment 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 a device for video processing. In the method, a motion vector prediction (MVP) candidate list of a current video block of the video is determined. The MVP candidate list includes at least a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates. A plurality of SbTMVP candidates are determined based on a plurality of motion shift candidates in at least one motion shift list. A plurality of metrics of the candidates in the MVP candidate list are determined. At least one metric of the plurality of metrics is adjusted. The MVP candidate list is reordered based on the plurality of metrics. A bitstream is generated based on the reordered MVP candidate list.

[0180] According to some further embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a motion vector prediction (MVP) candidate list of a current video block of the video is determined. The MVP candidate list includes at least a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates. A plurality of SbTMVP candidates are determined based on a plurality of motion shift candidates in at least one motion shift list. A plurality of metrics of the candidates in the MVP candidate list are determined. At least one metric of the plurality of metrics is adjusted. The MVP candidate list is reordered based on the plurality of metrics. A bitstream is generated based on the reordered MVP candidate list. The bitstream is stored in a non-transitory computer-readable recording medium.

[0181] It should be understood that the above methods 1200, 1300, 1400, 1500, 1600 and / or 1700 can be used in combination or alone. Any suitable combination of these methods can be applied. The scope of the present disclosure is not limited in this regard.

[0182] By using these methods 1200, 1300, 1400, 1500, 1600 and 1700 individually or in combination, the video encoding and decoding process can be improved by using temporal motion information. In this way, the encoding and decoding effectiveness and encoding and decoding efficiency can be improved.

[0183] Embodiments of the present disclosure may be described according to the following clauses, features of which may be combined in any reasonable way.

[0184] Clause 1. A method for video processing, comprising: for conversion between a current video block of a video and a bitstream of the video, determining whether a candidate frame associated with the current video block is a co-located frame based on time domain information of a current frame including the current video block, and the co-located frame is co-located with the current frame; and performing the conversion based on the determination.

[0185] Clause 2. The method according to clause 1, wherein the time domain information of the current frame includes at least one of the following: an index value of a time domain layer of the current frame, or a value of a time domain identifier of the current frame.

[0186] Clause 3. The method according to clause or clause 2, wherein determining whether the candidate frame is a co-located frame comprises: determining whether the candidate frame is the co-located frame based on a comparison between the time domain information and a threshold.

[0187] Clause 4. The method according to any one of clauses 1 to 3 further includes: determining a threshold number based on the time domain information of the current frame, the number of co-located frames of the current frame being less than or equal to the threshold number.

[0188] Clause 5. A method according to Clause 4, wherein determining the threshold number comprises at least one of the following: determining the threshold number as a first number if at least one of the following is determined to be less than or equal to the threshold: the value of the time domain identifier indicated by the time domain information or the index value of the time domain layer indicated by the time domain information; or determining the threshold number as a second number if at least one of the following is determined to be greater than the threshold: the value of the time domain identifier or the index value of the time domain layer.

[0189] Clause 6. The method of clause 5, wherein the first threshold number and the second threshold number are the same, or wherein the first threshold number and the second threshold number are different.

[0190] Clause 7. A method for video processing, comprising: determining a set of co-located frames associated with a current video block of a video and a bitstream of the video, wherein the current video block is in a current frame co-located with a plurality of co-located frames, and the number of co-located frames in the set of co-located frames is based on codec information associated with the current video block; and performing the conversion based on the set of co-located frames.

[0191] Clause 8. The method of clause 7, wherein the codec information associated with the current video block comprises a codec configuration.

[0192] Clause 9. The method of clause 8, wherein the codec configuration comprises at least one of: a random access (RA) configuration, a low delay B (LDB) configuration, or a low delay P (LDP) configuration.

[0193] Clause 10. The method according to Clause 8 or Clause 9 further includes: if it is determined that the codec configuration includes a first codec configuration, determining the number of co-located frames as a first number; and if it is determined that the codec configuration includes a second codec configuration, determining the number of co-located frames as a second number.

[0194] Clause 11. The method of clause 10, wherein the first number is different from the second number.

[0195] Clause 12. The method of clause 10, wherein the first number is the same as the second number.

[0196] Clause 13. A method according to any one of clauses 10 to 12, wherein the first codec configuration comprises a random access (RA) configuration, and the second codec configuration comprises at least one of: a low delay B (LDB) configuration, or a low delay P (LDP) configuration.

[0197] Clause 14. The method of Clause 7, wherein the codec information associated with the current video block comprises a status of a reference frame list associated with the current video block.

[0198] Clause 15. The method of clause 14, wherein the number of co-located frames is based on a comparison between a picture order count (POC) value of the current frame and a plurality of POC values ​​of a plurality of reference frames in the reference frame list.

[0199] Clause 16. The method of Clause 15, wherein if the POC value of the current frame is less than or greater than the plurality of POC values ​​of the plurality of reference frames, the number of co-located frames is determined to be a first number.

[0200] Clause 17. A method according to Clause 16, wherein if the POC value of the current frame is less than a subset of the multiple POC values ​​of the multiple reference frames, and if the POC value of the current frame is greater than another subset of the multiple POC values ​​of the multiple reference frames, the number of co-located frames is determined to be a second number.

[0201] Clause 18. The method of clause 17, wherein the first number and the second number are the same or different.

[0202] Clause 19. The method according to Clause 14 further includes: determining whether a reference frame in the reference frame list is a co-located frame of the current frame based on a picture order count (POC) distance between the reference frame and the current frame.

[0203] Clause 20. The method of clause 19, wherein determining whether the reference frame is the co-located frame comprises determining whether the reference frame is the co-located frame based on a comparison between the POC distance and a threshold distance.

[0204] Clause 21. A method according to any one of Clause 19 or Clause 20, wherein if the corresponding POC distance between the current frame and multiple reference frames in the reference frame list is less than a threshold distance, then there is no co-located frame for the current frame.

[0205] Clause 22. The method of clause 21, wherein the candidate list for the current video block has no temporal motion vector prediction (TMVP), no sub-block based TMVP (SbTMVP), or no temporal affine control point.

[0206] Clause 23. The method of any one of clauses 20 to 22, wherein the threshold distance is predefined or determined during the transition.

[0207] Clause 24. The method of clause 7, further comprising determining the number of co-located frames based on codec information of at least one reference frame associated with the current video block.

[0208] Clause 25. The method according to Clause 7 further includes: determining whether the reference frame is a co-located frame of the current frame based on the coding information of the reference frame.

[0209] Clause 26. The method of clause 25, wherein if the reference frame comprises an I frame, then the reference frame is not the co-located frame.

[0210] Clause 27. The method of clause 25 or clause 26, wherein if the number of intra-coded blocks in the reference frame is greater than a threshold number, then the reference frame is not the co-located frame.

[0211] Clause 28. The method of clause 7, further comprising determining a number of co-located frames based on characteristics of the current video block.

[0212] Clause 29. The method of clause 7, further comprising: determining whether a reference frame is a co-located frame of the current frame based on characteristics of the current video block.

[0213] Clause 30. The method of clause 28 or clause 29, wherein the characteristic of the current video block comprises at least one of: a block size of the current video block, a quantization parameter of the current video block, or prediction information of the current video block.

[0214] Clause 31. The method of clause 30, wherein the prediction information indicates a uni-directional prediction or a bi-directional prediction of the current video block.

[0215] Clause 32. The method of clause 7, further comprising: determining a number of co-located frames based on a codec tool of the current video block.

[0216] Clause 33. The method of clause 7, further comprising: determining whether a reference frame is a co-located frame of the current frame based on a codec tool of the current video block.

[0217] Clause 34. A method according to clause 32 or clause 33, wherein the codec tool of the current video block includes at least one of the following: a conventional codec tool, a template matching codec tool, a combined inter-frame and intra-frame prediction (CIIP) codec tool, a merge with motion vector difference (MMVD) codec tool, a geometric partition mode (GPM) codec tool, a triangular partition mode (TPM) codec tool, a sub-block merge mode codec tool, an advanced motion vector prediction (AMVP) codec tool, an AMVP merge codec tool, an affine codec tool, a bidirectional optical flow (BDOF) codec tool, or a local illumination compensation (LIC) codec tool.

[0218] Clause 35. A method according to any one of clauses 7 to 34, wherein the first co-located frame associated with the current video block is a co-located frame associated with another video block, the current video block and the other video block being in at least one of: the current frame, the same slice, or the same tile.

[0219] Clause 36. A method according to any one of clauses 7 to 34, wherein the first co-located frame associated with the current video block is not a co-located frame associated with another video block, the current video block and the other video block are in at least one of the following: the current frame, the same slice, or the same tile.

[0220] Clause 37. A method according to any one of clauses 7 to 36, wherein the number of co-located frames associated with the current video block is the same as or different from a second number of co-located frames associated with another video block, the current video block and the other video block being in at least one of: the current frame, the same slice, or the same tile.

[0221] Clause 38. A method according to any one of clauses 7 to 36, wherein a first reference frame associated with the current video block is the same as or different from a second reference frame associated with another video block, the first reference frame is a first co-located frame associated with the current video block, the second reference frame is a second co-located frame associated with the other video block, and the current video block and the other video block are in at least one of: the current frame, the same strip, or the same tile.

[0222] Clause 39. A method for video processing, comprising: determining a motion shift list for a conversion between a current video block of a video and a bitstream of the video, wherein motion shift candidates in the motion shift list have a target accuracy; and performing the conversion based on the motion shift list.

[0223] Clause 40. The method of Clause 39, wherein the motion shift candidate is included in the motion shift list before or after rounding to the target precision.

[0224] Clause 41. A method according to clause 39 or clause 40, wherein the target precision comprises integer precision.

[0225] Clause 42. The method according to any one of clauses 39 to 41 further includes: determining a target motion shift of the current video block based on the motion shift list, wherein the target motion shift is associated with at least one of the following: an affine control point, a time domain MVP (TMVP), or a sub-block based TMVP (SbTMVP).

[0226] Clause 43. The method of any one of clauses 39 to 42, further comprising determining whether to determine the motion shift list based on availability of a template for the current video block.

[0227] Clause 44. The method of clause 33, wherein the motion shift list is not determined if the template for the current video block is not available.

[0228] Clause 45. A method for video processing, comprising: determining a motion shift list for a conversion between a current video block of a video and a bitstream of the video; performing a pruning process on the motion shift list based on a pruning threshold; and performing the conversion based on the pruned motion shift list.

[0229] Clause 46. The method of clause 45, wherein the pruning threshold is associated with a value used in a rate-distortion optimization (RDO) process.

[0230] Clause 47. The method of clause 45 or clause 46, wherein the pruning process is performed based on the pruning threshold to remove redundant motion shift candidates in the motion shift list.

[0231] Clause 48. A method for video processing, comprising: for conversion between a current video block of a video and a bitstream of the video, determining a motion shift list of the current video block by traversing a plurality of motion shift candidates in a predefined order; and performing the conversion based on the motion shift list.

[0232] Clause 49. A method according to clause 48, wherein the multiple motion shift candidates include at least one of the following: an adjacent neighbor motion vector prediction (MVP), an adjacent neighbor MVP at a predefined position, a temporal MVP (TMVP), a history-based MVP, a non-adjacent MVP, a constructed MVP, a paired MVP, an inherited affine motion vector (MV) candidate, a constructed affine MV candidate, or a sub-block based TMVP (SbTMVP).

[0233] Clause 50. The method of clause 48 or clause 49, wherein the determining of the motion shift list is terminated if the number of motion shift candidates in the motion shift list exceeds a threshold number.

[0234] Clause 51. A method according to any one of clauses 48 to 50, wherein the motion shift list is unsorted.

[0235] Clause 52. The method according to any one of clauses 48 to 51 further includes: determining a candidate for the current video block based on the motion shift list, the candidate comprising at least one of the following: an affine control point candidate, a temporal motion vector prediction (TMVP) candidate, or a sub-block based TMVP (SbTMVP) candidate.

[0236] Clause 53. The method of clause 52, wherein determining the candidate for the current video block based on the motion shift list comprises determining the candidate based on temporal motion information of a position associated with a motion shift candidate in the motion shift list.

[0237] Clause 54. The method of clause 53, wherein the temporal motion information comprises at least one of: a motion vector (MV) of a position, or a reference index of the position.

[0238] Clause 55. The method of clause 54, wherein the MV of the position is scaled, and the candidate is determined based on the scaled MV.

[0239] Clause 56. The method of Clause 54, wherein the candidate is determined based on the MV without scaling the MV.

[0240] Clause 57. The method according to any one of clauses 54 to 56 further includes: determining whether to scale the MV of the position based on a first picture order count (POC) distance between a current frame including the current video block and a co-located frame co-located with the current frame and based on a second POC distance between the co-located frame and a reference frame associated with the current video block, the co-located frame being associated with the motion shift candidate.

[0241] Clause 58. The method of any one of clauses 53 to 57, further comprising determining further motion information for the current video block based on the temporal motion information.

[0242] Clause 59. A method for video processing, comprising: determining a motion vector prediction (MVP) candidate list for a conversion between a current video block of a video and a bitstream of the video, the MVP candidate list comprising at least a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates, the plurality of SbTMVP candidates being determined based on a plurality of motion shift candidates in at least one motion shift list; determining a plurality of metrics of the candidates in the MVP candidate list, at least one of the plurality of metrics being adjusted; reordering the MVP candidate list based on the plurality of metrics; and performing the conversion based on the reordered MVP candidate list.

[0243] Clause 60. The method of clause 59, wherein the at least one metric is adjusted to be a sum of a weighted value of the at least one metric and a predefined offset value.

[0244] Clause 61. The method of clause 59 or clause 60, wherein the MVP candidate list further includes at least one affine candidate.

[0245] Clause 62. The method of any one of clauses 59 to 61, further comprising: determining whether to adjust a metric of a candidate in the MVP candidate list based on the candidate category of the candidate.

[0246] Clause 63. The method of clause 62, wherein at least one metric of at least one affine candidate in the MVP candidate list or at least one SbTMVP candidate in the MVP candidate list is to be adjusted.

[0247] Clause 64. The method of any one of clauses 59 to 63, further comprising: determining whether to adjust a metric of a candidate in the MVP candidate list based on the prediction type of the candidate.

[0248] Clause 65. The method according to clause 64, wherein the candidate prediction type includes at least one of the following: a unidirectional prediction type, or a bidirectional prediction type.

[0249] Clause 66. The method of any one of clauses 59 to 65, wherein the MVP candidate list is at a sub-codec unit (sub-CU) level.

[0250] Clause 67. The method of any one of clauses 59 to 66, wherein the plurality of metrics comprises a plurality of template matching costs or a plurality of bilateral matching costs.

[0251] Clause 68. The method of any one of clauses 1 to 67, wherein the converting comprises encoding the current video block into the bitstream.

[0252] Clause 69. The method of any one of clauses 1 to 67, wherein the converting comprises decoding the current video block from the bitstream.

[0253] Clause 70. An apparatus for video processing, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of Claims 1 to 69.

[0254] Clause 71. A non-transitory computer-readable storage medium storing instructions for causing a processor to perform the method of any one of claims 1 to 69.

[0255] Item 72. A non-transitory computer-readable recording medium storing a bitstream of a video, the bitstream being generated by a method executed by a device for video processing, wherein the method comprises: determining whether a candidate frame associated with a current video block of the video is a co-located frame based on time domain information of a current frame including the current video block, the co-located frame being co-located with the current frame; and generating the bitstream based on the determination.

[0256] Clause 73. A method for storing a bitstream of a video, comprising: determining whether a candidate frame associated with a current video block of the video is a co-located frame based on time domain information of a current frame including the current video block, the co-located frame being co-located with the current frame; generating the bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.

[0257] Clause 74. A non-transitory computer-readable recording medium storing a bitstream of a video, the bitstream being generated by a method performed by a device for video processing, wherein the method comprises: determining a set of co-located frames associated with a current video block of the video, the current video block being in a current frame co-located with a plurality of co-located frames, the number of co-located frames in the set of co-located frames being based on codec information associated with the current video block; and generating the bitstream based on the set of co-located frames.

[0258] Clause 75. A method for storing a bitstream of a video, comprising: determining a set of co-located frames associated with a current video block of the video, wherein the current video block is in a current frame co-located with a plurality of co-located frames, and the number of co-located frames in the set of co-located frames is based on codec information associated with the current video block; generating the bitstream based on the set of co-located frames; and storing the bitstream in a non-transitory computer-readable recording medium.

[0259] Clause 76. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method executed by a device for video processing, wherein the method comprises: determining a motion shift list for a current video block of the video, the motion shift candidates in the motion shift list having a target accuracy; and generating the bitstream based on the motion shift list.

[0260] Clause 77. A method for storing a bitstream of a video, comprising: determining a motion shift list for a current video block of the video, the motion shift candidates in the motion shift list having a target accuracy; generating the bitstream based on the motion shift list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0261] Clause 78. A non-transitory computer-readable recording medium storing a bitstream of a video, the bitstream being generated by a method executed by a device for video processing, wherein the method comprises: determining a motion shift list of a current video block of the video; performing a pruning process on the motion shift list based on a pruning threshold; and generating the bitstream based on the pruned motion shift list.

[0262] Clause 79. A method for storing a bitstream of a video, comprising: determining a motion shift list for a current video block of the video; performing a pruning process on the motion shift list based on a pruning threshold; generating the bitstream based on the pruned motion shift list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0263] Clause 80. A non-transitory computer-readable recording medium storing a bitstream of a video, the bitstream being generated by a method executed by a device for video processing, wherein the method comprises: determining a motion shift list for a current video block of the video by traversing a plurality of motion shift candidates in a predefined order; and generating the bitstream based on the motion shift list.

[0264] Clause 81. A method for storing a bitstream of a video, comprising: determining a motion shift list of a current video block of the video by traversing a plurality of motion shift candidates in a predefined order; and generating the bitstream based on the motion shift list; and storing the bitstream in a non-transitory computer-readable recording medium.

[0265] Item 82. A non-transitory computer-readable recording medium storing a bitstream of a video, the bitstream being generated by a method executed by a device for video processing, wherein the method comprises: determining a motion vector prediction (MVP) candidate list for a current video block of the video, the MVP candidate list comprising at least a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates, the plurality of SbTMVP candidates being determined based on a plurality of motion shift candidates in at least one motion shift list; determining a plurality of metrics of the candidates in the MVP candidate list, at least one of the plurality of metrics being adjusted; reordering the MVP candidate list based on the plurality of metrics; and generating the bitstream based on the reordered MVP candidate list.

[0266] Clause 83. A method for storing a bitstream of a video, comprising: determining a motion vector prediction (MVP) candidate list for a current video block of the video, the MVP candidate list comprising at least a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates, the plurality of SbTMVP candidates being determined based on a plurality of motion shift candidates in at least one motion shift list; determining a plurality of metrics of the candidates in the MVP candidate list, at least one of the plurality of metrics being adjusted; reordering the MVP candidate list based on the plurality of metrics; generating the bitstream based on the reordered MVP candidate list; and storing the bitstream in a non-transitory computer-readable recording medium. Example Device

[0267] Fig.18 A block diagram of a computing device 1800 is shown in which various embodiments of the present disclosure may be implemented. The computing device 1800 may be implemented as or included in the source device 110 (or video encoder 114 or 200) or the destination device 120 (or video decoder 124 or 300).

[0268] It should be understood that Fig.18 The computing device 1800 shown in FIG. 1 is for illustrative purposes only and is not intended to in any way imply any limitation on the functionality and scope of the embodiments of the present disclosure.

[0269] like Fig.18 As shown, computing device 1800 includes a general computing device 1800. Computing device 1800 may include at least one or more processors or processing units 1810, memory 1820, storage unit 1830, one or more communication units 1840, one or more input devices 1850, and one or more output devices 1860.

[0270] In some embodiments, computing device 1800 can be implemented as any user terminal or server terminal with computing power. The server terminal can be a server provided by a service provider, a large computing device, etc. The user terminal can be, for example, any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a station, a unit, a device, a multimedia computer, a multimedia tablet computer, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a gaming device, or any combination thereof, and includes the accessories and peripherals of these devices, or any combination thereof. It is conceivable that computing device 1800 can support any type of interface to the user (such as a "wearable" circuit device, etc.).

[0271] The processing unit 1810 may be a physical processor or a virtual processor and may implement various processes based on a program stored in the memory 1820. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the computing device 1800. The processing unit 1810 may also be referred to as a central processing unit (CPU), a microprocessor, a controller, or a microcontroller.

[0272] The computing device 1800 typically includes various computer storage media. Such media can be any media accessible by the computing device 1800, including but not limited to volatile media and non-volatile media, or removable media and non-removable media. The memory 1820 can be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (such as a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM) or flash memory) or any combination thereof. The storage unit 1830 can be any removable or non-removable medium, and can include machine-readable media, such as a memory, a flash drive, a disk, or other media that can be used to store information and / or data and can be accessed in the computing device 1800.

[0273] The computing device 1800 may also include additional removable / non-removable storage media, volatile / non-volatile storage media. Fig.18 Although not shown in the figure, a magnetic disk drive for reading from and / or writing to a removable nonvolatile magnetic disk and an optical disk drive for reading from and / or writing to a removable nonvolatile optical disk may be provided. In this case, each drive may be connected to the bus (not shown) via one or more data medium interfaces.

[0274] The communication unit 1840 communicates with another computing device via a communication medium. In addition, the functions of the components in the computing device 1800 can be implemented by a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 1800 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or other general network nodes.

[0275] The input device 1850 may be one or more of various input devices, such as a mouse, keyboard, trackball, voice input device, etc. The output device 1860 may be one or more of various output devices, such as a display, a speaker, a printer, etc. With the help of the communication unit 1840, the computing device 1800 may also communicate with one or more external devices (not shown), such as storage devices and display devices, and the computing device 1800 may also communicate with one or more devices that enable a user to interact with the computing device 1800, or any device that enables the computing device 1800 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.), if necessary. Such communication may be performed via an input / output (I / O) interface (not shown).

[0276] In some embodiments, some or all components of computing device 1800 may also be arranged in a cloud computing architecture rather than being integrated in a single device. In a cloud computing architecture, components may be provided remotely and work together to implement the functions described in the present disclosure. In some embodiments, cloud computing provides computing, software, data access and storage services, which will not require the end user to know the physical location or configuration of the system or hardware that provides these services. In various embodiments, cloud computing provides services via a wide area network (e.g., the Internet) using a suitable protocol. For example, a cloud computing provider provides applications via a wide area network, which can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture and the corresponding data may be stored on a remote server. The computing resources in a cloud computing environment may be merged or distributed at the location of a remote data center. Cloud computing infrastructure may provide services through a shared data center, although they appear as a single access point for users. Therefore, the cloud computing architecture may be used to provide the components and functions described herein from a service provider at a remote location. Alternatively, they may be provided by a conventional server, or installed directly or otherwise on a client device.

[0277] In an embodiment of the present disclosure, the computing device 1800 may be used to implement video encoding / decoding. The memory 1820 may include one or more video encoding / decoding modules 1825 having one or more program instructions. These modules can be accessed and executed by the processing unit 1810 to perform the functions of the various embodiments described herein.

[0278] In an example embodiment performing video encoding, input device 1850 may receive video data as input 1870 to be encoded. The video data may be processed by, for example, video codec module 1825 to generate an encoded bitstream. The encoded bitstream may be provided as output 1880 via output device 1860.

[0279] In an example embodiment performing video decoding, input device 1850 may receive an encoded bitstream as input 1870. The encoded bitstream may be processed by, for example, video codec module 1825 to generate decoded video data. The decoded video data may be provided as output 1880 via output device 1860.

[0280] Although the present disclosure has been specifically shown and described with reference to the preferred embodiments of the present disclosure, it will be understood by those skilled in the art that various changes can be made in form and detail without departing from the spirit and scope of the present application as defined by the appended claims. These changes are intended to be encompassed by the scope of the present application. Therefore, the foregoing description of the embodiments of the present application is not intended to be limiting.

Claims

1. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining whether a candidate frame associated with the current video block is a co-located frame based on temporal information of a current frame including the current video block, the co-located frame being co-located with the current frame; as well as The converting is performed based on the determination.

2. The method according to claim 1, wherein the time domain information of the current frame comprises at least one of the following: an index value of a time domain layer of the current frame, or a value of a time domain identifier of the current frame.

3. The method according to claim 2, wherein determining whether the candidate frame is a co-located frame comprises: Whether the candidate frame is the co-located frame is determined based on a comparison between the time domain information and a threshold.

4. The method according to any one of claims 1 to 3, further comprising: A threshold number is determined based on the time domain information of the current frame, and the number of co-located frames of the current frame is less than or equal to the threshold number.

5. The method of claim 4, wherein determining the threshold number comprises at least one of: If it is determined that at least one of the following is less than or equal to a threshold, the threshold number is determined as a first number: a value of a time domain identifier indicated by the time domain information or an index value of a time domain layer indicated by the time domain information; or If it is determined that at least one of the following is greater than the threshold, the threshold number is determined as a second number: the value of the time domain identifier or the index value of the time domain layer.

6. The method according to claim 5, wherein the first threshold number and the second threshold number are the same, or The first threshold number and the second threshold number are different.

7. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining a set of co-located frames associated with the current video block, the current video block being in a current frame co-located with a plurality of co-located frames, the number of co-located frames in the set of co-located frames being based on codec information associated with the current video block; as well as The converting is performed based on the set of co-located frames.

8. The method of claim 7, wherein the codec information associated with the current video block comprises a codec configuration.

9. The method according to claim 8, wherein the codec configuration comprises at least one of the following: Random Access (RA) configuration, Low Latency B (LDB) configuration, or Low Latency P (LDP) configuration.

10. The method according to claim 8 or claim 9, further comprising: If it is determined that the codec configuration includes the first codec configuration, determining the number of co-located frames to be a first number; as well as If it is determined that the codec configuration includes the second codec configuration, the number of co-located frames is determined to be a second number. The method of claim 10 , wherein the first number is different from the second number. The method of claim 10 , wherein the first number is the same as the second number.

13. The method according to any one of claims 10 to 12, wherein the first codec configuration comprises a random access (RA) configuration, and the second codec configuration comprises at least one of the following: a low delay B (LDB) configuration, or a low delay P (LDP) configuration.

14. The method of claim 7, wherein the codec information associated with the current video block comprises a status of a reference frame list associated with the current video block.

15. The method of claim 14, wherein the number of co-located frames is based on a comparison between a picture order count (POC) value of the current frame and a plurality of POC values ​​of a plurality of reference frames in the reference frame list. 16 . The method of claim 15 , wherein if the POC value of the current frame is smaller than or greater than the plurality of POC values ​​of the plurality of reference frames, the number of co-located frames is determined to be a first number.

17. The method of claim 16, wherein if the POC value of the current frame is less than a subset of the multiple POC values ​​of the multiple reference frames, and if the POC value of the current frame is greater than another subset of the multiple POC values ​​of the multiple reference frames, the number of co-located frames is determined to be a second number. The method of claim 17 , wherein the first number and the second number are the same or different.

19. The method according to claim 14, further comprising: Based on a picture order count (POC) distance between the reference frame and the current frame, it is determined whether a reference frame in the reference frame list is a co-located frame of the current frame.

20. The method of claim 19, wherein determining whether the reference frame is the co-located frame comprises: Whether the reference frame is the co-located frame is determined based on a comparison between the POC distance and a threshold distance.

21. The method of any one of claims 19 or 20, wherein if the corresponding POC distances between the current frame and multiple reference frames in the reference frame list are less than a threshold distance, then there is no co-located frame for the current frame.

22. The method of claim 21, wherein the candidate list for the current video block has no temporal motion vector prediction (TMVP), no sub-block based TMVP (SbTMVP), or no temporal affine control point.

23. The method according to any one of claims 20 to 22, wherein the threshold distance is predefined or determined during the conversion.

24. The method according to claim 7, further comprising: The number of co-located frames is determined based on codec information of at least one reference frame associated with the current video block.

25. The method of claim 7, further comprising: It is determined whether the reference frame is a co-located frame of the current frame based on the codec information of the reference frame.

26. The method of claim 25, wherein if the reference frame comprises an I frame, the reference frame is not the co-located frame.

27. The method of claim 25 or claim 26, wherein if the number of intra-coded blocks in the reference frame is greater than a threshold number, then the reference frame is not the co-located frame.

28. The method of claim 7, further comprising: The number of co-located frames is determined based on characteristics of the current video block.

29. The method according to claim 7, further comprising: A determination is made based on characteristics of the current video block whether a reference frame is a co-located frame of the current frame.

30. The method of claim 28 or claim 29, wherein the characteristic of the current video block comprises at least one of: the block size of the current video block, The quantization parameter of the current video block, or Prediction information of the current video block.

31. The method of claim 30, wherein the prediction information indicates uni-directional prediction or bi-directional prediction of the current video block.

32. The method of claim 7, further comprising: The number of co-located frames is determined based on a codec tool of the current video block.

33. The method of claim 7, further comprising: A codec tool based on the current video block determines whether a reference frame is a co-located frame of the current frame.

34. The method of claim 32 or claim 33, wherein the codec tools of the current video block include at least one of: Conventional codec tools, Template matching codec tool, Combined Inter and Intra Prediction (CIIP) codec, Merge with Motion Vector Difference (MMVD) codec, Geometric Partitioning Mode (GPM) codec, Triangulation Partition Mode (TPM) codec tool, Sub-block merging mode codec tool, Advanced Motion Vector Prediction (AMVP) codec, AMVP combined codec tool, Affine codec tools, Bidirectional Optical Flow (BDOF) codec, or Local Illumination Compensation (LIC) codec.

35. The method of any one of claims 7 to 34, wherein the first co-located frame associated with the current video block is a co-located frame associated with another video block, the current video block and the other video block being in at least one of: the current frame, a same slice, or a same tile.

36. The method of any one of claims 7 to 34, wherein a first co-located frame associated with the current video block is not a co-located frame associated with another video block, the current video block and the other video block being in at least one of: the current frame, a same slice, or a same tile.

37. The method of any one of claims 7 to 36, wherein the number of co-located frames associated with the current video block is the same as or different from a second number of co-located frames associated with another video block, the current video block and the other video block being in at least one of: the current frame, the same slice, or the same tile.

38. The method of any one of claims 7 to 36, wherein a first reference frame associated with the current video block is the same as or different from a second reference frame associated with another video block, the first reference frame is a first co-located frame associated with the current video block, the second reference frame is a second co-located frame associated with the another video block, and the current video block and the another video block are in at least one of: the current frame, the same slice, or the same tile.

39. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining a motion shift list of the current video block, wherein motion shift candidates in the motion shift list have a target accuracy; and The conversion is performed based on the motion shift list.

40. The method of claim 39, wherein the motion shift candidates are included in the motion shift list before or after rounding to the target precision.

41. A method according to claim 39 or claim 40, wherein the target precision comprises integer precision.

42. The method according to any one of claims 39 to 41, further comprising: A target motion shift for the current video block is determined based on the motion shift list, the target motion shift being associated with at least one of: Affine control points, Time domain MVP (TMVP), or Sub-block based TMVP (SbTMVP).

43. The method according to any one of claims 39 to 42, further comprising: Whether to determine the motion shift list is determined based on availability of a template for the current video block.

44. The method of claim 33, wherein if the template for the current video block is not available, the motion shift list is not determined.

45. A method for video processing, comprising: For a conversion between a current video block of a video and a bitstream of the video, determining a motion shift list for the current video block; performing a pruning process on the motion shift list based on a pruning threshold; as well as The conversion is performed based on the pruned motion shift list.

46. ​​The method of claim 45, wherein the pruning threshold is associated with a value used in a rate-distortion optimization (RDO) process.

47. The method of claim 45 or claim 46, wherein the pruning process is performed based on the pruning threshold to remove redundant motion shift candidates in the motion shift list.

48. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining a motion shift list of the current video block by traversing a plurality of motion shift candidates in a predefined order; as well as The conversion is performed based on the motion shift list.

49. The method of claim 48, wherein the plurality of motion shift candidates comprises at least one of: Neighboring neighbor motion vector prediction (MVP), adjacent neighboring MVPs at predefined locations, Time domain MVP (TMVP), MVP based on history, Non-adjacent MVPs, The built MVP, Paired MVP, Inherited affine motion vector (MV) candidates, The constructed affine MV candidate, or Sub-block based TMVP (SbTMVP).

50. The method of claim 48 or claim 49, wherein if the number of motion shift candidates in the motion shift list exceeds a threshold number, the determination of the motion shift list is terminated.

51. A method according to any one of claims 48 to 50, wherein the motion shift list is unsorted.

52. The method according to any one of claims 48 to 51, further comprising: A candidate for the current video block is determined based on the motion shift list, the candidate comprising at least one of the following: Affine control point candidates, Temporal Motion Vector Prediction (TMVP) candidate, or Sub-block based TMVP (SbTMVP) candidates.

53. The method of claim 52, wherein determining the candidates for the current video block based on the motion shift list comprises: The candidate is determined based on temporal motion information of a position associated with a motion shift candidate in the motion shift list.

54. The method according to claim 53, wherein the temporal motion information comprises at least one of the following: The motion vector (MV) of the position, or The reference index of the position.

55. The method of claim 54, wherein the MV of the location is scaled and the candidate is determined based on the scaled MV.

56. The method of claim 54, wherein the candidate is determined based on the MV without scaling the MV.

57. The method according to any one of claims 54 to 56, further comprising: determining whether to scale the MV of the position based on a first picture order count (POC) distance between a current frame including the current video block and a co-located frame co-located with the current frame and based on a second POC distance between the co-located frame and a reference frame associated with the current video block, the co-located frame being associated with the motion shift candidate.

58. The method according to any one of claims 53 to 57, further comprising: Another motion information of the current video block is determined based on the temporal motion information.

59. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determine a motion vector prediction (MVP) candidate list of the current video block, the MVP candidate list comprising at least a plurality of sub-block-based temporal motion vector prediction (SbTMVP) candidates, the plurality of SbTMVP candidates being determined based on a plurality of motion shift candidates in at least one motion shift list; Determining a plurality of metrics of candidates in the MVP candidate list, at least one metric of the plurality of metrics being adjusted; reordering the MVP candidate list based on the multiple metrics; as well as The converting is performed based on the reordered MVP candidate list.

60. The method of claim 59, wherein the at least one metric is adjusted to be a sum of a weighted value of the at least one metric and a predefined offset value.

61. The method of claim 59 or claim 60, wherein the MVP candidate list further includes at least one affine candidate.

62. The method according to any one of claims 59 to 61, further comprising: Based on the candidate category of the candidate, it is determined whether to adjust the metric of the candidate in the MVP candidate list.

63. The method of claim 62, wherein at least one metric of at least one affine candidate in the MVP candidate list or at least one SbTMVP candidate in the MVP candidate list is to be adjusted.

64. The method according to any one of claims 59 to 63, further comprising: Whether to adjust the metric of the candidate in the MVP candidate list is determined based on the prediction type of the candidate.

65. The method according to claim 64, wherein the candidate prediction types include at least one of the following: One-way forecast type, or Bidirectional prediction type.

66. The method according to any one of claims 59 to 65, wherein the MVP candidate list is at a sub-codec unit (sub-CU) level.

67. The method of any one of claims 59 to 66, wherein the plurality of metrics comprises a plurality of template matching costs or a plurality of bilateral matching costs.

68. The method of any one of claims 1 to 67, wherein the converting comprises encoding the current video block into the bitstream.

69. The method of any one of claims 1 to 67, wherein the converting comprises decoding the current video block from the bitstream.

70. An apparatus for video processing, comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to perform the method of any one of claims 1 to 69.

71. A non-transitory computer-readable storage medium storing instructions for causing a processor to execute the method according to any one of claims 1 to 69.

72. A non-transitory computer-readable recording medium storing a bit stream of a video, the bit stream being generated by a method performed by an apparatus for video processing, wherein the method comprises: determining, based on temporal information of a current frame including the current video block, whether a candidate frame associated with a current video block of the video is a co-located frame, the co-located frame being co-located with the current frame; as well as The bitstream is generated based on the determination.

73. A method for storing a bitstream of a video, comprising: determining whether a candidate frame associated with a current video block of the video is a co-located frame based on temporal information of a current frame including the current video block, the co-located frame being co-located with the current frame; generating the bitstream based on the determination; as well as The bit stream is stored in a non-transitory computer-readable recording medium.

74. A non-transitory computer-readable recording medium storing a bit stream of a video, the bit stream being generated by a method performed by an apparatus for video processing, wherein the method comprises: determining a set of co-located frames associated with a current video block of the video, the current video block being in a current frame co-located with a plurality of co-located frames, the number of co-located frames in the set of co-located frames being based on codec information associated with the current video block; as well as The bitstream is generated based on the set of co-located frames.

75. A method for storing a bitstream of a video, comprising: determining a set of co-located frames associated with a current video block of the video, the current video block being in a current frame co-located with a plurality of co-located frames, the number of co-located frames in the set of co-located frames being based on codec information associated with the current video block; generating the bitstream based on the set of co-located frames; as well as The bit stream is stored in a non-transitory computer-readable recording medium.

76. A non-transitory computer-readable recording medium storing a bit stream of a video generated by a method performed by an apparatus for video processing, wherein the method comprises: determining a motion shift list for a current video block of the video, wherein motion shift candidates in the motion shift list have a target accuracy; as well as The bitstream is generated based on the motion shift list.

77. A method for storing a bitstream of a video, comprising: determining a motion shift list for a current video block of the video, wherein motion shift candidates in the motion shift list have a target accuracy; generating the bitstream based on the motion shift list; as well as The bit stream is stored in a non-transitory computer-readable recording medium.

78. A non-transitory computer-readable recording medium storing a bit stream of a video, the bit stream being generated by a method performed by an apparatus for video processing, wherein the method comprises: determining a motion shift list for a current video block of the video; performing a pruning process on the motion shift list based on a pruning threshold; as well as The bitstream is generated based on the pruned motion shift list.

79. A method for storing a bitstream of a video, comprising: determining a motion shift list for a current video block of the video; performing a pruning process on the motion shift list based on a pruning threshold; generating the bitstream based on the pruned motion shift list; as well as The bit stream is stored in a non-transitory computer-readable recording medium.

80. A non-transitory computer-readable recording medium storing a bit stream of a video, the bit stream being generated by a method performed by an apparatus for video processing, wherein the method comprises: determining a motion shift list for a current video block of the video by traversing a plurality of motion shift candidates in a predefined order; as well as The bitstream is generated based on the motion shift list.

81. A method for storing a bitstream of a video, comprising: determining a motion shift list for a current video block of the video by traversing a plurality of motion shift candidates in a predefined order; as well as generating the bitstream based on the motion shift list; as well as The bit stream is stored in a non-transitory computer-readable recording medium.

82. A non-transitory computer-readable recording medium storing a bit stream of a video, the bit stream being generated by a method performed by an apparatus for video processing, wherein the method comprises: Determine a motion vector prediction (MVP) candidate list for a current video block of the video, the MVP candidate list comprising at least a plurality of sub-block based temporal motion vector prediction (SbTMVP) candidates, the plurality of SbTMVP candidates being determined based on a plurality of motion shift candidates in at least one motion shift list; Determining a plurality of metrics of candidates in the MVP candidate list, at least one metric of the plurality of metrics being adjusted; reordering the MVP candidate list based on the multiple metrics; as well as The bitstream is generated based on the reordered MVP candidate list.

83. A method for storing a bitstream of a video, comprising: Determine a motion vector prediction (MVP) candidate list for a current video block of the video, the MVP candidate list comprising at least a plurality of sub-block based temporal motion vector prediction (SbTMVP) candidates, the plurality of SbTMVP candidates being determined based on a plurality of motion shift candidates in at least one motion shift list; Determining a plurality of metrics of candidates in the MVP candidate list, at least one metric of the plurality of metrics being adjusted; reordering the MVP candidate list based on the multiple metrics; generating the bitstream based on the reordered MVP candidate list; as well as The bit stream is stored in a non-transitory computer-readable recording medium.