Encoding method, decoding method, bitstream, encoder, decoder, and storage medium

By using co-located images to determine the time domain candidate block vectors to construct a candidate merge list in video coding, the problem that the candidate merge list cannot be filled is solved, and the coding and decoding efficiency and accuracy are improved.

WO2025199705A1PCT designated stage Publication Date: 2025-10-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/083659
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-03-25
Publication Date
2025-10-02

Smart Images

  • Figure CN2024083659_02102025_PF_FP_ABST
    Figure CN2024083659_02102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses an encoding method, a decoding method, a bitstream, an encoder, a decoder, and a storage medium. The method comprises: determining at least one co-located image of a current block; determining one or more time domain candidate block vectors of the current block on the basis of the at least one co-located image; and constructing a candidate merge list on the basis of the one or more time domain candidate block vectors. In this way, not only can the situation where the candidate merge list cannot be filled be ameliorated, but also the accuracy of prediction can be improved, thereby improving encoding and decoding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Coding and decoding method, code stream, encoder, decoder and storage medium Technical Field

[0001] The present application relates to the field of video coding and decoding technology, and in particular to a coding and decoding method, a bit stream, an encoder, a decoder, and a storage medium. Background Art

[0002] As demand for video display quality increases, high-resolution video, such as HD and UHD, has emerged. However, high-resolution video typically contains more information and therefore requires more bandwidth. To reduce bandwidth requirements, video coding standards involving video compression have been introduced.

[0003] In video coding standards, both Intra Template Matching Prediction (IntraTMP) and Intra Block Copy (IBC) technologies use a constructed candidate merge list for prediction. However, when constructing the candidate merge list, there are often situations where the existing block vectors cannot fill the candidate merge list. This results in a lack of sufficient candidate information, poor prediction performance, and reduced encoding and decoding efficiency.

[0004] Summary of the Invention

[0005] The present application provides a coding and decoding method, a code stream, an encoder, a decoder and a storage medium, which can not only improve the situation where the candidate merge list cannot be filled, but also improve the accuracy of the prediction, thereby improving the coding and decoding efficiency.

[0006] The technical solution of this application can be implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a decoding method, applied to a decoder, the method comprising:

[0008] determining at least one co-located image of the current block;

[0009] Determine one or more time-domain candidate block vectors of a current block according to at least one co-located image;

[0010] Based on one or more time-domain candidate block vectors, a candidate merge list is constructed.

[0011] In a second aspect, an embodiment of the present application provides an encoding method, applied to an encoder, the method comprising:

[0012] determining at least one co-located image of the current block;

[0013] Determine one or more time-domain candidate block vectors of a current block according to at least one co-located image;

[0014] Based on one or more time-domain candidate block vectors, a candidate merge list is constructed.

[0015] In a third aspect, an embodiment of the present application provides a code stream, which is generated by bit encoding based on information to be encoded; wherein the information to be encoded includes at least one of the following:

[0016] The residual value of the current block, the co-located image index of the current block and the value of the first syntax element; wherein the first syntax element is used to indicate whether the current block uses the time domain candidate block vector as a candidate for constructing a candidate merge list.

[0017] In a fourth aspect, an embodiment of the present application provides an encoder, including a first determining unit and a first constructing unit, wherein:

[0018] A first determining unit is configured to determine at least one co-located image of the current block; and determine one or more time-domain candidate block vectors of the current block based on the at least one co-located image;

[0019] The first construction unit is configured to construct a candidate merging list based on one or more time-domain candidate block vectors.

[0020] In a fifth aspect, an embodiment of the present application provides an encoder, comprising a first memory and a first processor, wherein:

[0021] a first memory for storing a computer program capable of running on the first processor;

[0022] The first processor is configured to execute the method according to the second aspect when running a computer program.

[0023] In a sixth aspect, an embodiment of the present application provides a decoder, including a second determining unit and a second constructing unit, wherein:

[0024] A second determining unit is configured to determine at least one co-located image of the current block; and determine one or more time-domain candidate block vectors of the current block based on the at least one co-located image;

[0025] The second construction unit is configured to construct a candidate merging list based on one or more time-domain candidate block vectors.

[0026] In a seventh aspect, an embodiment of the present application provides a decoder, including a second memory and a second processor, wherein:

[0027] a second memory for storing a computer program capable of running on the second processor;

[0028] The second processor is configured to execute the method according to the first aspect when running a computer program.

[0029] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it implements the method described in the first aspect or the method described in the second aspect.

[0030] In a ninth aspect, an embodiment of the present application provides a computer program product, comprising a computer program or instructions, which, when executed by a processor, implements the method described in the first aspect, or implements the method described in the second aspect.

[0031] The embodiments of the present application provide a coding and decoding method, a code stream, an encoder, a decoder, and a storage medium. Whether on the encoding or decoding end, at least one co-located image of the current block is first determined; then, based on the at least one co-located image, one or more time-domain candidate block vectors of the current block are determined; and then, based on the one or more time-domain candidate block vectors, a candidate merge list is constructed. In other words, the coding and decoding method proposed in the embodiments of the present application, when constructing the candidate merge list, considers one or more time-domain candidate block vectors as candidates in the candidate merge list. This not only effectively reduces the situation where the candidate merge list cannot be filled, but also improves the prediction accuracy under the candidate merge list without introducing additional software and hardware implementation complexity, thereby improving coding and decoding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] FIG1 is a schematic diagram of template matching of an IntraTMP technology;

[0033] FIG2 is a schematic diagram of a matching block for determining a current block;

[0034] FIG3A is a second schematic diagram of template matching using the IntraTMP technology;

[0035] FIG3B is a third schematic diagram of template matching using the IntraTMP technology;

[0036] FIG4 is a schematic diagram of adjacent positions and non-adjacent positions of a current block;

[0037] FIG5 is a schematic diagram of relocating a new position according to a block vector;

[0038] FIG6 is a schematic diagram of searching a block vector according to multiple positions within a reference block;

[0039] FIG7 is a schematic diagram of a network architecture of a video codec provided in an embodiment of the present application;

[0040] FIG8 is a schematic diagram of a system block diagram of an encoder provided in an embodiment of the present application;

[0041] FIG9 is a schematic diagram of a system block diagram of a decoder provided in an embodiment of the present application;

[0042] FIG10 is a flowchart diagram of a decoding method provided in an embodiment of the present application;

[0043] FIG11 is a schematic diagram of searching for a reference position of a current block based on a co-located image according to an embodiment of the present application;

[0044] FIG12 is a second flow chart of a decoding method provided in an embodiment of the present application;

[0045] FIG13 is a schematic diagram of five candidate positions of a current block provided by an embodiment of the present application;

[0046] FIG14 is a third flow chart of a decoding method provided in an embodiment of the present application;

[0047] FIG15 is a fourth flow chart of a decoding method provided in an embodiment of the present application;

[0048] FIG16 is a flowchart diagram 1 of an encoding method provided in an embodiment of the present application;

[0049] FIG17 is a second flow chart of an encoding method provided in an embodiment of the present application;

[0050] FIG18 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;

[0051] FIG19 is a schematic diagram of a specific hardware structure of an encoder provided in an embodiment of the present application;

[0052] FIG20 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;

[0053] FIG21 is a schematic diagram of a specific hardware structure of a decoder provided in an embodiment of the present application;

[0054] FIG22 is a schematic diagram of the composition structure of a coding and decoding system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the implementation of the embodiments of the present application is described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0057] In the following description, reference is made to "some embodiments," which describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that the terms "first, second, and third" in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first, second, and third" may be interchanged in a specific order or sequential order where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0058] Before further explaining the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained first. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:

[0059] Coding Block (CB);

[0060] Block Maching (BM);

[0061] Motion vector (MV);

[0062] Block Vector (BV);

[0063] Block vectors at adjacent positions (Spatial BV);

[0064] Block vectors at non-adjacent positions (Non-adjacent BV);

[0065] History block vector prediction (HBVP) stored in the historical encoding and decoding order;

[0066] Auto-relocated block vector prediction (ARBVP);

[0067] Collocated picture;

[0068] Sum of Absolute Difference (SAD);

[0069] Sum of Absolute Transformed Difference (SATD);

[0070] Mean Square Error (MSE);

[0071] Sum of Squared Differences (SSD);

[0072] Mean Absolute Deviation (MAD);

[0073] Mean Square Differences (MSD);

[0074] H.266 / Versatile Video Coding (VVC);

[0075] VVC Test Model (VTM), a reference software testing platform for VVC;

[0076] Intra Block Copy (IBC);

[0077] Intra Template Matching Prediction (Intra TMP);

[0078] Beyond VVC's reference software testing platform (Enhanced Compression Model, ECM).

[0079] The following is a brief introduction to the intra-frame template matching prediction technology and the intra-frame block copy technology in the related technologies.

[0080] (1) Intra-frame template matching prediction technology.

[0081] Intra-frame template matching prediction technology, referred to as IntraTMP technology, is a special intra-frame prediction coding tool, mainly used for screen content coding. IntraTMP is mainly implemented through the following process:

[0082] The algorithm selects an L-shaped portion of reconstructed pixels adjacent to the current block as a template. The algorithm searches for the most similar template within the reconstructed region of the current image. The reconstructed block corresponding to the most similar template is used as the matching block (or "reference block") to obtain the prediction block for the current block. As shown in Figure 1, R1 to R4 are the available IntraTMP search regions. Matching blocks are searched point by point within these regions using a raster scan.

[0083] In addition, as shown in Figure 2, the matching block can be represented by a block vector BV from the current block to the matching block, and the similarity degree between templates is represented by the magnitude of the template error value. The smaller the template error value, the higher the similarity degree. For example, using SAD to calculate the template error value, the smaller the SAD, the more similar the templates are.

[0084] Here, the codec indicates whether the current block is encoded using the IntraTMP mode through the flag bit intra_tmp_flag. If so, the same template matching process is performed at the decoding end to obtain the same predicted block at the decoding end, and there is no need to additionally encode the block vector information from the current block to the matching block.

[0085] (2) IntraTMP adaptation technology for camera-captured content.

[0086] Based on the existing IntraTMP technology, the IntraTMP adaptation (IntraTMP adaption for camera-captured content) technology for camera-captured content proposes to perform template matching with a step size S (i.e., every S points in the horizontal and vertical directions, S>1). As shown in Figure 3A, for example, in the search area, instead of searching for the matching block point by point according to raster scan, it searches at intervals in the horizontal and vertical directions of the search area. Exemplarily, if the current block vector for template matching is (X0,Y0), the next block vector for template matching should be (X0+S,Y0), and the ordinate of the block vector for template matching in the next row should be Y0+S. In addition, the template matching process can be divided into multiple rounds, and the search step size for each round can be different. For example, after completing the first round of search with the step size S, the search range for the next round can be determined according to the matching results (for example, taking the first N matching blocks with the smallest template errors) (for example, within the adjacent areas of these matching blocks), and template matching is performed with a smaller step size S', as shown in Figure 3B, 1≤S'<S; thus optimizing the matching results. This technology can effectively reduce the complexity of the IntraTMP mode while maintaining good coding efficiency. As shown in Figures 3A and 3B, the grid-filled area represents the template area; the arrows represent the block vectors, and the dashed boxes represent the matching blocks.

[0087] (3) IntraTMP multi-candidate technology.

[0088] In a given search area, there may be multiple reference blocks similar to the current block, and the template matching technology may not necessarily be able to accurately find the target block only by comparing the cost values in the template area. Therefore, finding multiple candidate matching blocks from the reference area can make the search error tolerance higher.

[0089] IntraTMP multi-candidate technology uses a template matching process to obtain N candidate matching blocks within the reference area, or to construct a candidate block list of length N. The candidate blocks in the list can be sorted by the template error value between them and the current block. A candidate block in the list is selected as the final prediction block by index. For a coded block using IntraTMP multi-candidate technology, after decoding the IntraTMP flag intra_tmp_flag to true, it continues to decode intra_tmp_idx. The intra_tmp_idx syntax element can represent the index of the selected candidate block.

[0090] In one possible implementation, the template matching process for constructing the candidate block list is as follows:

[0091] The first step is to perform the first search with a certain step size, for example, both the horizontal step size and the vertical step size are 4. N optimal matching blocks with a certain spacing are obtained (the first N with the smallest template error value);

[0092] In the second step, a second search is performed in the N neighboring areas of the matching blocks obtained in the first step. These neighboring areas can be set to multiple non-overlapping areas based on the step size in the first step. M optimal matching blocks are obtained from these areas (which may include the matching blocks obtained in the first step).

[0093] The same construction process is used at the encoding and decoding ends to obtain a consistent list of candidate blocks.

[0094] Intra_tmp_idx may use fixed-length encoding or variable-length encoding, for example, truncated binary encoding.

[0095] In one possible implementation, the variable-length encoding method is:

[0096] The smaller the index (the smaller the intra_tmp_idx value), the smaller the template error value of the corresponding candidate block, and the greater the probability of being selected statistically. A shorter codeword can be set for a smaller intra_tmp_idx, as shown in Table 1.

[0097] Table 1

[0098] If the maximum value N of intra_tmp_idx is large, a codeword of the same length can be allocated to the larger intra_tmp_idx. For example, in the ECM-11.0 reference software, N is 15, as shown in Table 2.

[0099] Table 2

[0100] In Table 2 above, x can be obtained using truncated binary.

[0101] (4) Some other features included in the intra-frame template matching prediction technology.

[0102] In addition to the general features described above, intra-frame template matching prediction technology can also include the following features:

[0103] A. Intra-frame template prediction matching based on sub-pixel level.

[0104] After finding one or more integer-pixel-precision candidate blocks through template matching, it further interpolates the integer-pixel-precision blocks to find a sub-pixel-precision candidate. When a sub-pixel-precision candidate is selected, the syntax element should also use a corresponding identifier to identify the selected sub-pixel precision. For example, in ECM-11.0, sub-pixel precision can be 1 / 4, 1 / 2, or 3 / 4 pixel precision.

[0105] B. Fusion of multiple candidate blocks.

[0106] It uses template matching technology to find multiple candidate blocks and weight them, thereby obtaining a weighted prediction block as the prediction value of the current block to be predicted. For example, in ECM-11.0, the candidate blocks used for weighting are the multiple candidate blocks obtained in (3) above, and the weights used for weighting can be adaptively calculated using each weighted candidate block template.

[0107] C. Brightness compensation of intra-frame template matching technology.

[0108] It is similar to the local illumination compensation technology between frames (LIC). It uses the L-shaped area around the candidate matching block and the L-shaped area around the current block to construct a linear model or a linear equation group. The linear model parameters or the parameters of the equation group are obtained by analysis and used to compensate the candidate block. The compensated candidate block will be used as the prediction block of the current block.

[0109] (5) Intra-frame block copy technology.

[0110] Intra Block Copy (IBC) is an intra-frame prediction technique that uses block matching to obtain predicted pixels. Similar to inter-frame prediction, prediction is achieved by using a block vector pointing from the current block to a reference block. The difference is that the reference block for inter-frame prediction comes from the coded and reconstructed portion of the reference image, while the reference block for IBC comes from the coded and reconstructed portion of the current image. Block vector information needs to be transmitted in the codestream, so similar to inter-frame prediction, there are IBC-AMVP mode and IBC-Merge mode.

[0111] IBC-AMVP mode: The predicted block vector is obtained by constructing a merge candidate list, and the reference block of the current block and the corresponding final block vector are obtained through hash search, full search, etc. The final block vector is encoded based on the predicted block vector to improve coding efficiency;

[0112] IBC-Merge mode: Prediction is performed using a constructed candidate merge list, which can include coding information such as adjacent and non-adjacent coded blocks, historical coded blocks, and the average of candidate block vectors. After the candidate merge list is constructed, it can be reordered based on the template error value of each candidate in the list. The template error value can be obtained by the error value (such as the SAD value) between each candidate's reference block template and the current block template.

[0113] (6) IntraTMP merging mode.

[0114] Since inter-frame prediction and IBC technologies each have their own merge modes, the intraTMP technology, which uses the construction of a candidate merge list as a technique to enhance the multi-matching block list in (3) above, has also been adopted into the ECM-12.0 reference software.

[0115] IntraTMP's merge mode (IntraTMP with Merge Candidates, IntraTMP-Merge) is similar to IBC's merge mode in that it predicts whether to include the current block's pattern based on the BV used by the coded blocks in the area surrounding the current block (left, upper left, lower left, upper, and upper right). Similarly to IBC-Merge, it can include both adjacent and non-adjacent coded blocks, as well as historical coded blocks.

[0116] In addition, intraTMP-Merge may also include features similar to IBC-Merge, such as reordering the candidate merge list according to the error value between the reference block template and the current block template.

[0117] (7) Differences and similarities between IntraTMP-Merge and IBC-Merge.

[0118] A. Similarities when building a candidate merge list:

[0119] ① Both include searching whether the five adjacent positions in the space contain processes that can use BV;

[0120] ② Both include the process of searching whether non-adjacent positions in the space contain BVs that can be used.

[0121] B. Differences when building a candidate merge list:

[0122] ① The number of non-adjacent positions and positions in the search space is different;

[0123] ② The IBC further includes information about historical block vectors.

[0124] (8) The type of block vector in IntraTMP-Merge and IBC-Merge.

[0125] The block vectors used to construct the block vector candidate merge list include: block vectors at adjacent positions, block vectors at non-adjacent positions, block vectors based on historical information, and automatically relocated block vectors. For adjacent and non-adjacent block vectors, refer to the adjacent and non-adjacent positions of the current block in Figure 4. If block vectors exist at these positions, they are considered adjacent and non-adjacent block vectors. As shown in Figure 4, the dot-filled block is the current block. Positions 1-5 in Figure 4 are called adjacent position candidates, and the remaining positions are called non-adjacent position candidates.

[0126] The block vector based on the history information type refers to using a table of length N to record and update the used block vectors according to the order of encoding and decoding.

[0127] The Auto-Relocated Block Vector Prediction (AR-BVP) technique proposes a method to construct a new block vector by using the block vector of the reference block. For example, a guiding block vector (BV) is determined for the current block B0. 0,1 And determine the reference block B1 based on the block vector. If there is a block vector BV in the area of ​​the reference block B1 1,2 (The motion vector corresponding to the block with the greatest similarity in the area around B1, or the motion vector corresponding to the block with the best template match), then a new block vector BV can be constructed 0,2 =BV 0,1 +BV 1,2 , as the candidate block vector of the current block. Recursively (cutoff conditions: reaching a certain recursion depth, the block error corresponding to the constructed new block vector is less than the threshold, exceeding the preset area, meeting the maximum recursion time, etc.), according to BV 0,n The reference block B can be determined n , if in B n There is a block vector BV in the region n,n+1 , then a new block vector BV can be constructed 0,n+1 =BV 0,1 +BV 1,2 +…+BV n,n+1 , as shown in Figure 5.

[0128] Among them, when determining the reference block B nThe corresponding block vector BV n,n+1 For example, check the center, upper left, upper right, lower left and lower right of the reference block to see if there is a coding block predicted by IBC or IntraTMP mode. If so, use the saved block vector as the block vector BV. n,n+1 , as shown in Figure 6. In Figure 6, CTR represents the center position of the reference block, LB represents the lower left position of the reference block, RB represents the lower right position of the reference block, LT represents the upper left position of the reference block, and RT represents the upper right position of the reference block.

[0129] In summary, when constructing the candidate merge list of IntraTMP and IBC, the related technologies often have the situation that the existing block vectors cannot fill the candidate merge list. This makes the merge mode sometimes have poor performance due to the lack of sufficient candidate information, which reduces the encoding and decoding efficiency.

[0130] Based on this, an embodiment of the present application provides a coding and decoding method, which first determines at least one co-located image of the current block; then, based on the at least one co-located image, determines one or more time-domain candidate block vectors of the current block; and then, based on the one or more time-domain candidate block vectors, constructs a candidate merge list. In other words, the coding and decoding method proposed in the embodiment of the present application, when constructing the candidate merge list, considers one or more time-domain candidate block vectors as candidates in the candidate merge list. This not only effectively reduces the situation where the candidate merge list cannot be filled, but also improves the prediction accuracy under the candidate merge list without introducing additional software and hardware implementation complexity, thereby improving coding and decoding efficiency and coding and decoding performance.

[0131] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0132] FIG7 is a schematic diagram of a network architecture for video encoding and decoding provided in an embodiment of the present application. As shown in FIG7 , the network architecture includes one or more electronic devices 13 to 1N and a communication network 01, wherein electronic devices 13 to 1N can perform video interaction via the communication network 01. During implementation, the electronic devices can be various types of devices with video encoding and decoding capabilities. For example, the electronic devices can include mobile phones, tablet computers, personal computers, personal digital assistants, navigators, digital phones, video phones, televisions, sensor devices, servers, etc., and the embodiments of the present application are not limited thereto.

[0133] In an embodiment of the present application, a network architecture of a video encoding and decoding system including a decoding method and an encoding method is provided. The decoder or encoder in the embodiment of the present application can be the aforementioned electronic device. In other words, the electronic device in the embodiment of the present application has video encoding and decoding capabilities, and generally includes a video encoder (i.e., encoder) and a video decoder (i.e., decoder).

[0134] FIG8 is a schematic diagram of a system block diagram of an encoder provided in an embodiment of the present application. As shown in FIG8 , the encoder 100 may include: a segmentation unit 101, a prediction unit 102, a first adder 107, a transform unit 108, a quantization unit 109, an inverse quantization unit 110, an inverse transform unit 111, a second adder 112, a filtering unit 113, a decoded picture buffer (DPB) unit 114, and an entropy coding unit 115. Here, the input of the encoder 100 may be a video consisting of a series of pictures or a single still picture, and the output of the encoder 100 may be a bitstream (also referred to as a "codestream") used to represent a compressed version of the input video.

[0135] Among them, the segmentation unit 101 segments the picture in the input video into one or more Coding Tree Units (CTUs). The segmentation unit 101 divides the picture into multiple tiles (or tiles), and can further divide a tile into one or more bricks. Here, a tile or a brick may include one or more complete and / or partial CTUs. In addition, the segmentation unit 101 can form one or more slices, where a slice can include one or more tiles arranged in a grid order in the picture, or one or more tiles covering a rectangular area in the picture. The segmentation unit 101 can also form one or more sub-pictures, where a sub-picture can include one or more slices, tiles or bricks.

[0136] During the encoding process of encoder 100, segmentation unit 101 transmits the CTU to prediction unit 102. Generally, prediction unit 102 may be composed of block segmentation unit 103, motion estimation (ME) unit 104, motion compensation (MC) unit 105, and intra prediction unit 106. Specifically, block segmentation unit 103 iteratively uses quadtree segmentation, binary tree segmentation, and ternary tree segmentation to further divide the input CTU into smaller coding units (CUs). Prediction unit 102 may use ME unit 104 and MC unit 105 to obtain inter-frame prediction blocks for the CU. Intra-frame prediction unit 106 may use various intra-frame prediction modes, including MIP mode, to obtain intra-frame prediction blocks for the CU. In an example, a rate-distortion optimized motion estimation method may be used by ME unit 104 and MC unit 105 to obtain inter-frame prediction blocks, and a rate-distortion optimized mode determination method may be used by intra-frame prediction unit 106 to obtain intra-frame prediction blocks. The prediction unit 102 outputs the prediction block of the CU, and the first adder 107 calculates the difference between the CU in the output of the segmentation unit 101 and the prediction block of the CU, i.e., the residual CU. The transform unit 108 reads the residual CU and performs one or more transform operations on the residual CU to obtain coefficients. The quantization unit 109 quantizes the coefficients and outputs the quantized coefficients (i.e., levels). The inverse quantization unit 110 performs a scaling operation on the quantized coefficients to output reconstructed coefficients. The inverse transform unit 111 performs one or more inverse transforms corresponding to the transform in the transform unit 108 and outputs the reconstructed residual. The second adder 112 calculates the reconstructed CU by adding the reconstructed residual and the prediction block of the CU from the prediction unit 102. The second adder 112 also sends its output to the prediction unit 102 for use as an intra-frame prediction reference. After all CUs in the picture or sub-picture are reconstructed, the filtering unit 113 performs loop filtering on the reconstructed picture or sub-picture. Here, the filtering unit 113 includes one or more filters, such as a deblocking filter, a sample adaptive offset (SAO) filter, an adaptive loop filter (ALF), a luminance mapping and chroma scaling (LMCS) filter, and a neural network-based filter. Alternatively, when the filtering unit 113 determines that the CU is not used as a reference for encoding other CUs, the filtering unit 113 performs loop filtering on one or more target pixels in the CU. The output of the filtering unit 113 is a decoded picture or sub-picture, which is cached to the DPB unit 114. The DPB unit 114 outputs the decoded picture or sub-picture according to the timing and control information.Here, the picture stored in the DPB unit 114 can also be used as a reference for the prediction unit 102 to perform inter-frame prediction or intra-frame prediction. Finally, the entropy coding unit 115 converts the parameters necessary for decoding the picture from the encoder 100 (such as control parameters and supplementary information, etc.) into binary form, and writes such binary form into the code stream according to the syntax structure of each data unit, that is, the encoder 100 finally outputs the code stream.

[0137] Furthermore, encoder 100 may include a first processor and a first memory storing a computer program. When the first processor reads and executes the computer program, encoder 100 reads the input video and generates a corresponding bitstream. Alternatively, encoder 100 may be a computing device comprising one or more chips. These units, implemented as integrated circuits on the chip, have similar connectivity and data exchange functions as the corresponding units in FIG8 .

[0138] Figure 9 is a schematic diagram of a system block diagram of a decoder provided in an embodiment of the present application. As shown in Figure 9, the decoder 200 may include: a parsing unit 201, a prediction unit 202, an inverse quantization unit 205, an inverse transform unit 206, an adder 207, a filtering unit 208, and a decoded image buffer unit 209. Here, the input of the decoder 200 is a bitstream representing a compressed version of a video or a still image, and the output of the decoder 200 may be a decoded video consisting of a series of images or a decoded still image.

[0139] The input codestream to decoder 200 may be the codestream generated by encoder 100. Parsing unit 201 parses the input codestream and obtains syntax element values ​​from the input codestream. Parsing unit 201 converts the binary representation of the syntax elements into digital values ​​and sends the digital values ​​to units within decoder 200 to obtain one or more decoded pictures. Parsing unit 201 may also parse one or more syntax elements from the input codestream to display decoded pictures.

[0140] During the decoding process in decoder 200, parsing unit 201 transmits the values ​​of syntax elements and one or more variables set or determined based on the values ​​of the syntax elements, used to obtain one or more decoded pictures, to units within decoder 200. Prediction unit 202 determines a prediction block for the current decoding block (e.g., a CU). Prediction unit 202 may include motion compensation unit 203 and intra prediction unit 204. Specifically, when an inter decoding mode is indicated for decoding the current decoding block, prediction unit 202 passes relevant parameters from parsing unit 201 to motion compensation unit 203 to obtain an inter prediction block. When an intra prediction mode (including a MIP mode indicated based on a MIP mode index value) is indicated for decoding the current decoding block, prediction unit 202 passes relevant parameters from parsing unit 201 to intra prediction unit 204 to obtain an intra prediction block. Dequantization unit 205 has the same functionality as dequantization unit 110 in encoder 100. Dequantization unit 205 performs a scaling operation on the quantization coefficients (i.e., levels) from parsing unit 201 to obtain reconstructed coefficients. The inverse transform unit 206 has the same function as the inverse transform unit 111 in the encoder 100. The inverse transform unit 206 performs one or more transform operations (i.e., the inverse of the one or more transform operations performed by the inverse transform unit 111 in the encoder 100) to obtain a reconstructed residual. The adder 207 performs an addition operation on its input (the prediction block from the prediction unit 202 and the reconstructed residual from the inverse transform unit 206) to obtain a reconstructed block of the current decoded block. The reconstructed block is also sent to the prediction unit 202 to be used as a reference for other blocks encoded in the intra prediction mode.

[0141] After all CUs in the picture or sub-picture are reconstructed, the filtering unit 208 performs loop filtering on the reconstructed picture or sub-picture. The filtering unit 208 includes one or more filters, such as a deblocking filter, a sample adaptive offset filter, an adaptive loop filter, a luminance mapping and chroma scaling filter, and a neural network-based filter. Alternatively, when the filtering unit 208 determines that the reconstructed block is not used as a reference for decoding other blocks, the filtering unit 208 performs loop filtering on one or more target pixels in the reconstructed block. Here, the output of the filtering unit 208 is a decoded picture or sub-picture, which is cached to the DPB unit 209. The DPB unit 209 outputs the decoded picture or sub-picture based on timing and control information. The picture stored in the DPB unit 209 can also be used as a reference for performing inter-frame prediction or intra-frame prediction by the prediction unit 202.

[0142] Furthermore, the decoder 200 can be a second memory having a second processor and a computer program. When the first processor reads and runs the computer program, the decoder 200 reads the input bit stream and generates the corresponding decoded video. In addition, the decoder 200 can also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in Figure 9.

[0143] It should be noted that the method of the embodiment of the present application can be applied to both the encoder and the decoder, and can even be applied to both the encoder and the decoder simultaneously, without specific limitation here. In addition, when the embodiment of the present application is applied to the encoder 100, the "current block" specifically refers to the block currently to be encoded in the video image (also referred to as the "encoding block"); when the embodiment of the present application is applied to the decoder 200, the "current block" specifically refers to the block currently to be decoded in the video image (also referred to as the "decoding block").

[0144] In one embodiment of the present application, FIG10 is a flowchart of a decoding method provided by the embodiment of the present application. As shown in FIG10 , the method may include:

[0145] S1001: Determine at least one co-located image of a current block.

[0146] It should be noted that the decoding method of the embodiment of the present application is applied to the decoder. The decoding method may specifically refer to a method for constructing a candidate merge list, and more specifically, a method for constructing a candidate merge list based on a time domain block vector. Thus, based on the composition structure of the decoder 200 shown in FIG9 , the decoding method of the embodiment of the present application is mainly applicable to the intraTMP mode or IBC mode in the inter-frame prediction frame. Thus, when constructing the candidate merge list, it is possible to improve the situation where the candidate merge list cannot be filled according to the co-located image of the current block.

[0147] It should also be noted that, in the embodiment of the present application, the current block can have one, two, or even more collocated images. For example, as shown in FIG11 , the current block can have two collocated images, such as a forward collocated image (Frame 0, reference image 0) located before the current image and a backward collocated image (Frame 1, reference image 1) located after the current image. Here, the current block is a block in the current image, and the reference position of the current block can be searched for in Frame 0 and Frame 1, respectively.

[0148] In an embodiment of the present application, for a current block, one or more corresponding co-located images can be determined based on a co-located image index in a bitstream. In some embodiments, determining at least one co-located image for the current block may include: decoding the bitstream, determining a co-located image index for the current block; and determining at least one co-located image for the current block based on the co-located image index.

[0149] In the embodiment of the present application, the current image includes the current block. However, the current image may not have a co-located image. In this case, it is impossible to further obtain the temporal candidate block vector. In this case, the candidate merge list is still constructed according to the relevant technology. If the current image has a co-located image, it can be determined whether there are one or more co-located images based on the co-located image index written into the bitstream by the encoder.

[0150] It should be noted that, in the embodiment of the present application, the co-located image is a subset of the reference image, and the time domain motion vector MV / block vector BV can only be obtained from the co-located image.

[0151] It should also be noted that in this embodiment of the present application, each B-frame can have two reference image lists, List0 and List1. The co-located image index specifically refers to whether the co-located image is in List0 or List1, so the co-located image index is the index value for obtaining List0 and List1. Furthermore, it is not ruled out that an image can have more co-located images, or that more than one image in List0 and List1 can be a co-located image. In other words, the co-located image index is used to indicate the position of the co-located image in the reference image list.

[0152] In a specific embodiment, determining at least one co-located image of the current block based on the co-located image index may include: if the number of indexes included in the co-located image index is one, determining one co-located image of the current block; if the number of indexes included in the co-located image index is two, determining two co-located images of the current block.

[0153] That is to say, for the current image to which the current block belongs, if the current image has no co-located image index, then there is no co-located image for the current image, and the time domain candidate block vector of the current block cannot be further obtained; if the current image has only one co-located image index, then the current image has only one co-located image, and the time domain candidate block vector of the current block can be obtained from this one co-located image; if the current image has two co-located image indexes, then the current image has two co-located images, and the time domain candidate block vector of the current block can be obtained from these two co-located images; even more, if the current image has more than two co-located image indexes, then the current image has more than two co-located images, and the time domain candidate block vector of the current block can be obtained from these co-located images.

[0154] For example, in the existing reference software implementation, it is possible to support an inter-frame of the current block with two co-located frames (i.e., two co-located images). Then, the time domain candidate block vector of the current block can be obtained not only from one of the co-located images, but also from the two co-located images. No limitation is imposed here.

[0155] S1002: Determine one or more time-domain candidate block vectors of a current block according to at least one co-located image.

[0156] In an embodiment of the present application, the temporal candidate block vector may include a first type of temporal candidate block vector and / or a second type of temporal candidate block vector. The first type of temporal candidate block vector is different from the second type of temporal candidate block vector. The first type of temporal candidate block vector represents a temporal block vector determined based on a reference position in a co-located image, and the second type of temporal candidate block vector represents an offset temporal block vector determined by offsetting a reference position indicated by a motion vector of the co-located image.

[0157] In an embodiment of the present application, for a certain co-located image, the reference position in the co-located image may be a block that is not predicted based on a block vector, so the motion information of the reference position does not include a block vector; even more, if all reference positions in the co-located image are blocks that are not predicted based on a block vector, then the motion information of these reference positions does not include a block vector, and at this time, 0 time domain block vector can be obtained based on the co-located image.

[0158] That is to say, assuming that at least one co-located image includes a first co-located image and a second co-located image, it is possible to obtain 0 time domain block vectors of the first co-located image and 0 time domain block vectors of the second co-located image, that is, based on this at least one co-located image, it is possible to obtain 0 time domain candidate block vectors. In this case, the candidate merge list is still constructed according to the relevant technology.

[0159] Taking into account that this technical solution is to solve the situation where the candidate merge list cannot be filled, the obtained time domain candidate block vector is added to the candidate merge list. The following is an example of obtaining at least one time domain candidate block vector of the current block based on at least one co-located image.

[0160] In one possible implementation, determining one or more time-domain candidate block vectors for the current block based on at least one co-located image may include: determining X first-category time-domain candidate block vectors based on the at least one co-located image; and determining one or more time-domain candidate block vectors for the current block based on the X first-category time-domain candidate block vectors; where X is a positive integer.

[0161] In another possible implementation, determining one or more time-domain candidate block vectors of the current block based on at least one co-located image may include: determining Y second-category time-domain candidate block vectors based on at least one co-located image; and determining one or more time-domain candidate block vectors of the current block based on the Y second-category time-domain candidate block vectors; wherein Y is a positive integer.

[0162] In yet another possible implementation, determining one or more time-domain candidate block vectors for the current block based on at least one co-located image may include: determining X time-domain candidate block vectors of the first category and Y time-domain candidate block vectors of the second category based on the at least one co-located image; and determining one or more time-domain candidate block vectors for the current block based on the X time-domain candidate block vectors of the first category and the Y time-domain candidate block vectors of the second category; wherein X and Y are both positive integers.

[0163] That is, in an embodiment of the present application, one or more time-domain candidate block vectors of the current block may be obtained from X first-category time-domain candidate block vectors and / or Y second-category time-domain candidate block vectors determined based on at least one co-located image.

[0164] In some embodiments, determining X first-category temporal candidate block vectors based on at least one co-located image may include: determining K temporal block vectors for each of the at least one co-located image, where K is an integer greater than or equal to 0; and determining the X first-category temporal candidate block vectors based on the K temporal block vectors for each of the at least one co-located image.

[0165] In the embodiment of the present application, when the at least one co-located image includes only one co-located image, the value of K may be set equal to the value of X.

[0166] In addition, in the embodiment of the present application, the value of K may be the same or different for different co-located images. For example, when at least one co-located image includes a first co-located image and a second co-located image, a zero time-domain block vector may be obtained for the first co-located image, and a non-zero time-domain block vector may be obtained for the second co-located image; alternatively, a non-zero time-domain block vector may be obtained for each of the first co-located image and the second co-located image.

[0167] In the embodiment of the present application, the first co-located image may be any one of the at least one co-located image. For determining one or more time-domain block vectors for each of the at least one co-located image, taking the first co-located image as an example, the method may include: determining one or more reference positions in the first co-located image; and determining K time-domain block vectors for the first co-located image based on the one or more reference positions.

[0168] For example, for the first co-located image, if all reference positions in the first co-located image are blocks not predicted based on block vectors, then the motion information of these reference positions does not include block vectors. At this time, 0 time domain block vectors of the first co-located image can be obtained.

[0169] It should also be noted that for each co-located image, there may be one or more reference positions, and the definitions of these reference positions are shown in Table 3.

[0170] Table 3

[0171] In Table 3, X0 and Y0 represent the horizontal coordinate and vertical coordinate of the lower right corner of the current block in the current image, X1 and Y1 represent the horizontal coordinate and vertical coordinate of the middle position of the current block in the current image, and W and H represent the width and height of the current block.

[0172] It should be noted that the reference positions in Table 3 are mostly the positions of the current block or the positions to the right, lower right, and upper bottom of the current block. Since these positions have not yet been encoded and decoded in the current image, the required information cannot be obtained. The reference image in the time domain (specifically, the co-located image) has been encoded and decoded, and this information can be saved and obtained. In some embodiments, in addition to the above-mentioned reference positions, the reference position in the time domain can also be selected as a position in the current block, or in the upper left, upper, upper right, left, and lower left directions, without any limitation. In addition, it should be noted that for a certain co-located image, it is also possible to include 0 reference positions. At this time, the step of obtaining the time domain candidate block vector will no longer be performed for the co-located image.

[0173] In some embodiments, determining K time domain block vectors of the first co-located image based on one or more reference positions may include: determining a current reference position corresponding to a current position index; when the current reference position satisfies a first condition, determining H time domain block vectors based on the current reference position, where H is an integer greater than or equal to 0; sequentially determining a reference position corresponding to a next position index based on the first position index, and using the reference position corresponding to the next position index as the current reference position, and continuing to execute the step of determining whether the current reference position satisfies the first condition until one or more reference positions are traversed, so as to obtain K time domain block vectors of the first co-located image.

[0174] In an embodiment of the present application, H time-domain block vectors are determined based on the current reference position, for example, 0, 1, 2, or more time-domain block vectors may be determined. For example, if the current reference position uses a non-block-vector-based prediction mode, then there may be 0 time-domain block vectors; if the current reference position uses an IBC weighted prediction mode, then there may be multiple (two) time-domain block vectors; if the current reference position uses an IntraTMP or non-weighted IBC prediction mode, then there may be one time-domain block vector.

[0175] In the embodiment of the present application, the first position index sequence may be the position index sequence in Table 3, such as 1, 2, 3, ..., 10, etc. First, position index 1 is determined as the current reference position corresponding to the current position index. When the current reference position satisfies the first condition, H time-domain block vectors are determined based on the current reference position. Then, the reference position corresponding to position index 2 is determined as the current reference position. The step of determining whether the current reference position satisfies the first condition is continued. Then, the reference position corresponding to position index 3 is determined as the current reference position. This process is repeated until the traversal of these 10 reference positions is completed, thereby obtaining K time-domain block vectors of the first co-located image.

[0176] In an embodiment of the present application, as shown in Table 3, each reference position may include a primary position and a secondary position. In some embodiments, referring to FIG12 , H time domain block vectors are determined based on the current reference position. The method may include:

[0177] S1201, determining whether the main position in the current reference position meets the first condition.

[0178] S1202: When the main position in the current reference position meets the first condition, determine H time-domain block vectors according to the main position in the current reference position.

[0179] S1203: When the primary position in the current reference position does not satisfy the first condition, determine whether the secondary position in the current reference position satisfies the first condition.

[0180] S1204: When the secondary position in the current reference position meets the first condition, determine H time-domain block vectors according to the secondary position in the current reference position.

[0181] S1205: When the primary position in the current reference position does not satisfy the first condition and the secondary position in the current reference position does not satisfy the first condition, skip the current reference position and determine the reference position corresponding to the next position index based on the first position index sequence.

[0182] It should be noted that, in this embodiment of the present application, the primary position in the current reference position meeting the first condition may include: the primary position in the current reference position being within the range of the first collocated image. Correspondingly, the secondary position in the current reference position meeting the first condition may include: the secondary position in the current reference position being within the range of the first collocated image.

[0183] In some embodiments, the method may further include: when the current reference position does not meet the first condition, skipping the current reference position, determining the reference position corresponding to the next position index based on the first position index sequence, and using the reference position corresponding to the next position index as the current reference position, and continuing to execute the step of determining whether the current reference position meets the first condition.

[0184] It should also be noted that, in the embodiment of the present application, the current reference position does not meet the first condition, which may include: the primary position in the current reference position does not meet the first condition and the secondary position in the current reference position does not meet the first condition.

[0185] It should also be noted that in the embodiment of the present application, for the first condition, the first condition can be to determine whether the main position or the secondary position is within the range of the co-located image, or the first condition can be to determine whether the main position or the secondary position is within the range of the co-located sub-image, slice, CTU, etc., without any limitation here.

[0186] It should also be noted that, in the embodiment of the present application, the value of the variable H may be the same or different in different situations. Furthermore, if zero time-domain block vectors are obtained for the primary position in the current reference position, H time-domain block vectors may be further obtained based on the secondary position in the current reference position. If zero time-domain block vectors are also obtained for the secondary position, the current reference position is skipped, and the reference position corresponding to the next position index is determined based on the first position index sequence.

[0187] That is, in the embodiment of the present application, for each co-located image, the reference position in the co-located image may include the 10 primary positions and 10 secondary positions in Table 3, and the primary positions are added in the order of position indexes 1 to 10. When the primary position does not meet the first condition (the primary position is not within the range of the co-located image, or other conditions may be met, such as not being within the range of the co-located sub-image, slice, CTU, etc.), the corresponding secondary position is used to replace the primary position to determine the time domain block vector; if the secondary position also does not meet the first condition, the position index is skipped, and the primary position or secondary position of the next position index is directly added to determine one or more first-category time domain candidate block vectors.

[0188] In an embodiment of the present application, in addition to determining the first-category temporal candidate block vector based on the reference position in Table 3, a second-category temporal candidate block vector may also be determined in combination with the searched motion vector. In some embodiments, determining Y second-category temporal candidate block vectors based on at least one co-located image may include: determining I offset temporal block vectors for each of the at least one co-located image, where I is an integer greater than or equal to 0; and determining the Y second-category temporal candidate block vectors based on the I offset temporal block vectors for each of the at least one co-located image.

[0189] In the embodiment of the present application, when at least one co-located image includes only one co-located image, the value of I can be set to be equal to the value of Y.

[0190] In addition, in the embodiment of the present application, the value of I may be the same or different for different co-located images. For example, assuming there are a first co-located image and a second co-located image, a zero offset time-domain block vector may be obtained for the first co-located image, and a non-zero offset time-domain block vector may be obtained for the second co-located image; alternatively, a non-zero offset time-domain block vector may be obtained for each of the first co-located image and the second co-located image.

[0191] In an embodiment of the present application, the first co-located image is any one of the at least one co-located image. For determining the I offset time-domain block vectors for each of the at least one co-located image, taking the first co-located image as an example, the method may include: determining a first motion vector for the first co-located image and determining one or more initial reference positions of a current block; offsetting the one or more initial reference positions based on the first motion vector to obtain one or more offset reference positions in the first co-located image; and determining the I offset time-domain block vectors for the first co-located image based on the one or more offset reference positions in the first co-located image.

[0192] Exemplarily, for the first co-located image, if all offset reference positions in the first co-located image are blocks that are not predicted based on block vectors, then the motion information of these offset reference positions does not include block vectors. At this time, 0 offset time domain block vectors of the first co-located image can be obtained.

[0193] In an embodiment of the present application, the frame to which the current block belongs is the current image. For a first co-located image of the current image, in some embodiments, determining a first motion vector of the first co-located image may include: determining a motion vector of each of multiple candidate positions around the current block and a reference image index to which the motion vector points; determining a current candidate position among the multiple candidate positions based on a preset position order, and according to the current reference image index to which the motion vector of the current candidate position points, when the reference image indicated by the current reference image index is the first co-located image, determining the motion vector of the current candidate position as the first motion vector of the first co-located image.

[0194] In the embodiment of the present application, the order of the preset positions may be 0, 1, 2, 3, 4 as shown in FIG13 , and these five positions are spatially adjacent blocks of the current block. The coordinates of these five positions in the current image are defined as shown in Table 4.

[0195] Table 4

[0196] In Table 4, X2 and Y2 represent the horizontal coordinate and vertical coordinate of the upper left corner position of the current block in the current image, and W and H represent the width and height of the current block.

[0197] In addition, in an embodiment of the present application, in addition to the five positions in Figure 13, the motion vector used for offset in the co-located image can also be obtained through other positions around the current block, and multiple motion vectors can also be found for a co-located image to guide the offset.

[0198] In some embodiments, when the reference image indicated by the current reference image index is the first co-located image, the method may further include: performing a correction operation on the motion vector of the current candidate position, and determining the corrected motion vector as the first motion vector of the first co-located image.

[0199] In the embodiment of the present application, taking the first motion vector of the first collocated image as an example, when the reference image indicated by the current reference image index is the first collocated image, the motion vector of the current candidate position can be directly determined as the first motion vector of the first collocated image, or the motion vector of the current candidate position can be corrected and then determined as the first motion vector of the first collocated image. Here, the correction operation can be a rounding operation, the purpose of which is to avoid finding sub-pixel positions.

[0200] In some embodiments, determining I offset time-domain block vectors for each of at least one co-located image may include: when the at least one co-located image includes a first co-located image and a second co-located image, determining a first motion vector of the first co-located image and a second motion vector of the second co-located image, and determining one or more initial reference positions of the current block; offsetting the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first co-located image; and offsetting the one or more initial reference positions according to the second motion vector to obtain one or more offset reference positions in the second co-located image; determining I offset time-domain block vectors for each of the at least one co-located image based on the one or more offset reference positions in the first co-located image and the one or more offset reference positions in the second co-located image.

[0201] It should be noted that, in the embodiment of the present application, it is assumed that the current image has two co-located images: a first co-located image Frame0 and a second co-located image Frame1. At this time, two motion vectors can be found, namely a first motion vector MV0' and a second motion vector MV1'. Then, MV0' and MV1' are first rounded (to avoid finding sub-pixel positions) to obtain MV0 and MV1, so that one or more offset reference positions can be determined. Then, based on whether these offset reference positions contain block vectors, I offset time-domain block vectors are obtained. In addition, in the embodiment of the present application, for a co-located image, if multiple motion vectors can be found for this co-located image to offset the initial reference position, for example, if the first co-located image (Frame0) finds motion vectors MV00, MV01, ..., then there should also be more offset reference positions at this time, and no limitation is made here.

[0202] It should also be noted that, for these two co-located images, each co-located image has one or more offset reference positions, and the definitions of these offset reference positions are shown in Table 5.

[0203] Table 5

[0204] In Table 5, X0 and Y0 represent the horizontal and vertical coordinates of the lower-right corner of the current block in the current image, X1 and Y1 represent the horizontal and vertical coordinates of the center of the current block in the current image, and W and H represent the width and height of the current block. Additionally, MV0.X and MV0.Y represent the horizontal and vertical offsets of the integer motion vector corresponding to the first collocated image (Frame0), and MV1.X and MV1.Y represent the horizontal and vertical offsets of the integer motion vector corresponding to the second collocated image (Frame1).

[0205] It should be noted that in the embodiment of the present application, in addition to the reference positions in Table 5, other reference positions may be selected as the offset temporal reference positions, and no limitation is imposed herein. Furthermore, it should be noted that a certain collocated image may include zero offset reference positions, in which case the step of obtaining the temporal candidate block vector will not be performed for the collocated image.

[0206] It should also be noted that in the embodiments of the present application, if multiple motion vectors can be found for a collocated image to offset the initial reference position, for example, if motion vectors MV00, MV01, ... are found for the first collocated image (Frame0), then more offset reference positions should be defined. In other words, if multiple motion vectors for offset are found for a collocated image, the number of defined offset reference positions will increase accordingly.

[0207] In some embodiments, determining I offset time domain block vectors for each of at least one co-located image based on one or more offset reference positions in a first co-located image and one or more offset reference positions in a second co-located image may include: determining a current offset reference position corresponding to a current position index; when the current offset reference position satisfies a second condition, determining J offset time domain block vectors based on the current offset reference position, where J is an integer greater than or equal to 0; determining an offset reference position corresponding to a next position index based on the second position index sequence, and using the offset reference position corresponding to the next position index as the current offset reference position, and continuing to execute the step of determining whether the current offset reference position satisfies the second condition until all offset reference positions are traversed, so as to obtain I offset time domain block vectors for each of at least one co-located image.

[0208] In an embodiment of the present application, the second position index order may be the position index order in Table 5. As shown in Table 5, the method may further include: alternately setting one or more offset reference positions in the first collocated image and one or more offset reference positions in the second collocated image to determine the second position index order.

[0209] In an embodiment of the present application, J offset time domain block vectors are determined based on the current offset reference position, for example, 0, 1, 2, or more offset time domain block vectors may be determined. For example, if the current offset reference position uses a non-block vector-based prediction mode, then there may be 0 offset time domain block vectors; if the current offset reference position uses an IBC weighted prediction mode, then there may be multiple (two) offset time domain block vectors; if the current offset reference position uses an IntraTMP or non-weighted IBC prediction mode, then there may be one offset time domain block vector.

[0210] In an embodiment of the present application, as shown in Table 5, each offset reference position may include a primary position and a secondary position. In some embodiments, referring to FIG14 , determining J offset time domain block vectors based on the current offset reference position may include:

[0211] S1401, determining whether the main position in the current offset reference position satisfies the second condition.

[0212] S1402: When the main position in the current offset reference position meets the second condition, determine J offset time-domain block vectors according to the main position in the current offset reference position.

[0213] S1403: When the primary position in the current offset reference position does not satisfy the second condition, determine whether the secondary position in the current offset reference position satisfies the second condition.

[0214] S1404: When the secondary position in the current offset reference position meets the second condition, determine J offset time-domain block vectors according to the secondary position in the current offset reference position.

[0215] S1405, when the primary position in the current offset reference position does not meet the second condition and the secondary position in the current offset reference position does not meet the second condition, skip the current offset reference position and determine the offset reference position corresponding to the next position index based on the second position index sequence.

[0216] It should be noted that, in this embodiment of the present application, the primary position in the current offset reference position meeting the second condition may include: the primary position in the current offset reference position being within the range of the first collocated image. Correspondingly, the secondary position in the current offset reference position meeting the second condition may include: the secondary position in the current offset reference position being within the range of the first collocated image.

[0217] In some embodiments, the method may further include: when the current offset reference position does not meet the second condition, skipping the current offset reference position, determining the offset reference position corresponding to the next position index based on the second position index sequence, and using the offset reference position corresponding to the next position index as the current offset reference position, and continuing to execute the step of determining whether the current offset reference position meets the second condition.

[0218] It should also be noted that, in the embodiment of the present application, the current offset reference position does not meet the second condition, which may include: the primary position in the current offset reference position does not meet the second condition and the secondary position in the current offset reference position does not meet the second condition.

[0219] It should also be noted that in the embodiment of the present application, for the second condition, the second condition can be to determine whether the main position or the secondary position is within the range of the same-position image, or the second condition can be to determine whether the main position or the secondary position is within the range of the same-position sub-image, slice, CTU, etc., without any limitation here.

[0220] It should also be noted that, in the embodiment of the present application, the value of the variable J may be the same or different in different situations. Furthermore, if zero offset time-domain block vectors are obtained for the primary position in the current offset reference position, then J time-domain block vectors may be further obtained based on the secondary position in the current offset reference position. If zero offset time-domain block vectors are also obtained for the secondary position, then the current offset reference position is skipped, and then the offset reference position corresponding to the next position index is determined based on the first position index sequence.

[0221] That is, in the embodiment of the present application, the positions in Table 5 are respectively offset according to the first co-located image (Frame0) and the second co-located image (Frame1) by alternating the original 10 reference positions. Here, the primary positions can be added in the order of positions 1 to 20 in Table 5. If a similar primary position does not meet the second condition, the secondary position is used. If the secondary position also does not meet the second condition, the current position index is skipped and the primary position or secondary position of the next position index is directly added. Here, the second condition is the same as the first condition described above, and it can be determined whether the corresponding offset time domain block vector is determined according to the primary position or the secondary position, and then one or more second-category time domain candidate block vectors are determined.

[0222] Thus, after determining the first type of temporal candidate block vectors and the second type of temporal candidate block vectors, one or more temporal candidate block vectors can be obtained accordingly. Specifically, corresponding motion information can be obtained from a reference position and / or offset reference position of at least one co-located image. For example, the motion information includes a block vector, a block flip type, whether illumination compensation is used, whether filtering is used, etc. A block vector is then obtained based on the motion information obtained from the at least one co-located image. Exemplarily, if the current motion information includes one available block vector, then this block vector is obtained as the temporal candidate block vector; if the current motion information includes multiple available block vectors, then more than one block vector is obtained as the temporal candidate block vector.

[0223] That is to say, in the embodiment of the present application, if the motion information contains several block vectors, several time-domain candidate block vectors can be obtained. For example, if the reference position uses a prediction mode based on a non-block vector, then there may be 0 block vectors in the reference position, and the block vectors saved in the motion information may also be 0; if the reference position uses an IBC mode and it is an IBC weighted prediction mode, then there may be multiple (two) block vectors in the reference position, and the block vectors saved in the motion information may also be multiple. Otherwise, when the reference position uses an IntraTMP or non-weighted IBC prediction mode, there may be one block vector in the reference position, and the block vector saved in the motion information may also be one.

[0224] S1003: Construct a candidate merging list based on one or more time-domain candidate block vectors.

[0225] It should be noted that, in the embodiment of the present application, after obtaining one or more time-domain candidate block vectors, a candidate merge list may be constructed based on the one or more time-domain candidate block vectors. Referring to FIG. 15 , the method may include:

[0226] S1501: Determine an initial merge list for the current block.

[0227] S1502: Add one or more time-domain candidate block vectors to an initial merge list to obtain a candidate merge list.

[0228] In the embodiment of the present application, the initial merge list is a merge list constructed according to related technologies. For example, the candidate block vectors included in the initial merge list may include block vectors at adjacent positions, block vectors at non-adjacent positions, block vectors based on historical information, and automatically relocated block vectors. The adjacent positions and non-adjacent positions can refer to the adjacent and non-adjacent positions in FIG. 4 . If block vectors exist at these positions, they are determined to be block vectors at adjacent positions and block vectors at non-adjacent positions.

[0229] It is understood that when the initial merge list is not full, one or more time-domain candidate block vectors may be added to the initial merge list. Furthermore, when adding time-domain candidate block vectors to the initial merge list, a duplicate check operation is required to avoid adding existing block vectors in the initial merge list to the initial merge list.

[0230] In a specific embodiment, taking the current time-domain candidate block vector among the one or more time-domain candidate block vectors as an example, the method may further include: if a candidate identical to the current time-domain candidate block vector exists in the initial merged list, discarding the current time-domain candidate block vector; and if a candidate identical to the current time-domain candidate block vector does not exist in the initial merged list, adding the current time-domain candidate block vector to the initial merged list. In other words, in this embodiment of the present application, the resulting candidate merged list does not contain duplicate block vectors.

[0231] It can also be understood that in an embodiment of the present application, for the first type of time domain candidate block vectors and the second type of time domain candidate block vectors, the first type of time domain candidate block vectors can be added first (in the order of the first position index), and then the second type of time domain candidate block vectors can be added (in the order of the second position index), and the addition is stopped until the initial merge list is filled.

[0232] In a specific embodiment, the one or more time-domain candidate block vectors may include X first-category time-domain candidate block vectors and Y second-category time-domain candidate block vectors, where X and Y are both positive integers. Accordingly, adding the one or more time-domain candidate block vectors to the initial merge list may include: adding the X first-category time-domain candidate block vectors to the initial merge list; and when the initial merge list is not full, continuing to add the Y second-category time-domain candidate block vectors to the initial merge list until the initial merge list is full.

[0233] In one possible implementation, adding one or more time-domain candidate block vectors to the initial merge list may include: adding N first-category time-domain candidate block vectors among X first-category time-domain candidate block vectors and M second-category time-domain candidate block vectors among Y second-category time-domain candidate block vectors to the initial merge list; wherein N is an integer greater than 0 and less than or equal to a first threshold, and M is an integer greater than 0 and less than or equal to a second threshold.

[0234] It should be noted that in this embodiment of the present application, the number of first-category time-domain candidate block vectors and second-category time-domain candidate block vectors added to the initial merge list can be individually or jointly capped, wherein the first threshold represents the upper limit for the number of first-category time-domain candidate block vectors added, and the second threshold represents the upper limit for the number of second-category time-domain candidate block vectors added. Exemplarily, a maximum of N first-category time-domain candidate block vectors and M second-category time-domain candidate block vectors are added to the initial merge list.

[0235] In another possible implementation, adding one or more time domain candidate block vectors to the initial merge list may include: adding P time domain candidate block vectors from the one or more time domain candidate block vectors to the initial merge list; wherein the P time domain candidate block vectors are composed of a first category of time domain candidate block vectors and a second category of time domain candidate block vectors, and P is an integer greater than 0 and less than or equal to a third threshold.

[0236] It should also be noted that, in this embodiment of the present application, a total upper limit is set when adding time-domain candidate block vectors to the initial merge list, wherein the third threshold represents the total upper limit for adding first-category time-domain candidate block vectors and second-category time-domain candidate block vectors. Exemplarily, a maximum of P time-domain candidate block vectors are added to the initial merge list, and the P time-domain candidate block vectors are composed of a number of first-category time-domain candidate block vectors and a number of second-category time-domain candidate block vectors.

[0237] It is also understood that in the embodiments of the present application, a judgment condition for executing the present technical solution, namely, a judgment condition for whether to add the temporal candidate block vector to the candidate merge list, can also be set. In one possible implementation, the method can further include: determining a prediction mode for the current block; and when the prediction mode for the current block satisfies a preset condition, executing the step of determining at least one co-located image for the current block.

[0238] In an embodiment of the present application, the prediction mode of the current block can be determined by decoding the bitstream. In some embodiments, if the prediction mode of the current block satisfies a preset condition, the prediction mode can be determined to use the Intra TMP mode for the current block and to construct a candidate merge list for prediction; or the prediction mode can be determined to use the IBC mode for the current block and to construct a candidate merge list for prediction.

[0239] That is to say, in an embodiment of the present application, when the decoding end determines that the current block uses the IBC mode and needs to construct a merge list, or when it is determined that the current block uses the intraTMP mode and needs to construct a candidate merge list, this technical solution will apply a time-domain-based candidate block vector to supplement the constructed candidate merge list.

[0240] In another possible implementation, the method may further include: determining a video sequence to which the current block belongs; and when the video sequence is of the screen content category, performing the step of determining at least one co-located image of the current block. That is, in this embodiment of the present application, the time-domain-based candidate block vector may be used to supplement the constructed candidate merge list only when the video sequence is of the screen content category.

[0241] In another possible implementation, the method may further include: decoding the code stream, determining the value of the first syntax element; when the first syntax element indicates that the current block uses the time domain candidate block vector as a candidate for constructing a candidate merge list, executing the step of determining at least one co-located image of the current block.

[0242] In an embodiment of the present application, if the value of the first syntax element is the first value, then it can be determined that the first syntax element indicates that the current block uses the time domain candidate block vector as a candidate for constructing a candidate merge list; if the value of the first syntax element is the second value, then it can be determined that the first syntax element indicates that the current block does not use the time domain candidate block vector as a candidate for constructing a candidate merge list.

[0243] In an embodiment of the present application, the first value is different from the second value. The first value can be set to 1 and the second value can be set to 0; or the first value can be set to 0 and the second value can be set to 1; or the first value can be set to true and the second value can be set to false; or the first value can be set to false and the second value can be set to true.

[0244] Exemplarily, assuming that the first value is 1 and the second value is 0, when the value of the first syntax element obtained during decoding is 1, it is determined that the current block uses the time domain candidate block vector as a candidate for constructing a candidate merge list; when the value of the first syntax element obtained during decoding is 0, it is determined that the current block does not use the time domain candidate block vector as a candidate for constructing a candidate merge list.

[0245] That is, in the embodiment of the present application, whether the time-domain candidate block vector is added to the candidate merge list may be controlled by some syntax elements, which may be at the sequence level, frame level, slice level, or block level, etc. When the first decoded syntax element is enabled, the first type of time-domain candidate block vector and the second type of time-domain candidate block vector based on the time domain are added when constructing the candidate merge list.

[0246] It can also be understood that in the embodiments of the present application, for the initial merge list constructed according to the relevant technology, exemplarily, the initial merge list of the IBC mode may include: block vectors of adjacent blocks, block vectors of non-adjacent blocks, block vectors based on historical information, and block vectors based on automatic repositioning, etc.; the initial merge list of the intraTMP mode may include: block vectors of adjacent blocks and block vectors of non-adjacent blocks.

[0247] In this way, the first type of time domain candidate block vectors and the second type of time domain candidate block vectors obtained above should be added to the candidate merging list in a certain order with the existing types of block vectors.

[0248] Exemplarily, for the candidate merge list of the IBC mode, the first-category temporal candidate block vector and the second-category temporal candidate block vector should be added before the block vector based on automatic repositioning and after the block vector of the adjacent block. The order can be:

[0249] a. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors based on historical information, block vectors based on automatic repositioning, etc.;

[0250] b. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, block vectors of non-adjacent blocks, second-category time-domain candidate block vectors, block vectors based on historical information, block vectors based on automatic repositioning, etc.;

[0251] c. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, block vectors based on historical information, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors based on automatic repositioning, etc.

[0252] Exemplarily, for the candidate merge list of the IntraTMP mode, the first-category time domain candidate block vector and the second-category time domain candidate block vector should be located after the adjacent block vector, and the order can be:

[0253] a. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, etc.;

[0254] b. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors of non-adjacent blocks, etc.;

[0255] c. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, block vectors of non-adjacent blocks, second-category time-domain candidate block vectors, etc.

[0256] In some embodiments, the block vector based on automatic repositioning is also used to add to the candidate merge list of the IntraTMP mode. In this case, the block vector based on automatic repositioning should be similarly added after the first type of time domain candidate block vector and the second type of time domain candidate block vector.

[0257] It can also be understood that, in the embodiment of the present application, after the candidate merge list is constructed, prediction can be performed based on the candidate merge list, and the reconstructed block of the current block can be further determined.

[0258] In some embodiments, the method may further include: determining one or more target block vectors of the current block according to the candidate merge list, and determining a prediction block of the current block according to the one or more target block vectors of the current block.

[0259] In an embodiment of the present application, one or more target block vectors of the current block are determined based on the candidate merge list. For example, the candidate merge list can be reordered based on the template error value of each candidate in the candidate merge list, and then combined with the block vector index obtained by decoding the code stream, so as to obtain one or more target block vectors.

[0260] In an embodiment of the present application, if a target block vector is obtained, then a reference block corresponding to the target block vector is determined, and a prediction block of the current block is determined based on the reference block; or, if at least two target block vectors are obtained, then at least two reference blocks corresponding to the at least two target block vectors are determined, and then a weighted operation is performed on the at least two reference blocks to determine the prediction block of the current block.

[0261] In some embodiments, the method may further include: decoding a code stream to determine a residual block of a current block; and determining a reconstructed block of the current block according to the residual block of the current block and a predicted block of the current block.

[0262] In an embodiment of the present application, after decoding to obtain the residual block of the current block, an addition operation may be performed on the residual block of the current block and the prediction block of the current block to determine the reconstructed block of the current block, thereby realizing the reconstruction process of the current block.

[0263] An embodiment of the present application provides a decoding method that first determines at least one co-located image of a current block; then, based on the at least one co-located image, determines one or more time-domain candidate block vectors of the current block; and then, based on the one or more time-domain candidate block vectors, constructs a candidate merge list. In other words, when constructing the candidate merge list, one or more time-domain candidate block vectors are considered as candidates in the candidate merge list. This not only effectively reduces the situation where the candidate merge list cannot be filled, but also improves the prediction accuracy under the candidate merge list, such as the prediction effect of IBC and / or IntraTMP in the merge list mode, without introducing additional software and hardware implementation complexity, thereby improving encoding and decoding efficiency.

[0264] In another embodiment of the present application, FIG16 is a flow chart of a coding method provided in an embodiment of the present application. As shown in FIG16 , the method may include:

[0265] S1601: Determine at least one co-located image of the current block.

[0266] It should be noted that the encoding method of the embodiment of the present application is applied to the encoder. The encoding method may specifically refer to a method for constructing a candidate merge list, and more specifically, a method for constructing a candidate merge list based on a time domain block vector. Thus, based on the composition structure of the encoder 100 shown in FIG8 , the encoding method of the embodiment of the present application is mainly applicable to the intraTMP mode or IBC mode in the inter-frame prediction frame. Thus, when constructing the candidate merge list, it is possible to improve the situation where the candidate merge list cannot be filled according to the co-located image of the current block.

[0267] It should also be noted that, in the embodiment of the present application, the current block can have one, two, or even more collocated images. For example, as shown in FIG11 , the current block can have two collocated images, such as a forward collocated image (Frame 0, reference image 0) located before the current image and a backward collocated image (Frame 1, reference image 1) located after the current image. Here, the current block is a block in the current image, and the reference position of the current block can be searched for in Frame 0 and Frame 1, respectively.

[0268] In an embodiment of the present application, for a current block, one or more corresponding co-located images can be determined based on the co-located image index in the bitstream. In some embodiments, the method may further include: determining a co-located image index for the current block based on at least one co-located image of the current block; encoding the co-located image index for the current block, and writing the resulting encoded bits into the bitstream.

[0269] It should be noted that, in the embodiment of the present application, the co-located image is a subset of the reference image, and the time domain motion vector MV / block vector BV can only be obtained from the co-located image.

[0270] It should also be noted that in this embodiment of the present application, each B-frame can have two reference image lists, List0 and List1. The co-located image index specifically refers to whether the co-located image is in List0 or List1, so the co-located image index is the index value for obtaining List0 and List1. Furthermore, it is not ruled out that an image can have more co-located images, or that more than one image in List0 and List1 can be a co-located image. In other words, the co-located image index is used to indicate the position of the co-located image in the reference image list.

[0271] It can be understood that in the embodiment of the present application, the current image includes the current block. For the current image, the current image may also not have a co-located image. In this case, it is impossible to further obtain the time domain candidate block vector. In this case, the candidate merge list is still constructed according to the relevant technology. In the case that there is a co-located image for the current image, it can be determined that there can be one or more co-located images based on the co-located image index written into the bitstream by the encoding end. In a specific embodiment, the method may also include: if the number of indexes included in the co-located image index is one, then determining a co-located image of the current block; if the number of indexes included in the co-located image index is two, then determining two co-located images of the current block.

[0272] That is to say, for the current image to which the current block belongs, if the current image has no co-located image index, then there is no co-located image for the current image, and the time domain candidate block vector of the current block cannot be further obtained; if the current image has only one co-located image index, then the current image has only one co-located image, and the time domain candidate block vector of the current block can be obtained from this one co-located image; if the current image has two co-located image indexes, then the current image has two co-located images, and the time domain candidate block vector of the current block can be obtained from these two co-located images; even more, if the current image has more than two co-located image indexes, then the current image has more than two co-located images, and the time domain candidate block vector of the current block can be obtained from these co-located images.

[0273] For example, in the existing reference software implementation, it is possible to support an inter-frame of the current block with two co-located frames (i.e., two co-located images). Then, the time domain candidate block vector of the current block can be obtained not only from one of the co-located images, but also from the two co-located images. No limitation is imposed here.

[0274] S1602: Determine one or more time-domain candidate block vectors of the current block according to at least one co-located image.

[0275] In an embodiment of the present application, the temporal candidate block vector may include a first type of temporal candidate block vector and / or a second type of temporal candidate block vector. The first type of temporal candidate block vector is different from the second type of temporal candidate block vector. The first type of temporal candidate block vector represents a temporal block vector determined based on a reference position in a co-located image, and the second type of temporal candidate block vector represents an offset temporal block vector determined by offsetting a reference position indicated by a motion vector of the co-located image.

[0276] In an embodiment of the present application, for a certain co-located image, the reference position in the co-located image may be a block that is not predicted based on a block vector, so the motion information of the reference position does not include a block vector; even more, if all reference positions in the co-located image are blocks that are not predicted based on a block vector, then the motion information of these reference positions does not include a block vector, and at this time, 0 time domain block vector can be obtained based on the co-located image.

[0277] That is to say, assuming that at least one co-located image includes a first co-located image and a second co-located image, it is possible to obtain 0 time domain block vectors of the first co-located image and 0 time domain block vectors of the second co-located image, that is, based on this at least one co-located image, it is possible to obtain 0 time domain candidate block vectors. In this case, the candidate merge list is still constructed according to the relevant technology.

[0278] Taking into account that this technical solution is to solve the situation where the candidate merge list cannot be filled, the obtained time domain candidate block vector is added to the candidate merge list. The following is an example of obtaining at least one time domain candidate block vector of the current block based on at least one co-located image.

[0279] In one possible implementation, determining one or more time-domain candidate block vectors for the current block based on at least one co-located image may include: determining X first-category time-domain candidate block vectors based on the at least one co-located image; and determining one or more time-domain candidate block vectors for the current block based on the X first-category time-domain candidate block vectors; where X is a positive integer.

[0280] In another possible implementation, determining one or more time-domain candidate block vectors of the current block based on at least one co-located image may include: determining Y second-category time-domain candidate block vectors based on at least one co-located image; and determining one or more time-domain candidate block vectors of the current block based on the Y second-category time-domain candidate block vectors; wherein Y is a positive integer.

[0281] In yet another possible implementation, determining one or more time-domain candidate block vectors for the current block based on at least one co-located image may include: determining X time-domain candidate block vectors of the first category and Y time-domain candidate block vectors of the second category based on the at least one co-located image; and determining one or more time-domain candidate block vectors for the current block based on the X time-domain candidate block vectors of the first category and the Y time-domain candidate block vectors of the second category; wherein X and Y are both positive integers.

[0282] That is, in an embodiment of the present application, one or more time-domain candidate block vectors of the current block may be obtained from X first-category time-domain candidate block vectors and / or Y second-category time-domain candidate block vectors determined based on at least one co-located image.

[0283] In some embodiments, determining X first-category temporal candidate block vectors based on at least one co-located image may include: determining K temporal block vectors for each of the at least one co-located image, where K is an integer greater than or equal to 0; and determining the X first-category temporal candidate block vectors based on the K temporal block vectors for each of the at least one co-located image.

[0284] In the embodiment of the present application, when the at least one co-located image includes only one co-located image, the value of K may be set equal to the value of X.

[0285] In addition, in the embodiment of the present application, the value of K may be the same or different for different collocated images. For example, assuming there is a first collocated image and a second collocated image, a zero time-domain block vector may be obtained for the first collocated image, and a non-zero time-domain block vector may be obtained for the second collocated image; alternatively, a non-zero time-domain block vector may be obtained for each of the first collocated image and the second collocated image.

[0286] In an embodiment of the present application, the first co-located image is any one of the at least one co-located image. For determining one or more time-domain block vectors for each of the at least one co-located image, taking the first co-located image as an example, the method may include: determining one or more reference positions in the first co-located image; and determining K time-domain block vectors for the first co-located image based on the one or more reference positions.

[0287] For example, for the first co-located image, if all reference positions in the first co-located image are blocks not predicted based on block vectors, then the motion information of these reference positions does not include block vectors. At this time, 0 time domain block vectors of the first co-located image can be obtained.

[0288] It should be noted that for each co-located image, there can be one or more reference positions, and the definitions of these reference positions are shown in the aforementioned Table 3. In Table 3, X0 and Y0 represent the horizontal and vertical coordinates of the lower right corner of the current block in the current image, X1 and Y1 represent the horizontal and vertical coordinates of the center of the current block in the current image, and W and H represent the width and height of the current block.

[0289] It should be noted that the reference positions in Table 3 are mostly the positions of the current block or the positions to the right, lower right, and upper bottom of the current block. Since these positions have not yet been encoded and decoded in the current image, the required information cannot be obtained. The reference image in the time domain (specifically, the co-located image) has been encoded and decoded, and this information can be saved and obtained. In some embodiments, in addition to the above-mentioned reference positions, the reference position in the time domain can also be selected as a position in the current block, or in the upper left, upper, upper right, left, and lower left directions, without any limitation. In addition, it should be noted that for a certain co-located image, it is also possible to include 0 reference positions. At this time, the step of obtaining the time domain candidate block vector will no longer be performed for the co-located image.

[0290] In some embodiments, determining K time domain block vectors of the first co-located image based on one or more reference positions may include: determining a current reference position corresponding to a current position index; when the current reference position satisfies a first condition, determining H time domain block vectors based on the current reference position, where H is an integer greater than or equal to 0; sequentially determining a reference position corresponding to a next position index based on the first position index, and using the reference position corresponding to the next position index as the current reference position, and continuing to execute the step of determining whether the current reference position satisfies the first condition until one or more reference positions are traversed, so as to obtain K time domain block vectors of the first co-located image.

[0291] In an embodiment of the present application, H time-domain block vectors are determined based on the current reference position, for example, 0, 1, 2, or more time-domain block vectors may be determined. For example, if the current reference position uses a non-block-vector-based prediction mode, then there may be 0 time-domain block vectors; if the current reference position uses an IBC weighted prediction mode, then there may be multiple (two) time-domain block vectors; if the current reference position uses an IntraTMP or non-weighted IBC prediction mode, then there may be one time-domain block vector.

[0292] In the embodiment of the present application, the first position index sequence may be the position index sequence in Table 3, such as 1, 2, 3, ..., 10, etc. First, position index 1 is determined as the current reference position corresponding to the current position index. When the current reference position satisfies the first condition, H time-domain block vectors are determined based on the current reference position. Then, the reference position corresponding to position index 2 is determined as the current reference position. The step of determining whether the current reference position satisfies the first condition is continued. Then, the reference position corresponding to position index 3 is determined as the current reference position. This process is repeated until the traversal of these 10 reference positions is completed, thereby obtaining K time-domain block vectors of the first co-located image.

[0293] In an embodiment of the present application, as shown in Table 3, each reference position may include a primary position and a secondary position. In some embodiments, determining H time-domain block vectors based on the current reference position may include: determining whether the primary position in the current reference position satisfies a first condition; when the primary position in the current reference position satisfies the first condition, determining H time-domain block vectors based on the primary position in the current reference position; when the primary position in the current reference position does not satisfy the first condition, determining whether the secondary position in the current reference position satisfies the first condition; when the secondary position in the current reference position satisfies the first condition, determining H time-domain block vectors based on the secondary position in the current reference position; when the primary position in the current reference position does not satisfy the first condition and the secondary position in the current reference position does not satisfy the first condition, skipping the current reference position and determining a reference position corresponding to a next position index based on the first position index sequence.

[0294] It should be noted that, in this embodiment of the present application, the primary position in the current reference position meeting the first condition may include: the primary position in the current reference position being within the range of the first collocated image. Correspondingly, the secondary position in the current reference position meeting the first condition may include: the secondary position in the current reference position being within the range of the first collocated image.

[0295] In some embodiments, the method may further include: when the current reference position does not meet the first condition, skipping the current reference position, determining the reference position corresponding to the next position index based on the first position index sequence, and using the reference position corresponding to the next position index as the current reference position, and continuing to execute the step of determining whether the current reference position meets the first condition.

[0296] It should also be noted that, in the embodiment of the present application, the current reference position does not meet the first condition, which may include: the primary position in the current reference position does not meet the first condition and the secondary position in the current reference position does not meet the first condition.

[0297] It should also be noted that in the embodiment of the present application, for the first condition, the first condition can be to determine whether the main position or the secondary position is within the range of the co-located image, or the first condition can be to determine whether the main position or the secondary position is within the range of the co-located sub-image, slice, CTU, etc., without any limitation here.

[0298] It should also be noted that, in the embodiment of the present application, the value of the variable H may be the same or different in different situations. Furthermore, if zero time-domain block vectors are obtained for the primary position in the current reference position, H time-domain block vectors may be further obtained based on the secondary position in the current reference position. If zero time-domain block vectors are also obtained for the secondary position, the current reference position is skipped, and the reference position corresponding to the next position index is determined based on the first position index sequence.

[0299] That is, in the embodiment of the present application, for each co-located image, the reference position in the co-located image may include the 10 primary positions and 10 secondary positions in Table 3, and the primary positions are added in the order of position indexes 1 to 10. When the primary position does not meet the first condition (the primary position is not within the range of the co-located image, or other conditions may be met, such as not being within the range of the co-located sub-image, slice, CTU, etc.), the corresponding secondary position is used to replace the primary position to determine the time domain block vector; if the secondary position also does not meet the first condition, the position index is skipped, and the primary position or secondary position of the next position index is directly added to determine one or more first-category time domain candidate block vectors.

[0300] In an embodiment of the present application, in addition to determining the first-category temporal candidate block vector based on the reference position in Table 3, a second-category temporal candidate block vector may also be determined in combination with the searched motion vector. In some embodiments, determining Y second-category temporal candidate block vectors based on at least one co-located image may include: determining I offset temporal block vectors for each of the at least one co-located image, where I is an integer greater than or equal to 0; and determining the Y second-category temporal candidate block vectors based on the I offset temporal block vectors for each of the at least one co-located image.

[0301] In the embodiment of the present application, when at least one co-located image includes only one co-located image, the value of I can be set to be equal to the value of Y.

[0302] In addition, in the embodiment of the present application, the value of I may be the same or different for different co-located images. For example, assuming there are a first co-located image and a second co-located image, a zero offset time-domain block vector may be obtained for the first co-located image, and a non-zero offset time-domain block vector may be obtained for the second co-located image; alternatively, a non-zero offset time-domain block vector may be obtained for each of the first co-located image and the second co-located image.

[0303] In an embodiment of the present application, the first co-located image is any one of the at least one co-located image. For determining the I offset time-domain block vectors for each of the at least one co-located image, taking the first co-located image as an example, the method may include: determining a first motion vector for the first co-located image and determining one or more initial reference positions of a current block; offsetting the one or more initial reference positions based on the first motion vector to obtain one or more offset reference positions in the first co-located image; and determining the I offset time-domain block vectors for the first co-located image based on the one or more offset reference positions in the first co-located image.

[0304] Exemplarily, for the first co-located image, if all offset reference positions in the first co-located image are blocks that are not predicted based on block vectors, then the motion information of these offset reference positions does not include block vectors. At this time, 0 offset time domain block vectors of the first co-located image can be obtained.

[0305] In an embodiment of the present application, the frame to which the current block belongs is the current image. For a first co-located image of the current image, in some embodiments, determining a first motion vector of the first co-located image may include: determining a motion vector of each of multiple candidate positions around the current block and a reference image index to which the motion vector points; determining a current candidate position among the multiple candidate positions based on a preset position order, and according to the current reference image index to which the motion vector of the current candidate position points, when the reference image indicated by the current reference image index is the first co-located image, determining the motion vector of the current candidate position as the first motion vector of the first co-located image.

[0306] In the embodiment of the present application, the order of the preset positions may be 0, 1, 2, 3, and 4 as shown in FIG13 . These five positions are spatially adjacent blocks of the current block. The coordinates of these five positions in the current image are defined as shown in Table 4 above. In Table 4, X2 and Y2 represent the horizontal and vertical coordinates of the upper left corner of the current block in the current image, and W and H represent the width and height of the current block.

[0307] In addition, in an embodiment of the present application, in addition to the five positions in Figure 13, the motion vector used for offset in the co-located image can also be obtained through other positions around the current block, and multiple motion vectors can also be found for a co-located image to guide the offset.

[0308] In some embodiments, when the reference image indicated by the current reference image index is the first co-located image, the method may further include: performing a correction operation on the motion vector of the current candidate position, and determining the corrected motion vector as the first motion vector of the first co-located image.

[0309] In the embodiment of the present application, taking the first motion vector of the first collocated image as an example, when the reference image indicated by the current reference image index is the first collocated image, the motion vector of the current candidate position can be directly determined as the first motion vector of the first collocated image, or the motion vector of the current candidate position can be corrected and then determined as the first motion vector of the first collocated image. Here, the correction operation can be a rounding operation, the purpose of which is to avoid finding sub-pixel positions.

[0310] In some embodiments, determining I offset time-domain block vectors for each of at least one co-located image may include: when the at least one co-located image includes a first co-located image and a second co-located image, determining a first motion vector of the first co-located image and a second motion vector of the second co-located image, and determining one or more initial reference positions of the current block; offsetting the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first co-located image; and offsetting the one or more initial reference positions according to the second motion vector to obtain one or more offset reference positions in the second co-located image; determining I offset time-domain block vectors for each of the at least one co-located image based on the one or more offset reference positions in the first co-located image and the one or more offset reference positions in the second co-located image.

[0311] It should be noted that, in the embodiment of the present application, it is assumed that the current image has two co-located images: a first co-located image Frame0 and a second co-located image Frame1. At this time, two motion vectors can be found, namely a first motion vector MV0' and a second motion vector MV1'. Then, MV0' and MV1' are first rounded (to avoid finding sub-pixel positions) to obtain MV0 and MV1, so that one or more offset reference positions can be determined. Then, based on whether these offset reference positions contain block vectors, I offset time-domain block vectors are obtained. In addition, in the embodiment of the present application, for a co-located image, if multiple motion vectors can be found for this co-located image to offset the initial reference position, for example, if the first co-located image (Frame0) finds motion vectors MV00, MV01, ..., then there should also be more offset reference positions at this time, and no limitation is made here.

[0312] It should also be noted that for these two collocated images, each collocated image has one or more offset reference positions, and the definitions of these offset reference positions are shown in the aforementioned Table 5. In Table 5, X0 and Y0 represent the horizontal and vertical coordinates of the lower right corner of the current block in the current image, X1 and Y1 represent the horizontal and vertical coordinates of the center of the current block in the current image, and W and H represent the width and height of the current block. In addition, MV0.X and MV0.Y are the horizontal and vertical offsets of the integer motion vector corresponding to the first collocated image (Frame0), and MV1.X and MV1.Y are the horizontal and vertical offsets of the integer motion vector corresponding to the second collocated image (Frame1).

[0313] It should be noted that in the embodiment of the present application, in addition to the reference positions in Table 5, other reference positions may be selected as the offset temporal reference positions, and no limitation is imposed herein. Furthermore, it should be noted that a certain collocated image may include zero offset reference positions, in which case the step of obtaining the temporal candidate block vector will not be performed for the collocated image.

[0314] It should also be noted that in the embodiments of the present application, if multiple motion vectors can be found for a collocated image to offset the initial reference position, for example, if motion vectors MV00, MV01, ... are found for the first collocated image (Frame0), then more offset reference positions should be defined. In other words, if multiple motion vectors for offset are found for a collocated image, the number of defined offset reference positions will increase accordingly.

[0315] In some embodiments, determining I offset time domain block vectors for each of at least one co-located image based on one or more offset reference positions in a first co-located image and one or more offset reference positions in a second co-located image may include: determining a current offset reference position corresponding to a current position index; when the current offset reference position satisfies a second condition, determining J offset time domain block vectors based on the current offset reference position, where J is an integer greater than or equal to 0; determining an offset reference position corresponding to a next position index based on the second position index sequence, and using the offset reference position corresponding to the next position index as the current offset reference position, and continuing to execute the step of determining whether the current offset reference position satisfies the second condition until all offset reference positions are traversed, so as to obtain I offset time domain block vectors for each of at least one co-located image.

[0316] In an embodiment of the present application, the second position index order may be the position index order in Table 5. As shown in Table 5, the method may further include: alternately setting one or more offset reference positions in the first collocated image and one or more offset reference positions in the second collocated image to determine the second position index order.

[0317] In an embodiment of the present application, J offset time domain block vectors are determined based on the current offset reference position, for example, 0, 1, 2, or more offset time domain block vectors may be determined. For example, if the current offset reference position uses a non-block vector-based prediction mode, then there may be 0 offset time domain block vectors; if the current offset reference position uses an IBC weighted prediction mode, then there may be multiple (two) offset time domain block vectors; if the current offset reference position uses an IntraTMP or non-weighted IBC prediction mode, then there may be one offset time domain block vector.

[0318] In an embodiment of the present application, as shown in Table 5, each offset reference position may include a primary position and a secondary position. In some embodiments, determining J offset time-domain block vectors based on the current offset reference position may include: determining whether the primary position in the current offset reference position satisfies a second condition; when the primary position in the current offset reference position satisfies the second condition, determining J offset time-domain block vectors based on the primary position in the current offset reference position; when the primary position in the current offset reference position does not satisfy the second condition, determining whether the secondary position in the current offset reference position satisfies the second condition; when the secondary position in the current offset reference position satisfies the second condition, determining J offset time-domain block vectors based on the secondary position in the current offset reference position; when the primary position in the current offset reference position does not satisfy the second condition and the secondary position in the current offset reference position does not satisfy the second condition, skipping the current offset reference position and determining the offset reference position corresponding to the next position index based on the second position index sequence.

[0319] It should be noted that, in this embodiment of the present application, the primary position in the current offset reference position meeting the second condition may include: the primary position in the current offset reference position being within the range of the first collocated image. Correspondingly, the secondary position in the current offset reference position meeting the second condition may include: the secondary position in the current offset reference position being within the range of the first collocated image.

[0320] In some embodiments, the method may further include: when the current offset reference position does not meet the second condition, skipping the current offset reference position, determining the offset reference position corresponding to the next position index based on the second position index sequence, and using the offset reference position corresponding to the next position index as the current offset reference position, and continuing to execute the step of determining whether the current offset reference position meets the second condition.

[0321] It should also be noted that, in the embodiment of the present application, the current offset reference position does not meet the second condition, which may include: the primary position in the current offset reference position does not meet the second condition and the secondary position in the current offset reference position does not meet the second condition.

[0322] It should also be noted that in the embodiment of the present application, for the second condition, the second condition can be to determine whether the main position or the secondary position is within the range of the same-position image, or the second condition can be to determine whether the main position or the secondary position is within the range of the same-position sub-image, slice, CTU, etc., without any limitation here.

[0323] It should also be noted that, in the embodiment of the present application, the value of the variable J may be the same or different in different situations. Furthermore, if zero offset time-domain block vectors are obtained for the primary position in the current offset reference position, then J time-domain block vectors may be further obtained based on the secondary position in the current offset reference position. If zero offset time-domain block vectors are also obtained for the secondary position, then the current offset reference position is skipped, and then the offset reference position corresponding to the next position index is determined based on the first position index sequence.

[0324] That is, in the embodiment of the present application, the positions in Table 5 are respectively offset according to the first co-located image (Frame0) and the second co-located image (Frame1) by alternating the original 10 reference positions. Here, the primary positions can be added in the order of positions 1 to 20 in Table 5. If a similar primary position does not meet the second condition, the secondary position is used. If the secondary position also does not meet the second condition, the current position index is skipped and the primary position or secondary position of the next position index is directly added. Here, the second condition is the same as the first condition described above, and it can be determined whether the corresponding offset time domain block vector is determined according to the primary position or the secondary position, and then one or more second-category time domain candidate block vectors are determined.

[0325] Thus, after determining the first type of temporal candidate block vectors and the second type of temporal candidate block vectors, one or more temporal candidate block vectors can be obtained accordingly. Specifically, corresponding motion information can be obtained from a reference position and / or offset reference position of at least one co-located image. For example, the motion information includes a block vector, a block flip type, whether illumination compensation is used, whether filtering is used, etc. A block vector is then obtained based on the motion information obtained from the at least one co-located image. Exemplarily, if the current motion information includes one available block vector, then this block vector is obtained as the temporal candidate block vector; if the current motion information includes multiple available block vectors, then more than one block vector is obtained as the temporal candidate block vector.

[0326] That is to say, in the embodiment of the present application, if the motion information contains several block vectors, several time-domain candidate block vectors can be obtained. For example, if the reference position uses a prediction mode based on a non-block vector, then there may be 0 block vectors in the reference position, and the block vectors saved in the motion information may also be 0; if the reference position uses an IBC mode and it is an IBC weighted prediction mode, then there may be multiple (two) block vectors in the reference position, and the block vectors saved in the motion information may also be multiple. Otherwise, when the reference position uses an IntraTMP or non-weighted IBC prediction mode, there may be one block vector in the reference position, and the block vector saved in the motion information may also be one.

[0327] S1603: Construct a candidate merge list based on one or more time-domain candidate block vectors.

[0328] It should be noted that in an embodiment of the present application, a candidate merge list is constructed based on one or more time domain candidate block vectors. The method may include: determining an initial merge list for the current block; adding one or more time domain candidate block vectors to the initial merge list to obtain a candidate merge list.

[0329] In the embodiment of the present application, the initial merge list is a merge list constructed according to related technologies. For example, the candidate block vectors included in the initial merge list may include block vectors at adjacent positions, block vectors at non-adjacent positions, block vectors based on historical information, and automatically relocated block vectors. The adjacent positions and non-adjacent positions can refer to the adjacent and non-adjacent positions in FIG. 4 . If block vectors exist at these positions, they are determined to be block vectors at adjacent positions and block vectors at non-adjacent positions.

[0330] It is understood that when the initial merge list is not full, one or more time-domain candidate block vectors may be added to the initial merge list. Furthermore, when adding time-domain candidate block vectors to the initial merge list, a duplicate check operation is required to avoid adding existing block vectors in the initial merge list to the initial merge list.

[0331] In a specific embodiment, taking the current time-domain candidate block vector among the one or more time-domain candidate block vectors as an example, the method may further include: if a candidate identical to the current time-domain candidate block vector exists in the initial merged list, discarding the current time-domain candidate block vector; and if a candidate identical to the current time-domain candidate block vector does not exist in the initial merged list, adding the current time-domain candidate block vector to the initial merged list. In other words, in this embodiment of the present application, the resulting candidate merged list does not contain duplicate block vectors.

[0332] It can also be understood that in an embodiment of the present application, for the first type of time domain candidate block vectors and the second type of time domain candidate block vectors, the first type of time domain candidate block vectors can be added first (in the order of the first position index), and then the second type of time domain candidate block vectors can be added (in the order of the second position index), and the addition is stopped until the initial merge list is filled.

[0333] In a specific embodiment, the one or more time-domain candidate block vectors may include X first-category time-domain candidate block vectors and Y second-category time-domain candidate block vectors, where X and Y are both positive integers. Accordingly, adding the one or more time-domain candidate block vectors to the initial merge list may include: adding the X first-category time-domain candidate block vectors to the initial merge list; and when the initial merge list is not full, continuing to add the Y second-category time-domain candidate block vectors to the initial merge list until the initial merge list is full.

[0334] In one possible implementation, adding one or more time-domain candidate block vectors to the initial merge list may include: adding N first-category time-domain candidate block vectors among X first-category time-domain candidate block vectors and M second-category time-domain candidate block vectors among Y second-category time-domain candidate block vectors to the initial merge list; wherein N is an integer greater than 0 and less than or equal to a first threshold, and M is an integer greater than 0 and less than or equal to a second threshold.

[0335] It should be noted that in this embodiment of the present application, the number of first-category time-domain candidate block vectors and second-category time-domain candidate block vectors added to the initial merge list can be individually or jointly capped, wherein the first threshold represents the upper limit for the number of first-category time-domain candidate block vectors added, and the second threshold represents the upper limit for the number of second-category time-domain candidate block vectors added. Exemplarily, a maximum of N first-category time-domain candidate block vectors and M second-category time-domain candidate block vectors are added to the initial merge list.

[0336] In another possible implementation, adding one or more time domain candidate block vectors to the initial merge list may include: adding P time domain candidate block vectors from the one or more time domain candidate block vectors to the initial merge list; wherein the P time domain candidate block vectors are composed of a first category of time domain candidate block vectors and a second category of time domain candidate block vectors, and P is an integer greater than 0 and less than or equal to a third threshold.

[0337] It should also be noted that, in this embodiment of the present application, a total upper limit is set when adding time-domain candidate block vectors to the initial merge list, wherein the third threshold represents the total upper limit for adding first-category time-domain candidate block vectors and second-category time-domain candidate block vectors. Exemplarily, a maximum of P time-domain candidate block vectors are added to the initial merge list, and the P time-domain candidate block vectors are composed of a number of first-category time-domain candidate block vectors and a number of second-category time-domain candidate block vectors.

[0338] It is also understood that in the embodiments of the present application, a judgment condition for executing the present technical solution, namely, a judgment condition for whether to add the temporal candidate block vector to the candidate merge list, can also be set. In one possible implementation, the method can further include: determining a prediction mode for the current block; and when the prediction mode for the current block satisfies a preset condition, executing the step of determining at least one co-located image for the current block.

[0339] In an embodiment of the present application, after determining the prediction mode for the current block, the encoder may encode the prediction mode for the current block into the bitstream, so that the decoder can subsequently determine the prediction mode for the current block simply by decoding the bitstream. In some embodiments, the prediction mode for the current block satisfies a preset condition, which may include determining that the current block uses the Intra TMP mode and constructing a candidate merge list for prediction; or determining that the current block uses the IBC mode and constructing a candidate merge list for prediction.

[0340] That is to say, in an embodiment of the present application, when the encoding end determines that the current block uses the IBC mode and needs to construct a merge list, or when it determines that the current block uses the intraTMP mode and needs to construct a candidate merge list, this technical solution will apply a time-domain-based candidate block vector to supplement the constructed candidate merge list.

[0341] In another possible implementation, the method may further include: determining a video sequence to which the current block belongs; and when the video sequence is of the screen content category, performing the step of determining at least one co-located image of the current block. That is, in this embodiment of the present application, the time-domain-based candidate block vector may be used to supplement the constructed candidate merge list only when the video sequence is of the screen content category.

[0342] In yet another possible implementation, the method may further include: when the current block uses the time-domain candidate block vector as a candidate for constructing a candidate merge list, executing the step of determining at least one co-located image of the current block.

[0343] In some embodiments, the method may further include: determining a value of a first syntax element; encoding the value of the first syntax element, and writing the obtained coded bits into a bitstream.

[0344] In an embodiment of the present application, the first syntax element may be used to indicate whether the current block uses the time-domain candidate block vector as a candidate for constructing a candidate merge list. If the current block uses the time-domain candidate block vector as a candidate for constructing a candidate merge list, then the value of the first syntax element may be determined to be a first value; if the current block does not use the time-domain candidate block vector as a candidate for constructing a candidate merge list, then the value of the first syntax element may be determined to be a second value.

[0345] In an embodiment of the present application, the first value is different from the second value. The first value can be set to 1 and the second value can be set to 0; or the first value can be set to 0 and the second value can be set to 1; or the first value can be set to true and the second value can be set to false; or the first value can be set to false and the second value can be set to true.

[0346] Exemplarily, assuming that the first value is 1 and the second value is 0, if the time domain candidate block vector is used as a candidate for constructing a candidate merge list in the current block, the value of the first syntax element 1 can be encoded into the bitstream; if the time domain candidate block vector is not used as a candidate for constructing a candidate merge list in the current block, the value of the first syntax element 0 can be encoded into the bitstream.

[0347] That is, in the embodiment of the present application, whether the time-domain candidate block vector is added to the candidate merge list can be controlled by some syntax elements, which can be sequence-level, frame-level, slice-level, or block-level. In this way, when the first syntax element decoded is enabled, the subsequent decoding end adds the first-category time-domain candidate block vector and the second-category time-domain candidate block vector based on the time domain when constructing the candidate merge list. Otherwise, the first-category time-domain candidate block vector and the second-category time-domain candidate block vector based on the time domain will not be added.

[0348] It can also be understood that in the embodiments of the present application, for the initial merge list constructed according to the relevant technology, exemplarily, the initial merge list of the IBC mode may include: block vectors of adjacent blocks, block vectors of non-adjacent blocks, block vectors based on historical information, and block vectors based on automatic repositioning, etc.; the initial merge list of the intraTMP mode may include: block vectors of adjacent blocks and block vectors of non-adjacent blocks.

[0349] In this way, the first type of time domain candidate block vectors and the second type of time domain candidate block vectors obtained above should be added to the candidate merging list in a certain order with the existing types of block vectors.

[0350] Exemplarily, for the candidate merge list of the IBC mode, the first-category temporal candidate block vector and the second-category temporal candidate block vector should be added before the block vector based on automatic repositioning and after the block vector of the adjacent block. The order can be:

[0351] a. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors based on historical information, block vectors based on automatic repositioning, etc.;

[0352] b. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, block vectors of non-adjacent blocks, second-category time-domain candidate block vectors, block vectors based on historical information, block vectors based on automatic repositioning, etc.;

[0353] c. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, block vectors based on historical information, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors based on automatic repositioning, etc.

[0354] Exemplarily, for the candidate merge list of the IntraTMP mode, the first-category time domain candidate block vector and the second-category time domain candidate block vector should be located after the adjacent block vector, and the order can be:

[0355] a. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, etc.;

[0356] b. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors of non-adjacent blocks, etc.;

[0357] c. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, block vectors of non-adjacent blocks, second-category time-domain candidate block vectors, etc.

[0358] In some embodiments, the block vector based on automatic repositioning is also used to add to the candidate merge list of the IntraTMP mode. In this case, the block vector based on automatic repositioning should be similarly added after the first type of time domain candidate block vector and the second type of time domain candidate block vector.

[0359] It is also understood that, in the embodiment of the present application, after constructing the candidate merge list, referring to FIG. 16 , the method further includes:

[0360] S1604: Perform prediction based on the candidate merge list to determine a prediction block for the current block.

[0361] It should be noted that in an embodiment of the present application, prediction is performed based on the candidate merge list to determine the prediction block of the current block, which may include: determining one or more target block vectors of the current block based on the candidate merge list, and determining the prediction block of the current block based on the one or more target block vectors of the current block.

[0362] That is, in an embodiment of the present application, one or more target block vectors for the current block are determined based on the candidate merge list. For example, the one or more target block vectors may be determined based on the template error values ​​of the candidates in the candidate merge list. Furthermore, the candidate merge list may be reordered based on the template error values ​​of the candidates in the candidate merge list, and then the block vector indices corresponding to the one or more target block vectors are determined and written into the bitstream. This allows a subsequent decoder to obtain the reordered candidate merge list and, in combination with the block vector indices obtained from the bitstream, obtain the one or more target block vectors.

[0363] It should also be noted that, in an embodiment of the present application, if a target block vector is obtained, then a reference block corresponding to the target block vector is determined, and the prediction block of the current block is determined based on the reference block; or, if at least two target block vectors are obtained, then at least two reference blocks corresponding to the at least two target block vectors are determined, and then a weighted operation is performed on the at least two reference blocks to determine the prediction block of the current block.

[0364] In some embodiments, after determining the prediction block of the current block, referring to FIG. 17 , the method may further include:

[0365] S1701: Determine a residual block of the current block according to a prediction block of the current block.

[0366] S1702: Encode the residual block of the current block and write the obtained coded bits into a bitstream.

[0367] In an embodiment of the present application, determining the residual block of the current block may include: determining an initial block of the current block; and determining the residual block of the current block based on the initial block of the current block and a predicted block of the current block. Specifically, the residual block of the current block may be determined by performing a subtraction operation on the initial block of the current block and the predicted block of the current block.

[0368] In the embodiment of the present application, the residual block of the current block can also be transformed and quantized, and then encoded into the bitstream. In this way, after the residual block of the current block is encoded into the bitstream, it is convenient for the decoding end to implement the reconstruction process of the current block.

[0369] It is also understood that the embodiments of the present application provide a bitstream that is generated by bit-coding based on information to be coded. The information to be coded includes at least one of the following: a residual value of a current block, a co-located image index of the current block, and a value of a first syntax element; the first syntax element is used to indicate whether the current block uses a time-domain candidate block vector as a candidate for constructing a candidate merge list.

[0370] An embodiment of the present application provides an encoding method, which first determines at least one co-located image of a current block; then, based on the at least one co-located image, determines one or more time-domain candidate block vectors of the current block; and then, based on the one or more time-domain candidate block vectors, constructs a candidate merge list. In other words, when constructing the candidate merge list, one or more time-domain candidate block vectors are considered as candidates in the candidate merge list, which not only effectively reduces the situation where the candidate merge list cannot be filled, but also improves the prediction accuracy under the candidate merge list, such as the prediction effect of IBC and / or IntraTMP in the merge list mode, without bringing additional software and hardware implementation complexity, thereby improving encoding and decoding efficiency.

[0371] In another embodiment of the present application, based on the encoding and decoding method described in the above embodiment, the technical solution of the embodiment of the present application is located in the intraTMP mode or IBC mode in the inter-frame prediction frame in the entire encoding and decoding framework.

[0372] In some embodiments, at the encoding end, when the encoder uses the IBC mode for the current block and needs to construct a candidate merge list, or when the encoder uses the intraTMP mode for the current block and needs to construct a candidate merge list, the present technical solution will apply the time domain-based candidate block vector to supplement the constructed candidate merge list, that is, to fill the IBC merge list or the IntraTmp merge list.

[0373] In some embodiments, at the decoding end, when the decoder determines that the current block uses the IBC mode and needs to construct a candidate merge list, or determines that the current block uses the intraTMP mode and needs to construct a candidate merge list, the present solution will apply a time-domain-based block vector to supplement the constructed candidate merge list, that is, to fill the IBC merge list or the IntraTmp merge list.

[0374] In one possible implementation, each frame image / coding unit stores the motion information of the image / block in the motion information cache after encoding and decoding. The motion information includes the following parts:

[0375] ① When the reference position is an inter-frame prediction block, the motion information should include information such as motion vector;

[0376] ② When the reference position is an IBC or intraTMP prediction block, the motion information should include: block vector, block flip type, whether illumination compensation is used, whether filtering is used, etc. In addition, since when the reference position uses the IBC mode, IBC may be a weighted mode, in which case there may be multiple (two) block vectors, so the block vectors stored in the motion information may also be multiple.

[0377] In another possible implementation, as shown in FIG11 , the steps of obtaining the time domain block vector in this technical solution can be roughly divided into:

[0378] Step 1: Find the cache storing the motion information of the co-located image according to the index of the co-located image;

[0379] Step 2: obtaining motion information from the motion information cache according to the reference position information;

[0380] Step three: determine whether the motion information includes a block vector; if so, obtain the block vector if it is included and is available.

[0381] Specifically, the block vector obtained in the time domain may include the following features:

[0382] Feature A: The time domain block vector can be obtained from the collocated picture. For an inter-coded frame, the index of the collocated picture encoded into or parsed from the bitstream can be used to determine whether there are one or more collocated pictures (corresponding to the collocated pictures in step 1):

[0383] ① If the current image has no co-located image, no further block vector in the time domain is obtained;

[0384] ② If the current image has only one co-located image, then further obtain the block vector from this co-located image;

[0385] ③ If the current image has more than one co-located image, block vectors are further obtained from one or more frames of these co-located images.

[0386] Illustratively, in the reference software implementation, it is supported that one inter-frame has two co-located frames, and the block vector can be obtained from only one of the co-located frames, or can also be obtained from both co-located frames.

[0387] In an embodiment of the present application, for an inter-frame coded frame, a corresponding co-located image is obtained, and the number of co-located images of the current image is determined to be one or two based on the syntax elements parsed from the code stream: (1) If there is one, a time domain block vector is obtained from the one co-located image; (2) If there are two, a time domain block vector is obtained from both co-located images. In other words, the present technical solution can search for block vectors based on a reference position from more than or equal to one co-located frame.

[0388] Feature B: Obtain block vectors at one or more reference positions in the collocated image, such as the reference positions defined in Table 3 (corresponding to the reference positions in the collocated image in step 2):

[0389] In Table 3, X0 and Y0 represent the horizontal and vertical coordinates of the lower-right corner of the current block in the current image, X1 and Y1 represent the horizontal and vertical coordinates of the center of the current block in the current image, and W and H represent the width and height of the current block. In other words, this technical solution searches for block vectors in the primary and secondary positions of the collocated frame according to the order and method specified in Table 3.

[0390] It should be noted that these temporal reference positions are mostly the positions of the current block or positions to the right, lower right, or above and below the current block. This is because these positions have not yet been coded or decoded within the current image, so the required information cannot be obtained. However, for the temporal reference image, the co-located image has already been coded and decoded, so this information can be stored and obtained. In some embodiments, the temporal position can also be selected as a position within the current block, or in the upper left, upper, upper right, left, or lower left directions.

[0391] In an embodiment of the present application, the reference positions in the collocated image may include the 10 primary positions and 10 secondary positions in Table 3, and the primary positions are added sequentially according to position indexes 1 to 10. When the primary position does not meet the conditions (the primary position is not within the range of the collocated image, and the conditions here can also be other conditions such as not being within the range of the collocated sub-image, slice, CTU, etc.), the corresponding secondary position is used to replace the primary position; if the secondary position also does not meet the conditions, the position index is skipped and the primary or secondary position of the next position index is directly added.

[0392] Furthermore, in addition to the block vector at the time domain reference position (which may be referred to as the "time domain block vector"), the present technical solution can also guide the reference position to be offset according to the searched motion vector, thereby obtaining the block vector at the time domain offset reference position (which may be referred to as the "offset time domain block vector"):

[0393] First, the motion vectors of the five positions around the current block in FIG. 13 and the reference image indexes pointed to by the motion vectors are found in the order of indexes 0-4. The coordinates of these five positions in the current image are shown in Table 4.

[0394] In some embodiments, the offset motion vector in the co-located image may be obtained by obtaining it from other positions around the current block. For one co-located image, multiple offset motion vectors may be found to guide the offset.

[0395] Next, if the accessed location is an inter-frame coded block, the motion vector (MV) and the reference image index to which it points are obtained. If the reference image is a co-located image, the MV is recorded and used to offset the reference position. For all co-located images of the current image, a corresponding MV is found in order.

[0396] Next, the reference position is offset based on the MV of the found collocated image. For example, if the current image has two collocated images, Frame0 and Frame1, and the two motion vectors found are MV0' and MV1', then MV0' and MV1' are first rounded (to avoid finding sub-pixel positions) to obtain MV0 and MV1. Then, according to the order in Table 5, the reference position in the corresponding collocated image is determined to see if it contains a block vector.

[0397] In Table 5, MV0.X and MV0.Y are the horizontal and vertical offsets of the integer motion vector corresponding to collocated image 0 (Frame0), and MV1.X and MV1.Y are the horizontal and vertical offsets of the integer motion vector corresponding to collocated image 1 (Frame1). It is not difficult to find that the reference positions in Table 5 are offsets of the original 10 reference positions alternately according to collocated image 0 and collocated image 1. Here, the primary positions are added in the order of positions 1-20 in Table 5. If a similar primary position does not meet the conditions, the secondary position is used. If a secondary position also does not meet the conditions, the current position sequence is skipped. The conditions are the same as described above.

[0398] In some embodiments, when multiple offset vectors are found for a collocated image to offset the reference position, for example, offset vectors MV00, MV01, etc. are found for collocated image 0, more offset reference positions should be defined. In other words, this technical solution addresses the situation where multiple offset vectors are found in a collocated image, and the number of offset reference positions defined can also be increased.

[0399] Feature C: When the motion information obtained from the co-located image contains one or more block vectors (corresponding to the block vector obtained in step 3):

[0400] ① If the current motion information contains an available block vector, obtain this block vector;

[0401] ② If the current motion information contains multiple available block vectors, more than one block vector can be obtained.

[0402] That is, in the embodiment of the present application, the motion information may include several block vectors, and then several block vectors are obtained. Specifically, if the motion information includes multiple block vectors, then greater than or equal to one block vector can be added as the time domain block vector.

[0403] In the reference software, when a block uses IBC weighted prediction, two block vectors are saved as motion information for the block; when a block uses IntraTMP or non-weighted IBC prediction mode, one block vector is saved as motion information. In the embodiment of the present application, if the motion information of the reference position of the co-located image includes a block vector, then this block vector can be added to the candidate merge list; if there are two block vectors, then both are added to the candidate merge list.

[0404] Furthermore, in addition to the features of obtaining the time domain block vector described above, the following features may also be included:

[0405] ① When adding block vectors to the candidate merge list, duplicate checking is required to avoid adding block vectors already in the candidate merge list to the merge list repeatedly;

[0406] ② First add the time domain block vector (in the order of the reference position of the same image), then add the offset time domain block vector (in the offset reference position of the same image), and stop adding when the filled block vector reaches the upper limit set in the candidate merge list;

[0407] ③ The number of time domain block vectors and offset time domain block vectors can be set with an upper limit separately or together, for example, a maximum of N time domain block vectors, M offset time domain block vectors, or a maximum of P time domain and offset time domain block vectors in total;

[0408] ④ The time domain block vector and the offset time domain block vector can be added only when the video sequence is of screen content type. Whether the time domain and offset time domain block vectors are added to the candidate merge list can be controlled by some syntax elements. These syntax elements can be sequence level, frame level, slice level or block level. When the encoding and decoding syntax elements are enabled, the time domain and offset time domain block vectors can be added when constructing the candidate merge list.

[0409] In related art, the initial merge list includes:

[0410] (1) Initial merge list of IBC mode: block vectors of adjacent blocks, block vectors of non-adjacent blocks, block vectors based on historical information, and block vectors based on automatic relocation, etc.

[0411] (2) Initial merge list for intraTMP mode: block vectors of adjacent blocks and block vectors of non-adjacent blocks.

[0412] In the embodiment of the present application, the aforementioned time domain block vectors and offset time domain block vectors should be added to the initial merge list in a certain order with the existing type of block vectors to obtain a candidate merge list.

[0413] Exemplarily, for the candidate merge list of IBC mode, the time domain and offset time domain block vectors should be added before the block vector based on automatic repositioning and after the block vectors of the adjacent blocks. The order can be:

[0414] a. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors based on historical information, block vectors based on automatic repositioning, etc.;

[0415] b. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, block vectors of non-adjacent blocks, second-category time-domain candidate block vectors, block vectors based on historical information, block vectors based on automatic repositioning, etc.;

[0416] c. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, block vectors based on historical information, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors based on automatic repositioning, etc.

[0417] For example, for the candidate merge list of the IntraTMP mode, the time domain block vectors of the time domain and the offset should be located after the block vectors of the adjacent blocks, and the order can be:

[0418] a. Block vectors of adjacent blocks, block vectors of non-adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, etc.;

[0419] b. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, second-category time-domain candidate block vectors, block vectors of non-adjacent blocks, etc.;

[0420] c. Block vectors of adjacent blocks, first-category time-domain candidate block vectors, block vectors of non-adjacent blocks, second-category time-domain candidate block vectors, etc.

[0421] In some embodiments, the block vector based on automatic repositioning is also used to add to the candidate merge list of IntraTMP. In this case, the block vector based on automatic repositioning should be similarly added after the time domain and offset time domain block vectors.

[0422] In an embodiment of the present application, the use of time-domain block vectors and offset time-domain block vectors as new types of block vector candidates can effectively reduce the situation where the merge list cannot be filled, and can improve the IBC and IntraTMP prediction effects in the merge list mode without introducing additional software and hardware implementation complexity. For example, on the ECM reference software, a maximum of 8 time-domain block vectors and offset time-domain block vectors are used for the IBC Merge list. The list is constructed in the order of block vectors of adjacent blocks, block vectors of non-adjacent blocks, time-domain block vectors, offset time-domain block vectors, block vectors based on historical information, and block vectors based on automatic repositioning. The following test results can be obtained.

[0423] Table 6

[0424] As can be seen from Table 6, since the time domain block vector only exists when the current image is an inter-frame coded frame, the above Table 6 shows the results under the random access (RA) configuration. It can be seen that the method brings improved coding performance of the Y / U / V channels for Class F and TGM video sequences, and the encoding time (EncT) / decoding time (DecT) and encoding memory overhead (EncVmPeak) / decoding memory overhead (DecVmPeak) do not bring changes in encoding and decoding complexity and memory overhead, thereby improving encoding and decoding efficiency.

[0425] An embodiment of the present application provides a method for constructing a candidate merge list based on a time domain candidate block vector. The specific implementation of the aforementioned embodiment is elaborated in detail through the above embodiment. It can be seen that, according to the technical solution of the aforementioned embodiment, it is proposed here to use the time domain block vector and the offset time domain block vector as candidates for filling the candidate merge list; for the time domain and offset time domain candidate block vectors, they can be obtained from greater than or equal to one co-located image; when the motion information found based on the time domain includes multiple block vectors, greater than or equal to one block vector can be obtained; for the number of time domain block vectors and offset time domain block vectors, the upper limit number can be set separately or together when filling the candidate merge list; for the time domain block vector and the offset time domain block vector, whether to add them as candidates to the candidate merge list can be determined based on the encoding / decoding syntax elements; in addition, for the time domain block vector and the offset time domain block vector, whether to add them as candidates to the candidate merge list can also be determined based on the video sequence with codec and whether the code stream is a screen content category. In this way, since one or more time domain candidate block vectors are considered as candidates in the candidate merge list, it can not only effectively reduce the situation where the candidate merge list cannot be filled, but also improve the prediction accuracy under the candidate merge list, such as the prediction effect of IBC and / or IntraTMP in the merge list mode, without bringing additional software and hardware implementation complexity, thereby improving the encoding and decoding efficiency.

[0426] In yet another embodiment of the present application, based on the same inventive concept as the aforementioned embodiment, FIG18 is a schematic diagram of the composition structure of an encoder provided in an embodiment of the present application. As shown in FIG18 , the encoder 180 may include a first determining unit 1801 and a first constructing unit 1802, wherein:

[0427] The first determining unit 1801 is configured to determine at least one co-located image of the current block; and determine one or more time-domain candidate block vectors of the current block based on the at least one co-located image;

[0428] The first constructing unit 1802 is configured to construct a candidate merging list based on one or more time-domain candidate block vectors.

[0429] In some embodiments, the first determination unit 1801 is further configured to determine X first-category time-domain candidate block vectors based on at least one co-located image; and determine one or more time-domain candidate block vectors for the current block based on the X first-category time-domain candidate block vectors; where X is a positive integer.

[0430] In some embodiments, the first determination unit 1801 is further configured to determine Y second-category time-domain candidate block vectors based on at least one co-located image; and determine one or more time-domain candidate block vectors of the current block based on the Y second-category time-domain candidate block vectors; wherein Y is a positive integer.

[0431] In some embodiments, the first determining unit 1801 is further configured to determine, based on at least one co-located image, X time-domain candidate block vectors of the first category and Y time-domain candidate block vectors of the second category; and determine, based on the X time-domain candidate block vectors of the first category and the Y time-domain candidate block vectors of the second category, one or more time-domain candidate block vectors for the current block; wherein X and Y are both positive integers.

[0432] In some embodiments, the first determining unit 1801 is further configured to determine K time-domain block vectors for each of at least one co-located image, where K is an integer greater than or equal to 0; and determine X first-category time-domain candidate block vectors based on the K time-domain block vectors for each of the at least one co-located image.

[0433] In some embodiments, the first determination unit 1801 is further configured to determine one or more reference positions in the first co-located image; and determine K time domain block vectors of the first co-located image based on the one or more reference positions; wherein the first co-located image is any one of the at least one co-located image.

[0434] In some embodiments, the first determination unit 1801 is further configured to determine a current reference position corresponding to a current position index; when the current reference position satisfies a first condition, determine H time domain block vectors according to the current reference position, where H is an integer greater than or equal to 0; and sequentially determine a reference position corresponding to a next position index based on the first position index, and use the reference position corresponding to the next position index as the current reference position, and continue to execute the step of determining whether the current reference position satisfies the first condition until one or more reference positions are traversed to obtain K time domain block vectors of the first co-located image.

[0435] In some embodiments, referring to FIG18 , the encoder 180 further includes a first judgment unit 1803 configured to judge whether the primary position in the current reference position satisfies the first condition; the first determination unit 1801 is further configured to determine H time domain block vectors according to the primary position in the current reference position when the primary position in the current reference position satisfies the first condition; the first judgment unit 1803 is further configured to judge whether the secondary position in the current reference position satisfies the first condition when the primary position in the current reference position does not satisfy the first condition; the first determination unit 1801 is further configured to determine H time domain block vectors according to the secondary position in the current reference position when the secondary position in the current reference position satisfies the first condition.

[0436] In some embodiments, the primary position in the current reference position satisfies the first condition, including: the primary position in the current reference position is within the range of the first co-located image; and the secondary position in the current reference position satisfies the first condition, including: the secondary position in the current reference position is within the range of the first co-located image.

[0437] In some embodiments, the first determination unit 1801 is further configured to skip the current reference position when the current reference position does not meet the first condition, determine the reference position corresponding to the next position index based on the first position index sequence, and use the reference position corresponding to the next position index as the current reference position, and continue to execute the step of determining whether the current reference position meets the first condition; wherein, the current reference position does not meet the first condition, including: the primary position in the current reference position does not meet the first condition and the secondary position in the current reference position does not meet the first condition.

[0438] In some embodiments, the first determination unit 1801 is further configured to determine I offset time domain block vectors for each of at least one co-located image, where I is an integer greater than or equal to 0; and determine Y second-category time domain candidate block vectors based on the I offset time domain block vectors for each of at least one co-located image.

[0439] In some embodiments, the first determination unit 1801 is further configured to determine a first motion vector of the first co-located image, and determine one or more initial reference positions of the current block; offset the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first co-located image; and determine I offset time domain block vectors of the first co-located image based on the one or more offset reference positions in the first co-located image; wherein the first co-located image is any one of the at least one co-located image.

[0440] In some embodiments, the first determination unit 1801 is further configured to determine the motion vectors of each of multiple candidate positions around the current block and the reference image index pointed to by the motion vector; and determine the current candidate position among the multiple candidate positions based on a preset position order, and according to the current reference image index pointed to by the motion vector of the current candidate position, when the reference image indicated by the current reference image index is the first co-located image, determine the motion vector of the current candidate position as the first motion vector of the first co-located image.

[0441] In some embodiments, the first determining unit 1801 is further configured to perform a correction operation on the motion vector of the current candidate position, and determine the corrected motion vector as the first motion vector of the first co-located image.

[0442] In some embodiments, the first determination unit 1801 is further configured to, when at least one co-located image includes a first co-located image and a second co-located image, determine a first motion vector of the first co-located image and a second motion vector of the second co-located image, and determine one or more initial reference positions of the current block; offset the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first co-located image; and offset the one or more initial reference positions according to the second motion vector to obtain one or more offset reference positions in the second co-located image; determine I offset time domain block vectors of each of the at least one co-located image based on the one or more offset reference positions in the first co-located image and the one or more offset reference positions in the second co-located image.

[0443] In some embodiments, the first determination unit 1801 is further configured to determine a current offset reference position corresponding to a current position index; when the current offset reference position satisfies a second condition, determine J offset time domain block vectors according to the current offset reference position, where J is an integer greater than or equal to 0; and sequentially determine an offset reference position corresponding to a next position index based on the second position index, and use the offset reference position corresponding to the next position index as the current offset reference position, and continue to execute the step of determining whether the current offset reference position satisfies the second condition until all offset reference positions are traversed, so as to obtain I offset time domain block vectors for each of at least one co-located image.

[0444] In some embodiments, the first determining unit 1801 is further configured to alternately set one or more offset reference positions in the first collocated image and one or more offset reference positions in the second collocated image to determine a second position index order.

[0445] In some embodiments, the first judgment unit 1803 is further configured to judge whether the main position in the current offset reference position satisfies the second condition; the first determination unit 1801 is further configured to determine J offset time domain block vectors based on the main position in the current offset reference position when the main position in the current offset reference position satisfies the second condition; the first judgment unit 1803 is further configured to judge whether the secondary position in the current offset reference position satisfies the second condition when the main position in the current offset reference position does not satisfy the second condition; the first determination unit 1801 is further configured to determine J offset time domain block vectors based on the secondary position in the current offset reference position when the secondary position in the current offset reference position satisfies the second condition.

[0446] In some embodiments, the primary position in the current offset reference position satisfies the second condition, including: the primary position in the current offset reference position is within the range of the first co-located image; and the secondary position in the current offset reference position satisfies the second condition, including: the secondary position in the current offset reference position is within the range of the first co-located image.

[0447] In some embodiments, the first determination unit 1801 is further configured to skip the current offset reference position when the current offset reference position does not meet the second condition, determine the offset reference position corresponding to the next position index based on the second position index sequence, and use the offset reference position corresponding to the next position index as the current offset reference position, and continue to execute the step of determining whether the current offset reference position meets the second condition; wherein, the current offset reference position does not meet the second condition, including: the primary position in the current offset reference position does not meet the second condition and the secondary position in the current offset reference position does not meet the second condition.

[0448] In some embodiments, the first determining unit 1801 is further configured to determine an initial merge list of the current block; and add one or more time-domain candidate block vectors to the initial merge list to obtain a candidate merge list.

[0449] In some embodiments, the first determination unit 1801 is further configured to discard the current time domain candidate block vector if there is a candidate item identical to the current time domain candidate block vector in the initial merge list; and add the current time domain candidate block vector to the initial merge list if there is no candidate item identical to the current time domain candidate block vector in the initial merge list.

[0450] In some embodiments, the one or more time-domain candidate block vectors include X first-category time-domain candidate block vectors and Y second-category time-domain candidate block vectors, where X and Y are both positive integers; the first determining unit 1801 is further configured to add the X first-category time-domain candidate block vectors to an initial merge list; and when the initial merge list is not full, continue to add the Y second-category time-domain candidate block vectors to the initial merge list until the initial merge list is full.

[0451] In some embodiments, the first determination unit 1801 is further configured to add N first-category time-domain candidate block vectors among the X first-category time-domain candidate block vectors and M second-category time-domain candidate block vectors among the Y second-category time-domain candidate block vectors to the initial merge list; wherein N is an integer greater than 0 and less than or equal to the first threshold, and M is an integer greater than 0 and less than or equal to the second threshold.

[0452] In some embodiments, the first determination unit 1801 is further configured to add P time domain candidate block vectors from one or more time domain candidate block vectors to the initial merge list; wherein the P time domain candidate block vectors are composed of a first type of time domain candidate block vector and a second type of time domain candidate block vector, and P is an integer greater than 0 and less than or equal to a third threshold.

[0453] In some embodiments, the first determining unit 1801 is further configured to determine a prediction mode of the current block; and when the prediction mode of the current block meets a preset condition, perform the step of determining at least one co-located image of the current block.

[0454] In some embodiments, the first constructing unit 1802 is further configured to determine that the current block uses the intra template matching prediction mode and construct a candidate merge list for prediction; or determine that the current block uses the intra block copy mode and construct a candidate merge list for prediction.

[0455] In some embodiments, the first determining unit 1801 is further configured to determine a video sequence to which the current block belongs; and when the video sequence is a screen content category, perform the step of determining at least one co-located image of the current block.

[0456] In some embodiments, the first determining unit 1801 is further configured to, when the current block uses the time-domain candidate block vector as a candidate for constructing the candidate merging list, perform the step of determining at least one co-located image of the current block.

[0457] In some embodiments, referring to FIG. 18 , the encoder 180 further includes an encoding unit 1804, wherein: the first determination unit 1801 is further configured to determine a value of a first syntax element; wherein the first syntax element is used to indicate whether the current block uses a time-domain candidate block vector as a candidate for constructing a candidate merge list; and the encoding unit 1804 is configured to perform encoding processing on the value of the first syntax element and write the obtained encoded bits into the bitstream.

[0458] In some embodiments, the first determination unit 1801 is further configured to determine a co-located image index of the current block based on at least one co-located image of the current block; the encoding unit 1804 is further configured to encode the co-located image index of the current block and write the obtained encoded bits into the bitstream.

[0459] In some embodiments, the first determination unit 1801 is further configured to determine one or more target block vectors of the current block based on the candidate merge list; determine the prediction block of the current block based on the one or more target block vectors of the current block; and determine the residual block of the current block based on the prediction block of the current block.

[0460] In some embodiments, the encoding unit 1804 is further configured to perform encoding processing on the residual block of the current block and write the obtained encoding bits into the bitstream.

[0461] It is understandable that in the embodiments of the present application, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the various components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional modules.

[0462] In another embodiment of the present application, FIG19 is a schematic diagram of the specific hardware structure of an encoder provided in an embodiment of the present application. As shown in FIG19 , the encoder 180 may include: a first communication interface 1901, a first memory 1902, and a first processor 1903; each component is coupled together through a first bus system 1904. It can be understood that the first bus system 1904 is used to realize the connection and communication between these components. In addition to the data bus, the first bus system 1904 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as the first bus system 1904 in FIG19. Among them,

[0463] The first communication interface 1901 is used to receive and send signals when sending and receiving information with other external network elements;

[0464] A first memory 1902 is used to store computer programs that can be run on the first processor 1903;

[0465] The first processor 1903 is configured to, when running the computer program, execute:

[0466] Determine at least one co-located image of the current block; determine one or more time-domain candidate block vectors of the current block according to the at least one co-located image; and construct a candidate merge list based on the one or more time-domain candidate block vectors.

[0467] It is understood that the first memory 1902 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The first memory 1902 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0468] The first processor 1903 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits or software instructions in the first processor 1903. The above-mentioned first processor 1903 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the first memory 1902 , and the first processor 1903 reads the information in the first memory 1902 and completes the steps of the above method in combination with its hardware.

[0469] It is to be understood that these embodiments described in the present application can be implemented with hardware, software, firmware, middleware, microcode or its combination.For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing equipment (DSP Device, DSPD), programmable logic device (Programmable Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing functions described in the present application or its combination.For software implementation, the technology described in the present application can be realized by the module (such as process, function etc.) that performs functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0470] Optionally, as another embodiment, the first processor 1903 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

[0471] This embodiment provides an encoder, in which, when constructing a candidate merge list, one or more time-domain candidate block vectors are considered as candidates in the candidate merge list. This not only effectively reduces the situation where the candidate merge list cannot be filled, but also improves the prediction accuracy under the candidate merge list, such as the prediction effect of IBC and / or IntraTMP in the merge list mode, without bringing additional software and hardware implementation complexity, thereby improving the encoding and decoding efficiency.

[0472] In yet another embodiment of the present application, based on the same inventive concept as the aforementioned embodiment, FIG20 is a schematic diagram of the composition structure of a decoder provided in an embodiment of the present application. As shown in FIG20 , the decoder 200 may include a second determining unit 2001 and a second constructing unit 2002, wherein:

[0473] The second determining unit 2001 is configured to determine at least one co-located image of the current block; and determine one or more time-domain candidate block vectors of the current block based on the at least one co-located image;

[0474] The second constructing unit 2002 is configured to construct a candidate merging list based on one or more time-domain candidate block vectors.

[0475] In some embodiments, referring to FIG. 20 , the decoder 200 further includes a decoding unit 2003 configured to decode the code stream and determine a co-located image index of the current block; and a second determining unit 2001 further configured to determine at least one co-located image of the current block based on the co-located image index.

[0476] In some embodiments, the second determining unit 2001 is further configured to determine one co-located image of the current block if the number of indexes included in the co-located image index is one; and to determine two co-located images of the current block if the number of indexes included in the co-located image index is two.

[0477] In some embodiments, the second determination unit 2001 is further configured to determine X first-category time-domain candidate block vectors based on at least one co-located image; and determine one or more time-domain candidate block vectors of the current block based on the X first-category time-domain candidate block vectors; where X is a positive integer.

[0478] In some embodiments, the second determination unit 2001 is further configured to determine Y second-category time-domain candidate block vectors based on at least one co-located image; and determine one or more time-domain candidate block vectors of the current block based on the Y second-category time-domain candidate block vectors; wherein Y is a positive integer.

[0479] In some embodiments, the second determination unit 2001 is further configured to determine, based on at least one co-located image, X first-category time-domain candidate block vectors and Y second-category time-domain candidate block vectors; and determine, based on the X first-category time-domain candidate block vectors and the Y second-category time-domain candidate block vectors, one or more time-domain candidate block vectors for the current block; wherein X and Y are both positive integers.

[0480] In some embodiments, the second determination unit 2001 is further configured to determine K time-domain block vectors for each of at least one co-located image, where K is an integer greater than or equal to 0; and determine X first-category time-domain candidate block vectors based on the K time-domain block vectors for each of the at least one co-located image.

[0481] In some embodiments, the second determination unit 2001 is further configured to determine one or more reference positions in the first co-located image; and determine K time domain block vectors of the first co-located image based on the one or more reference positions; wherein the first co-located image is any one of the at least one co-located image.

[0482] In some embodiments, the second determination unit 2001 is further configured to determine a current reference position corresponding to the current position index; when the current reference position satisfies the first condition, determine H time domain block vectors based on the current reference position, where H is an integer greater than or equal to 0; and determine the reference position corresponding to the next position index based on the first position index sequence, and use the reference position corresponding to the next position index as the current reference position, and continue to execute the step of determining whether the current reference position satisfies the first condition until one or more reference positions are traversed to obtain K time domain block vectors of the first co-located image.

[0483] In some embodiments, the reference position includes a primary position and a secondary position; referring to FIG20 , the decoder 200 further includes a second judgment unit 2004, configured to judge whether the primary position in the current reference position satisfies the first condition; the second determination unit 2001 is further configured to determine H time domain block vectors according to the primary position in the current reference position when the primary position in the current reference position satisfies the first condition; the second judgment unit 2004 is further configured to judge whether the secondary position in the current reference position satisfies the first condition when the primary position in the current reference position does not satisfy the first condition; the second determination unit 2001 is further configured to determine H time domain block vectors according to the secondary position in the current reference position when the secondary position in the current reference position satisfies the first condition.

[0484] In some embodiments, the primary position in the current reference position satisfies the first condition, including: the primary position in the current reference position is within the range of the first co-located image; and the secondary position in the current reference position satisfies the first condition, including: the secondary position in the current reference position is within the range of the first co-located image.

[0485] In some embodiments, the second determination unit 2001 is further configured to skip the current reference position when the current reference position does not meet the first condition, determine the reference position corresponding to the next position index based on the first position index sequence, and use the reference position corresponding to the next position index as the current reference position, and continue to execute the step of determining whether the current reference position meets the first condition; wherein, the current reference position does not meet the first condition, including: the primary position in the current reference position does not meet the first condition and the secondary position in the current reference position does not meet the first condition.

[0486] In some embodiments, the second determination unit 2001 is further configured to determine I offset time domain block vectors for each of at least one co-located image, where I is an integer greater than or equal to 0; and determine Y second-category time domain candidate block vectors based on the I offset time domain block vectors for each of at least one co-located image.

[0487] In some embodiments, the second determination unit 2001 is further configured to determine a first motion vector of the first co-located image, and determine one or more initial reference positions of the current block; offset the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first co-located image; and determine I offset time domain block vectors of the first co-located image based on the one or more offset reference positions in the first co-located image; wherein the first co-located image is any one of the at least one co-located image.

[0488] In some embodiments, the second determination unit 2001 is further configured to determine the motion vectors of each of multiple candidate positions around the current block and the reference image index pointed to by the motion vector; and determine the current candidate position among the multiple candidate positions based on a preset position order, and according to the current reference image index pointed to by the motion vector of the current candidate position, when the reference image indicated by the current reference image index is the first co-located image, determine the motion vector of the current candidate position as the first motion vector of the first co-located image.

[0489] In some embodiments, the second determining unit 2001 is further configured to perform a correction operation on the motion vector of the current candidate position, and determine the corrected motion vector as the first motion vector of the first co-located image.

[0490] In some embodiments, the second determination unit 2001 is further configured to, when at least one co-located image includes a first co-located image and a second co-located image, determine a first motion vector of the first co-located image and a second motion vector of the second co-located image, and determine one or more initial reference positions of the current block; offset the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first co-located image; and offset the one or more initial reference positions according to the second motion vector to obtain one or more offset reference positions in the second co-located image; and determine I offset time domain block vectors of each of the at least one co-located image based on the one or more offset reference positions in the first co-located image and the one or more offset reference positions in the second co-located image.

[0491] In some embodiments, the second determination unit 2001 is further configured to determine a current offset reference position corresponding to the current position index; when the current offset reference position satisfies the second condition, determine J offset time domain block vectors based on the current offset reference position, where J is an integer greater than or equal to 0; and sequentially determine the offset reference position corresponding to the next position index based on the second position index, and use the offset reference position corresponding to the next position index as the current offset reference position, and continue to execute the step of determining whether the current offset reference position satisfies the second condition until all offset reference positions are traversed to obtain I offset time domain block vectors for each of at least one co-located image.

[0492] In some embodiments, the second determining unit 2001 is further configured to alternately set one or more offset reference positions in the first collocated image and one or more offset reference positions in the second collocated image to determine a second position index order.

[0493] In some embodiments, the offset reference position includes a primary position and a secondary position; the second judgment unit 2004 is further configured to judge whether the primary position in the current offset reference position satisfies the second condition; the second determination unit 2001 is further configured to determine J offset time domain block vectors based on the primary position in the current offset reference position when the primary position in the current offset reference position satisfies the second condition; the second judgment unit 2004 is further configured to judge whether the secondary position in the current offset reference position satisfies the second condition when the primary position in the current offset reference position does not satisfy the second condition; the second determination unit 2001 is further configured to determine J offset time domain block vectors based on the secondary position in the current offset reference position when the secondary position in the current offset reference position satisfies the second condition.

[0494] In some embodiments, the primary position in the current offset reference position satisfies the second condition, including: the primary position in the current offset reference position is within the range of the first co-located image; and the secondary position in the current offset reference position satisfies the second condition, including: the secondary position in the current offset reference position is within the range of the first co-located image.

[0495] In some embodiments, the second determination unit 2001 is further configured to skip the current offset reference position when the current offset reference position does not meet the second condition, determine the offset reference position corresponding to the next position index based on the second position index sequence, and use the offset reference position corresponding to the next position index as the current offset reference position, and continue to execute the step of determining whether the current offset reference position meets the second condition; wherein, the current offset reference position does not meet the second condition, including: the primary position in the current offset reference position does not meet the second condition and the secondary position in the current offset reference position does not meet the second condition.

[0496] In some embodiments, the second determining unit 2001 is further configured to determine an initial merge list of the current block; and add one or more time-domain candidate block vectors to the initial merge list to obtain a candidate merge list.

[0497] In some embodiments, the second determination unit 2001 is further configured to discard the current time domain candidate block vector if there is a candidate item identical to the current time domain candidate block vector in the initial merge list; and add the current time domain candidate block vector to the initial merge list if there is no candidate item identical to the current time domain candidate block vector in the initial merge list.

[0498] In some embodiments, the one or more time-domain candidate block vectors include X first-category time-domain candidate block vectors and Y second-category time-domain candidate block vectors, where X and Y are both positive integers; the second determining unit 2001 is further configured to add the X first-category time-domain candidate block vectors to an initial merge list; and when the initial merge list is not full, continue to add the Y second-category time-domain candidate block vectors to the initial merge list until the initial merge list is full.

[0499] In some embodiments, the second determination unit 2001 is further configured to add N first-category time-domain candidate block vectors among the X first-category time-domain candidate block vectors and M second-category time-domain candidate block vectors among the Y second-category time-domain candidate block vectors to the initial merge list; wherein N is an integer greater than 0 and less than or equal to the first threshold, and M is an integer greater than 0 and less than or equal to the second threshold.

[0500] In some embodiments, the second determination unit 2001 is further configured to add P time domain candidate block vectors from one or more time domain candidate block vectors to the initial merge list; wherein the P time domain candidate block vectors are composed of a first category of time domain candidate block vectors and a second category of time domain candidate block vectors, and P is an integer greater than 0 and less than or equal to a third threshold.

[0501] In some embodiments, the second determining unit 2001 is further configured to determine a prediction mode of the current block; and when the prediction mode of the current block meets a preset condition, perform the step of determining at least one co-located image of the current block.

[0502] In some embodiments, the second constructing unit 2002 is further configured to determine that the current block uses the intra template matching prediction mode and construct a candidate merge list for prediction; or determine that the current block uses the intra block copy mode and construct a candidate merge list for prediction.

[0503] In some embodiments, the second determining unit 2001 is further configured to determine a video sequence to which the current block belongs; and when the video sequence is a screen content category, perform the step of determining at least one co-located image of the current block.

[0504] In some embodiments, the decoding unit 2003 is further configured to decode the code stream and determine the value of the first syntax element; the second determination unit 2001 is further configured to perform the step of determining at least one co-located image of the current block when the first syntax element indicates that the current block uses the time domain candidate block vector as a candidate for constructing the candidate merge list.

[0505] In some embodiments, the second determination unit 2001 is further configured to determine one or more target block vectors of the current block based on the candidate merge list, and determine the prediction block of the current block based on the one or more target block vectors of the current block; the decoding unit 2003 is further configured to decode the code stream and determine the residual block of the current block; the second determination unit 2001 is further configured to determine the reconstructed block of the current block based on the residual block of the current block and the prediction block of the current block.

[0506] It is understood that in this embodiment, a "unit" can be a portion of a circuit, a portion of a processor, a portion of a program or software, etc., and can also be a module or a non-modular system. Furthermore, the various components in this embodiment can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into a single unit. The aforementioned integrated units can be implemented in the form of hardware or software functional modules.

[0507] In another embodiment of the present application, FIG21 is a schematic diagram of the specific hardware structure of a decoder provided in an embodiment of the present application. As shown in FIG21 , the decoder 200 may include: a second communication interface 2101, a second memory 2102, and a second processor 2103; each component is coupled together via a second bus system 2104. It can be understood that the second bus system 2104 is used to achieve connection and communication between these components. In addition to the data bus, the second bus system 2104 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as the second bus system 2104 in FIG21. Among them,

[0508] The second communication interface 2101 is used to receive and send signals during the process of sending and receiving information between other external network elements;

[0509] The second memory 2102 is used to store computer programs that can be run on the second processor 2103;

[0510] The second processor 2103 is configured to, when running the computer program, execute:

[0511] Determine at least one co-located image of the current block; determine one or more time-domain candidate block vectors of the current block according to the at least one co-located image; and construct a candidate merge list based on the one or more time-domain candidate block vectors.

[0512] Optionally, as another embodiment, the second processor 2103 is further configured to execute any one of the methods described in the foregoing embodiments when running the computer program.

[0513] It can be understood that the hardware functions of the second memory 2102 are similar to those of the first memory 1902, and the hardware functions of the second processor 2103 are similar to those of the first processor 1903; they will not be described in detail here.

[0514] This embodiment provides a decoder in which, when constructing a candidate merge list, one or more time-domain candidate block vectors are considered as candidates in the candidate merge list. This not only effectively reduces the situation where the candidate merge list cannot be filled, but also improves the prediction accuracy under the candidate merge list, such as the prediction effect of IBC and / or IntraTMP in the merge list mode, without bringing additional software and hardware implementation complexity, thereby improving the encoding and decoding efficiency.

[0515] In yet another embodiment of the present application, FIG22 is a schematic diagram of the structure of a coding and decoding system provided in an embodiment of the present application. As shown in FIG22 , the coding and decoding system 220 may include an encoder 2201 and a decoder 2202 .

[0516] In the embodiment of the present application, the encoder 2201 may be the encoder described in any one of the aforementioned embodiments, and the decoder 2202 may be the decoder described in any one of the aforementioned embodiments.

[0517] In some embodiments, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor (eg, the first processor or the second processor), implements the method as described in any of the aforementioned embodiments.

[0518] In some embodiments, embodiments of the present application further provide a computer program product, including a computer program or instructions. When the computer program or instructions are executed by a processor (e.g., a first processor or a second processor), the method described in any one of the aforementioned embodiments is implemented.

[0519] In some embodiments, the embodiments of the present application further provide a computer program, which, when executed by a processor (eg, a first processor or a second processor), implements the method as described in any one of the aforementioned embodiments.

[0520] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0521] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0522] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0523] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0524] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0525] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0526] It should be noted that, in this application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0527] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0528] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0529] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0530] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.

[0531] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims. Industrial Applicability

[0532] In the embodiment of the present application, whether it is the encoding end or the decoding end, first determine at least one co-located image of the current block; then, based on the at least one co-located image, determine one or more time-domain candidate block vectors of the current block; and then, based on the one or more time-domain candidate block vectors, construct a candidate merge list. In other words, the encoding and decoding method proposed in the embodiment of the present application, when constructing the candidate merge list, considers one or more time-domain candidate block vectors as candidates in the candidate merge list, which not only effectively reduces the situation where the candidate merge list cannot be filled, but also improves the prediction accuracy under the candidate merge list, while not bringing additional software and hardware implementation complexity, thereby improving encoding and decoding efficiency and also improving encoding and decoding performance.

Claims

1. A decoding method, applied to a decoder, comprising: determining at least one co-located image of the current block; determining one or more time-domain candidate block vectors of the current block according to the at least one co-located image; A candidate merge list is constructed based on the one or more time-domain candidate block vectors.

2. The method according to claim 1, wherein The determining of at least one co-located image of the current block includes: Decoding a code stream to determine a co-located image index of the current block; At least one co-located image of the current block is determined according to the co-located image index.

3. The method according to claim 2, wherein: The determining, according to the co-located image index, at least one co-located image of the current block includes: If the number of indexes included in the co-located image index is one, determining a co-located image of the current block; If the number of indexes included in the co-located image index is two, two co-located images of the current block are determined.

4. The method according to claim 1, wherein The determining, according to the at least one co-located image, one or more time-domain candidate block vectors of the current block includes: Determine X first-category time-domain candidate block vectors according to the at least one co-located image; One or more time-domain candidate block vectors of the current block are determined according to the X first-category time-domain candidate block vectors; wherein X is a positive integer.

5. The method according to claim 1, wherein The determining, according to the at least one co-located image, one or more time-domain candidate block vectors of the current block includes: Determine Y second-category time-domain candidate block vectors according to the at least one co-located image; One or more time-domain candidate block vectors of the current block are determined according to the Y second-category time-domain candidate block vectors; wherein Y is a positive integer.

6. The method according to claim 1, wherein The determining, according to the at least one co-located image, one or more time-domain candidate block vectors of the current block includes: Determine, according to the at least one co-located image, X first-category time-domain candidate block vectors and Y second-category time-domain candidate block vectors; One or more time-domain candidate block vectors of the current block are determined according to the X first-category time-domain candidate block vectors and the Y second-category time-domain candidate block vectors; wherein X and Y are both positive integers.

7. The method according to claim 4 or 6, wherein: The determining, according to the at least one co-located image, X first-category time-domain candidate block vectors includes: Determine K time-domain block vectors for each of the at least one co-located image, where K is an integer greater than or equal to 0; The X first-category time-domain candidate block vectors are determined according to the K time-domain block vectors of each of the at least one co-located image.

8. The method according to claim 7, wherein: The determining of K time-domain block vectors of each of the at least one co-located image comprises: determining one or more reference locations in the first collocated image; Determining K time-domain block vectors of the first co-located image according to the one or more reference positions; The first collocated image is any one of the at least one collocated image.

9. The method according to claim 8, wherein The determining, according to the one or more reference positions, K time-domain block vectors of the first co-located image includes: Determine the current reference position corresponding to the current position index; When the current reference position satisfies a first condition, determining H time-domain block vectors according to the current reference position, where H is an integer greater than or equal to 0; Based on the first position index sequence, a reference position corresponding to a next position index is determined, and the reference position corresponding to the next position index is used as the current reference position. The step of determining whether the current reference position meets the first condition is continued until the traversal of the one or more reference positions is completed to obtain K time domain block vectors of the first co-located image.

10. The method according to claim 9, wherein: The reference position includes a primary position and a secondary position; when the current reference position satisfies a first condition, determining H time-domain block vectors according to the current reference position includes: Determining whether a primary position in the current reference position satisfies a first condition; When a main position in the current reference position satisfies a first condition, determining the H time-domain block vectors according to the main position in the current reference position; When the primary position in the current reference position does not meet the first condition, it is determined whether the secondary position in the current reference position meets the first condition. satisfy the first condition; When the secondary position in the current reference position satisfies a first condition, the H time-domain block vectors are determined according to the secondary position in the current reference position.

11. The method according to claim 10, wherein: The main position in the current reference position satisfies a first condition, including: the main position in the current reference position is within the range of the first co-located image; The secondary position in the current reference position satisfies a first condition, including: the secondary position in the current reference position is within the range of the first co-located image.

12. The method according to claim 10, wherein: The method further comprises: When the current reference position does not satisfy the first condition, skipping the current reference position, determining a reference position corresponding to a next position index based on the first position index sequence, taking the reference position corresponding to the next position index as the current reference position, and continuing to perform the step of determining whether the current reference position satisfies the first condition; The fact that the current reference position does not satisfy the first condition includes: a primary position in the current reference position does not satisfy the first condition and a secondary position in the current reference position does not satisfy the first condition.

13. The method according to claim 5 or 6, wherein: The determining, according to the at least one co-located image, Y second-category time-domain candidate block vectors includes: Determining I offset time-domain block vectors for each of the at least one co-located image, where I is an integer greater than or equal to 0; The Y second-category time-domain candidate block vectors are determined according to the I offset time-domain block vectors of each of the at least one co-located image.

14. The method according to claim 13, wherein The determining of I offset time-domain block vectors of each of the at least one co-located image comprises: determining a first motion vector of a first co-located image, and determining one or more initial reference positions of the current block; offsetting the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first collocated image; I offset time-domain block vectors of the first co-located image are determined according to one or more offset reference positions in the first co-located image; wherein the first co-located image is any one of the at least one co-located image.

15. The method according to claim 14, wherein The determining of the first motion vector of the first co-located image includes: Determine motion vectors of respective multiple candidate positions around the current block and reference image indexes pointed to by the motion vectors; A current candidate position among the multiple candidate positions is determined based on a preset position order, and according to the current reference image index pointed to by the motion vector of the current candidate position, when the reference image indicated by the current reference image index is the first co-located image, the motion vector of the current candidate position is determined as the first motion vector of the first co-located image.

16. The method according to claim 15, wherein The method further comprises: A correction operation is performed on the motion vector of the current candidate position, and the corrected motion vector is determined as the first motion vector of the first co-located image.

17. The method according to claim 13, wherein: The determining of I offset time-domain block vectors of each of the at least one co-located image comprises: When the at least one collocated image includes a first collocated image and a second collocated image, determining a first motion vector of the first collocated image and a second motion vector of the second collocated image, and determining one or more initial reference positions of the current block; offsetting the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first collocated image; and offsetting the one or more initial reference positions according to the second motion vector to obtain one or more offset reference positions in the second collocated image; I offset time-domain block vectors of each of the at least one co-located image are determined according to one or more offset reference positions in the first co-located image and one or more offset reference positions in the second co-located image.

18. The method according to claim 17, wherein The determining, based on one or more offset reference positions in the first co-located image and one or more offset reference positions in the second co-located image, I offset time-domain block vectors for each of the at least one co-located image comprises: Determine the current offset reference position corresponding to the current position index; When the current offset reference position satisfies a second condition, determining J offset time-domain block vectors according to the current offset reference position, where J is an integer greater than or equal to 0; Based on the second position index sequence, determine the offset reference position corresponding to the next position index, and use the offset reference position corresponding to the next position index as the current offset reference position. Continue to execute the step of determining whether the current offset reference position meets the second condition until all offset reference positions are traversed to obtain I offset time domain block vectors for each of the at least one co-located image.

19. The method according to claim 18, wherein The method further comprises: One or more offset reference positions in the first co-located image and one or more offset reference positions in the second co-located image The positions are alternately set to determine the second position index order.

20. The method according to claim 18, wherein The offset reference position includes a primary position and a secondary position; and when the current offset reference position satisfies a second condition, determining J offset time-domain block vectors according to the current offset reference position includes: Determining whether a main position in the current offset reference position satisfies a second condition; When a main position in the current offset reference position satisfies a second condition, determining the J offset time-domain block vectors according to the main position in the current offset reference position; When the primary position in the current offset reference position does not satisfy the second condition, determining whether the secondary position in the current offset reference position satisfies the second condition; When the secondary position in the current offset reference position satisfies a second condition, the J offset time-domain block vectors are determined according to the secondary position in the current offset reference position.

21. The method according to claim 20, wherein The main position of the current offset reference position satisfies the second condition, including: the main position of the current offset reference position is within the range of the first collocated image; The secondary position in the current offset reference position satisfies a second condition, including: the secondary position in the current offset reference position is within the range of the first co-located image.

22. The method according to claim 20, wherein The method further comprises: When the current offset reference position does not satisfy the second condition, skipping the current offset reference position, determining an offset reference position corresponding to a next position index based on the second position index sequence, taking the offset reference position corresponding to the next position index as the current offset reference position, and continuing to perform the step of determining whether the current offset reference position satisfies the second condition; The fact that the current offset reference position does not satisfy the second condition includes: the primary position in the current offset reference position does not satisfy the second condition and the secondary position in the current offset reference position does not satisfy the second condition.

23. The method according to claim 1, wherein The constructing a candidate merge list based on the one or more time-domain candidate block vectors includes: Determining an initial merge list for the current block; The one or more time-domain candidate block vectors are added to the initial merge list to obtain the candidate merge list.

24. The method according to claim 23, wherein Based on a current time-domain candidate block vector among the one or more time-domain candidate block vectors, the method further includes: If there is a candidate in the initial merge list that is identical to the current time domain candidate block vector, discarding the current time domain candidate block vector; If there is no candidate identical to the current time-domain candidate block vector in the initial merge list, the current time-domain candidate block vector is added to the initial merge list.

25. The method according to claim 23, wherein The one or more time domain candidate block vectors include X first-category time domain candidate block vectors and Y second-category time domain candidate block vectors, where X and Y are both positive integers; Adding the one or more time-domain candidate block vectors to the initial merge list includes: Adding the X first-category time-domain candidate block vectors to the initial merge list; When the initial merge list is not filled, continue adding the Y second-category time-domain candidate block vectors to the initial merge list until the initial merge list is filled.

26. The method according to claim 25, wherein Adding the one or more time-domain candidate block vectors to the initial merge list includes: Adding N first-category time domain candidate block vectors among the X first-category time domain candidate block vectors and M second-category time domain candidate block vectors among the Y second-category time domain candidate block vectors to the initial merge list; wherein N is an integer greater than 0 and less than or equal to a first threshold, and M is an integer greater than 0 and less than or equal to a second threshold.

27. The method according to claim 25, wherein Adding the one or more time-domain candidate block vectors to the initial merge list includes: Add P time domain candidate block vectors from the one or more time domain candidate block vectors to the initial merge list; wherein the P time domain candidate block vectors are composed of a first type of time domain candidate block vector and a second type of time domain candidate block vector, and P is an integer greater than 0 and less than or equal to a third threshold.

28. The method according to any one of claims 1 to 27, wherein The method further comprises: determining a prediction mode for the current block; When the prediction mode of the current block meets a preset condition, the step of determining at least one co-located image of the current block is performed.

29. The method according to claim 28, wherein The prediction mode of the current block satisfies a preset condition, including: Determine that the current block uses intra template matching prediction mode and construct the candidate merge list for prediction; or, It is determined that the current block uses an intra block copy mode and the candidate merge list is constructed for prediction.

30. The method according to any one of claims 1 to 27, wherein The method further comprises: Determining a video sequence to which the current block belongs; When the video sequence is of the screen content category, the step of determining at least one co-located image of the current block is performed.

31. The method according to any one of claims 1 to 27, wherein The method further comprises: Decoding the code stream and determining the value of the first syntax element; When the first syntax element indicates that the current block uses a time-domain candidate block vector as a candidate for constructing the candidate merge list, the step of determining at least one co-located image of the current block is performed.

32. The method according to any one of claims 1 to 27, wherein The method further comprises: Determining one or more target block vectors of the current block according to the candidate merge list, and determining a prediction block of the current block according to the one or more target block vectors of the current block; Decoding a bitstream to determine a residual block of the current block; A reconstructed block of the current block is determined according to the residual block of the current block and the prediction block of the current block.

33. A coding method, applied to an encoder, comprising: determining at least one co-located image of the current block; determining one or more time-domain candidate block vectors of the current block according to the at least one co-located image; A candidate merge list is constructed based on the one or more time-domain candidate block vectors.

34. The method according to claim 33, wherein The determining, according to the at least one co-located image, one or more time-domain candidate block vectors of the current block includes: Determine X first-category time-domain candidate block vectors according to the at least one co-located image; One or more time-domain candidate block vectors of the current block are determined according to the X first-category time-domain candidate block vectors; wherein X is a positive integer.

35. The method of claim 33, wherein: The determining, according to the at least one co-located image, one or more time-domain candidate block vectors of the current block includes: Determine Y second-category time-domain candidate block vectors according to the at least one co-located image; One or more time-domain candidate block vectors of the current block are determined according to the Y second-category time-domain candidate block vectors; wherein Y is a positive integer.

36. The method of claim 33, wherein: The determining, according to the at least one co-located image, one or more time-domain candidate block vectors of the current block includes: Determine, according to the at least one co-located image, X first-category time-domain candidate block vectors and Y second-category time-domain candidate block vectors; One or more time-domain candidate block vectors of the current block are determined according to the X first-category time-domain candidate block vectors and the Y second-category time-domain candidate block vectors; wherein X and Y are both positive integers.

37. The method according to claim 34 or 36, wherein The determining, according to the at least one co-located image, X first-category time-domain candidate block vectors includes: Determine K time-domain block vectors for each of the at least one co-located image, where K is an integer greater than or equal to 0; The X first-category time-domain candidate block vectors are determined according to the K time-domain block vectors of each of the at least one co-located image.

38. The method of claim 37, wherein: The determining of K time-domain block vectors of each of the at least one co-located image comprises: determining one or more reference locations in the first collocated image; Determining K time-domain block vectors of the first co-located image according to the one or more reference positions; The first collocated image is any one of the at least one collocated image.

39. The method according to claim 38, wherein The determining, according to the one or more reference positions, K time-domain block vectors of the first co-located image includes: Determine the current reference position corresponding to the current position index; When the current reference position satisfies a first condition, determining H time-domain block vectors according to the current reference position, where H is an integer greater than or equal to 0; Based on the first position index sequence, a reference position corresponding to a next position index is determined, and the reference position corresponding to the next position index is used as the current reference position. The step of determining whether the current reference position meets the first condition is continued until the traversal of the one or more reference positions is completed to obtain K time domain block vectors of the first co-located image.

40. The method of claim 39, wherein The reference position includes a primary position and a secondary position; when the current reference position satisfies a first condition, determining H time-domain block vectors according to the current reference position includes: Determining whether a primary position in the current reference position satisfies a first condition; When the main position in the current reference position meets the first condition, the H time domain block vectors; When the primary position in the current reference position does not satisfy the first condition, determining whether the secondary position in the current reference position satisfies the first condition; When the secondary position in the current reference position satisfies a first condition, the H time-domain block vectors are determined according to the secondary position in the current reference position.

41. The method according to claim 40, wherein The main position in the current reference position satisfies a first condition, including: the main position in the current reference position is within the range of the first co-located image; The secondary position in the current reference position satisfies a first condition, including: the secondary position in the current reference position is within the range of the first co-located image.

42. The method of claim 40, wherein: The method further comprises: When the current reference position does not satisfy the first condition, skipping the current reference position, determining a reference position corresponding to a next position index based on the first position index sequence, taking the reference position corresponding to the next position index as the current reference position, and continuing to perform the step of determining whether the current reference position satisfies the first condition; The fact that the current reference position does not satisfy the first condition includes: a primary position in the current reference position does not satisfy the first condition and a secondary position in the current reference position does not satisfy the first condition.

43. The method according to claim 35 or 36, wherein The determining, according to the at least one co-located image, Y second-category time-domain candidate block vectors includes: Determining I offset time-domain block vectors for each of the at least one co-located image, where I is an integer greater than or equal to 0; The Y second-category time-domain candidate block vectors are determined according to the I offset time-domain block vectors of each of the at least one co-located image.

44. The method according to claim 43, wherein The determining of I offset time-domain block vectors of each of the at least one co-located image comprises: determining a first motion vector of a first co-located image, and determining one or more initial reference positions of the current block; offsetting the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first collocated image; I offset time-domain block vectors of the first co-located image are determined according to one or more offset reference positions in the first co-located image; wherein the first co-located image is any one of the at least one co-located image.

45. The method of claim 44, wherein: The determining of the first motion vector of the first co-located image includes: Determine motion vectors of respective multiple candidate positions around the current block and reference image indexes pointed to by the motion vectors; A current candidate position among the multiple candidate positions is determined based on a preset position order, and according to the current reference image index pointed to by the motion vector of the current candidate position, when the reference image indicated by the current reference image index is the first co-located image, the motion vector of the current candidate position is determined as the first motion vector of the first co-located image.

46. ​​The method of claim 45, wherein The method further comprises: A correction operation is performed on the motion vector of the current candidate position, and the corrected motion vector is determined as the first motion vector of the first co-located image.

47. The method of claim 43, wherein The determining of I offset time-domain block vectors of each of the at least one co-located image comprises: When the at least one collocated image includes a first collocated image and a second collocated image, determining a first motion vector of the first collocated image and a second motion vector of the second collocated image, and determining one or more initial reference positions of the current block; offsetting the one or more initial reference positions according to the first motion vector to obtain one or more offset reference positions in the first collocated image; and offsetting the one or more initial reference positions according to the second motion vector to obtain one or more offset reference positions in the second collocated image; I offset time-domain block vectors of each of the at least one co-located image are determined according to one or more offset reference positions in the first co-located image and one or more offset reference positions in the second co-located image.

48. The method of claim 47, wherein The determining, based on one or more offset reference positions in the first co-located image and one or more offset reference positions in the second co-located image, I offset time-domain block vectors for each of the at least one co-located image comprises: Determine the current offset reference position corresponding to the current position index; When the current offset reference position satisfies a second condition, determining J offset time-domain block vectors according to the current offset reference position, where J is an integer greater than or equal to 0; Based on the second position index sequence, determine the offset reference position corresponding to the next position index, and use the offset reference position corresponding to the next position index as the current offset reference position. Continue to execute the step of determining whether the current offset reference position meets the second condition until all offset reference positions are traversed to obtain I offset time domain block vectors for each of the at least one co-located image.

49. The method according to claim 48, wherein The method further comprises: One or more offset reference positions in the first co-located image and one or more offset reference positions in the second co-located image are alternately set to determine the second position index sequence.

50. The method of claim 48, wherein The offset reference position includes a primary position and a secondary position; and when the current offset reference position satisfies a second condition, determining J offset time-domain block vectors according to the current offset reference position includes: Determining whether a main position in the current offset reference position satisfies a second condition; When a main position in the current offset reference position satisfies a second condition, determining the J offset time-domain block vectors according to the main position in the current offset reference position; When the primary position in the current offset reference position does not satisfy the second condition, determining whether the secondary position in the current offset reference position satisfies the second condition; When the secondary position in the current offset reference position satisfies a second condition, the J offset time-domain block vectors are determined according to the secondary position in the current offset reference position.

51. The method of claim 50, wherein: The main position of the current offset reference position satisfies the second condition, including: the main position of the current offset reference position is within the range of the first collocated image; The secondary position in the current offset reference position satisfies a second condition, including: the secondary position in the current offset reference position is within the range of the first co-located image.

52. The method of claim 50, wherein: The method further comprises: When the current offset reference position does not satisfy the second condition, skipping the current offset reference position, determining an offset reference position corresponding to a next position index based on the second position index sequence, taking the offset reference position corresponding to the next position index as the current offset reference position, and continuing to perform the step of determining whether the current offset reference position satisfies the second condition; The fact that the current offset reference position does not satisfy the second condition includes: the primary position in the current offset reference position does not satisfy the second condition and the secondary position in the current offset reference position does not satisfy the second condition.

53. The method of claim 33, wherein: The constructing a candidate merge list based on the one or more time-domain candidate block vectors includes: Determining an initial merge list for the current block; The one or more time-domain candidate block vectors are added to the initial merge list to obtain the candidate merge list.

54. The method of claim 53, wherein: Based on a current time-domain candidate block vector among the one or more time-domain candidate block vectors, the method further includes: If there is a candidate in the initial merge list that is identical to the current time domain candidate block vector, discarding the current time domain candidate block vector; If there is no candidate identical to the current time-domain candidate block vector in the initial merge list, the current time-domain candidate block vector is added to the initial merge list.

55. The method of claim 53, wherein The one or more time domain candidate block vectors include X first-category time domain candidate block vectors and Y second-category time domain candidate block vectors, where X and Y are both positive integers; Adding the one or more time-domain candidate block vectors to the initial merge list includes: Adding the X first-category time-domain candidate block vectors to the initial merge list; When the initial merge list is not filled, continue adding the Y second-category time-domain candidate block vectors to the initial merge list until the initial merge list is filled.

56. The method of claim 55, wherein: Adding the one or more time-domain candidate block vectors to the initial merge list includes: Adding N first-category time domain candidate block vectors among the X first-category time domain candidate block vectors and M second-category time domain candidate block vectors among the Y second-category time domain candidate block vectors to the initial merge list; wherein N is an integer greater than 0 and less than or equal to a first threshold, and M is an integer greater than 0 and less than or equal to a second threshold.

57. The method of claim 55, wherein: Adding the one or more time-domain candidate block vectors to the initial merge list includes: Add P time domain candidate block vectors from the one or more time domain candidate block vectors to the initial merge list; wherein the P time domain candidate block vectors are composed of a first type of time domain candidate block vector and a second type of time domain candidate block vector, and P is an integer greater than 0 and less than or equal to a third threshold.

58. The method according to any one of claims 33 to 57, wherein The method further comprises: determining a prediction mode for the current block; When the prediction mode of the current block meets a preset condition, the step of determining at least one co-located image of the current block is performed.

59. The method of claim 58, wherein The prediction mode of the current block satisfies a preset condition, including: Determine that the current block uses intra template matching prediction mode and construct the candidate merge list for prediction; or, It is determined that the current block uses an intra block copy mode and the candidate merge list is constructed for prediction.

60. The method according to any one of claims 33 to 57, wherein The method further comprises: Determining a video sequence to which the current block belongs; When the video sequence is of the screen content category, the step of determining at least one co-located image of the current block is performed.

61. The method according to any one of claims 33 to 57, wherein The method further comprises: When the current block uses a time-domain candidate block vector as a candidate for constructing the candidate merging list, the step of determining at least one co-located image of the current block is performed.

62. The method of claim 61, wherein The method further comprises: Determining a value of a first syntax element; wherein the first syntax element is used to indicate whether the current block uses a time-domain candidate block vector as a candidate for constructing the candidate merge list; The value of the first syntax element is coded, and the obtained coded bits are written into a bitstream.

63. The method according to any one of claims 33 to 57, wherein The method further comprises: determining a co-located image index of the current block according to at least one co-located image of the current block; The co-located image index of the current block is coded, and the obtained coded bits are written into a bitstream.

64. The method according to any one of claims 33 to 57, wherein The method further comprises: Determine one or more target block vectors of the current block according to the candidate merge list; Determining a prediction block for the current block according to one or more target block vectors of the current block; A residual block of the current block is determined according to the prediction block of the current block.

65. The method of claim 64, wherein The method further comprises: The residual block of the current block is coded, and the obtained coded bits are written into a bitstream.

66. A code stream, wherein The code stream is generated by bit encoding according to information to be encoded; wherein the information to be encoded includes at least one of the following: a residual value of a current block, a co-located image index of the current block, and a value of a first syntax element; The first syntax element is used to indicate whether the current block uses a time-domain candidate block vector as a candidate for constructing the candidate merge list.

67. An encoder comprising a first determining unit and a first constructing unit, wherein: The first determining unit is configured to determine at least one co-located image of the current block; and determining one or more time-domain candidate block vectors of the current block based on the at least one co-located image; The first construction unit is configured to construct a candidate merge list based on the one or more time-domain candidate block vectors.

68. An encoder comprising a first memory and a first processor, wherein: The first memory is used to store a computer program that can be run on the first processor; The first processor is configured to execute the method according to any one of claims 33 to 65 when running the computer program.

69. A decoder comprising a second determining unit and a second constructing unit, wherein: The second determining unit is configured to determine at least one co-located image of the current block; and determining one or more time-domain candidate block vectors of the current block based on the at least one co-located image; The second constructing unit is configured to construct a candidate merge list based on the one or more time-domain candidate block vectors.

70. A decoder comprising a second memory and a second processor, wherein: The second memory is used to store a computer program that can be run on the second processor; The second processor is configured to execute the method according to any one of claims 1 to 32 when running the computer program.

71. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 32 or the method according to any one of claims 33 to 65 is implemented.

72. A computer program product comprising a computer program or instructions, wherein: When the computer program or instruction is executed by a processor, the method according to any one of claims 1 to 32 or the method according to any one of claims 33 to 65 is implemented.

Citation Information

Patent Citations

  • Intra block copy merge list simplification

    CN113455003A

  • Image / video coding method, device and system and computer readable storage medium

    CN113596475A

  • Inter prediction method, encoder, decoder and computer storage medium

    CN113747172A

  • Inter prediction method, encoder, decoder and computer storage medium

    CN114651443A

  • Method for encoding / decoding image and device using same

    WO2015194913A1