Coding and decoding method, communication device, storage medium and program product

By expanding the motion candidate list to include motion vectors from adjacent coding blocks of the largest coding unit, the problem of poor motion vector accuracy in AVS3 is solved, improving motion vector accuracy and compression efficiency during the coding process.

CN121603679APending Publication Date: 2026-03-03ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411125461.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

In the skip/direct mode of the Advanced Video Coding Standard (AVS3), the accuracy of motion vectors in the motion candidate list of the current coding block is poor, resulting in inaccurate motion vectors used during the encoding process.

Method used

The motion candidate list is expanded to include motion vectors of neighboring coding blocks of the largest coding unit containing the current coding block, generating a motion candidate list for the current coding block. This provides more spatial expansion candidates and improves the accuracy of motion vectors.

Benefits of technology

By expanding the motion candidate list, the likelihood of motion vectors that are closer to the currently encoded motion vector is increased, thereby improving the accuracy of motion vectors and compression efficiency during the encoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121603679A_ABST
    Figure CN121603679A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a coding and decoding method, a communication device, a storage medium and a program product, relates to the technical field of video processing, and solves the technical problem of poor accuracy of a motion vector used in a coding process. The method comprises the following steps: acquiring first indication information; the first indication information is used for indicating a first motion vector in a motion candidate list of the current coding block; the first motion vector is used for determining the motion vector of the current coding block; the motion candidate list is determined based on the motion vector of the coding block adjacent to the boundary of the maximum coding unit where the current coding block is located; and sending the first indication information to the decoding end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of video processing technology, and in particular to an encoding / decoding method, communication device, storage medium, and program product. Background Technology

[0002] In the skip / direct mode of Advanced Video Coding Standard (AVS) 3, when generating the motion candidate list for the current coding block, the maximum number of motion vectors (MVs) in the motion candidate list is 12, and the spatially related motion vectors are selected or derived from neighboring coding blocks. The motion vectors in the currently determined motion candidate list may differ significantly from the actual motion vectors of the current coding block, leading to poor accuracy of the motion vectors used during the encoding process. Summary of the Invention

[0003] This disclosure provides an encoding / decoding method, communication device, storage medium, and program product, which solves the technical problem of poor accuracy of motion vectors used in the encoding process.

[0004] On one hand, an encoding method is provided, comprising: acquiring first indication information; the first indication information being used to indicate a first motion vector in a motion candidate list of the current coding block; the first motion vector being used to determine the motion vector of the current coding block; the motion candidate list being determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit in which the current coding block is located; and sending the first indication information to a decoding end.

[0005] In another aspect, a decoding method is provided, comprising: receiving first indication information; the first indication information being used to indicate a first motion vector in the motion candidate list of the current coding block; the motion candidate list being determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit in which the current coding block is located; and decoding the motion vector of the current coding block based on the first indication information.

[0006] In another aspect, a communication device is provided, comprising: a processing unit and a communication unit, wherein the processing unit is configured to acquire first indication information; the first indication information is configured to indicate a first motion vector in a motion candidate list of the current coding block; the first motion vector is configured to determine the motion vector of the current coding block; the motion candidate list is determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit in which the current coding block is located; and the communication unit is configured to send the first indication information to a decoding end.

[0007] In another aspect, a communication device is provided, comprising: a processing unit and a communication unit, wherein the communication unit is configured to receive first indication information; the first indication information is configured to indicate a first motion vector in a motion candidate list of the current coding block; the motion candidate list is determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit in which the current coding block is located; and the processing unit is configured to decode the motion vector of the current coding block based on the first indication information.

[0008] In another aspect, a communication device is provided, comprising: a memory and a processor; the memory and the processor are coupled; the memory is used to store a computer program; and the processor, when executing the computer program, implements the information processing method of any of the above embodiments.

[0009] In another aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, which, when executed by a processor, implement the information processing method of any of the above embodiments.

[0010] In another aspect, a computer program product is provided, which includes computer program instructions that, when executed by a processor, implement the information processing method of any of the above embodiments.

[0011] This disclosure provides an encoding method in which the encoding end generates a motion candidate list for the current coding block based on the motion vectors of the neighboring coding blocks of the largest coding unit containing the current coding block. Compared to the prior art where the encoding end determines the motion candidate list based on the motion vectors of the neighboring coding blocks of the current coding block, this disclosure additionally expands the spatial candidate list by including the motion vectors of the neighboring coding blocks of the largest coding unit containing the current coding block. This allows for the provision of more spatially expanded candidates. Since the spatially expanded candidates may contain motion vectors that are closer to the current coding motion vector, the encoding method provided by this disclosure can improve the accuracy of motion vectors during the encoding process. Attached Figure Description

[0012] Figure 1 This is a schematic diagram of adjacent coding blocks of the current coding block provided in an embodiment of the present disclosure;

[0013] Figure 2 A system architecture diagram of an encoding / decoding system provided in this disclosure embodiment;

[0014] Figure 3 A flowchart illustrating an encoding method provided in an embodiment of this disclosure;

[0015] Figure 4 This is a schematic diagram of a coding block adjacent to the left and the coding block adjacent to the top outside the largest coding unit, provided in an embodiment of this disclosure.

[0016] Figure 5 This is a schematic diagram of the left-adjacent coding block and the top-adjacent coding block within a maximum coding unit, provided in an embodiment of this disclosure.

[0017] Figure 6 A schematic diagram illustrating the matching of the template of the current coding block and the template of the reference coding block to which the motion vector points, provided for an embodiment of this disclosure;

[0018] Figure 7 A flowchart illustrating yet another encoding method provided in this disclosure embodiment;

[0019] Figure 8 A flowchart illustrating a decoding method provided in an embodiment of this disclosure;

[0020] Figure 9 A flowchart illustrating yet another decoding method provided in this disclosure embodiment;

[0021] Figure 10 This is a schematic diagram of the structure of a communication device provided in an embodiment of the present disclosure;

[0022] Figure 11 This is a schematic diagram of the structure of another communication device provided in an embodiment of the present disclosure;

[0023] Figure 12 This is a schematic diagram of the hardware structure of a communication device provided in an embodiment of the present disclosure. Detailed Implementation

[0024] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the embodiments of this disclosure.

[0025] It should be noted that, in the embodiments disclosed herein, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments disclosed herein should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0026] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0027] In the description of the embodiments disclosed herein, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, "at least one" refers to one or more, and "multiple" refers to two or more.

[0028] AVS3 is a video codec technology. AVS3's inter-frame prediction modes include Skip mode and Direct mode. Skip mode predicts the motion vector of the current coding block using motion information from neighboring encoded blocks. In Skip mode, the residual information of the current coding block is assumed to be zero; therefore, no residual information is transmitted. The process of predicting the motion vector of the current coding block in Direct mode is similar to Skip mode, but Direct mode calculates and transmits the residual information of the current coding block to further improve the prediction accuracy.

[0029] When predicting motion vectors for the current coded block at the encoder using Skip or Direct mode, the encoder first generates a motion candidate list containing multiple motion vectors. The encoder then selects the best motion vector from this list. The encoder sends the index of the best motion vector to the decoder; this index indicates the best motion vector's order within the motion candidate list.

[0030] After receiving the index value sent by the encoder, the decoder generates a motion candidate list in the same way as the encoder. The decoder selects the motion vector corresponding to the index value from the motion candidate list, and predicts the motion vector of the current coded block based on the selected motion vector.

[0031] The above list of motion candidates typically includes the following motion vectors in a fixed candidate order:

[0032] One temporal candidate (or sub-block temporal candidate) (also known as a temporal candidate motion vector).

[0033] The three airspace candidates (also known as airspace candidate motion vectors) are: one bidirectional candidate, one backward candidate, and one forward candidate.

[0034] 0 to 5 motion vector angular prediction candidates (also known as motion vector angular prediction (MVAP)).

[0035] 0 to 8 historical motion candidates (also known as history-based motion vector prediction, HMVP).

[0036] There are 0 to X candidates for repeated filling, where X is a positive integer.

[0037] Currently, the maximum number of candidates in the sports candidate list is 12.

[0038] The decoding or encoding end determines the above three spatial domain candidates in the following ways.

[0039] Taking the current coding block as #E as an example, the candidate coding blocks to the left and above #E are: #A, #B, #C, #D, #F, and #G, respectively. The positions of each coding block are as follows: Figure 1 As shown.

[0040] When selecting spatial candidates, the decoding or encoding end sequentially acquires the motion vectors of these coded blocks in the order of coded block #F, coded block #G, coded block #C, coded block #A, coded block #B, and coded block #D. If the acquired motion vector differs from the motion vector in the current motion candidate list, the acquired coded block is taken as a candidate coded block, and the motion vector of the candidate coded block is the spatial candidate. Optionally, the motion vector of the first selected candidate coded block is called the spatial bidirectional candidate, the motion vector of the second selected candidate coded block is called the spatial backward candidate, and the motion vector of the third selected candidate coded block is called the spatial forward candidate.

[0041] When generating the motion candidate list for the current coding block, the method for selecting motion vectors from the list is fixed. When determining spatial candidates, only the motion vectors of adjacent blocks of the current coding block are selected as motion vectors. However, in some scenarios, the motion vectors in the motion candidate list may differ significantly from the actual motion vectors of the current coding block, leading to poor accuracy of the motion vectors used during encoding.

[0042] To address the aforementioned technical problems, embodiments of this disclosure provide an encoding method in which the encoding end generates a motion candidate list for the current coding block based on the motion vectors of the neighboring coding blocks of the largest coding unit containing the current coding block. Compared to the prior art where the encoding end determines the motion candidate list based on the motion vectors of the neighboring coding blocks of the current coding block, the spatial candidate list of this disclosure additionally expands to include the motion vectors of the neighboring coding blocks of the largest coding unit containing the current coding block. Thus, this disclosure can provide more spatially expanded candidates. Since there may be motion vectors in the spatially expanded candidates that are closer to the current coding motion vector, the encoding method provided by this disclosure can improve the accuracy of motion vectors during the encoding process.

[0043] The encoding method provided in this disclosure can be applied to, for example, Figure 2 In the encoding / decoding system 20 shown, such as Figure 2 As shown, the encoding / decoding system 20 includes an encoding end 201 and a decoding end 202.

[0044] In this process, the encoder 201 generates a motion candidate list and selects the optimal motion vector from the list. The encoder 201 then indicates the index of this optimal motion vector to the decoder 202. The decoder 202 generates a motion candidate list in the same manner as the encoder 201, and upon receiving the index of the optimal motion vector from the encoder 201, selects the motion vector corresponding to that index from the list. Based on this motion vector, the decoder predicts the motion vector of the current coded block.

[0045] In some embodiments, when the encoder 201 generates a motion candidate list, in addition to determining the motion candidate list based on temporal candidate motion vectors, spatial candidate motion vectors, motion vectors predicted based on motion vector angles, and historical motion vectors, the motion candidate list can also be determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit containing the current coding block. Thus, this disclosure can provide more spatially extended candidates. Since there may be motion vectors among the spatially extended candidates that are closer to the current coded motion vector, the encoding method provided by this disclosure can improve the accuracy of the motion vectors determined during the encoding process.

[0046] In some embodiments, before selecting the best motion vector from the motion candidate list, the encoder 201 can sort the motion vectors in the motion candidate list based on the template cost (the template cost corresponding to the motion vector). The motion vector with the smaller the template cost is ranked higher, and the index value of the motion vector with the smaller the template cost is also smaller. A smaller template cost of a motion vector indicates a smaller pixel error in the coding block to which the motion vector belongs, and a higher probability that the motion vector is determined to be the best motion vector. In other words, in this embodiment, after sorting based on the template cost, the index value of the best motion vector is usually a smaller index value. Thus, the encoder 201 sends a smaller index value to the decoder when indicating the best motion vector by the index of the motion vector, and the smaller index value occupies fewer coding bits. Therefore, in this embodiment, after sorting the motion vectors in the motion candidate list by the template cost, the coding bits occupied by the index indicating the best motion vector can be reduced, thereby improving compression efficiency.

[0047] It should be noted that, Figure 2 This is just an example framework diagram. Figure 2 The number of devices included and the names of each device are unlimited, except for... Figure 2In addition to the devices shown, the encoding and decoding system may also include other devices, such as video playback devices, video servers, etc.

[0048] The application scenarios of the embodiments disclosed herein are not limited. The system architecture and business scenarios described in the embodiments of this disclosure are for the purpose of more clearly illustrating the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of this disclosure. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this disclosure are also applicable to similar technical problems.

[0049] The encoding method provided in the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0050] Figure 3 This is a flowchart illustrating an encoding method provided in an embodiment of this disclosure. In this method, the encoding end selects at least one preset coding block from the adjacent coding blocks of the largest coding unit where the current coding block is located, and adds the motion vectors of at least one preset coding block to a motion candidate list, thereby increasing the selection range of motion vectors in the motion candidate list and thus improving the accuracy of the selected motion vectors. The functions and operations of various devices in the encoding / decoding system provided in this embodiment of the disclosure are described below, such as... Figure 3 As shown, the encoding method includes the following steps:

[0051] Step 301: The encoding end generates the first instruction information.

[0052] Wherein, the first indication information is used to indicate the first motion vector in the motion candidate list of the current coding block; the first motion vector is used to determine the motion vector of the current coding block; the motion candidate list is determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit (LCU) where the current coding block is located; in some embodiments, step 301 can specifically be implemented as follows: the encoding end selects at least one preset coding block from a plurality of coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located. The encoding end writes the motion vectors of at least one preset coding block and other candidate coding blocks determined by other methods into the motion candidate list to generate the motion candidate list of the current coding block. After this, the encoding end determines the best motion vector in the motion candidate list as the first motion vector. The encoding end generates first indication information to indicate the first motion vector.

[0053] As one embodiment, the first indication information can be used to indicate the index value of the first motion vector, so that the decoding end can determine the first motion vector from the motion candidate list based on the index value of the first motion vector. The index value of the motion vector is used to characterize the order of the motion vector in the motion candidate list.

[0054] It should be noted that, in some cases, the motion candidate list above includes the motion vector of at least one preset coding block; the preset coding block is a coding block that is adjacent to the boundary of the largest coding unit where the current coding block is located.

[0055] In some other cases, the motion candidate list may not include the motion vector of at least one preset coding block. For example, if there are no adjacent coding blocks at the boundary of the largest coding unit, or if there are no motion vectors in the adjacent coding blocks, the motion candidate list may not include the motion vector of at least one preset coding block. Or, for example, if the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit are all the same as the motion vectors already determined in the motion candidate list, the motion candidate list may not include the motion vector of at least one preset coding block. This application does not impose any limitations on this.

[0056] It is understood that the motion candidate list described above may include motion vectors in addition to those of at least one preset coding block. For example, the motion vectors in the motion candidate list may include: temporal domain candidate motion vectors; spatial domain candidate motion vectors; motion vectors predicted based on motion vector angles; historical motion vectors; and motion vectors of at least one preset coding block. It should be understood that the motion candidate list may also include more or fewer motion vectors than in this example, and this disclosure does not limit this.

[0057] Step 302: The encoding end sends the first instruction information to the decoding end.

[0058] In some embodiments, after the encoder sends the first indication information to the decoder, the decoder determines the first motion vector based on the first indication information, and then predicts the motion vector of the current coded block based on the first motion vector.

[0059] In one implementation, the first indication information is used to indicate the index value of the first motion vector. Thus, the decoder first determines a motion candidate list based on the method described in step 301 of the encoder, then determines the first motion vector from the motion candidate list based on the index value indicated by the first indication information, and subsequently predicts the motion vector of the current coded block based on the first motion vector.

[0060] In this embodiment, when the encoder generates a motion candidate list for the current coding block based on the motion vectors of the neighboring coding blocks of the largest coding unit containing the current coding block, compared to the prior art where the encoder determines the motion candidate list based on the motion vectors of the neighboring coding blocks of the current coding block, the spatial candidate list of this disclosure additionally expands to include the motion vectors of the neighboring coding blocks of the largest coding unit containing the current coding block. Thus, this disclosure can provide more spatially expanded candidates. Since there may be motion vectors in the spatially expanded candidates that are closer to the current coding motion vector, the encoding method provided by this disclosure can improve the accuracy of motion vectors during the encoding process.

[0061] The following section will first explain at least one preset coding block (also known as a spatial expansion candidate) in the motion candidate list.

[0062] In some embodiments, at least one preset coding block in the motion candidate list includes: a coding block outside the maximum coding unit and adjacent to the boundary of the maximum coding unit; and / or, a coding block inside the maximum coding unit and adjacent to the boundary of the maximum coding unit.

[0063] Optionally, the boundary of the largest coding unit includes at least one of the following: the left boundary of the largest coding unit; the upper boundary of the largest coding unit.

[0064] In other words, at least one preset coding block in the motion candidate list includes at least one of the following coding blocks: a coding block outside the maximum coding unit and adjacent to the left boundary of the maximum coding unit; a coding block outside the maximum coding unit and adjacent to the upper boundary of the maximum coding unit; a coding block inside the maximum coding unit and adjacent to the left boundary of the maximum coding unit; and a coding block inside the maximum coding unit and adjacent to the upper boundary of the maximum coding unit.

[0065] In some embodiments, the motion vector of at least one preset coding block is different from the motion vectors in the motion candidate list other than the motion vector of at least one preset coding block; and / or, the motion vectors of the at least one preset coding block are all different. That is, the motion vector of at least one preset coding block added to the motion candidate list is the deduplicated motion vector.

[0066] In this scenario, when the encoder determines at least one preset coding block, it sequentially selects coding blocks from those adjacent to the boundary of the largest coding unit containing the current coding block, and determines whether the motion vector of the currently selected coding block is the same as the current motion vector in the motion candidate list. If they are the same, the motion vector of that coding block is not added to the motion candidate list; otherwise, it is added to the motion candidate list. This avoids duplicate motion vectors in the motion candidate list, thereby increasing the number of valid motion vectors in the list and further improving the accuracy of the final determined optimal motion vector. Optionally, all motion vectors in the motion candidate list are different.

[0067] In some other embodiments, at least one preset coding block includes a coding block selected from coding blocks adjacent to the boundary of the largest coding unit, based on the positional order of coding blocks in the video frame and / or a preset interval. In other words, when the encoding end selects at least one preset coding block from coding blocks adjacent to the boundary of the largest coding unit, it may do so based on the positional order of coding blocks in the video frame and / or a preset interval.

[0068] As an example, the positional order includes bottom-up and left-to-right. The encoder selects a coding block every other coding block in a bottom-up and left-to-right manner and adds the motion vector of the selected coding block to the motion candidate list. Optionally, before adding the motion vector of the selected coding block to the motion candidate list, the encoder can pre-determine whether the motion vector of the selected coding block meets the conditions (such as whether it is the same as the current motion vector in the motion candidate list), and add the motion vector of the selected coding block to the motion candidate list if the conditions are met.

[0069] As a specific implementation, the process of selecting at least one preset coding block from coding blocks outside the largest coding unit and adjacent to the left and upper boundaries of the largest coding unit at the encoding end is as follows:

[0070] The encoder determines the largest coding unit (MCU) containing the current coding block, and also determines the coding blocks adjacent to the left and top of the largest coding unit. Specifically, the coding blocks adjacent to the left and top of the largest coding unit are as follows: Figure 4 As shown. As an example, the size of the largest coding unit is 128×128 pixels; the size of the coding block is 4×4 pixels.

[0071] The encoder selects a code block from bottom to top and from left to right, skipping every other code block, and determines the motion vector of the selected code block. The code block selected by the encoder is as follows: Figure 4 The black coded block is shown.

[0072] The encoder determines whether the motion vector and / or bi-directional gradient correction (BGC) information of the selected coding block meets the requirements. For example, it checks whether the motion vector of the coding block is the same as the current motion vector in the motion candidate list, or whether the bi-directional gradient correction information of the coding block meets preset conditions. If it does, the encoder adds the motion vector of the currently selected coding block to the motion candidate list.

[0073] As another specific implementation, the process of selecting at least one preset coding block from the coding blocks within the largest coding unit and adjacent to the left and upper boundaries of the largest coding unit at the encoding end is as follows:

[0074] The encoder determines the largest coding unit (MCU) containing the current coding block, and then determines the leftmost and topmost coding blocks within that MCU. Specifically, the leftmost and topmost coding blocks within the MCU are defined as follows: Figure 5 As shown. As an example, the size of the largest coding unit is 128×128 pixels. The size of the coding block is 4×4 pixels.

[0075] The encoder selects a code block from bottom to top and from left to right, skipping every other code block, and determines the motion vector of the selected code block. The code block selected by the encoder is as follows: Figure 5 The black coded block is shown.

[0076] The encoder determines whether the motion vector and / or bidirectional gradient correction information of the selected coding block meets the requirements. For example, it checks whether the motion vector of the coding block is the same as the current motion vector in the motion candidate list, or whether the bidirectional gradient correction information of the coding block meets preset conditions. If it does, the encoder adds the motion vector of the currently selected coding block to the motion candidate list.

[0077] It is understood that the size of the aforementioned coding block and the size of the maximum coding unit can be determined according to actual needs, and this disclosure does not impose any limitations on them.

[0078] It should be noted that the above description only uses the example of the boundary of the largest coding unit including at least one of the left boundary and the upper boundary of the largest coding unit. In practical applications, the boundary of the largest coding unit may also include, but is not limited to, other boundaries, such as at least one of the right boundary and the lower boundary of the largest coding unit; this disclosure does not limit this.

[0079] In some embodiments, the motion vectors in the motion candidate list can be sorted based on two methods, namely Method 1 and Method 2. Method 1 is sorting based on template cost; Method 2 is sorting based on preset position, which will be described in detail below.

[0080] Method 1: The motion vectors in the motion candidate list are sorted based on template cost.

[0081] In Method 1, after the encoder determines the motion vectors in the motion candidate list, it determines the size of the template cost of the motion vectors and sorts the motion vectors in the motion candidate list according to the size of the template cost.

[0082] The template cost characterizes the error between pixels in adjacent reconstructed coded blocks of the current coded block and pixels in adjacent reconstructed coded blocks of the reference coded block in the reference frame pointed to by the motion vector; the reference coded block is the coded block in the reference frame corresponding to the current coded block. For example, such as... Figure 6 The diagram illustrates the matching of a template of a current coding block and a template of a reference coding block to which a motion vector points, according to an embodiment of this disclosure. The adjacent reconstructed coding blocks of the current coding block typically refer to the top and / or left adjacent coding blocks of the current coding block (denoted as the current upper template and the current left template); the adjacent reconstructed coding blocks of the reference coding block typically refer to the top and / or left adjacent coding blocks of the reference coding block (denoted as the reference upper template and the reference left template). The pixel error between the two is denoted as the template cost.

[0083] It should be noted that the encoding end can determine the reference coding block in the reference frame based on the current coding block and the target motion vector, and then determine the template cost of the target motion vector based on the error between the pixels of the adjacent reconstructed coding blocks of the current coding block and the pixels of the adjacent reconstructed coding blocks of the reference coding block in the reference frame pointed to by the motion vector.

[0084] In Method 1, all motion vectors in the motion candidate list can be sorted based on template cost (referred to as Method 1.1), or only a portion of the motion vectors in the motion candidate list can be sorted based on template cost (referred to as Method 1.2); these will be explained in detail below:

[0085] Method 1.1: Sort all motion vectors in the motion candidate list based on template cost.

[0086] In Method 1.1, after the encoder determines the motion vectors in the motion candidate list, it determines the template cost of all motion vectors and sorts the motion vectors in the motion candidate list according to the template cost.

[0087] For example, the motion vectors in the motion candidate list include: temporal candidate motion vectors; spatial candidate motion vectors; historical motion vectors; and motion vectors of at least one pre-defined coding block. The encoder calculates the template cost of each of these motion vectors and sorts the motion vectors in the motion candidate list based on the template cost of the motion vectors.

[0088] It is understandable that method 1.1 can be applied to scenarios where the template cost can be calculated for all encoded blocks corresponding to motion vectors in the motion candidate list.

[0089] Method 1.2: Sort a portion of the motion vectors in the motion candidate list based on template cost.

[0090] In some embodiments, the order of preset motion vectors in the motion candidate list is determined based on the magnitude of the template cost corresponding to the preset motion vector; motion vectors other than the preset motion vectors are located at a first preset position in the motion candidate list. In other words, the encoder sorts the preset motion vectors in the motion candidate list based on the magnitude of the template cost. For motion vectors other than the preset motion vectors, the encoder adds them to the first preset position in the motion candidate list.

[0091] It is understandable that method 1.2 can be applied to scenarios where some motion vectors in the motion candidate list can have their template costs calculated, while others cannot. Situations where template costs cannot be calculated include: the temporal candidate motion vectors are multiple sub-block temporal candidate motion vectors.

[0092] As an example, the motion vectors in the motion candidate list include: temporal candidate motion vectors for sub-blocks; spatial candidate motion vectors; motion vectors predicted based on motion vector angles; historical motion vectors; and motion vectors for at least one preset coding block.

[0093] The temporal candidate motion vectors of the sub-block and the motion vectors predicted based on the motion vector angles are set at fixed positions (such as the starting position) in the motion candidate list.

[0094] Spatial candidate motion vectors, historical motion vectors, and at least one preset motion vector can be used to calculate template costs. The encoder calculates the costs of these motion vectors respectively, sorts them based on the calculated costs, and then adds them to the motion candidate list based on the sorting. In some implementations, motion vectors with lower template costs are ranked higher, and correspondingly, their index values ​​are smaller. A smaller template cost indicates a smaller pixel error in the coding block to which the motion vector belongs, and a higher probability that the motion vector is identified as the optimal motion vector. In other words, in this embodiment, after sorting based on template costs, the index value of the optimal motion vector is usually a smaller value. Thus, the encoder sends a smaller index value to the decoder when indicating the optimal motion vector by its index, and a smaller index value occupies fewer coding bits. Therefore, in this embodiment, after sorting the motion vectors in the motion candidate list by template cost, the number of coding bits occupied by the index indicating the optimal motion vector can be reduced, improving compression efficiency.

[0095] In Method 1.2, if the number of spatial candidate motion vectors, history-based motion vectors, and motion vectors from at least one preset coding block is large, the encoder can select some motion vectors with the lowest template costs from these motion vectors and add them to the motion candidate list, instead of adding all of them. In other words, the preset motion vectors are the M motion vectors with the lowest template costs out of K motion vectors; where K and M are both positive integers, and K is greater than M. These K motion vectors are the spatial candidate motion vectors, history-based motion vectors, and motion vectors from at least one preset coding block. As an example, the motion candidate list retains a maximum of 12 motion vectors after reordering.

[0096] Based on this, the encoder adds motion vectors with smaller template values ​​to the motion candidate list, which can further reduce the size of the index value indicated by the first indication information, thereby reducing the number of encoding bits occupied by the index value.

[0097] Method 2: The motion vectors in the motion candidate list are sorted based on preset positions.

[0098] In some implementations, the motion vectors in the motion candidate list are arranged in the following order:

[0099] 1. Temporal candidate motion vectors.

[0100] 2. Candidate motion vectors in the airspace.

[0101] 3. Motion vectors predicted based on motion vector angles.

[0102] 4. Motion vectors based on history.

[0103] In this embodiment of the disclosure, the motion vector of at least one preset coded block can be added to a second preset position in the motion candidate list. For example, the second preset position can be the position following the spatial candidate motion vector in the motion candidate list (denoted as mode 2.1); or, the second preset position can also be the position following the historical motion vector in the motion candidate list (denoted as mode 2.2).

[0104] In method 2.1, the motion vectors in the motion candidate list are arranged in the following order:

[0105] 1. Temporal candidate motion vectors.

[0106] 2. The motion vector of at least one preset coded block.

[0107] 3. Candidate motion vectors in the airspace.

[0108] 4. Motion vectors predicted based on motion vector angles.

[0109] 5. Motion vectors based on history.

[0110] In Method 2.2, the motion vectors in the motion candidate list are arranged in the following order:

[0111] 1. Temporal candidate motion vectors.

[0112] 2. Candidate motion vectors in the airspace.

[0113] 3. Motion vectors predicted based on motion vector angles.

[0114] 4. Motion vectors based on history.

[0115] 5. The motion vector of at least one preset coded block.

[0116] It should be noted that, in Method 2, the motion vectors of at least one preset coding block can also be arranged in other positions in the motion candidate list, and this disclosure does not limit this. Furthermore, the positions of each motion vector in the motion candidate list can be adjusted according to actual application requirements, and this disclosure does not limit this.

[0117] The above provides a detailed description of the sorting method for motion vectors in the motion candidate list in the embodiments of this disclosure.

[0118] In some embodiments, the method of adding the motion vectors of the boundary adjacent coding blocks of the largest coding unit to the motion succession list is called spatial expansion candidate function. The encoder can also indicate to the decoder whether the spatial expansion candidate function is enabled in the motion candidate list. Figure 7As shown, the process by which the encoder can instruct the decoder whether the spatial expansion candidate function is enabled in the motion candidate list can be implemented through the following steps 701.

[0119] Step 701: The encoding end generates the second instruction information.

[0120] The second indication information is used to indicate whether the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located. In other words, the second indication information is used to indicate whether the spatial expansion candidate function is enabled.

[0121] Optionally, the second indication information can indicate whether the spatial expansion candidate function is enabled by the value of a corresponding bit. For example, a value of 1 for the first preset bit indicates that the spatial expansion candidate function is enabled; a value of 0 for the first preset bit indicates that the spatial expansion candidate function is disabled.

[0122] Step 702: The encoding end sends the second instruction information to the decoding end.

[0123] In some embodiments, the second indication information is further used to indicate whether the motion vectors in the motion candidate list are sorted based on the size of the template cost. In other words, the second indication information is also used to indicate whether the function of sorting based on the size of the template cost is enabled.

[0124] Optionally, the second indication information can indicate whether the template cost-based sorting function is enabled by the value of a corresponding bit. For example, a value of 1 for the second preset bit indicates that the template cost-based sorting function is enabled; a value of 0 for the second preset bit indicates that the template cost-based sorting function is disabled.

[0125] In some other embodiments, where the second indication information is used to indicate that the motion candidate list is determined based on the motion vectors of coded blocks adjacent to the boundary of the largest coding unit to which the current coded block belongs; the second indication information is also used to indicate the number of motion vectors of coded blocks adjacent to the boundary of the largest coding unit to which the current coded block belongs in the motion candidate list (i.e., the second indication information can also be used to indicate the number of spatial expansion candidates). In some embodiments, the number of spatial expansion candidates is N, where N is a positive integer, and the value of N can be a fixed value or the value indicated by the second indication information. As an example, the value of N is 10.

[0126] Based on the above, the second indication information may indicate at least one of the following: whether the spatial expansion candidate function is enabled, whether the function is sorted based on the size of the template cost, and the number of spatial expansion candidates.

[0127] In one possible implementation, the second indication information is carried in at least one of the following: the transmission bitstream of the sequence header of the video sequence, the transmission bitstream of the video frame, the transmission bitstream of the video strip, and the transmission bitstream of the video slice.

[0128] In other words, the encoding end can indicate at least one of the following at the granularity of video sequence: whether to enable the spatial domain expansion candidate function, whether to sort based on template cost, and the number of spatial domain expansion candidates; or, the encoding end can indicate at the granularity of video frame: whether to enable the spatial domain expansion candidate function, whether to sort based on template cost, and the number of spatial domain expansion candidates; or, the encoding end can indicate at the granularity of video strip: whether to enable the spatial domain expansion candidate function, whether to sort based on template cost, and the number of spatial domain expansion candidates; or, the encoding end can indicate at the granularity of video slice: whether to enable the spatial domain expansion candidate function, whether to sort based on template cost, and the number of spatial domain expansion candidates.

[0129] Taking the second indication information carried in the transmission bitstream of the video sequence header as an example, a control flag "spatial_ext_cands_enable_flag" is added to the bitstream of the sequence header to indicate whether the spatial extension candidate function is enabled. When the value of the flag is 1, it indicates that the spatial extension candidate function is enabled; when the value of the flag is 0, it indicates that the spatial extension candidate function is disabled.

[0130] A control flag "skip_direct_cands_reorder_enable_flag" is added to the bitstream of the sequence header to indicate whether the function of sorting based on the size of the template cost is enabled. When the value of the flag is 1, the function of sorting based on the size of the template cost is enabled; when the value of the flag is 0, the function of sorting based on the size of the template cost is disabled.

[0131] As an example, the format of the sequence header with the "spatial_ext_cands_enable_flag" and "skip_direct_cands_reorder_enable_flag" flags is shown in Table 1 below:

[0132] Table 1

[0133]

[0134] The above explains the process of enabling and disabling related functions through indicator information.

[0135] In this embodiment of the disclosure, the motion candidate list corresponding to each coding block in the maximum coding unit includes the motion vector of the coding block selected from the coding blocks adjacent to the boundary of the maximum coding unit.

[0136] In other words, in this embodiment of the disclosure, different coding blocks within the same maximum coding unit only need to determine the boundary-adjacent coding blocks of that maximum coding unit once (denoted as target coding blocks). The motion candidate lists corresponding to these coding blocks all include the motion vectors of the coding blocks selected from the target coding blocks.

[0137] It is understandable that the motion candidate lists corresponding to different coding blocks within the same maximum coding unit all include the motion vectors of the coding blocks selected from the target coding block. However, the motion vectors of the coding blocks selected from the target coding block included in the motion candidate lists corresponding to different coding blocks may be different.

[0138] For example, the temporal candidate motion vectors, spatial candidate motion vectors, motion vectors predicted based on motion vector angles, and motion vectors based on history may be different in the motion candidate lists corresponding to different coding blocks. When the encoder selects motion vectors from the target coding block, if it is necessary to deduplicate the selected motion vectors, the deduplicated motion vectors may be different, and correspondingly, the motion vectors added to the motion candidate list by the encoder will also be different.

[0139] The encoding method in the embodiments of this disclosure has been described in detail above. After the encoding end sends the first indication information to the decoding end, the decoding end determines the motion vector of the current encoding library based on the first indication information. The following, in conjunction with... Figure 8 The decoding process will be described in detail. For example... Figure 8 As shown, the decoding method provided in this embodiment includes:

[0140] Step 801: The decoding end receives the first instruction information.

[0141] The first indication information is used to indicate the first motion vector in the motion candidate list of the current coding block; the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit in which the current coding block is located.

[0142] It should be noted that the understanding of technical terms such as the first indication information, motion candidate list, first motion vector, coding block adjacent to the boundary of the preset coding unit to which the current coding block belongs, and at least one preset coding block in this step can be referred to the description in the above embodiments, and this disclosure will not repeat them.

[0143] Step 802: The decoding end decodes the motion vector of the current coded block based on the first indication information.

[0144] In some embodiments, the decoder predicts the motion vector of the current coded block based on the first motion vector indicated by the first indication information.

[0145] Taking the index value of the first indication information used to indicate the first motion vector as an example, the implementation process of step 802 includes: after receiving the first indication information, the decoding end parses the first indication information to determine the index value of the first motion vector. The decoding end determines the motion candidate list of the current coding block based on an implementation method similar to that of step 301 above. After that, the encoding end determines the motion vector corresponding to the index value indicated by the first indication information from the motion candidate list as the first motion vector. The decoding end predicts the motion vector of the current coding block based on the first motion vector.

[0146] It should be noted that the understanding of the relevant solutions involved in steps 801 and 802 above can be referred to the description in the above embodiments, and this disclosure will not repeat them here.

[0147] In some embodiments, combined with Figure 8 ,like Figure 9 As shown, the decoding method also includes:

[0148] Step 901: The decoding end receives the second instruction information.

[0149] The second indication information is used to indicate whether the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located.

[0150] Step 902: The decoding end determines whether the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located, based on the second indication information.

[0151] For an understanding of the second instruction information, please refer to the description of the second instruction information in the above embodiments; this disclosure will not repeat it further.

[0152] It should be noted that the decoding end can also determine, based on the second indication information, whether the motion vectors in the motion candidate list are sorted according to the size of the template cost, and / or the number of motion vectors in the motion candidate list that are adjacent to the boundary of the largest coding unit to which the current coding block belongs. This disclosure will not elaborate on these points.

[0153] The above scenarios and methods can be combined, and this disclosure does not limit them.

[0154] It is understood that, in order to achieve the above-mentioned functions, the communication device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the algorithmic steps of the various examples described in conjunction with the embodiments of this disclosure, the embodiments of this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in a hardware-driven or software-driven manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure.

[0155] This disclosure embodiment can divide the communication device into functional modules according to the above method embodiment. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one functional module. The integrated module can be implemented in hardware or software. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the example of dividing each functional module according to each function.

[0156] Figure 10 This is a schematic diagram of the structure of a communication device provided in an embodiment of this disclosure. Figure 1 The communication device can execute the encoding method provided in the above-described method embodiments. For example... Figure 10 As shown, the communication device includes a processing unit 1001 and a communication unit 1002.

[0157] Processing unit 1001 is used to acquire first indication information; the first motion vector is used to determine the motion vector of the current coding block; the motion candidate list is determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located; communication unit 1002 is used to send the first indication information to the decoding end.

[0158] In one possible implementation, the motion candidate list includes the motion vector of at least one preset coding block; the preset coding block is a coding block adjacent to the boundary of the largest coding unit where the current coding block is located.

[0159] In one possible implementation, at least one preset coding block includes: a coding block outside the maximum coding unit and adjacent to the boundary of the maximum coding unit; and / or, a coding block inside the maximum coding unit and adjacent to the boundary of the maximum coding unit.

[0160] In one possible implementation, the boundary of the maximum coding unit includes at least one of the following: the left boundary of the maximum coding unit; the upper boundary of the maximum coding unit.

[0161] In one possible implementation, the motion vector of at least one preset coded block is different from the motion vectors in the motion candidate list other than the motion vector of at least one preset coded block;

[0162] And / or, the motion vectors in at least one preset coded block are different.

[0163] In one possible implementation, at least one preset coding block includes: a coding block selected from coding blocks adjacent to the boundary of the largest coding unit based on the positional order of coding blocks in the video frame and / or a preset interval.

[0164] In one possible implementation, the order of preset motion vectors in the motion candidate list is determined based on the magnitude of the template cost corresponding to the preset motion vector; the template cost is used to characterize the error between the pixels of the adjacent reconstructed coding blocks of the current coding block and the pixels of the adjacent reconstructed coding blocks of the reference coding block in the reference frame pointed to by the motion vector; motion vectors other than the preset motion vectors in the motion candidate list are located at the first preset position in the motion candidate list.

[0165] In one possible implementation, the preset motion vector includes at least one of the following: spatial candidate motion vectors; historical motion vectors; motion vectors of at least one preset coded block.

[0166] In one possible implementation, the preset motion vectors are the M motion vectors with the minimum template cost among the K motion vectors; where K and M are both positive integers, and K is greater than M.

[0167] In one possible implementation, the first indication information is used to indicate the index value of the first motion vector.

[0168] In one possible implementation, the motion vector of at least one preset coded block is located at a second preset position in the motion candidate list.

[0169] In one possible implementation, the second preset position includes at least one of the following: the position following the spatial candidate motion vector in the motion candidate list; or the position following the historical motion vector in the motion candidate list.

[0170] In one possible implementation, the communication unit 1002 is used to send second indication information, which is used to indicate whether the motion candidate list is determined based on the motion vector of the coding block adjacent to the boundary of the largest coding unit where the current coding block is located.

[0171] In one possible implementation, the second indication information is also used to indicate whether the motion vectors in the motion candidate list are sorted based on the size of the template cost.

[0172] In one possible implementation, when the second indication information is used to indicate the motion candidate list determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit to which the current coding block belongs; the second indication information is also used to indicate the number of motion vectors of the coding blocks adjacent to the boundary of the largest coding unit to which the current coding block belongs in the motion candidate list.

[0173] In one possible implementation, the second indication information is carried in at least one of the following: the transmission bitstream of the sequence header of the video sequence, the transmission bitstream of the video frame, the transmission bitstream of the video strip, and the transmission bitstream of the video slice.

[0174] In one possible implementation, the motion candidate lists corresponding to each coding block in the maximum coding unit are all determined based on the motion vectors of the coding blocks adjacent to the boundary of the maximum coding unit.

[0175] Figure 11 This is a schematic diagram of the structure of a communication device provided in an embodiment of this disclosure. Figure 2 The communication device can execute the decoding method provided in the above-described method embodiments. For example... Figure 11 As shown, the communication device includes a processing unit 1101 and a communication unit 1102.

[0176] Communication unit 1102 is configured to receive first indication information; the first indication information indicates a first motion vector in the motion candidate list of the current coding block; the motion candidate list is determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located. Processing unit 1101 is configured to decode the motion vector of the current coding block based on the first indication information.

[0177] In one possible implementation, the motion candidate list includes the motion vector of at least one preset coding block; the preset coding block is a coding block adjacent to the boundary of the largest coding unit where the current coding block is located.

[0178] In one possible implementation, at least one preset coding block includes: a coding block outside the maximum coding unit and adjacent to the boundary of the maximum coding unit; and / or, a coding block inside the maximum coding unit and adjacent to the boundary of the maximum coding unit.

[0179] In one possible implementation, the boundary of the maximum coding unit includes at least one of the following: the left boundary of the maximum coding unit; the upper boundary of the maximum coding unit.

[0180] In one possible implementation, the motion vector of at least one preset coding block is different from the motion vectors in the motion candidate list other than the motion vector of at least one preset coding block; and / or, the individual motion vectors in the motion vector of at least one preset coding block are different.

[0181] In one possible implementation, at least one preset coding block includes: a coding block selected from coding blocks adjacent to the boundary of the largest coding unit based on the positional order of coding blocks in the video frame and / or a preset interval.

[0182] In one possible implementation, the order of preset motion vectors in the motion candidate list is determined based on the magnitude of the template cost corresponding to the preset motion vector; the template cost is used to characterize the error between the pixels of the adjacent reconstructed coding blocks of the current coding block and the pixels of the adjacent reconstructed coding blocks of the reference coding block in the reference frame pointed to by the motion vector; motion vectors other than the preset motion vectors in the motion candidate list are located at the first preset position in the motion candidate list.

[0183] In one possible implementation, the preset motion vector includes at least one of the following: spatial candidate motion vectors; historical motion vectors; motion vectors of at least one preset coded block.

[0184] In one possible implementation, the preset motion vectors are the M motion vectors with the minimum template cost among the K motion vectors; where K and M are both positive integers, and K is greater than M.

[0185] In one possible implementation, the first indication information is used to indicate the index value of the first motion vector.

[0186] In one possible implementation, the motion vector of at least one preset coded block is located at a second preset position in the motion candidate list.

[0187] In one possible implementation, the second preset position includes at least one of the following: the position following the spatial candidate motion vector in the motion candidate list; or the position following the historical motion vector in the motion candidate list.

[0188] In one possible implementation, the communication unit 1102 is further configured to receive second indication information, which indicates whether the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located.

[0189] In one possible implementation, the second indication information is also used to indicate whether the motion vectors in the motion candidate list are sorted based on the size of the template cost.

[0190] In one possible implementation, when the second indication information is used to indicate the motion candidate list determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit to which the current coding block belongs; the second indication information is also used to indicate the number of motion vectors of the coding blocks adjacent to the boundary of the largest coding unit to which the current coding block belongs in the motion candidate list.

[0191] In one possible implementation, the second indication information is carried in at least one of the following: the transmission bitstream of the sequence header of the video sequence, the transmission bitstream of the video frame, the transmission bitstream of the video strip, and the transmission bitstream of the video slice.

[0192] In one possible implementation, the motion candidate list corresponding to each coding block in the maximum coding unit includes the motion vectors of coding blocks selected from the coding blocks adjacent to the boundary of the maximum coding unit.

[0193] In implementing the functionality of the integrated modules described above using hardware, this disclosure provides another possible structure for the communication device involved in the above embodiments. For example... Figure 12 As shown, the communication device 120 includes a processor 1202 and a bus 1204. Optionally, the communication device may also include a memory 1201; alternatively, the communication device may also include a communication interface 1203.

[0194] Processor 1202 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. Processor 1202 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with embodiments of this disclosure. Processor 1202 may also be a combination of functions implementing computational capabilities, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0195] The communication interface 1203 is used to connect with other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.

[0196] The memory 1201 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0197] As one possible implementation, the memory 1201 can exist independently of the processor 1202. The memory 1201 can be connected to the processor 1202 via a bus 1204 and is used to store instructions or program code. When the processor 1202 calls and executes the instructions or program code stored in the memory 1201, it can implement the encoding or decoding method provided in the embodiments of this disclosure.

[0198] In another possible implementation, the memory 1201 can also be integrated with the processor 1202.

[0199] Bus 1204 can be an extended industry standard architecture (EISA) bus, etc. Bus 1204 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0200] Some embodiments of this disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium) storing computer program instructions that, when executed on a computer, cause the computer to perform an encoding or decoding method as described in any of the embodiments above.

[0201] For example, the computer-readable storage media described above may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes), optical disks (e.g., compact disks (CDs), digital versatile disks (DVDs), etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROMs), cards, sticks, or key drives, etc.). The various computer-readable storage media described in this disclosure can represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.

[0202] This disclosure provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the encoding or decoding method described in any of the above embodiments.

[0203] The above description is merely a specific implementation of the embodiments of this disclosure, but the protection scope of the embodiments of this disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of this disclosure should be covered within the protection scope of the embodiments of this disclosure. Therefore, the protection scope of the embodiments of this disclosure should be determined by the protection scope of the claims.

Claims

1. An encoding method, characterized in that, Applied to the encoding end, the method includes: Obtain first indication information; the first indication information is used to indicate a first motion vector in the motion candidate list of the current coding block; the first motion vector is used to determine the motion vector of the current coding block; the motion candidate list is determined based on the motion vectors of coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located; Send the first indication information to the decoding end.

2. The method according to claim 1, characterized in that, The motion candidate list includes motion vectors of at least one preset coding block; the preset coding block is a coding block adjacent to the boundary of the largest coding unit where the current coding block is located.

3. The method according to claim 2, characterized in that, The at least one preset coding block includes: The coding block outside the maximum coding unit and adjacent to the boundary of the maximum coding unit; and / or, the coding block inside the maximum coding unit and adjacent to the boundary of the maximum coding unit.

4. The method according to claim 3, characterized in that, The boundary of the largest coding unit includes at least one of the following: The left boundary of the largest coding unit; The upper boundary of the largest coding unit.

5. The method according to claim 2, characterized in that, The motion vector of the at least one preset coding block is different from the motion vectors in the motion candidate list other than the motion vector of the at least one preset coding block. And / or, the motion vectors in the motion vectors of the at least one preset coding block are different.

6. The method according to claim 2, characterized in that, The at least one preset coding block includes: a coding block selected from coding blocks adjacent to the boundary of the largest coding unit based on the positional order of coding blocks in the video frame and / or a preset interval.

7. The method according to claim 1, characterized in that, The sorting of the preset motion vectors in the motion candidate list is determined based on the magnitude of the template cost corresponding to the preset motion vector; the template cost is used to characterize the error between the pixels of the adjacent reconstructed coding blocks of the current coding block and the pixels of the adjacent reconstructed coding blocks of the reference coding block in the reference frame pointed to by the motion vector. The motion vectors in the motion candidate list other than the preset motion vectors are located in the first preset position in the motion candidate list.

8. The method according to claim 7, characterized in that, The preset motion vector includes at least one of the following: Candidate motion vectors in the airspace; Historical motion vectors; The motion vector of at least one preset coding block.

9. The method according to claim 8, characterized in that, The preset motion vectors are the M motion vectors with the smallest template cost among the K motion vectors; where K and M are both positive integers, and K is greater than M.

10. The method according to claim 1, characterized in that, The first indication information is used to indicate the index value of the first motion vector.

11. The method according to claim 2, characterized in that, The motion vector of at least one preset coding block is located at a second preset position in the motion candidate list.

12. The method according to claim 11, characterized in that, The second preset position includes at least one of the following: the position following the spatial candidate motion vector in the motion candidate list; the position following the historical motion vector in the motion candidate list.

13. The method according to claim 1, characterized in that, The method further includes: Send a second indication message, which is used to indicate whether the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located.

14. The method according to claim 13, characterized in that, The second indication information is also used to indicate whether the motion vectors in the motion candidate list are sorted based on the size of the template cost.

15. The method according to claim 13, characterized in that, In the case where the second indication information is used to indicate that the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located; The second indication information is also used to indicate the number of motion vectors of the coding blocks in the motion candidate list that are adjacent to the boundary of the largest coding unit to which the current coding block belongs.

16. The method according to claim 13, characterized in that, The second indication information is carried in at least one of the following: the transmission bitstream of the sequence header of the video sequence, the transmission bitstream of the video frame, the transmission bitstream of the video strip, and the transmission bitstream of the video slice.

17. The method according to claim 1, characterized in that, The motion candidate list corresponding to each coding block in the maximum coding unit is determined based on the motion vectors of the coding blocks adjacent to the boundary of the maximum coding unit.

18. A decoding method, characterized in that, include: Receive the first instruction message; The first indication information is used to indicate the first motion vector in the motion candidate list of the current coding block; The motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located; Based on the first indication information, the motion vector of the current coded block is decoded.

19. The method according to claim 18, characterized in that, The motion candidate list includes motion vectors of at least one preset coding block; the preset coding block is a coding block adjacent to the boundary of the largest coding unit where the current coding block is located.

20. The method according to claim 19, characterized in that, The at least one preset coding block includes: The coding block outside the maximum coding unit and adjacent to the boundary of the maximum coding unit; and / or, the coding block inside the maximum coding unit and adjacent to the boundary of the maximum coding unit.

21. The method according to claim 20, characterized in that, The boundary of the largest coding unit includes at least one of the following: The left boundary of the largest coding unit; The upper boundary of the largest coding unit.

22. The method according to claim 19, characterized in that, The motion vector of the at least one preset coding block is different from the motion vectors in the motion candidate list other than the motion vector of the at least one preset coding block. And / or, the motion vectors in the motion vectors of the at least one preset coding block are different.

23. The method according to claim 19, characterized in that, The at least one preset coding block includes: a coding block selected from coding blocks adjacent to the boundary of the largest coding unit based on the positional order of coding blocks in the video frame and / or a preset interval.

24. The method according to claim 18, characterized in that, The sorting of the preset motion vectors in the motion candidate list is determined based on the magnitude of the template cost corresponding to the preset motion vector; the template cost is used to characterize the error between the pixels of the adjacent reconstructed coding blocks of the current coding block and the pixels of the adjacent reconstructed coding blocks of the reference coding block in the reference frame pointed to by the motion vector. The motion vectors in the motion candidate list other than the preset motion vectors are located in the first preset position in the motion candidate list.

25. The method according to claim 24, characterized in that, The preset motion vector includes at least one of the following: Candidate motion vectors in the airspace; Historical motion vectors; The motion vector of at least one preset coding block.

26. The method according to claim 25, characterized in that, The preset motion vectors are the M motion vectors with the smallest template cost among the K motion vectors; where K and M are both positive integers, and K is greater than M.

27. The method according to claim 18, characterized in that, The first indication information is used to indicate the index value of the first motion vector.

28. The method according to claim 19, characterized in that, The motion vector of at least one preset coding block is located at a second preset position in the motion candidate list.

29. The method according to claim 28, characterized in that, The second preset position includes at least one of the following: the position following the spatial candidate motion vector in the motion candidate list; the position following the historical motion vector in the motion candidate list.

30. The method according to claim 18, characterized in that, The method further includes: Send a second indication message, which is used to indicate whether the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located.

31. The method according to claim 30, characterized in that, The second indication information is also used to indicate whether the motion vectors in the motion candidate list are sorted based on the size of the template cost.

32. The method according to claim 30, characterized in that, In the case where the second indication information is used to indicate that the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit where the current coding block is located; The second indication information is also used to indicate the number of motion vectors of the coding blocks in the motion candidate list that are adjacent to the boundary of the largest coding unit to which the current coding block belongs.

33. The method according to claim 30, characterized in that, The second indication information is carried in at least one of the following: the transmission bitstream of the sequence header of the video sequence, the transmission bitstream of the video frame, the transmission bitstream of the video strip, and the transmission bitstream of the video slice.

34. The method according to claim 18, characterized in that, The motion candidate list corresponding to each coding block in the maximum coding unit is determined based on the motion vectors of the coding blocks adjacent to the boundary of the maximum coding unit.

35. A communication device, characterized in that, include: Memory and processor; Memory and processor are coupled; The memory is used to store instructions that can be executed by the processor; When the processor executes the instructions, it performs the method as described in any one of claims 1-34.

36. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-34.

37. A computer program product, characterized in that, The computer program product includes computing technology program instructions that, when executed by a processor, implement the method as described in any one of claims 1-34.