Method and device for video processing and medium
By optimizing the construction of MVP list based on template matching cost sorting, the problem of inefficient video encoding and decoding in the prior art is solved, and more efficient time-domain motion information utilization and encoding and decoding efficiency are achieved.
Patent Information
- Application Number
- CN202380052209.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-07-06
- Filing Date
- 2023-06-30
- Publication Date
- 2025-02-21
AI Technical Summary
The existing video encoding and decoding technology has low encoding and decoding efficiency, making it difficult to effectively utilize time domain motion information, resulting in inefficient construction of MVP candidate lists.
A method of comprehension of MVP list based on template matching cost sorting is proposed. By using the matching cost in the reconstruction template area to optimize MVP selection, dynamically adjust the construction order of candidate lists, and improve the efficiency of MVP lists.
By optimizing the sorting and construction order of MVP candidates, the encoding and decoding efficiency of video encoding and decoding is improved, the time domain motion information is fully utilized, and the priority of low-quality adjacent candidates is reduced.
Smart Images

Figure CN119497873A_ABST
Abstract
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to U.S. Provisional Application No. 63 / 358,859, filed on July 6, 2022, which is assigned to the assignee of this application, and the entire contents of the U.S. Provisional Application are incorporated by reference into this application. Technical Field
[0002] Embodiments of the present disclosure generally relate to video coding techniques, and more particularly, to video coding based on co-located frames. Background Art
[0003] 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
[0004] The embodiments of the present disclosure provide a solution for video processing.
[0005] 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, determining whether a candidate frame associated with the current video block is a co-located frame based on a frame type of the candidate frame, the co-located frame being co-located with a frame including the current video block; and performing conversion based on the determination. In this way, the candidate frame can be determined to be a co-located frame based on the frame type, thereby improving codec validity and codec efficiency.
[0006] 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 plurality of co-located frames co-located with a frame including the current video block, information of at least one of the plurality of co-located frames not existing in the bitstream; and performing conversion based on the plurality of co-located frames. In this way, at least one co-located frame may not be included in the bitstream, thereby improving codec validity and codec efficiency.
[0007] In a third 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 plurality of co-located frames co-located with a frame including the current video block, a plurality of syntax elements associated with the plurality of co-located frames being included in the bitstream; and performing conversion based on the plurality of co-located frames. In this way, a plurality of syntax elements can be included in the bitstream to identify the plurality of co-located frames.
[0008] In a fourth aspect, another method for video processing is proposed. The method includes: determining at least one motion shift list for a current video block for a conversion between a current video block of a video and a bitstream of the video; determining a target motion shift for the current video block based on the at least one motion shift list, the target motion shift being associated with at least one of the following: an affine control point, a temporal MVP (TMVP), or a sub-block-based TMVP (SbTMVP); and performing conversion based on the target motion shift. In this way, a motion shift for an affine control point, a TMVP, or a SbTMVP can be determined based on the at least one motion shift list.
[0009] In a fifth 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, or the fourth aspect of the present disclosure.
[0010] In a sixth 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, or the fourth aspect of the present disclosure.
[0011] In a seventh 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, based on a frame type of the candidate frame, 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 a frame including the current video block; and generating a bitstream based on the determination.
[0012] In an eighth aspect, a method for storing a bitstream of a video is provided. The method includes: determining, based on a frame type of the candidate frame, 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 a frame including the current video block; generating a bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.
[0013] 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 generated by a method performed by an apparatus for video processing. The method includes: determining a plurality of co-located frames co-located with a frame including a current video block of the video, information of at least one of the plurality of co-located frames not existing in the bitstream; and generating a bitstream based on the plurality of co-located frames.
[0014] In a tenth aspect, a method for storing a bitstream of a video is provided. The method includes: determining a plurality of co-located frames co-located with a frame including a current video block of the video, information of at least one of the plurality of co-located frames not existing in the bitstream; generating a bitstream based on the plurality of co-located frames; and storing the bitstream in a non-transitory computer-readable recording medium.
[0015] In an eleventh aspect, another non-transitory computer-readable storage medium is provided. The non-transitory computer-readable storage medium stores a bitstream of a video generated by a method performed by an apparatus for video processing. The method includes: determining a plurality of co-located frames co-located with a frame including a current video block of the video, a plurality of syntax elements associated with the plurality of co-located frames being included in a bitstream; and generating a bitstream based on the plurality of co-located frames.
[0016] In a twelfth aspect, a method for storing a bitstream of a video is provided. The method includes: determining a plurality of co-located frames co-located with a frame including a current video block of the video, a plurality of syntax elements associated with the plurality of co-located frames being included in the bitstream; generating a bitstream based on the plurality of co-located frames; and storing the bitstream in a non-transitory computer-readable recording medium.
[0017] 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 at least one motion shift list for a current video block of the video; determining a target motion shift for the current video block based on the at least one motion shift list, the target motion shift being associated with at least one of the following: an affine control point, a temporal MVP (TMVP), or a sub-block-based TMVP (SbTMVP); and generating a bitstream based on the target motion shift.
[0018] In a fourteenth aspect, a method for storing a bitstream of a video is provided. The method includes: determining at least one motion shift list for a current video block of the video; determining a target motion shift for the current video block based on the at least one 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); generating a bitstream based on the target motion shift; and storing the bitstream in a non-transitory computer-readable recording medium.
[0019] 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
[0020] 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.
[0021] Figure 1 A block diagram showing an example video encoding and decoding system according to some embodiments of the present disclosure is shown;
[0022] Figure 2 A block diagram illustrating a first example video encoder according to some embodiments of the present disclosure is shown;
[0023] Figure 3 A block diagram of an example video decoder according to some embodiments of the present disclosure is shown;
[0024] Figure 4 The positions of spatial and temporal neighboring blocks used in Advanced Motion Vector Prediction (AMVP) or merge candidate list structure are shown;
[0025] Figure 5 An example diagram illustrating the locations of non-neighboring candidates in an ECM is shown;
[0026] Figure 6 An example diagram showing template matching of a search area around an initial MV;
[0027] Figure 7 An example diagram showing a template and a corresponding reference template;
[0028] Figure 8 An 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;
[0029] Fig. 9An example diagram showing an example of locations of non-adjacent temporal motion vector prediction (TMVP) candidates is shown;
[0030] Fig.10 shows deriving a sub-CU motion field obtained by applying motion shifting based on neighboring motion information;
[0031] Fig.11 An example diagram showing an example of a display template;
[0032] Fig.12 A flowchart of a method for video processing according to some embodiments of the present disclosure is shown;
[0033] Fig.13 Another flow chart of a method for video processing according to some embodiments of the present disclosure is shown;
[0034] Fig.14 Another flow chart of a method for video processing according to some embodiments of the present disclosure is shown;
[0035] Fig.15 Another flow chart showing a method for video processing according to some embodiments of the present disclosure; and
[0036] Fig.16 A block diagram of a computing device is shown in which various embodiments of the present disclosure may be implemented.
[0037] Throughout the drawings, same or similar reference numbers generally refer to same or similar elements. DETAILED DESCRIPTION
[0038] 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.
[0039] 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.
[0040] 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.
[0041] 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.
[0042] 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
[0043] 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.
[0044] 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] After reconstruction unit 212 reconstructs the video block, a loop filtering operation may be performed to reduce video blocking artifacts in the video block.
[0070] 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.
[0071] 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.
[0072] 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.
[0073] 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.
[0074] 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.
[0075] 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.
[0076] 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.
[0077] 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-coded 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.
[0078] 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.
[0079] 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.
[0080] 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 bit stream. 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 is shown showing an example of a template. 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, the individual / joint groups A are first reordered based on a first cost (e.g., template matching cost) and the group with the largest cost (CL) in A is identified. The candidates of group A are 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). Group B is then re-ranked 2 to K times based on the first cost (or other cost metric) sorting. Finally, candidates in groups A (except CL) and B (including CL) are included in the MVP list according to the sorting order. 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 list performs a second pass of 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 as the last or any other entry. List. 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 HMVP is reordered and subsequently appended to the MVP list. In this case, at least one position is reserved for a virtual candidate (e.g., a paired MVP and / or a zero MVP), and the virtual 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 limited 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 The 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, in addition, the threshold for a particular pass or group is determined by decoding information, including but not limited to block size, the codec tools used (e.g., TM, DMVR, adaptive DMVR, CIIP, AFFINE, and AMVP merged). 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 first N The reference frame with the index is selected as the co-located frame. 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 S K is any candidate in S. Then: a) S K The frame that can be selected as the same position frame may depend on the frame to be coded and the S K The POC distance between them. 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), S K Can be selected as a co-located frame. b) S K The selection 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) In one example, multiple metrics are combined to determine which one to use 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. 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 number of TMVPs in a certain co-located frame 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. 12. 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. 13. The proposed co-located frame can be used in any coding 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 first M (M>=0) candidates are included in the final merged candidate list according to some specific metrics. i. The types of MVP candidates in the joint group include but are not limited to adjacent candidates, non-adjacent candidates, HMVP, zero candidates, constructed candidates, 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. 14. 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. 15. 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, 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. d) In one example, the MVP candidate list constructed for some certain coding modes (eg, conventional / CIIP / MMVD / GPM / TPM) can be reused to obtain motion shift candidates. 16. 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. 17. 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, only one motion shift list is constructed to derive SbTMVP / AFFINE control point / TMVP candidates. c) 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. d) 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 built 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 displacement list is constructed by including motion candidates with MVs in any reference list pointing to the current collocated frame. Specifically, first, the motion information of potential motion displacement candidates is obtained. If the corresponding MV points to the current collocated frame, after performing redundancy check, the MV is inserted into the motion displacement list constructed for the current collocated frame. 18. The constructed motion displacement list can be sorted based on at least one specific metric. a) In one example, the metric can be a template matching cost or a bilateral matching cost. b) In one example, the reference template is in the collocated frame, and the current template is in the frame to be coded / decoded, and then the template matching cost is calculated for some or all of the motion displacement candidates. c) In one example, the motion displacement list can be sorted based on the template matching of the motion displacement candidates within the list. d) In one example, a Q (Q >= 1) reordering process can be performed on the motion displacement 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, first a candidate group is constructed, and then the first K (0 < K < Q) passes of reordering are performed to select some candidates in the motion displacement list. The last pass of reordering is performed to reorder all candidates in the motion displacement list. 19. 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 displacement list are used to derive SbTMVP / AFFINE control points / TMVP candidates. b) In one example, at most Q (Q > 0) motion displacements are used to derive SbTMVP / AFFINE control points / TMVP candidates in a motion displacement list. c) In one example, no motion displacements are used to derive SbTMVP / AFFINE control points / TMVP candidates in some motion displacement lists. 20. The top M (M > 0) candidates with the minimum metric cost in each motion displacement list can be used to derive SbTMVP / AFFINE control points / TMVP candidates. a) In one example, M can be the same or different values for each list. b) 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. c) 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. 21. Before motion shifting is used to derive SbTMVP / AFFINE control points / TMVP candidates, it can first be refined through a template matching process. 22. 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. 23. 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, 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. ii. 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. 24. 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. 25. In one example, multiple motion shifts (denoted as SM0, SM1, and SMn) from the motion shift list may 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 Nmax-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 coding / decoding 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 coding / decoding 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 coding / decoding 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, first, a set of non-adjacent candidates containing at most F (F > 0) candidates is constructed. Then, the candidates in this set are re-ordered based on the template matching cost, and at most 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 SbTMVP candidates are included in the list, the re-ordering process begins. Specifically, the SbTMVP candidates derived from the motion shift of the highest priority reference frame are identified, and the motion shift in the corresponding shift list that is ranked first among them 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.
[0081] 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.
[0082] At block 1210, it is determined whether the candidate frame associated with the current video block is a co-located frame based on the frame type of the candidate frame. The co-located frame is co-located with the frame that includes the current video block.
[0083] At block 1220, conversion is performed based on the determination. 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.
[0084] Method 1200 enables determining a co-located frame for a current video block based on the frame type of the co-located frame. In this way, temporal motion information of the co-located frame can be considered for conversion. Thus, codec effectiveness and codec efficiency can be improved.
[0085] In some embodiments, if the frame type of the candidate frame is an I frame or a P frame, the candidate frame is not determined as a co-located frame.
[0086] In some embodiments, if the frame type of the candidate frame is an I frame or a P frame, the candidate frame is determined to be a co-located frame.
[0087] In some embodiments, the candidate frame may be from at least one of a decoded picture buffer (DPB) or a reference frame list.
[0088] 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 determination is made based on a frame type of the candidate frame 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 a frame including the current video block. A bitstream is generated based on the determination.
[0089] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a determination is made whether a candidate frame associated with a current video block of the video is a co-located frame based on a frame type of the candidate frame. The co-located frame is co-located with a frame including the current video block. A bitstream is generated based on the determination. The bitstream is stored in a non-transitory computer-readable recording medium.
[0090] 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.
[0091] At block 1310, a plurality of co-located frames that are co-located with a frame that includes a current video block are determined. Information of at least one of the plurality of co-located frames is not present in the bitstream.
[0092] At block 1320, a conversion is performed based on the plurality of co-located frames. 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.
[0093] Method 1300 enables including some co-located frames in a bitstream without including other co-located frames in the bitstream. In this way, no additional information needs to be transmitted. Therefore, the coding effectiveness and coding efficiency can be improved.
[0094] In some embodiments, the method 1300 further includes: determining information of at least one co-located frame based on a predefined rule.
[0095] In some embodiments, further information of another co-located frame of the plurality of co-located frames is included in at least one syntax element.
[0096] In some embodiments, the further information of the further co-located frame at least indicates a first reference frame list including the further co-located frame.
[0097] In some embodiments, the further information of the further co-located frame further indicates a reference index of the further co-located frame in the first reference frame list.
[0098] In some embodiments, if the number of frames in the first reference frame list is less than or equal to a threshold, a reference index of another co-located frame in the first reference frame list is not included in the bitstream.
[0099] In some embodiments, if no reference frame is included in the second reference frame list, list information of the second reference frame list is not included in the bitstream.
[0100] 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 plurality of co-located frames co-located with a frame of a current video block of the video are determined. Information of at least one of the plurality of co-located frames does not exist in the bitstream. A bitstream is generated based on the plurality of co-located frames.
[0101] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a plurality of co-located frames co-located with a frame of a current video block of the video are determined. Information of at least one of the plurality of co-located frames does not exist in the bitstream. A bitstream is generated based on the plurality of co-located frames. The bitstream is stored in a non-transitory computer-readable recording medium.
[0102] Fig.14A flow chart of a method 1400 for video processing according to an embodiment of the present disclosure is shown. The method 1400 may be implemented for conversion between a current video block of a video and a bit stream of the video.
[0103] At block 1410, a plurality of co-located frames that are co-located with a frame that includes a current video block are determined. A plurality of syntax elements associated with the plurality of co-located frames are included in a bitstream.
[0104] At block 1420, a conversion is performed based on the plurality of co-located frames. 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.
[0105] Method 1400 enables inclusion of multiple syntax elements in a bitstream to identify multiple co-located frames. In this way, each syntax element can specify a different co-located frame, thereby improving codec effectiveness and codec efficiency.
[0106] In some embodiments, the plurality of syntax elements include a first syntax element and a second syntax element associated with a first co-located frame of the plurality of co-located frames, the first syntax element and the second syntax element being different.
[0107] In some embodiments, the first co-located frame is identified by a first syntax element and a second syntax element, and the first syntax element and the second syntax element are associated with different reference frame lists. That is, the same co-located frame can be identified by different syntax elements, and the different syntax elements can be in different reference frame lists.
[0108] In some embodiments, the first co-located frame is included in the bitstream multiple times, and at least one of the first temporal information or the second temporal information of the first co-located frame is included in the bitstream, the first temporal information is associated with a first reference frame list including the first co-located frame, and the second temporal information is associated with a second reference frame list including the first co-located frame. For example, when the same positioning frame is used more than once, MVs in different reference frame lists may be used.
[0109] In some embodiments, the first temporal information includes a first motion vector in a first reference frame list, and the second temporal information includes a second motion vector in a second reference frame list.
[0110] In some embodiments, the first motion vector and the second motion vector are included in the bitstream in a combined manner. For example, the MVs in the two lists may be used in a combined manner.
[0111] In some embodiments, determining a plurality of co-located frames includes: if it is determined that the number of the plurality of candidate frames of the current video block is less than a predefined number, adding the plurality of candidate frames to the plurality of co-located frames; and based on the number of the plurality of candidate frames and the predefined number, selecting at least one candidate frame from the plurality of candidate frames; and adding the at least one candidate frame to the plurality of co-located frames.
[0112] In some embodiments, determining multiple co-located frames includes: if it is determined that the candidate frame is different from each of the multiple co-located frames, determining whether the candidate frame satisfies a predefined condition; and if it is determined that the candidate frame satisfies the predefined condition, adding the candidate frame to the multiple co-located frames.
[0113] In some embodiments, the method 1400 further includes: determining a priority of a co-located frame in the plurality of co-located frames based on a reference index of the co-located frame in the reference frame list.
[0114] In some embodiments, a first collocated frame and a second collocated frame in the plurality of collocated frames are from the same reference frame list. If a first reference index of the first collocated frame in the reference frame list is less than a second reference index of the second collocated frame in the reference frame list, a first priority of the first collocated frame is higher than a second priority of the second collocated frame.
[0115] In some embodiments, a first co-located frame in the plurality of co-located frames is from a first reference frame list, and a second co-located frame in the plurality of co-located frames is from a second reference frame list different from the first reference frame list.
[0116] In some embodiments, if a first priority of a first co-located frame in the plurality of co-located frames is higher than a threshold, the first co-located frame is from one of the following: the first reference frame list or the second reference frame list.
[0117] In some embodiments, if a second priority level of a second co-located frame in the plurality of co-located frames is lower than the first priority level, then the third reference frame list from which the second co-located frame comes depends on information about the first co-located frame.
[0118] In some embodiments, if the first co-located frame is from the first reference frame list, the third reference frame list is an item in the first reference frame list or the second reference frame list.
[0119] In some embodiments, if the first co-located frame is from the second reference frame list, the third reference frame list is the second reference frame list.
[0120] In some embodiments, if the first co-located frame is from the second reference frame list, the third reference frame list is an item in the first reference frame list or the second reference frame list.
[0121] 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 plurality of co-located frames co-located with a frame including a current video block of the video are determined. A plurality of syntax elements associated with the plurality of co-located frames are included in the bitstream. A bitstream is generated based on the plurality of co-located frames.
[0122] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, a plurality of co-located frames co-located with a frame of a current video block of the video are determined. A plurality of syntax elements associated with the plurality of co-located frames are included in the bitstream. A bitstream is generated based on the plurality of co-located frames. The bitstream is stored in a non-transitory computer-readable recording medium.
[0123] 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.
[0124] At block 1510, at least one motion shift list for a current video block is determined. At block 1520, a target motion shift for the current video block is determined based on the at least one motion shift list. The target motion shift is associated with at least one of an affine control point, a temporal MVP (TMVP), or a sub-block based TMVP (SbTMVP).
[0125] At block 1530, a conversion is performed based on the target motion shift. 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.
[0126] The method 1500 enables the determination of the motion shift of the current video block based on at least one motion shift list, thereby improving the coding effectiveness and coding efficiency.
[0127] In some embodiments, the candidate motion shifts in the at least one motion shift list include a motion vector (MV) pointing to a co-located frame of the current video block.
[0128] In some embodiments, at least one of an affine control point, a TMVP, or a SbTMVP is located in a co-located frame based on the MV.
[0129] In some embodiments, method 1500 further includes: determining a candidate for the current video block based on at least one motion shift list, the candidate comprising at least one of the following: an affine control point candidate, a TMVP candidate, or a SbTMVP candidate.
[0130] In some embodiments, the candidate is determined based on a single motion shift list of the at least one motion shift list.
[0131] In some embodiments, the method 1500 further comprises: determining a candidate motion shift in at least one motion shift list based on the coded block or the coded coding unit (CU).
[0132] In some embodiments, determining a candidate motion shift comprises: determining motion information of a coded block or a coded CU; determining whether a motion vector (MV) associated with the motion information points to at least one co-located frame of the current video block; and adding the MV to at least one motion shift list as a candidate motion shift.
[0133] In some embodiments, the MV is added to the at least one motion shift list after redundancy checking with another candidate motion shift in the at least one motion shift list.
[0134] In some embodiments, the candidate motion shifts include neighboring candidates from neighboring blocks or neighboring CUs.
[0135] In some embodiments, the neighboring candidate is in at least one of: a predefined position or a neighboring position of the current video block.
[0136] In some embodiments, the candidate motion shifts include non-neighboring candidates from non-neighboring blocks or non-neighboring CUs.
[0137] In some embodiments, the non-adjacent candidate is in at least one of: a predefined position or a non-adjacent position of the current video block.
[0138] In some embodiments, the candidate motion shifts are from a motion vector (MV) list that includes historical motion information of the encoded block.
[0139] In some embodiments, the MV list comprises a history-based motion vector prediction (HMVP) list.
[0140] In some embodiments, the candidate motion shifts include virtual candidates.
[0141] In some embodiments, the virtual candidate includes at least one of: a zero candidate or a constructed candidate.
[0142] In some embodiments, the candidate motion shifts are determined using at least one of the following codec modes: a normal mode, a combined inter- and intra-prediction (CIIP) codec, a merge with motion vector differences (MMVD) codec, a geometric partitioning mode (GPM) codec, or a triangular partitioning mode (TPM) codec.
[0143] In some embodiments, the number of candidates in each motion shift list of the at least one motion shift list is less than or equal to a threshold number.
[0144] In some embodiments, a first number of candidates is selected from a first motion shift list of the at least one motion shift list and a second number of candidates is selected from a second motion shift list of the at least one motion shift list, the first number and the second number being the same or different.
[0145] In some embodiments, the number of at least one motion shift list is based on the number of co-located frames of the current video block.
[0146] In some embodiments, the number of at least one motion shift list is the number of co-located frames.
[0147] In some embodiments, determining at least one motion shift list comprises: for a co-located frame of the current video block, adding a motion candidate associated with a motion vector (MV) in a reference list to a corresponding motion shift list of the at least one motion shift list, the MV pointing to the co-located frame.
[0148] In some embodiments, after redundancy checking, the motion candidate is added to a motion shift list.
[0149] In some embodiments, the at least one motion shift list comprises a single motion shift list.
[0150] In some embodiments, determining at least one motion shift list includes: determining motion information of a candidate motion shift of the current video block, the motion information indicating a motion vector (MV) in a reference picture list; and if it is determined that the MV points to at least one co-located frame of the current video block, adding the candidate motion shift to the at least one motion shift list after a redundancy check.
[0151] In some embodiments, at least one candidate for the current video block is included in a motion vector prediction (MVP) candidate list, the MVP candidate list is a sub-codec unit (sub-CU) level or a CU level, and the at least one candidate includes at least one of the following: an affine control point candidate, a TMVP candidate, or a SbTMVP candidate.
[0152] In some embodiments, the at least one candidate is determined based on at least a portion of at least one motion shift list.
[0153] In some embodiments, the at least one candidate is determined based on a set of motion shift candidates in the at least one motion shift list, the number of motion shift candidates in the set of motion shift candidates being less than or equal to a threshold number.
[0154] In some embodiments, at least one candidate is determined without using one of the at least one motion shift lists.
[0155] In some embodiments, the method 1500 further comprises: determining a group of motion shift candidates from the at least one motion shift list based on respective metrics of the motion shift candidates in the at least one motion shift list; and determining at least one candidate based on the group of motion shift candidates.
[0156] In some embodiments, a set of motion shift candidates includes a first number of motion shift candidates from a first motion shift list of at least one motion shift list and a second number of motion shift candidates from a second motion shift list of at least one motion shift list, the first number and the second number being the same or different.
[0157] In some embodiments, method 1500 further includes: reordering at least one candidate.
[0158] In some embodiments, a predefined number of candidates of the at least one candidate are included in the MVP candidate list.
[0159] In some embodiments, determining at least one candidate comprises: comparing a first cost of a first motion shift candidate from a first motion shift list with a second cost of a second motion shift candidate from a second motion shift list; and if it is determined that the first cost is less than the second cost, determining at least one candidate based on the first motion shift candidate.
[0160] In some embodiments, a first index of a first motion shift candidate in the first motion shift list is the same as a second index of a second motion shift candidate in the second motion shift list.
[0161] In some embodiments, the method 1500 further includes: refining the object motion shift based on a template matching process; and determining at least one candidate based on the refined object motion shift.
[0162] In some embodiments, at least one candidate is determined based on the target motion shift without refining the target motion shift.
[0163] 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 this aspect, at least one motion shift list of a current video block of the video is determined. A target motion shift of the current video block is determined based on at least one motion shift list. 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). A bitstream is generated based on the target motion shift.
[0164] According to some other embodiments of the present disclosure, a method for storing a bitstream of a video is provided. In the method, at least one motion shift list of a current video block of the video is determined. A target motion shift of the current video block is determined based on the at least one motion shift list. 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). A bitstream is generated based on the target motion shift. The bitstream is stored in a non-transitory computer readable recording medium.
[0165] It should be understood that the above methods 1200, 1300, 1400 and / or 1500 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.
[0166] By using the methods 1200, 1300, 1400, and 1500 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 the encoding and decoding efficiency can be improved.
[0167] Embodiments of the present disclosure may be described according to the following clauses, features of which may be combined in any reasonable way.
[0168] 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, based on a frame type of the candidate frame, whether the candidate frame associated with the current video block is a co-located frame, the co-located frame being co-located with a frame including the current video block; and performing the conversion based on the determination.
[0169] Clause 2. The method of clause 1, wherein the frame type of the candidate frame is an I frame or a P frame, and the candidate frame is not determined to be the co-located frame.
[0170] Clause 3. The method of clause 1, wherein the frame type of the candidate frame is an I frame or a P frame, and the candidate frame is determined to be the co-located frame.
[0171] Clause 4. A method according to any of clauses 1-3, wherein the candidate frame is from at least one of a decoded picture buffer (DPB) or a reference frame list.
[0172] Item 5. A method for video processing, comprising: for conversion between a current video block of a video and a bitstream of the video, determining a plurality of co-located frames that are co-located with a frame including the current video block, information of at least one of the plurality of co-located frames not existing in the bitstream; and performing the conversion based on the plurality of co-located frames.
[0173] Clause 6. The method according to clause 5, further comprising: determining the information of the at least one co-located frame based on a predefined rule.
[0174] Clause 7. A method as described in clause 5 or clause 6, wherein the further information of another co-located frame in the plurality of co-located frames is included in at least one syntax element.
[0175] Clause 8. The method according to clause 7, wherein the further information of the further co-located frame indicates at least a first reference frame list including the further co-located frame.
[0176] Clause 9. The method according to clause 8, wherein the further information of the further co-located frame further indicates a reference index of the further co-located frame in the first reference frame list.
[0177] Clause 10. The method of clause 8, wherein if the number of frames in the first reference frame list is less than or equal to a threshold, then the reference index of the another co-located frame in the first reference frame list is not included in the bitstream.
[0178] Clause 11. A method according to any of clauses 8-10, wherein no reference frames are included in a second reference frame list and list information of the second reference frame list is not included in the bitstream.
[0179] Clause 12. A method for video processing, comprising: for conversion between a current video block of a video and a bitstream of the video, determining a plurality of co-located frames co-located with a frame including the current video block, a plurality of syntax elements associated with the plurality of co-located frames being included in the bitstream; and performing the conversion based on the plurality of co-located frames.
[0180] Clause 13. The method of clause 12, wherein the plurality of syntax elements comprises a first syntax element and a second syntax element associated with a first co-located frame of the plurality of co-located frames, the first syntax element and the second syntax element being different.
[0181] Clause 14. The method of clause 13, wherein the first co-located frame is identified by the first syntax element and the second syntax element, and the first syntax element and the second syntax element are associated with different reference frame lists.
[0182] Clause 15. A method according to Clause 13 or Clause 14, wherein the first co-located frame is included in the bitstream multiple times, and at least one of the first time domain information or the second time domain information of the first co-located frame is included in the bitstream, the first time domain information is associated with a first reference frame list including the first co-located frame, and the second time domain information is associated with a second reference frame list including the first co-located frame.
[0183] Clause 16. The method of clause 15, wherein the first temporal information comprises a first motion vector in the first reference frame list, and the second temporal information comprises a second motion vector in the second reference frame list.
[0184] Clause 17. The method of clause 16, wherein the first motion vector and the second motion vector are included in the bitstream in a combined manner.
[0185] Clause 18. A method according to any one of clauses 12-17, wherein determining the multiple co-located frames includes: if it is determined that the number of multiple candidate frames for the current video block is less than a predefined number, adding the multiple candidate frames to the multiple co-located frames; and based on the number of the multiple candidate frames and the predefined number, selecting at least one candidate frame from the multiple candidate frames; and adding the at least one candidate frame to the multiple co-located frames.
[0186] Clause 19. A method according to any one of clauses 12-18, wherein determining the multiple co-located frames includes: if it is determined that the candidate frame is different from each of the multiple co-located frames, determining whether the candidate frame satisfies a predefined condition; and if it is determined that the candidate frame satisfies the predefined condition, adding the candidate frame to the multiple co-located frames.
[0187] Clause 20. The method according to any one of clauses 12-19 further comprises: determining a priority of a co-located frame among the plurality of co-located frames based on a reference index of the co-located frame in a reference frame list.
[0188] Clause 21. A method according to any one of clauses 12-20, wherein a first co-located frame and a second co-located frame among the multiple co-located frames are from the same reference frame list, a first reference index of the first co-located frame in the reference frame list is less than a second reference index of the second co-located frame in the reference frame list, and a first priority of the first co-located frame is higher than a second priority of the second co-located frame.
[0189] Clause 22. A method according to any of clauses 12-20, wherein a first co-located frame in the plurality of co-located frames is from a first reference frame list and a second co-located frame in the plurality of co-located frames is from a second reference frame list different from the first reference frame list.
[0190] Clause 23. A method according to any one of clauses 12-20, wherein if a first priority of a first co-located frame in the plurality of co-located frames is above a threshold, the first co-located frame is from one of: a first reference frame list or a second reference frame list.
[0191] Clause 24. The method of clause 23, wherein if a second priority of a second co-located frame in the plurality of co-located frames is lower than the first priority, a third reference frame list from which the second co-located frame comes depends on information about the first co-located frame.
[0192] Clause 25. The method of clause 24, wherein if the first co-located frame is from the first reference frame list, the third reference frame list is an item in the first reference frame list or the second reference frame list.
[0193] Clause 26. The method of clause 24, wherein if the first co-located frame is from the second reference frame list, the third reference frame list is the second reference frame list.
[0194] Clause 27. The method of clause 24, wherein if the first co-located frame is from the second reference frame list, the third reference frame list is an item in the first reference frame list or the second reference frame list.
[0195] Clause 28. A method for video processing, comprising: determining at least one motion shift list for a conversion between a current video block of a video and a bitstream of the video; determining a target motion shift for the current video block based on the at least one motion shift list, the target motion shift being associated with at least one of: an affine control point, a temporal motion vector prediction (TMVP), or a sub-block based TMVP (SbTMVP); and performing the conversion based on the target motion shift.
[0196] Clause 29. The method of clause 28, wherein the candidate motion shifts in the at least one motion shift list comprise motion vectors (MVs) pointing to a co-located frame of the current video block.
[0197] Clause 30. The method of clause 29, wherein at least one of the affine control point, the TMVP, or the SbTMVP is located in the co-located frame based on the MV.
[0198] Clause 31. The method according to any one of clauses 28-30 further comprises: determining a candidate for the current video block based on the at least one motion shift list, the candidate comprising at least one of the following: an affine control point candidate, a TMVP candidate, or a SbTMVP candidate.
[0199] Clause 32. The method of clause 31, wherein the candidate is determined based on a single motion shift list of the at least one motion shift list.
[0200] Clause 33. The method of any of clauses 28-32, further comprising determining a candidate motion shift in the at least one motion shift list based on a coded block or a coded codec unit (CU).
[0201] Clause 34. A method according to clause 33, wherein determining the candidate motion shift comprises: determining motion information of the encoded block or the encoded CU; determining whether a motion vector (MV) associated with the motion information points to at least one co-located frame of the current video block; and adding the MV to the at least one motion shift list as the candidate motion shift.
[0202] Clause 35. The method of clause 34, wherein the MV is added to the at least one motion shift list after redundancy checking with another candidate motion shift in the at least one motion shift list.
[0203] Clause 36. The method of clause 33, wherein the candidate motion shift comprises a neighboring candidate from a neighboring block or a neighboring CU.
[0204] Clause 37. The method of clause 36, wherein the neighboring candidate is in at least one of: a predefined position or a neighboring position of the current video block.
[0205] Clause 38. The method of clause 33, wherein the candidate motion shifts comprise non-neighboring candidates from non-neighboring blocks or non-neighboring CUs.
[0206] Clause 39. The method of clause 38, wherein the non-adjacent candidate is in at least one of: a predefined position or a non-adjacent position of the current video block.
[0207] Clause 40. The method of clause 33, wherein the candidate motion shift is from a motion vector (MV) list, the MV list comprising historical motion information of a coded block.
[0208] Clause 41. The method of clause 40, the method of claim 40, wherein the MV list comprises a history-based motion vector prediction (HMVP) list.
[0209] Clause 42. The method of any of clauses 33-41, wherein the candidate motion shifts comprise virtual candidates.
[0210] Clause 43. The method of clause 42, wherein the virtual candidate comprises at least one of: a zero candidate or a constructed candidate.
[0211] Clause 44. A method according to any one of clauses 33-43, wherein the candidate motion shift is determined by using at least one of the following codec modes: normal mode, combined inter-frame and intra-frame prediction (CIIP) codec, merge with motion vector difference (MMVD) codec, geometric partitioning mode (GPM) codec, or triangular partitioning mode (TPM) codec.
[0212] Clause 45. The method of any of clauses 28-44, wherein the number of candidates in each motion shift list of the at least one motion shift list is less than or equal to a threshold number.
[0213] Clause 46. A method according to any one of clauses 28-45, wherein a first number of candidates is selected from a first motion shift list in the at least one motion shift list, and a second number of candidates is selected from a second motion shift list in the at least one motion shift list, the first number and the second number being the same or different.
[0214] Clause 47. The method of any of clauses 28-46, wherein the number of the at least one motion shift list is based on the number of co-located frames of the current video block.
[0215] Clause 48. The method of clause 47, wherein the number of the at least one motion shift list is the number of the co-located frames.
[0216] Clause 49. A method according to clause 47 or clause 48, wherein determining the at least one motion shift list comprises: for a co-located frame of the current video block, adding a motion candidate associated with a motion vector (MV) in a reference list to a corresponding motion shift list of the at least one motion shift list, the MV pointing to the co-located frame.
[0217] Clause 50. The method of clause 49, wherein after redundancy checking, the motion candidate is added to the motion shift list.
[0218] Clause 51. The method of any of clauses 28-46, wherein the at least one motion shift list comprises a single motion shift list.
[0219] Clause 52. A method according to any one of clauses 28-51, wherein determining the at least one motion shift list comprises: determining motion information of a candidate motion shift of the current video block, the motion information indicating a motion vector (MV) in a reference picture list; and if it is determined that the MV points to at least one co-located frame of the current video block, adding the candidate motion shift to the at least one motion shift list after a redundancy check.
[0220] Clause 53. A method according to any one of clauses 28-52, wherein at least one candidate for the current video block is included in a motion vector prediction (MVP) candidate list, the MVP candidate list is at a sub-codec unit (sub-CU) level or a CU level, and the at least one candidate includes at least one of the following: an affine control point candidate, a TMVP candidate, or a SbTMVP candidate.
[0221] Clause 54. The method of clause 53, wherein the at least one candidate is determined based on at least a portion of the at least one motion shift list.
[0222] Clause 55. A method according to clause 53 or clause 54, wherein the at least one candidate is determined based on a set of motion shift candidates in the at least one motion shift list, the number of motion shift candidates in the set of motion shift candidates being less than or equal to a threshold number.
[0223] Clause 56. The method of clause 55, the at least one candidate being determined without using one of the at least one motion shift lists.
[0224] Clause 57. The method according to any one of clauses 53-56 further includes: determining a group of motion shift candidates from the at least one motion shift list based on corresponding metrics of the motion shift candidates in the at least one motion shift list; and determining the at least one candidate based on the group of motion shift candidates.
[0225] Clause 58. A method according to Clause 57, wherein the set of motion shift candidates includes a first number of motion shift candidates from a first motion shift list in the at least one motion shift list and a second number of motion shift candidates from a second motion shift list in the at least one motion shift list, and the first number and the second number are the same or different.
[0226] Clause 59. The method according to Clause 57 or Clause 58, further comprising: reordering the at least one candidate.
[0227] Clause 60. The method of Clause 59, wherein a predefined number of the at least one candidate are included in the MVP candidate list.
[0228] Clause 61. A method according to Clause 58, wherein determining the at least one candidate includes: comparing a first cost of a first motion shift candidate from the first motion shift list with a second cost of a second motion shift candidate from the second motion shift list; and if it is determined that the first cost is less than the second cost, determining the at least one candidate based on the first motion shift candidate.
[0229] Clause 62. The method of clause 61, wherein a first index of the first motion shift candidate in the first motion shift list is the same as a second index of the second motion shift candidate in the second motion shift list.
[0230] Clause 63. The method according to any one of clauses 53-62, further comprising: refining the target motion shift based on a template matching process; and determining the at least one candidate based on the refined target motion shift.
[0231] Clause 64. The method of any of clauses 53-62, wherein the at least one candidate is determined based on the target motion shift without refining the target motion shift.
[0232] Clause 65. The method of any of clauses 1-64, wherein the converting comprises encoding the current video block into the bitstream.
[0233] Clause 66. The method of any of clauses 1-64, wherein the converting comprises decoding the current video block from the bitstream.
[0234] Clause 67. 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-66.
[0235] Clause 68. A non-transitory computer-readable storage medium storing instructions for causing a processor to perform the method of any one of Claims 1-66.
[0236] Item 69. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method executed by a video processing device, wherein the method comprises: determining, based on a frame type of the candidate frame, 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 a frame including the current video block; and generating the bitstream based on the determination.
[0237] Clause 70. A method for storing a bitstream of a video, comprising: determining, based on a frame type of the candidate frame, 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 a frame including the current video block; generating the bitstream based on the determination; and storing the bitstream in a non-transitory computer-readable recording medium.
[0238] Item 71. A non-transitory computer-readable recording medium storing a bitstream of a video generated by a method executed by a video processing device, wherein the method comprises: determining a plurality of co-located frames co-located with a frame including a current video block of the video, information of at least one of the plurality of co-located frames not existing in the bitstream; and generating the bitstream based on the plurality of co-located frames.
[0239] Item 72. A method for storing a bitstream of a video, comprising: determining a plurality of co-located frames that are co-located with a frame comprising a current video block of the video, information of at least one of the plurality of co-located frames not existing in the bitstream; generating the bitstream based on the plurality of co-located frames; and storing the bitstream in a non-transitory computer-readable recording medium.
[0240] Clause 73. A non-transitory computer-readable storage medium storing a bitstream of a video generated by a method performed by a device for video processing, wherein the method comprises: determining a plurality of co-located frames co-located with a frame including a current video block of the video, a plurality of syntax elements associated with the plurality of co-located frames being included in the bitstream; and generating the bitstream based on the plurality of co-located frames.
[0241] Clause 74. A method for storing a bitstream of a video, comprising: determining a plurality of co-located frames co-located with a frame including a current video block of the video, a plurality of syntax elements associated with the plurality of co-located frames being included in the bitstream; generating the bitstream based on the plurality of co-located frames; and storing the bitstream in a non-transitory computer-readable recording medium.
[0242] Clause 75. A non-transitory computer-readable storage medium storing a method executed by a device for video processing to generate a bitstream of a video, wherein the method comprises: determining at least one motion shift list for a current video block of the video; determining a target motion shift for the current video block based on the at least one motion shift list, the target motion shift being associated with at least one of: an affine control point, a time domain MVP (TMVP), or a sub-block based TMVP (SbTMVP); and generating the bitstream based on the target motion shift.
[0243] Clause 76. A method for storing a bitstream of a video, comprising: determining at least one motion shift list for a current video block of the video; determining a target motion shift for the current video block based on the at least one motion shift list, the target motion shift being associated with at least one of: an affine control point, a time domain MVP (TMVP), or a sub-block based TMVP (SbTMVP); generating the bitstream based on the target motion shift; and storing the bitstream in a non-transitory computer-readable recording medium. Example Device
[0244] Fig.16 A block diagram of a computing device 1600 is shown in which various embodiments of the present disclosure may be implemented. The computing device 1600 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).
[0245] It should be understood that Fig.16 The computing device 1600 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.
[0246] like Fig.16 As shown, computing device 1600 includes a general computing device 1600. Computing device 1600 may include at least one or more processors or processing units 1610, memory 1620, storage unit 1630, one or more communication units 1640, one or more input devices 1650, and one or more output devices 1660.
[0247] In some embodiments, computing device 1600 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 1600 can support any type of interface to the user (such as a "wearable" circuit device, etc.).
[0248] Processing unit 1610 may be a physical processor or a virtual processor and may implement various processes based on a program stored in memory 1620. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capability of computing device 1600. Processing unit 1610 may also be referred to as a central processing unit (CPU), a microprocessor, a controller, or a microcontroller.
[0249] The computing device 1600 typically includes various computer storage media. Such media can be any media accessible by the computing device 1600, including but not limited to volatile media and non-volatile media, or removable media and non-removable media. The memory 1620 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 1630 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 1600.
[0250] The computing device 1600 may also include additional removable / non-removable storage media, volatile / non-volatile storage media. Fig.16Although 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.
[0251] The communication unit 1640 communicates with another computing device via a communication medium. In addition, the functions of the components in the computing device 1600 can be implemented by a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 1600 can operate in a networked environment using logical connections to one or more other servers, networked personal computers (PCs), or other general network nodes.
[0252] Input device 1650 may be one or more of various input devices, such as a mouse, keyboard, trackball, voice input device, etc. Output device 1660 may be one or more of various output devices, such as a display, speaker, printer, etc. With the aid of communication unit 1640, computing device 1600 may also communicate with one or more external devices (not shown), such as storage devices and display devices, and computing device 1600 may also communicate with one or more devices that enable a user to interact with computing device 1600, or any device that enables computing device 1600 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).
[0253] In some embodiments, some or all components of computing device 1600 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.
[0254] In an embodiment of the present disclosure, the computing device 1600 may be used to implement video encoding / decoding. The memory 1620 may include one or more video encoding / decoding modules 1625 having one or more program instructions. These modules can be accessed and executed by the processing unit 1610 to perform the functions of the various embodiments described herein.
[0255] In an example embodiment performing video encoding, input device 1650 may receive video data as input 1670 to be encoded. The video data may be processed by, for example, video codec module 1625 to generate an encoded bitstream. The encoded bitstream may be provided as output 1680 via output device 1660.
[0256] In an example embodiment performing video decoding, input device 1650 may receive an encoded bitstream as input 1670. The encoded bitstream may be processed by, for example, video codec module 1625 to generate decoded video data. The decoded video data may be provided as output 1680 via output device 1660.
[0257] 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, based on a frame type of the candidate frame, whether the candidate frame associated with the current video block is a co-located frame, the co-located frame being co-located with a frame including the current video block; as well as The converting is performed based on the determination. 2 . The method according to claim 1 , wherein the frame type of the candidate frame is an I frame or a P frame, and the candidate frame is not determined as the co-located frame. 3 . The method according to claim 1 , wherein the frame type of the candidate frame is an I frame or a P frame, and the candidate frame is determined to be the co-located frame.
4. The method according to any one of claims 1-3, wherein the candidate frame is from at least one of a decoded picture buffer (DPB) or a reference frame list.
5. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determine a plurality of co-located frames co-located with a frame including the current video block, wherein information of at least one co-located frame of the plurality of co-located frames does not exist in the bitstream; as well as The converting is performed based on the plurality of co-located frames.
6. The method according to claim 5, further comprising: The information of the at least one co-located frame is determined based on a predefined rule. 7 . The method according to claim 5 , wherein the further information of another co-located frame in the plurality of co-located frames is included in at least one syntax element. 8 . The method according to claim 7 , wherein the another information of the another co-located frame at least indicates a first reference frame list including the another co-located frame. 9 . The method according to claim 8 , wherein the another information of the another co-located frame further indicates a reference index of the another co-located frame in the first reference frame list.
10. The method of claim 8, wherein if the number of frames in the first reference frame list is less than or equal to a threshold, the reference index of the another co-located frame in the first reference frame list is not included in the bitstream.
11. The method according to any one of claims 8 to 10, wherein no reference frame is included in a second reference frame list, and list information of the second reference frame list is not included in the bitstream.
12. A method for video processing, comprising: For conversion between a current video block of a video and a bitstream of the video, determining a plurality of co-located frames co-located with a frame including the current video block, a plurality of syntax elements associated with the plurality of co-located frames being included in the bitstream; as well as The converting is performed based on the plurality of co-located frames.
13. The method of claim 12, wherein the plurality of syntax elements comprises a first syntax element and a second syntax element associated with a first co-located frame of the plurality of co-located frames, the first syntax element and the second syntax element being different.
14. The method of claim 13, wherein the first co-located frame is identified by the first syntax element and the second syntax element, and the first syntax element and the second syntax element are associated with different reference frame lists.
15. A method according to claim 13 or claim 14, wherein the first co-located frame is included in the bitstream multiple times, and at least one of the first time domain information or the second time domain information of the first co-located frame is included in the bitstream, the first time domain information is associated with a first reference frame list including the first co-located frame, and the second time domain information is associated with a second reference frame list including the first co-located frame. 16 . The method of claim 15 , wherein the first temporal information comprises a first motion vector in the first reference frame list, and the second temporal information comprises a second motion vector in the second reference frame list.
17. The method of claim 16, wherein the first motion vector and the second motion vector are included in the bitstream in a combined manner.
18. The method according to any one of claims 12 to 17, wherein determining the plurality of co-located frames comprises: If it is determined that the number of the plurality of candidate frames of the current video block is less than a predefined number, adding the plurality of candidate frames to the plurality of co-located frames; as well as selecting at least one candidate frame from the plurality of candidate frames based on the number of the plurality of candidate frames and the predefined number; as well as The at least one candidate frame is added to the plurality of co-located frames.
19. The method according to any one of claims 12 to 18, wherein determining the plurality of co-located frames comprises: If it is determined that the candidate frame is different from each of the plurality of collocated frames, determining whether the candidate frame satisfies a predefined condition; as well as If it is determined that the candidate frame satisfies the predefined condition, the candidate frame is added to the multiple co-located frames.
20. The method according to any one of claims 12 to 19, further comprising: The priority of the co-located frame among the multiple co-located frames is determined based on the reference index of the co-located frame in the reference frame list.
21. The method according to any one of claims 12-20, wherein a first co-located frame and a second co-located frame among the multiple co-located frames are from the same reference frame list, a first reference index of the first co-located frame in the reference frame list is less than a second reference index of the second co-located frame in the reference frame list, and a first priority of the first co-located frame is higher than a second priority of the second co-located frame.
22. The method of any one of claims 12-20, wherein a first co-located frame of the plurality of co-located frames is from a first reference frame list, and a second co-located frame of the plurality of co-located frames is from a second reference frame list different from the first reference frame list.
23. The method according to any one of claims 12-20, wherein if a first priority of a first co-located frame in the plurality of co-located frames is higher than a threshold, the first co-located frame is from one of: a first reference frame list or a second reference frame list.
24. The method of claim 23, wherein if a second priority of a second co-located frame in the plurality of co-located frames is lower than the first priority, a third reference frame list from which the second co-located frame comes depends on information about the first co-located frame.
25. The method of claim 24, wherein if the first co-located frame is from the first reference frame list, the third reference frame list is an item in the first reference frame list or the second reference frame list.
26. The method of claim 24, wherein if the first co-located frame is from the second reference frame list, the third reference frame list is the second reference frame list.
27. The method of claim 24, wherein if the first co-located frame is from the second reference frame list, the third reference frame list is an item in the first reference frame list or the second reference frame list.
28. A method for video processing, comprising: determining, for a conversion between a current video block of a video and a bitstream of the video, at least one motion shift list for the current video block; A target motion shift for the current video block is determined based on the at least one motion shift list, the target motion shift being associated with at least one of: Affine control points, Temporal Motion Vector Prediction (TMVP), or Sub-block based TMVP (SbTMVP); and The conversion is performed based on the target motion shift.
29. The method of claim 28, wherein candidate motion shifts in the at least one motion shift list comprise motion vectors (MVs) pointing to a co-located frame of the current video block.
30. The method of claim 29, wherein at least one of the affine control points, the TMVP, or the SbTMVP is located in the co-located frame based on the MV.
31. The method according to any one of claims 28 to 30, further comprising: A candidate for the current video block is determined based on the at least one motion shift list, the candidate comprising at least one of the following: Affine control point candidates, TMVP candidate, or SbTMVP candidate.
32. The method of claim 31, wherein the candidate is determined based on a single motion shift list of the at least one motion shift list.
33. The method according to any one of claims 28 to 32, further comprising: Candidate motion shifts in the at least one motion shift list are determined based on a coded block or a coded codec unit (CU).
34. The method of claim 33, wherein determining the candidate motion shift comprises: Determine the coded motion information of the block or the coded motion information of the CU; determining whether a motion vector (MV) associated with the motion information points to at least one co-located frame of the current video block; as well as The MV is added to the at least one motion shift list as the candidate motion shift.
35. The method of claim 34, wherein the MV is added to the at least one motion shift list after redundancy checking with another candidate motion shift in the at least one motion shift list.
36. The method of claim 33, wherein the candidate motion shifts comprise neighboring candidates from neighboring blocks or neighboring CUs.
37. The method of claim 36, wherein the neighboring candidate is in at least one of: a predefined position or a neighboring position of the current video block.
38. The method of claim 33, wherein the candidate motion shifts comprise non-neighboring candidates from non-neighboring blocks or non-neighboring CUs.
39. The method of claim 38, wherein the non-adjacent candidate is in at least one of: a predefined position or a non-adjacent position of the current video block.
40. The method of claim 33, wherein the candidate motion shifts are from a motion vector (MV) list, the MV list comprising historical motion information of encoded blocks.
41. The method of claim 40, wherein the MV list comprises a history-based motion vector prediction (HMVP) list.
42. The method of any one of claims 33-41, wherein the candidate motion shifts comprise virtual candidates.
43. The method of claim 42, wherein the virtual candidate comprises at least one of: a zero candidate or a constructed candidate.
44. The method of any one of claims 33-43, wherein the candidate motion shifts are determined by using at least one of the following codec modes: Normal mode, Combined Inter and Intra Prediction (CIIP) codec, Merge with Motion Vector Difference (MMVD) codec, The Geometric Partitioning Mode (GPM) codec, or Triangulation Partition Mode (TPM) codec.
45. The method of any one of claims 28-44, wherein the number of candidates in each motion shift list of the at least one motion shift list is less than or equal to a threshold number.
46. A method according to any one of claims 28-45, wherein a first number of candidates is selected from a first motion shift list in the at least one motion shift list, and a second number of candidates is selected from a second motion shift list in the at least one motion shift list, and the first number and the second number are the same or different.
47. The method of any one of claims 28-46, wherein the number of the at least one motion shift list is based on a number of co-located frames of the current video block.
48. The method of claim 47, wherein the number of the at least one motion shift list is the number of the co-located frames.
49. The method of claim 47 or claim 48, wherein determining the at least one motion shift list comprises: For a co-located frame of the current video block, a motion candidate associated with a motion vector (MV) in a reference list is added to a corresponding motion shift list of the at least one motion shift list, the MV pointing to the co-located frame.
50. The method of claim 49, wherein after redundancy checking, the motion candidate is added to the motion shift list.
51. The method of any one of claims 28-46, wherein the at least one motion shift list comprises a single motion shift list.
52. The method of any one of claims 28-51, wherein determining the at least one motion shift list comprises: determining motion information of a candidate motion shift of the current video block, the motion information indicating a motion vector (MV) in a reference picture list; as well as If it is determined that the MV points to at least one co-located frame of the current video block, the candidate motion shift is added to the at least one motion shift list after redundancy checking.
53. The method of any one of claims 28-52, wherein at least one candidate for the current video block is included in a motion vector prediction (MVP) candidate list, the MVP candidate list being at a sub-codec unit (sub-CU) level or a CU level, the at least one candidate comprising at least one of the following: Affine control point candidates, TMVP candidate, or SbTMVP candidate.
54. The method of claim 53, wherein the at least one candidate is determined based on at least a portion of the at least one motion shift list.
55. The method of claim 53 or claim 54, wherein the at least one candidate is determined based on a set of motion shift candidates in the at least one motion shift list, the number of motion shift candidates in the set of motion shift candidates being less than or equal to a threshold number.
56. The method of claim 55, wherein the at least one candidate is determined without using one of the at least one motion shift lists.
57. The method according to any one of claims 53-56, further comprising: determining a set of motion shift candidates from the at least one motion shift list based on respective metrics of the motion shift candidates in the at least one motion shift list; as well as The at least one candidate is determined based on the set of motion shift candidates.
58. The method of claim 57, wherein the set of motion shift candidates comprises a first number of motion shift candidates from a first motion shift list among the at least one motion shift list and a second number of motion shift candidates from a second motion shift list among the at least one motion shift list, the first number and the second number being the same or different.
59. The method of claim 57 or claim 58, further comprising: The at least one candidate is reordered.
60. The method of claim 59, wherein a predefined number of the at least one candidate are included in the MVP candidate list.
61. The method of claim 58, wherein determining the at least one candidate comprises: comparing a first cost of a first motion shift candidate from the first motion shift list with a second cost of a second motion shift candidate from the second motion shift list; as well as If it is determined that the first cost is less than the second cost, the at least one candidate is determined based on the first motion shift candidate.
62. The method of claim 61, wherein a first index of the first motion shift candidate in the first motion shift list is the same as a second index of the second motion shift candidate in the second motion shift list.
63. The method according to any one of claims 53-62, further comprising: Based on the template matching process, refining the target motion shift; as well as Based on the refined target motion shift, the at least one candidate is determined.
64. The method of any one of claims 53-62, wherein the at least one candidate is determined based on the target motion shift without refining the target motion shift.
65. The method of any one of claims 1-64, wherein the converting comprises encoding the current video block into the bitstream.
66. The method of any one of claims 1-64, wherein the converting comprises decoding the current video block from the bitstream.
67. An apparatus for video processing, comprising a processor and a non-volatile 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-66.
68. A non-transitory computer-readable storage medium storing instructions for causing a processor to execute the method according to any one of claims 1-66.
69. A non-transitory computer-readable recording medium storing a bit stream of a video generated by a method performed by a video processing device, wherein the method comprises: determining, based on a frame type of the candidate frame, whether the candidate frame associated with a current video block of the video is a co-located frame, the co-located frame being co-located with a frame including the current video block; as well as The bitstream is generated based on the determination.
70. A method for storing a bitstream of a video, comprising: determining, based on a frame type of the candidate frame, whether the candidate frame associated with a current video block of the video is a co-located frame, the co-located frame being co-located with a frame including the current video block; generating the bitstream based on the determination; as well as The bit stream is stored in a non-transitory computer-readable recording medium.
71. A non-transitory computer-readable recording medium storing a bit stream of a video generated by a method performed by a video processing device, wherein the method comprises: determining a plurality of co-located frames co-located with a frame including a current video block of the video, information of at least one co-located frame of the plurality of co-located frames not existing in the bitstream; as well as The bitstream is generated based on the plurality of co-located frames.
72. A method for storing a bitstream of a video, comprising: determining a plurality of co-located frames co-located with a frame including a current video block of the video, information of at least one co-located frame of the plurality of co-located frames not existing in the bitstream; generating the bitstream based on the plurality of co-located frames; as well as The bit stream is stored in a non-transitory computer-readable recording medium.
73. A non-transitory computer-readable storage medium storing a bitstream of a video generated by a method performed by an apparatus for video processing, wherein the method comprises: determining a plurality of co-located frames co-located with a frame comprising a current video block of the video, a plurality of syntax elements associated with the plurality of co-located frames being included in the bitstream; as well as The bitstream is generated based on the plurality of co-located frames.
74. A method for storing a bitstream of a video, comprising: determining a plurality of co-located frames co-located with a frame comprising a current video block of the video, a plurality of syntax elements associated with the plurality of co-located frames being included in the bitstream; generating the bitstream based on the plurality of co-located frames; as well as The bit stream is stored in a non-transitory computer-readable recording medium.
75. A non-transitory computer-readable storage medium storing a bit stream of a video generated by a method executed by an apparatus for video processing, wherein the method comprises: determining at least one motion shift list for a current video block of the video; A target motion shift for the current video block is determined based on the at least one 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); and The bitstream is generated based on the target motion shift.
76. A method for storing a bitstream of a video, comprising: determining at least one motion shift list for a current video block of the video; A target motion shift for the current video block is determined based on the at least one 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); generating the bitstream based on the target motion shift; as well as The bit stream is stored in a non-transitory computer-readable recording medium.