Encoding method, decoding method, communication apparatus, storage medium, and program product

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

WO2026036758A1PCT designated stage Publication Date: 2026-02-19ZTE CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/088062
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-15
Filing Date
2025-04-09
Publication Date
2026-02-19

AI Technical Summary

Technical Problem

In video coding technology, the accuracy of motion vector selection in the existing motion candidate list is poor, resulting in insufficient accuracy of motion vectors during the encoding process.

Method used

By expanding the motion candidate list to include motion vectors of adjacent coding blocks of the largest coding unit containing the current coding block, a motion candidate list for the current coding block is generated, increasing the spatial expansion candidates and improving the accuracy of motion vectors.

Benefits of technology

This improves the accuracy of motion vectors during encoding, reduces the number of encoding bits occupied by the index indicating the optimal motion vector, and enhances compression efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025088062_19022026_PF_FP_ABST
    Figure CN2025088062_19022026_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide an encoding method, a decoding method, a communication apparatus, a storage medium, and a program product. The encoding method comprises: acquiring first indication information, wherein the first indication information is used for indicating a first motion vector in a motion candidate list of a current encoding block, the first motion vector is used for determining a motion vector of the current encoding block, and the motion candidate list is determined on the basis of a motion vector of an encoding block adjacent to a boundary of a largest encoding unit where the current encoding block is located; and transmitting the first indication information to a decoder side.
Need to check novelty before this filing date? Find Prior Art

Description

Coding method, communication apparatus, storage medium, and program product

[0001] The present disclosure claims priority to Chinese Patent Application No. 202411125461.1, filed on August 15, 2024, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0002] The present disclosure relates to the technical field of video processing, and in particular to a coding method, a communication apparatus, a storage medium, and a program product. BACKGROUND

[0003] In a skip / direct mode in a video coding technology, the number of motion vectors (MVs) in a motion candidate list for generating a current coding block is maximally 12, and the spatially related motion vectors are selected or derived from neighboring coding blocks of the current coding block. SUMMARY

[0004] In an aspect, an encoding method is provided. The encoding method includes: obtaining first indication information, wherein the first indication information is used to indicate a first motion vector in a motion candidate list of a current coding block, the first motion vector is used to determine a motion vector of the current coding block, and the motion candidate list is determined based on motion vectors of coding blocks adjacent to a boundary of a maximum 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. The decoding method includes: receiving first indication information, wherein the first indication information is used to indicate a first motion vector in a motion candidate list of a current coding block, the motion candidate list is determined based on motion vectors of coding blocks adjacent to a boundary of a maximum coding unit in which the current coding block is located; and decoding a motion vector of the current coding block based on the first indication information.

[0006] In yet another aspect, a communication apparatus is provided. The communication apparatus includes: a processing unit and a communication unit; wherein the processing unit is configured to obtain first indication information, the first indication information is used to indicate a first motion vector in a motion candidate list of a current coding block, the first motion vector is used to determine a motion vector of the current coding block, and the motion candidate list is determined based on motion vectors of coding blocks adjacent to a boundary of a maximum 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 yet another aspect, a communication apparatus is provided. The communication apparatus includes a processing unit and a communication unit; the communication unit is configured to receive first indication information, the first indication information is used to indicate a first motion vector in a motion vector candidate list of a current coding block, the motion vector candidate list is determined based on motion vectors of coding blocks neighboring a maximum 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 yet another aspect, a communication apparatus is provided. The communication apparatus includes a memory and a processor; the memory and the processor are coupled; the memory is configured to store instructions executable by the processor; and the processor is configured to implement the method in any of the aspects above when the instructions are executed.

[0009] In yet another aspect, a computer readable storage medium is provided. The computer readable storage medium stores computer instructions, which when executed on a computer, cause the computer to perform the method in any of the aspects above.

[0010] In yet another aspect, a computer program product is provided. The computer program product includes computer program instructions, which when executed on a processor, implement the method in any of the aspects above. BRIEF DESCRIPTION OF DRAWINGS

[0011] FIG. 1 is a schematic diagram of neighboring coding blocks of a current coding block according to an embodiment of the present disclosure.

[0012] FIG. 2 is a system architecture diagram of a coding and decoding system according to an embodiment of the present disclosure.

[0013] FIG. 3 is a flow diagram of an encoding method according to an embodiment of the present disclosure.

[0014] FIG. 4 is a schematic diagram of a left neighboring coding block and an upper neighboring coding block outside a maximum coding unit according to an embodiment of the present disclosure.

[0015] FIG. 5 is a schematic diagram of a left neighboring coding block and an upper neighboring coding block inside a maximum coding unit according to an embodiment of the present disclosure.

[0016] FIG. 6 is a schematic diagram of a template of a current coding block and a template of a reference coding block pointed by a motion vector according to an embodiment of the present disclosure.

[0017] FIG. 7 is a flow diagram of another encoding method according to an embodiment of the present disclosure.

[0018] FIG. 8 is a flow diagram of a decoding method according to an embodiment of the present disclosure.

[0019] FIG. 9 is a flow diagram of another decoding method according to an embodiment of the present disclosure.

[0020] FIG. 10 is a structural schematic diagram of a communication apparatus according to an embodiment of the present disclosure.

[0021] FIG. 11 is a structural schematic diagram of another communication apparatus according to an embodiment of the present disclosure.

[0022] FIG. 12 is a hardware structural schematic diagram of a communication apparatus according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In order to enable a person skilled in the art to better understand the technical solutions of the embodiments of the present disclosure, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by a person skilled in the art without creative work fall within the scope of protection of the present disclosure.

[0024] It should be noted that in the embodiments of the present disclosure, the words such as "exemplarily" or "for example" are used to represent as an example, illustration or description. Any embodiment or design scheme described as "exemplarily" or "for example" in the present disclosure should not be interpreted as more preferred or more advantageous than other embodiments or design schemes in the present disclosure. Rather, the words such as "exemplarily" or "for example" are intended to present the relevant concept in a specific manner.

[0025] Hereinafter, the terms "first", "second", and the like are used only for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second", and the like can explicitly or implicitly include one or more of the features.

[0026] In the description of the embodiments of the present disclosure, unless otherwise specified, the symbol " / " represents the relationship of "or", for example, A / B can represent A or B. "And / or" in this document only represents a description of the association between the objects, which means that there can be three kinds of relationships, for example, A and / or B can represent: only A, only B, and A and B. In addition, "at least one" means one or more, and "multiple" means two or more than two.

[0027] In video coding technology, inter prediction modes include Skip mode and Direct mode, wherein the Skip mode is used to predict the motion vector of a current coding block by using the motion information of a neighboring coding block which has been coded. In the Skip mode, the residual information of the current coding block is assumed to be zero, and thus the residual information of the current coding block is not transmitted in the Skip mode. In the Direct mode, the process of predicting the motion vector of the current coding block is similar to that in the Skip mode, but the residual information of the current coding block is calculated and transmitted in the Direct mode to further improve the prediction accuracy of the current coding block.

[0028] When predicting the motion vector of the current coding block by using the Skip mode or the Direct mode at the encoding end, the encoding end first generates a motion candidate list, which includes a plurality of motion vectors. Then, the encoding end selects a best motion vector from the motion candidate list. The encoding end sends an index value of the best motion vector to the decoding end, and the index value is used to indicate the order of the best motion vector in the motion candidate list.

[0029] After receiving the index value sent by the encoding end, the decoding end generates a motion candidate list based on the same manner as the encoding end. The decoding end selects the motion vector corresponding to the index value from the motion candidate list, and predicts the motion vector of the current coding block based on the selected motion vector.

[0030] The above motion candidate list usually includes the following motion vectors in a fixed candidate order, which are respectively:

[0031] 1 temporal candidate (or sub-block temporal candidate) (also referred to as temporal candidate motion vector);

[0032] 3 spatial candidates (also referred to as spatial candidate motion vectors), which are respectively 1 bi-directional candidate, 1 backward candidate and 1 forward candidate;

[0033] 0-5 motion vector angular prediction candidates (also referred to as motion vector angular prediction (MVAP));

[0034] 0-8 history motion candidates (also referred to as history-based motion vector prediction (HMVP));

[0035] 0-X repeated padding candidates, X being a positive integer.

[0036] At present, the maximum number of candidates in the motion candidate list is 12.

[0037] The manner in which the decoding end or the encoding end determines the three spatial domain candidates is as follows.

[0038] Taking the current coding block as coding block #E, the candidate coding blocks on the left and the top of the coding block #E are coding block #A, coding block #B, coding block #C, coding block #D, coding block #F, and coding block #G respectively. The positions of the coding blocks are shown in FIG. 1.

[0039] When the spatial domain candidate is selected, the decoding end or the encoding end obtains the motion vectors of the coding block #F, the coding block #G, the coding block #C, the coding block #A, the coding block #B, and the coding block #D in the order, and when the obtained motion vector is different from the motion vector in the current motion candidate list, the obtained coding block is taken as a candidate coding block, and the motion vector of the candidate coding block is the spatial domain candidate. In some embodiments, the motion vector of the first selected candidate coding block is called a spatial domain bi-directional candidate, the motion vector of the second selected candidate coding block is called a spatial domain backward candidate, and the motion vector of the third selected candidate coding block is called a spatial domain forward candidate.

[0040] When the motion candidate list of the current coding block is generated, the manner in which the motion vector in the motion candidate list is selected is fixed, and when the spatial domain candidate is determined, the motion vector of the coding block is selected from the neighboring blocks of the current coding block as the motion vector. However, in some scenarios, the motion vector in the above motion candidate list can be quite different from the actual motion vector of the current coding block, and thus the accuracy of the motion vector used in the encoding process is poor.

[0041] To solve the above technical problem, the embodiment of the present disclosure provides an encoding method, and the encoding end generates a motion candidate list of a current coding block based on the motion vectors of the neighboring coding blocks of the largest coding unit in which the current coding block is located. Compared with the encoding end determining the motion candidate list based on the motion vectors of the neighboring coding blocks of the current coding block in some technologies, the motion vectors of the neighboring coding blocks of the largest coding unit in which the current coding block is located are additionally expanded in the spatial domain candidate of the present disclosure. In this way, the present disclosure can provide more spatial domain expansion candidates, and since there can be a motion vector that is closer to the current coding motion vector in the spatial domain expansion candidate, the encoding method provided by the present disclosure can improve the accuracy of the motion vector in the encoding process.

[0042] The encoding method provided by the embodiment of the present disclosure can be applied to a codec system 20 as shown in FIG. 2, and as shown in FIG. 2, the codec system 20 includes an encoding end 201 and a decoding end 202.

[0043] The encoding end 201 is configured to generate a motion candidate list, and select a best motion vector from the motion candidate list. After that, the encoding end 201 indicates an index of the best motion vector to the decoding end 202. The decoding end 202 generates a motion candidate list based on the same manner as the encoding end 201, and selects a motion vector corresponding to the index from the motion candidate list after receiving the index of the best motion vector indicated by the encoding end 201, and then predicts a motion vector of a current coding block based on the motion vector.

[0044] In some embodiments, when the encoding end 201 generates the motion candidate list, in addition to determining the motion candidate list based on the temporal candidate motion vector, the spatial candidate motion vector, the motion vector predicted based on the motion vector angle, and the motion vector determined based on the history, the encoding end 201 can also determine the motion candidate list based on motion vectors of coding blocks adjacent to a boundary of a maximum coding unit in which the current coding block is located. In this way, the present disclosure can provide more spatial expansion candidates, and since there can be a motion vector closer to the current coding motion vector in the spatial expansion candidates, the encoding method provided by the present disclosure can improve the accuracy of the motion vector determined in the encoding process.

[0045] In some embodiments, before the encoding end 201 selects the best motion vector from the motion candidate list, the encoding end 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 smaller the template cost of a motion vector is, the earlier the motion vector is sorted, and the smaller the index value of the motion vector with the smaller template cost is. In other words, the smaller the template cost of a motion vector is, the smaller the pixel error of a coding block to which the motion vector belongs is, and the greater the probability of the motion vector being determined as the best motion vector is. In other words, in the embodiments of the present disclosure, after sorting based on the template cost, the index value of the best motion vector is usually a smaller index value. In this way, when the encoding end 201 indicates the best motion vector by using the index of the motion vector, the encoding end 201 sends a smaller index value to the decoding end, and the encoding bits occupied by the smaller index value are also less. Therefore, in the embodiments of the present disclosure, after sorting the motion vectors in the motion candidate list based on the template cost, the encoding bits occupied by the index indicating the best motion vector can be reduced, and the compression efficiency can be improved.

[0046] It should be noted that FIG. 2 is only an exemplary framework diagram, and the number of devices included in FIG. 2 and the names of the devices are not limited, and in addition to the devices shown in FIG. 2, the codec system can also include other devices, such as a video playing device, a video server, and the like.

[0047] The application scenarios of the embodiments of the present disclosure are not limited. The system architecture and business scenarios described in the embodiments of the present disclosure are used to more clearly illustrate the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art can know that, with the evolution of network architecture and the appearance of new business scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0048] The encoding method provided by the embodiments of the present disclosure will be described in detail below in combination with the accompanying drawings.

[0049] FIG. 3 is a flowchart of an encoding method provided by an embodiment of the present disclosure. In the method, the encoding end selects at least one preset coding block from the adjacent coding blocks of the maximum coding unit in which the current coding block is located, and adds the motion vector of the at least one preset coding block to the motion candidate list, thereby improving the selection range of the motion vector in the motion candidate list, and further improving the accuracy of the selected motion vector. The functions of each device in the encoding and decoding system provided by the embodiments of the present disclosure and the work performed by the device will be described below. As shown in FIG. 3, the encoding method includes S301-S302.

[0050] S301, the encoding end generates first indication information.

[0051] The first indication information is used to indicate a first motion vector in a motion candidate list of a current coding block; the first motion vector is used to determine a motion vector 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 a maximum coding unit (LCU) in which the current coding block is located; in some embodiments, S301 can be implemented as follows: the encoding end selects at least one preset coding block from the multiple coding blocks adjacent to the boundary of the maximum coding unit in which the current coding block is located. The encoding end writes the motion vectors of the at least one preset coding block and other candidate coding blocks determined based on other manners into the motion candidate list, to generate the motion candidate list of the current coding block. After that, the encoding end determines the best motion vector in the motion candidate list as the first motion vector. The encoding end generates the first indication information used to indicate the first motion vector.

[0052] As an embodiment, the first indication information can be used to indicate the index value of the first motion vector, so that the decoding end determines 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 represent the order of the motion vector in the motion candidate list.

[0053] It should be noted that in some cases, 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 maximum coding unit in which the current coding block is located.

[0054] In some cases, the motion vector of the at least one preset coding block can not be included in the motion candidate list. For example, the motion vector of the at least one preset coding block can not be included in the motion candidate list when there is no adjacent coding block at the boundary of the maximum coding unit, or there is no motion vector in the adjacent coding block. For another example, the motion vector of the at least one preset coding block can not be included in the motion candidate list when the motion vectors of the adjacent coding blocks at the boundary of the maximum coding unit are all the same as the motion vectors determined in the motion candidate list. The present disclosure does not limit this.

[0055] It can be understood that the motion candidate list can include other motion vectors in addition to the motion vector of the at least one preset coding block. For example, the motion vectors in the motion candidate list include: a temporal candidate motion vector, a spatial candidate motion vector, a motion vector based on motion vector angle prediction, a history-based motion vector, and a motion vector of the at least one preset coding block. It should be understood that the motion candidate list can include more or fewer motion vectors than this example, and the present disclosure does not limit this.

[0056] S302, the encoding end sends the first indication information to the decoding end.

[0057] In some embodiments, after the encoding end sends the first indication information to the decoding end, the decoding end determines the first motion vector according to the first indication information, and then predicts the motion vector of the current coding block according to the first motion vector.

[0058] As an implementation manner, the first indication information is used to indicate an index value of the first motion vector. In this way, the decoding end first determines the motion candidate list based on the manner described in the encoding end S301, then determines the first motion vector from the motion candidate list based on the index value indicated by the first indication information, and then predicts the motion vector of the current coding block according to the first motion vector.

[0059] In the embodiments of the present disclosure, when the encoding end generates the motion candidate list of the current coding block based on the motion vectors of the adjacent coding blocks of the maximum coding unit in which the current coding block is located. Compared with the prior art in which the encoding end determines the motion candidate list based on the motion vectors of the adjacent coding blocks of the current coding block, the present disclosure additionally expands the motion vectors of the adjacent coding blocks of the maximum coding unit in which the current coding block is located in the spatial candidate. In this way, the present disclosure can provide more spatial expansion candidates. Since there can be a motion vector that is closer to the current coding motion vector in the spatial expansion candidate, the encoding method provided by the present disclosure can improve the accuracy of the motion vector in the encoding process.

[0060] The following first describes at least one preset coding block (also referred to as a spatial extension candidate) in the motion candidate list.

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

[0062] In some embodiments, the boundaries of the maximum coding unit comprise at least one of: a left boundary of the maximum coding unit, a top boundary of the maximum coding unit.

[0063] In other words, the at least one preset coding block in the motion candidate list comprises a coding block in at least one of: a coding block outside the maximum coding unit and adjacent to a left boundary of the maximum coding unit, a coding block outside the maximum coding unit and adjacent to a top boundary of the maximum coding unit, a coding block inside the maximum coding unit and adjacent to a left boundary of the maximum coding unit; and a coding block inside the maximum coding unit and adjacent to a top boundary of the maximum coding unit.

[0064] In some embodiments, the motion vectors of the at least one preset coding block are different from the motion vectors in the motion candidate list except the motion vectors of the at least one preset coding block; and / or, each of the motion vectors of the at least one preset coding block is different. That is, the motion vectors of the at least one preset coding block added in the motion candidate list are motion vectors after deduplication.

[0065] In this case, when the encoder determines the at least one preset coding block, the encoder selects a coding block from the coding blocks adjacent to the boundaries of the maximum coding unit in which the current coding block is located in sequence, 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 the same, the motion vector of the coding block is not added to the motion candidate list; if not the same, the motion vector of the coding block is added to the motion candidate list. In this way, it can be avoided that the same motion vector appears in the motion candidate list, thereby increasing the number of effective motion vectors in the motion candidate list, and further improving the accuracy of the finally determined optimal motion vector. In some embodiments, each of the motion vectors in the motion candidate list is different.

[0066] In yet some embodiments, the at least one preset coding block comprises a coding block selected from the coding blocks adjacent to the boundaries of the maximum coding unit based on the order of the positions of the coding blocks in the video frame and / or a preset interval. In other words, when the encoder selects the at least one preset coding block from the coding blocks adjacent to the boundaries of the maximum coding unit, the selection can be based on the order of the positions of the coding blocks in the video frame and / or a preset interval.

[0067] As an example, the position order includes from bottom to top and from left to right, the encoder selects one coding block every other coding block in the order from bottom to top and from left to right, and adds the motion vector of the selected coding block to the motion candidate list. In some embodiments, before the encoder adds the motion vector of the selected coding block to the motion candidate list, the encoder can determine in advance whether the motion vector of the selected coding block meets a condition (such as whether the motion vector is the same as the current motion vector in the motion candidate list), and adds the motion vector of the selected coding block to the motion candidate list when the condition is met.

[0068] In some implementations, the process of selecting at least one preset coding block from the coding blocks outside the maximum coding unit and adjacent to the left boundary and the upper boundary of the maximum coding unit at the encoding end is as follows:

[0069] The encoding end determines the maximum coding unit in which the current coding block is located, and determines the coding blocks adjacent to the left and the top of the maximum coding unit. The coding blocks adjacent to the left and the top of the maximum coding unit outside the maximum coding unit are shown in FIG. 4. As an example, the size of the maximum coding unit is 128x128 pixels, and the size of the coding block is 4x4 pixels.

[0070] The encoding end selects one coding block every other coding block in the order from bottom to top and from left to right, and determines the motion vector of the selected coding block. The coding blocks selected by the encoding end are shown by the black coding blocks in FIG. 4.

[0071] The encoding end determines whether the motion vector and / or bi-directional gradient correction (BGC) information of the selected coding block meet the requirements, such as 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 a preset condition. If so, the encoding end adds the motion vector of the currently selected coding block to the motion candidate list.

[0072] In some implementations, the process of selecting at least one preset coding block from the coding blocks inside the maximum coding unit and adjacent to the left boundary and the upper boundary of the maximum coding unit at the encoding end is as follows:

[0073] The encoding end determines the maximum coding unit in which the current coding block is located, and determines the coding blocks adjacent to the left and the top of the maximum coding unit inside the maximum coding unit. The coding blocks adjacent to the left and the top of the maximum coding unit inside the maximum coding unit are shown in FIG. 5. As an example, the size of the maximum coding unit is 128x128 pixels. The size of the coding block is 4x4 pixels.

[0074] The encoding end selects an encoding block every interval of encoding blocks in a manner from bottom to top and from left to right, and determines the motion vector of the selected encoding block. The encoding block selected by the encoding end is shown by the black encoding block in FIG. 5.

[0075] The encoding end determines whether the motion vector and / or the bi-directional gradient modification information of the selected encoding block meet the requirements, for example, whether the motion vector of the encoding block is the same as the current motion vector in the motion candidate list or whether the bi-directional gradient modification information of the encoding block meets a preset condition. If yes, the encoding end adds the motion vector of the currently selected encoding block to the motion candidate list.

[0076] It can be understood that the size of the encoding block and the size of the maximum coding unit can be determined according to actual requirements, which are not limited in the present disclosure.

[0077] It should be noted that the above only takes the left boundary of the maximum coding unit and the upper boundary of the maximum coding unit as examples. In actual application, the boundary of the maximum coding unit can also include, but is not limited to, at least one of the right boundary of the maximum coding unit and the lower boundary of the maximum coding unit, which is not limited in the embodiments of the present disclosure.

[0078] In some embodiments, the motion vectors in the motion candidate list can be sorted based on two ways of way 1 and way 2 respectively. Way 1 is based on template cost, and way 2 is based on a preset position, which will be described in detail below.

[0079] In way 1, the motion vectors in the motion candidate list are sorted based on template cost.

[0080] In way 1, after the encoding end determines the motion vectors in the motion candidate list, the size of the template cost of the motion vectors is determined, and the motion vectors in the motion candidate list are sorted according to the size of the template cost.

[0081] The template cost is used to represent the error between the pixels of the neighboring reconstructed encoding blocks of the current encoding block and the pixels of the neighboring reconstructed encoding blocks of the reference encoding block pointed by the motion vector in the reference frame. The reference encoding block is the encoding block in the reference frame corresponding to the current encoding block. For example, FIG. 6 shows a matching diagram of a template of a current encoding block and a template of a reference encoding block pointed by a motion vector, wherein the neighboring reconstructed encoding blocks of the current encoding block are usually the encoding blocks adjacent to the top and / or left of the current encoding block (denoted as current top template and current left template); and the neighboring reconstructed encoding blocks of the reference encoding block are usually the encoding blocks adjacent to the top and / or left of the reference encoding block (denoted as reference top template and reference left template). The pixel error between the two is denoted as template cost.

[0082] 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 by the motion vector.

[0083] In mode 1, all motion vectors in the motion candidate list can be sorted based on the template cost (denoted as mode 1.1), or part of the motion vectors in the motion candidate list can be sorted based on the template cost (denoted as mode 1.2); the following will be described in detail respectively:

[0084] Mode 1.1, sorting all motion vectors in the motion candidate list based on the template cost.

[0085] In mode 1.1, after the encoding end determines the motion vectors in the motion candidate list, the sizes of the template costs of all motion vectors are determined, and the motion vectors in the motion candidate list are sorted according to the sizes of the template costs.

[0086] For example, the motion vectors in the motion candidate list include: temporal candidate motion vectors, spatial candidate motion vectors, history-based motion vectors, and motion vectors of at least one preset coding block. The encoding end calculates the template costs of these motion vectors respectively, and sorts the motion vectors in the motion candidate list based on the template costs of the motion vectors.

[0087] It can be understood that mode 1.1 can be applied to the scenario that the coding blocks corresponding to the motion vectors in the motion candidate list can all calculate the template costs.

[0088] Mode 1.2, sorting part of the motion vectors in the motion candidate list based on the template cost.

[0089] In some embodiments, the sorting of the preset motion vectors in the motion candidate list is determined based on the sizes of the template costs corresponding to the preset motion vectors; and the motion vectors in the motion candidate list other than the preset motion vectors are located at the first preset position in the motion candidate list. In other words, the encoding end sorts the preset motion vectors in the motion candidate list based on the sizes of the template costs. For the motion vectors other than the preset motion vectors, the encoding end adds them to the first preset position in the motion candidate list.

[0090] It can be understood that mode 1.2 can be applied to the scenario that part of the motion vectors in the motion candidate list can calculate the template costs, and part of the motion vectors cannot calculate the template costs. The cases that cannot calculate the template costs include: the temporal candidate motion vector is a plurality of sub-block time sequence candidate motion vectors.

[0091] As an example, the motion vectors in the motion candidate list include: a sub-block temporal candidate motion vector, a spatial candidate motion vector, a motion vector based on motion vector angle prediction, a history-based motion vector, and a motion vector of at least one preset coding block.

[0092] The sub-block temporal candidate motion vector and the motion vector based on motion vector angle prediction are arranged at a fixed position (e.g., a starting position) in the motion candidate list.

[0093] The spatial candidate motion vector, the history-based motion vector, and the motion vector of at least one preset motion vector can calculate a template cost value, in which the encoder calculates the cost values of these motion vectors respectively, and sorts the motion vectors based on the calculated cost values, and then adds these motion vectors to the motion candidate list based on the sorting. In some implementations, the smaller the template cost value of a motion vector is, the higher the sorting of the motion vector is, and the smaller the index value of the motion vector with the smaller template cost value is. The smaller the template cost value of a motion vector is, the smaller the pixel error of the coding block to which the motion vector belongs is, and the greater the probability that the motion vector is determined as the best motion vector is. In other words, in the embodiments of the present disclosure, the index value of the best motion vector is usually a smaller index value after sorting based on the template cost value. In this way, the encoder sends a smaller index value to the decoder when indicating the best motion vector through the index of the motion vector, and the smaller index value occupies fewer encoding bits. Therefore, in the embodiments of the present disclosure, after sorting the motion vectors in the motion candidate list based on the template cost value, the encoding bits occupied by the index indicating the best motion vector can be reduced, and the compression efficiency can be improved.

[0094] In mode 1.2, if the number of the spatial candidate motion vector, the history-based motion vector, and the motion vector of at least one preset coding block is large, the encoder can also select part of the motion vectors with the smallest template cost value from these motion vectors based on the template cost values of the motion vectors, and add the motion vectors to the motion candidate list, instead of adding all the motion vectors to the motion candidate list. In other words, the preset motion vectors are M motion vectors with the smallest template cost value in K motion vectors; K and M are both positive integers, and K is greater than M. The K motion vectors are the spatial candidate motion vector, the history-based motion vector, and the motion vector of at least one preset coding block. As an example, the motion candidate list after reordering can retain at most 12 motion vectors.

[0095] Based on this, the encoder adds the motion vectors with smaller template cost 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 encoding bits occupied by the index value.

[0096] Mode 2, the motion vectors in the motion candidate list are sorted based on a preset position.

[0097] In some implementations, the motion vector arrangement order in the motion candidate list in some technologies is as follows:

[0098] 1. Temporal candidate motion vector;

[0099] 2. Spatial candidate motion vector;

[0100] 3. Motion vector based on motion vector angle prediction;

[0101] 4. History-based motion vector.

[0102] In the embodiments of the present disclosure, the motion vector of at least one preset coding block can be added to the second preset position of the motion candidate list. For example, the second preset position can be the position after 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 after the history-based motion vector in the motion candidate list (denoted as mode 2.2).

[0103] In mode 2.1, the motion vector arrangement order in the motion candidate list is as follows:

[0104] 1. Temporal candidate motion vector;

[0105] 2. Motion vector of at least one preset coding block;

[0106] 3. Spatial candidate motion vector;

[0107] 4. Motion vector based on motion vector angle prediction;

[0108] 5. History-based motion vector.

[0109] In mode 2.2, the motion vector arrangement order in the motion candidate list is as follows:

[0110] 1. Temporal candidate motion vector;

[0111] 2. Spatial candidate motion vector;

[0112] 3. Motion vector based on motion vector angle prediction;

[0113] 4. History-based motion vector;

[0114] 5. Motion vector of at least one preset coding block.

[0115] It should be noted that the motion vector of at least one preset coding block in mode 2 can also be arranged in other positions in the motion candidate list, which is not limited in the present disclosure. In addition, the positions of each motion vector in the motion candidate list can be adjusted according to actual application requirements, which is not limited in the present disclosure.

[0116] The above describes in detail the ordering manner of the motion vectors in the motion candidate list in the embodiments of the present disclosure.

[0117] In some embodiments, the above manner of adding the motion vectors of the coding blocks adjacent to the boundary of the maximum coding unit in the motion subsequent list is referred to as a spatial extension candidate function. The encoding end can also indicate to the decoding end whether the spatial extension candidate function is enabled in the motion candidate list. As shown in FIG. 7, the process in which the encoding end indicates to the decoding end whether the spatial extension candidate function is enabled in the motion candidate list can be implemented by the following S701.

[0118] S701. The encoding end generates second indication information.

[0119] The second indication information is used to indicate whether the motion vectors in the motion candidate list are determined based on the motion vectors of the coding blocks adjacent to the boundary of the maximum coding unit in which the current coding block is located. In other words, the second indication information is used to indicate whether the spatial extension candidate function is enabled.

[0120] In some embodiments, the second indication information can indicate whether the spatial extension candidate function is enabled by the value of the corresponding bit. For example, when the value of the first preset bit is 1, it indicates that the spatial extension candidate function is enabled; when the value of the first preset bit is 0, it indicates that the spatial extension candidate function is disabled.

[0121] S702. The encoding end sends the second indication information to the decoding end.

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

[0123] In some embodiments, the second indication information can indicate whether the function of ordering based on the size of the template cost is enabled by the value of the corresponding bit. For example, when the value of the second preset bit is 1, it indicates that the function of ordering based on the size of the template cost is enabled; when the value of the second preset bit is 0, it indicates that the function of ordering based on the size of the template cost is disabled.

[0124] In yet some embodiments, in case the second indication information is used to indicate that the motion candidate list is determined based on motion vectors of the coding blocks neighboring the boundary of the largest coding unit in which the current coding block is located, the second indication information is further used to indicate a number of the motion vectors of the coding blocks neighboring the boundary of the largest coding unit in which the current coding block is located in the motion candidate list (i.e., the second indication information can also be used to indicate the number of the spatial extension candidates). In some embodiments, the number of the spatial extension candidates is N, N is a positive integer, and N can be a fixed value or a value indicated by the second indication information. As an example, N is 10.

[0125] Based on the above, the second indication information can indicate at least one of whether the spatial extension candidate function is enabled, whether the function of ordering based on the size of the template cost is enabled, and the number of the spatial extension candidates.

[0126] In some implementations, the second indication information is carried in at least one of the following: a transmission bitstream of a sequence header of a video sequence, a transmission bitstream of a video frame, a transmission bitstream of a video slice, a transmission bitstream of a video slice.

[0127] In other words, the encoding end can indicate at least one of whether the spatial extension candidate function is enabled, whether the function of ordering based on the size of the template cost is enabled, and the number of the spatial extension candidates at the granularity of a video sequence; or, the encoding end can indicate at least one of whether the spatial extension candidate function is enabled, whether the function of ordering based on the size of the template cost is enabled, and the number of the spatial extension candidates at the granularity of a video frame; or, the encoding end can indicate at least one of whether the spatial extension candidate function is enabled, whether the function of ordering based on the size of the template cost is enabled, and the number of the spatial extension candidates at the granularity of a video slice; or, the encoding end can indicate at least one of whether the spatial extension candidate function is enabled, whether the function of ordering based on the size of the template cost is enabled, and the number of the spatial extension candidates at the granularity of a video slice.

[0128] Taking the case that the second indication information is carried in the transmission bitstream of the sequence header of the video sequence, a control flag “spatial_ext_cands_enable_flag” is added in the bitstream of the sequence header, which is used 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.

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

[0130] As an example, the format of the sequence header in which the flags "spatial_ext_cands_enable_flag" and "skip_direct_cands_reorder_enable_flag" are added is shown in Table 1 as follows:

[0131] Table 1

[0132] The above describes the process of indicating the enabling and disabling of the related functions by the indication information.

[0133] In the embodiments of the present 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 boundary-adjacent coding block of the maximum coding unit.

[0134] In other words, in the embodiments of the present disclosure, the different coding blocks in the same maximum coding unit only need to determine once the boundary-adjacent coding block (denoted as a target coding block) of the maximum coding unit. The motion candidate list corresponding to each of these coding blocks includes the motion vector of the coding block selected from the target coding block.

[0135] It can be understood that the motion candidate list corresponding to each of the different coding blocks in the same maximum coding unit includes the motion vector of the coding block selected from the target coding block, but the motion vector of the coding block selected from the target coding block included in the motion candidate list corresponding to different coding blocks can be different.

[0136] For example, the temporal candidate motion vector, the spatial candidate motion vector, the motion vector based on motion vector angle prediction, and the history-based motion vector in the motion candidate list corresponding to different coding blocks can be different. When the encoder selects the motion vector of the coding block from the target coding block, if it is necessary to remove the selected motion vector, the removed motion vector can be different, and accordingly, the motion vector added to the motion candidate list by the encoder is also different.

[0137] The encoding method in the embodiments of the present disclosure is described in detail above. After the first indication information is sent from the encoding end to the decoding end, the decoding end determines the motion vector of the current encoding library based on the first indication information. The decoding process is described in detail below in combination with FIG. 8. As shown in FIG. 8, the decoding method provided by the embodiments of the present disclosure includes the following steps.

[0138] S801, the decoding end receives the first indication information.

[0139] The first indication information is used to indicate a first motion vector in a motion candidate list of a current encoding block, and the motion candidate list is determined based on motion vectors of encoding blocks adjacent to a boundary of a maximum encoding unit in which the current encoding block is located.

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

[0141] S802, the decoding end decodes the motion vector of the current encoding block based on the first indication information.

[0142] In some embodiments, the decoding end predicts the motion vector of the current encoding block based on the first motion vector indicated by the first indication information.

[0143] Taking an example in which the first indication information is used to indicate an index value of the first motion vector, the implementation process of S802 includes that after the decoding end receives 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 encoding block based on a similar implementation manner as S301. After that, the encoding end determines the motion vector corresponding to the index value indicated by the first indication information as the first motion vector from the motion candidate list. The decoding end predicts the motion vector of the current encoding block based on the first motion vector.

[0144] It should be noted that the understanding of the related schemes involved in S801 and S802 above can refer to the description in the above embodiments, and the present disclosure will not repeat them.

[0145] In some embodiments, in combination with FIG. 8, as shown in FIG. 9, the decoding method further includes the following steps.

[0146] S901, the decoding end receives second indication information.

[0147] The second indication information is used to indicate whether the motion candidate list is determined based on motion vectors of encoding blocks adjacent to a boundary of a maximum encoding unit in which the current encoding block is located.

[0148] S902, determining, by the decoding end, whether the motion candidate list is determined based on the motion vectors of the coding blocks adjacent to the boundary of the maximum coding unit in which the current coding block is located, based on the second indication information.

[0149] The understanding of the second indication information can refer to the description of the second indication information in the above embodiments, and the disclosure will not be repeated here.

[0150] It should be noted that the decoding end can also determine whether the motion vectors in the motion candidate list are sorted based on the size of the template cost and / or the number of motion vectors of the coding blocks adjacent to the boundary of the maximum coding unit to which the current coding block belongs based on the second indication information. The disclosure will not be repeated here.

[0151] The above various scenarios and various manners can be combined, and the disclosure embodiments do not limit this.

[0152] It can be understood that, in order to implement the above functions, the communication device contains the hardware structure and / or software module corresponding to the implementation of each function. Those skilled in the art should easily realize that the algorithm steps of each example described in combination with the embodiments of the disclosure can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in hardware or computer software driven hardware depends on the specific application and design constraints of the technical solution. Professional technicians 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 the disclosure.

[0153] The embodiments of the disclosure can divide the function modules of the communication device according to the above method embodiments, for example, each function module can be divided according to each function, or two or more functions can be integrated into one function module. The above integrated module can be realized in the form of hardware or software. It should be noted that the division of the modules in the embodiments of the disclosure is illustrative, and is only a logical function division. When actually implemented, another division method can be used. The following will be described taking the example of dividing each function module according to each function.

[0154] FIG. 10 is a structural schematic diagram of a communication device provided by an embodiment of the disclosure, which can execute the encoding method provided by the above method embodiments. As shown in FIG. 10, the communication device includes a processing unit 1001 and a communication unit 1002.

[0155] The processing unit 1001 is configured to acquire first indication information, wherein the first indication information is used to indicate a first motion vector in a motion vector candidate list of a current coding block, and the first motion vector is used to determine a motion vector of the current coding block; the motion vector candidate list is determined based on motion vectors of coding blocks adjacent to a boundary of a maximum coding unit in which the current coding block is located; and the communication unit 1002 is configured to send the first indication information to a decoding end.

[0156] In some implementations, the motion vector candidate list includes at least one motion vector of a preset coding block adjacent to the boundary of the maximum coding unit.

[0157] In some implementations, the 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 within the maximum coding unit and adjacent to the boundary of the maximum coding unit.

[0158] In some implementations, the boundary of the maximum coding unit includes at least one of: a left boundary of the maximum coding unit; and an upper boundary of the maximum coding unit.

[0159] In some implementations, the motion vector of the at least one preset coding block is different from motion vectors in the motion vector candidate list except for the motion vector of the at least one preset coding block; and / or, each of the motion vectors of the at least one preset coding block is different.

[0160] In some implementations, the at least one preset coding block includes: a coding block selected from the coding blocks adjacent to the boundary of the maximum coding unit based on a position order and / or a preset interval of the coding block in a video frame.

[0161] In some implementations, an order of the preset motion vectors in the motion vector candidate list is determined based on sizes of template costs corresponding to the preset motion vectors; the template cost is used to represent an error between pixels of a neighboring reconstructed coding block of the current coding block and pixels of a neighboring reconstructed coding block of a reference coding block in a reference frame pointed by the motion vector; and the motion vectors in the motion vector candidate list except for the preset motion vectors are located at a first preset position in the motion vector candidate list.

[0162] In some implementations, the preset motion vector includes at least one of: a spatial candidate motion vector; a history-based motion vector; and the motion vector of the at least one preset coding block.

[0163] In some implementations, the preset motion vector is M motion vectors with the smallest template costs in K motion vectors; wherein K and M are positive integers, and K is greater than M.

[0164] In some embodiments, the first indication information is used to indicate an index value of the first motion vector.

[0165] In some embodiments, the motion vector of the at least one preset coding block is located at a second preset position in the motion candidate list.

[0166] In some embodiments, the second preset position comprises at least one of the following: a position after a spatial candidate motion vector in the motion candidate list; a position after a history-based motion vector in the motion candidate list.

[0167] In some embodiments, the communication unit 1002 is configured to send second indication information, the second indication information being used to indicate whether the motion candidate list is determined based on motion vectors of coding blocks adjacent to a maximum coding unit in which the current coding block is located.

[0168] 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 sizes of template costs.

[0169] In some embodiments, in a case where the second indication information is used to indicate that the motion candidate list is determined based on motion vectors of coding blocks adjacent to a maximum coding unit in which the current coding block is located, the second indication information is further used to indicate a number of motion vectors of coding blocks adjacent to the maximum coding unit in which the current coding block is located in the motion candidate list.

[0170] In some embodiments, the second indication information is carried in at least one of the following: a transmission bitstream of a sequence header of a video sequence, a transmission bitstream of a video frame, a transmission bitstream of a video slice, and a transmission bitstream of a video slice.

[0171] In some embodiments, the motion candidate list of each coding block in the maximum coding unit is determined based on motion vectors of coding blocks adjacent to the maximum coding unit.

[0172] FIG. 11 is a structural schematic diagram of another communication apparatus provided by an embodiment of the present disclosure. The communication apparatus can perform the decoding method provided by the method embodiments described above. As shown in FIG. 11, the communication apparatus comprises a processing unit 1101 and a communication unit 1102.

[0173] The communication unit 1102 is configured to receive first indication information, the first indication information being used to indicate a first motion vector in a motion candidate list of a current coding block, the motion candidate list being determined based on motion vectors of coding blocks adjacent to a maximum coding unit in which the current coding block is located. The processing unit 1101 is configured to decode the motion vector of the current coding block based on the first indication information.

[0174] In some embodiments, the motion vector of the at least one preset coding block is included in the motion candidate list; and the preset coding block is a coding block adjacent to a boundary of the largest coding unit in which the current coding block is located.

[0175] In some embodiments, the at least one preset coding block includes: a coding block outside the largest coding unit and adjacent to a boundary of the largest coding unit; and / or, a coding block within the largest coding unit and adjacent to a boundary of the largest coding unit.

[0176] In some embodiments, the boundary of the largest coding unit includes at least one of: a left boundary of the largest coding unit; an upper boundary of the largest coding unit.

[0177] In some embodiments, the motion vector of the at least one preset coding block is different from the motion vectors in the motion candidate list except the motion vector of the at least one preset coding block; and / or, each of the motion vectors of the at least one preset coding block is different.

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

[0179] In some embodiments, the ordering of the preset motion vectors in the motion candidate list is determined based on sizes of template costs corresponding to the preset motion vectors; the template cost is used to represent an error between pixels of adjacent reconstructed coding blocks of the current coding block and pixels of adjacent reconstructed coding blocks of reference coding blocks in a reference frame pointed by the motion vector; and the motion vectors in the motion candidate list except the preset motion vectors are located at first preset positions in the motion candidate list.

[0180] In some embodiments, the preset motion vector includes at least one of: a spatial candidate motion vector; a history-based motion vector; and the motion vector of the at least one preset coding block.

[0181] In some embodiments, the preset motion vector is M motion vectors with the smallest template costs among K motion vectors; and K and M are positive integers, and K is greater than M.

[0182] In some embodiments, the first indication information is used to indicate an index value of the first motion vector.

[0183] In some embodiments, the motion vector of the at least one preset coding block is located at a second preset position in the motion candidate list.

[0184] In some embodiments, the second preset position includes at least one of: a position after the spatial candidate motion vector in the motion candidate list; and a position after the history-based motion vector in the motion candidate list.

[0185] In some embodiments, the communication unit 1102 is further configured to receive second indication information, the second indication information being used to indicate whether the motion candidate list is determined based on motion vectors of the coding blocks adjacent to a boundary of the largest coding unit in which the current coding block is located.

[0186] 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 sizes of template costs.

[0187] In some embodiments, in a case where the second indication information is used to indicate that the motion candidate list is determined based on motion vectors of the coding blocks adjacent to a boundary of the largest coding unit in which the current coding block is located, the second indication information is further used to indicate a number of the motion vectors of the coding blocks adjacent to the boundary of the largest coding unit in which the current coding block is located in the motion candidate list.

[0188] In some embodiments, the second indication information is carried in at least one of a transport bitstream of a sequence header of a video sequence, a transport bitstream of a video frame, a transport bitstream of a video slice, and a transport bitstream of a video slice.

[0189] In some embodiments, each of the coding blocks in the largest coding unit includes a motion vector of a coding block selected from the coding blocks adjacent to a boundary of the largest coding unit in a corresponding motion candidate list.

[0190] In a case where the functions of the above integrated modules are implemented in the form of hardware, the embodiments of the present disclosure provide another structure of the communication apparatus involved in the above embodiments. As shown in FIG. 12, the communication apparatus 120 includes a memory 1201, a processor 1202, a communication interface 1203, and a bus 1204.

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

[0192] The processor 1202 can be a logical block, module, and circuit that implements or executes various exemplary methods described in combination with embodiments of the present disclosure. The processor 1202 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The processor 1202 can also implement or execute various exemplary logical blocks, modules, and circuits described in combination with embodiments of the present disclosure. The processor 1202 can also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of a DSP (digital signal processor) and a microprocessor, and the like.

[0193] The communication interface 1203 is configured to connect with other devices through a communication network. The communication network can be an Ethernet, a wireless access network, a WLAN (wireless local area network), and the like.

[0194] In some implementations, the memory 1201 can exist independently of the processor 1202, and the memory 1201 can be connected to the processor 1202 through the bus 1204, for storing instructions or program codes. When the processor 1202 invokes and executes the instructions or program codes stored in the memory 1201, the encoding method or the decoding method provided in embodiments of the present disclosure can be implemented.

[0195] In some implementations, the memory 1201 can also be integrated with the processor 1202.

[0196] The bus 1204 can be an EISA (extended industry standard architecture) bus or the like. The bus 1204 can be divided into an address bus, a data bus, a control bus, and the like. For the sake of representation, only one thick line is used to represent the bus 1204 in FIG. 12, but it does not mean that there is only one bus or only one type of bus.

[0197] Some embodiments of the present disclosure provide a computer-readable storage medium (for example, a non-transitory computer-readable storage medium) having computer program instructions stored therein, and the computer program instructions, when executed on a computer, cause the computer to perform the encoding method or the decoding method described in any one of the above embodiments.

[0198] By way of example, the computer-readable storage medium can include a magnetic storage device (e.g., hard disk, floppy disk, magnetic strips, etc.), an optical disk (e.g., compact disk (CD), digital versatile disk (DVD), etc.), a smart card, and a flash memory device (e.g., card, stick, key drive, etc.). The various computer-readable storage media described in the present disclosure can represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" shall accordingly include, but not be limited to, a wireless channel, various other media and / or storage devices.

[0199] The embodiments of the present disclosure provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the encoding method or the decoding method described in any of the above embodiments.

[0200] The above describes only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and any changes or replacements within the technical scope disclosed by the present disclosure should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. An encoding method applied to an encoding end, wherein, The method comprises: obtaining first indication information, wherein the first indication information is used to indicate a first motion vector in a motion candidate list of a current coding block, the first motion vector is used to determine a motion vector of the current coding block, and the motion candidate list is determined based on motion vectors of coding blocks adjacent to a boundary of a maximum coding unit in which the current coding block is located; and sending the first indication information to a decoding end.

2. The method of claim 1, wherein, The motion candidate list comprises at least one motion vector of a preset coding block adjacent to the boundary of the maximum coding unit in which the current coding block is located.

3. The method of claim 2, wherein, The at least one preset coding block comprises: 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.

4. The method of claim 3, wherein, The boundary of the maximum coding unit comprises at least one of: a left boundary of the maximum coding unit; a top boundary of the maximum coding unit.

5. The method of claim 2, wherein, The motion vector of the at least one preset coding block is different from motion vectors in the motion candidate list except the motion vector of the at least one preset coding block. And / or, each motion vector of the at least one preset coding block is different.

6. The method of claim 2, wherein, The at least one preset coding block comprises a coding block selected from the coding blocks adjacent to the boundary of the maximum coding unit based on a position sequence and / or a preset interval of the coding block in a video frame.

7. The method of claim 1, wherein, An order of preset motion vectors in the motion candidate list is determined based on sizes of template costs corresponding to the preset motion vectors; the template cost is used to represent errors between pixels of adjacent reconstructed coding blocks of a current coding block and pixels of adjacent reconstructed coding blocks of reference coding blocks in a reference frame pointed by the motion vector. Motion vectors in the motion candidate list except the preset motion vectors are located at a first preset position in the motion candidate list.

8. The method of claim 7, wherein, The preset motion vector comprises at least one of: a spatial candidate motion vector; a history-based motion vector; a motion vector of the at least one preset coding block.

9. The method of claim 8, wherein, The preset motion vector is M motion vectors with minimum template costs in K motion vectors; wherein K and M are positive integers, and K is greater than M.

10. The method of claim 1, wherein, The first indication information is used to indicate an index value of the first motion vector.

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

12. The method of claim 11, wherein, The second preset position comprises at least one of a position after the spatial candidate motion vector in the motion candidate list and a position after the history-based motion vector in the motion candidate list.

13. The method of claim 1, further comprising: sending second indication information, wherein the second indication information is used to indicate whether the motion candidate list is determined based on motion vectors of coding blocks adjacent to a boundary of a maximum coding unit in which the current coding block is located.

14. The method of claim 13, wherein, The second indication information is also used to indicate whether motion vectors in the motion candidate list are ordered based on sizes of template costs.

15. The method of claim 13, wherein, In a case that the second indication information is used to indicate that the motion candidate list is determined based on motion vectors of the coding blocks neighboring a boundary of the maximum coding unit in which the current coding block is located, the second indication information is further used to indicate a number of the motion vectors of the coding blocks neighboring the boundary of the maximum coding unit in which the current coding block is located in the motion candidate list.

16. The method of claim 13, wherein, The second indication information is carried in at least one of the following: a transmission code stream of a sequence header of a video sequence, a transmission code stream of a video frame, a transmission code stream of a video slice, and a transmission code stream of a video slice.

17. The method of claim 1, wherein, Each of the motion candidate lists corresponding to the coding blocks in the maximum coding unit is determined based on motion vectors of the coding blocks neighboring a boundary of the maximum coding unit.

18. A decoding method applied to a decoding end, wherein, The method comprises: receiving first indication information, wherein the first indication information is used to indicate a first motion vector in a motion candidate list of a current coding block, and the motion candidate list is determined based on motion vectors of coding blocks neighboring a boundary of a maximum coding unit in which the current coding block is located; and decoding, based on the first indication information, a motion vector of the current coding block.

19. The method of claim 18, wherein, The motion candidate list includes at least one motion vector of a preset coding block; the preset coding block is a coding block neighboring a boundary of the maximum coding unit in which the current coding block is located.

20. The method of claim 19, wherein, The at least one preset coding block comprises: a coding block outside the maximum coding unit and neighboring a boundary of the maximum coding unit; and / or, a coding block inside the maximum coding unit and neighboring a boundary of the maximum coding unit.

21. The method of claim 20, wherein, The boundary of the maximum coding unit comprises at least one of the following: a left boundary of the maximum coding unit; an upper boundary of the maximum coding unit.

22. The method of claim 19, wherein, The motion vector of the at least one preset coding block is different from the motion vectors in the motion candidate list except the motion vector of the at least one preset coding block; and / or, each of the motion vectors of the at least one preset coding block is different.

23. The method of claim 19, wherein, The at least one preset coding block comprises a coding block selected from the coding blocks neighboring the boundary of the maximum coding unit based on an order of positions of the coding blocks in a video frame and / or a preset interval.

24. The method of claim 18, wherein, An order of the preset motion vectors in the motion candidate list is determined based on sizes of template costs corresponding to the preset motion vectors; the template cost is used to represent an error between pixels of a neighboring reconstructed coding block of a current coding block and pixels of a neighboring reconstructed coding block of a reference coding block in a reference frame pointed by the motion vector; The motion vectors in the motion candidate list except the preset motion vectors are located at a first preset position in the motion candidate list.

25. The method of claim 24, wherein, The preset motion vector comprises at least one of the following: a spatial candidate motion vector; a history-based motion vector; The motion vector of the at least one preset coding block.

26. The method of claim 25, wherein, The preset motion vector is M motion vectors with minimum template costs in K motion vectors; wherein K and M are positive integers, and K is greater than M.

27. The method of claim 18, wherein, The first indication information is used to indicate an index value of the first motion vector.

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

29. The method of claim 28, wherein, The second preset position comprises at least one of the following: a position after a spatial candidate motion vector in the motion candidate list; a position after a history-based motion vector in the motion candidate list.

30. The method of claim 18, further comprising: sending second indication information, the second indication information being used to indicate whether motion vectors of coding blocks adjacent to a maximum coding unit in which the current coding block is located are determined in the motion candidate list.

31. The method of claim 30, wherein, The second indication information is also used to indicate whether motion vectors in the motion candidate list are sorted based on sizes of template costs.

32. The method of claim 30, wherein, In a case where the second indication information is used to indicate that the motion candidate list is determined based on motion vectors of coding blocks adjacent to a maximum coding unit in which the current coding block is located, the second indication information is also used to indicate a number of motion vectors of coding blocks adjacent to the maximum coding unit in which the current coding block is located in the motion candidate list.

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

34. The method of claim 18, wherein, Motion candidate lists corresponding to each coding block in the maximum coding unit are determined based on motion vectors of coding blocks adjacent to the maximum coding unit.

35. A communications device comprising: A memory and a processor; wherein the memory and the processor are coupled; the memory is used to store instructions executable by the processor; the processor implements the method according to any one of claims 1-34 when executing the instructions.

36. A computer readable storage medium, wherein, The computer readable storage medium stores computer instructions, when the computer instructions run on a computer, make the computer execute the method according to any one of claims 1-34.

37. A computer program product, wherein, The computer program product comprises computer program instructions, when the computer program instructions are executed by a processor, implement the method according to any one of claims 1-34. The computer program product comprises computer program instructions, when the computer program instructions are executed by a processor, implement the method according to any one of claims 1-34.

Citation Information

Patent Citations

  • Selection of adjacent neighboring block for intra coding

    US20210211655A1

  • Moving image encoding apparatus, moving image encoding method, moving image encoding program, moving image decoding apparatus, moving image decoding method, and moving image decoding program

    WO2013021617A1

  • Video encoding device, video encoding method, video encoding program, video decoding device, video decoding method, video decoding program

    WO2013099244A1

  • Method and device for image decoding according to inter-prediction using plurality of neighboring blocks in image coding system

    WO2020004879A1

  • Image processing method and device by means of inter-prediction in image coding system

    WO2020009390A1