Motion vector processing method and apparatus

By optimizing the processing method of the candidate motion vector list, and addressing the limitations of video coding standards, priority is given to adding motion vectors that are more relevant to the current block, and these vectors are combined in the component direction. This solves the problem of insufficient candidate motion vector list and improves the video decoding and encoding performance.

CN119031145BActive Publication Date: 2026-04-17SHUXING TECH (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHUXING TECH (BEIJING) CO LTD
Filing Date
2024-08-21
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing technologies, candidate motion vector lists have not been effectively optimized in video encoding and decoding, resulting in poor video decoding and encoding performance.

Method used

By obtaining the candidate motion vector list for the current block of the video to be decoded/encoded, and prioritizing the addition of motion vectors based on the number of available bits and the priority order of motion vector addition, the candidate motion vector list is optimized by extracting and combining new components in different component directions.

Benefits of technology

This increases the probability of selecting better motion vectors during video decoding and encoding, thereby improving the decoding and encoding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031145B_ABST
    Figure CN119031145B_ABST
Patent Text Reader

Abstract

This specification provides a motion vector processing method and apparatus. The motion vector processing method includes: obtaining a candidate motion vector list for the current block of a video to be decoded; determining a target motion vector to be added based on the number of free slots in the candidate motion vector list and the motion vector addition priority order, wherein the number of target motion vectors to be added is less than or equal to the number of free slots; the motion vector addition priority order includes the order of addition priorities of multiple motion vectors; among the multiple motion vectors, the motion vector with greater relevance to the current block has a higher addition priority; obtaining the target motion vector to be added; and adding the target motion vector to the candidate motion vector list, thereby optimizing the candidate motion vector list.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of computer technology, and in particular to methods and apparatus for motion vector processing. Background Technology

[0002] Constructing a candidate motion vector list is a crucial step in video encoding and decoding. The candidate motion vector list is a collection of potential motion vectors, built upon spatial and temporal motion vectors. In inter-frame prediction during video encoding, the candidate motion vector list is used to predict the motion vectors of the current block of the video to be encoded, reducing the amount of data transmitted during encoding. In video decoding, the candidate motion vector list is used to reconstruct the current block of the video to be decoded.

[0003] Given the crucial role of candidate motion vector lists in video encoding and decoding, there is an urgent need to optimize these lists to improve video decoding and encoding performance and ensure a smoother viewing experience for users. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a motion vector processing method. One or more embodiments of this specification also relate to motion vector processing apparatus, computing devices, computer-readable storage media, and computer program products for optimizing motion vector lists and improving video decoding and encoding performance.

[0005] According to a first aspect of the embodiments of this specification, a motion vector processing method is provided, comprising: obtaining a candidate motion vector list of a current block of a video to be decoded; determining a target motion vector to be added based on the number of free slots in the candidate motion vector list and a motion vector addition priority order, wherein the number of target motion vectors to be added is less than or equal to the number of free slots, and the motion vector addition priority order includes an order of addition priorities of multiple motion vectors, wherein among the multiple motion vectors, the motion vector with greater relevance to the current block has a higher addition priority; obtaining the target motion vector to be added, and adding the target motion vector to the candidate motion vector list.

[0006] According to a second aspect of the embodiments of this specification, a motion vector processing method is provided, comprising: obtaining a candidate motion vector list of a current block of a video to be encoded; determining the maximum and minimum values ​​of the components of the candidate motion vectors in the candidate motion vector list in different component directions; determining the movement range of the candidate motion vectors in the candidate motion vector list in different component directions based on the maximum and minimum values ​​of the components in different component directions; extracting new components in different component directions from the movement ranges in different component directions according to a component extraction strategy, and combining the new components in different component directions to obtain a fourth motion vector; and adding the fourth motion vector to the candidate motion vector list.

[0007] According to a third aspect of the embodiments of this specification, a motion vector processing apparatus is provided, comprising: a decoding list acquisition module configured to acquire a candidate motion vector list of a current block of a video to be decoded; a decoding vector determination module configured to determine a target motion vector to be added based on the number of free slots in the candidate motion vector list and a motion vector addition priority order, wherein the number of target motion vectors to be added is less than or equal to the number of free slots, and the motion vector addition priority order includes an order of addition priorities of multiple motion vectors, wherein among the multiple motion vectors, the motion vector with greater relevance to the current block has a higher addition priority; and a decoding vector addition module configured to obtain the target motion vector to be added and add the target motion vector to the candidate motion vector list.

[0008] According to a fourth aspect of the embodiments of this specification, a motion vector processing apparatus is provided, comprising: an encoding list acquisition module configured to acquire a candidate motion vector list of a current block of a video to be encoded; a component range determination module configured to determine the maximum and minimum component values ​​of the candidate motion vectors in the candidate motion vector list in different component directions, and to determine the movement range of the candidate motion vectors in the candidate motion vector list in different component directions based on the maximum and minimum component values ​​in different component directions; a component extraction module configured to extract new components in different component directions from the movement range in different component directions according to a component extraction strategy, and to combine the new components in different component directions to obtain a fourth motion vector; and an encoding vector addition module configured to add the fourth motion vector to the candidate motion vector list.

[0009] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: a memory and a processor; the memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, wherein the computer programs / instructions, when executed by the processor, implement the steps of the methods described in any embodiment of this specification.

[0010] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the method described in any embodiment of this specification.

[0011] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the method described in any embodiment of this specification.

[0012] One embodiment of this specification implements a motion vector processing method. This method obtains a candidate motion vector list for the current block of the video to be decoded, and determines the target motion vector to be added based on the number of empty slots in the candidate motion vector list and the motion vector addition priority order. The number of target motion vectors to be added is less than or equal to the number of empty slots, and the motion vector addition priority order includes the order of addition priorities for multiple motion vectors. Among the multiple motion vectors, the target motion vector with the greater relevance to the current block has a higher addition priority. Therefore, the target motion vector to be added can be obtained and added to the candidate motion vector list.

[0013] Therefore, this method addresses the limitation on the size of the candidate motion vector list caused by video coding standards. Under the constraint of the number of empty slots in the candidate motion vector list, it prioritizes adding motion vectors that are more relevant to the current block to the candidate motion vector list based on the priority order of motion vector addition. That is, it prioritizes adding motion vectors with stronger relevance to the current block, and then considers adding motion vectors with relatively weaker relevance. This optimizes the candidate motion vector list used for video decoding, increases the probability of selecting better motion vectors for decoding, and improves the decoding effect.

[0014] Another embodiment of this specification implements another motion vector processing method. This method obtains a candidate motion vector list for the current block of the video to be encoded, determines the maximum and minimum values ​​of the candidate motion vectors in different component directions, determines the movement range of the candidate motion vectors in different component directions based on the maximum and minimum values ​​of the components in different component directions, and then extracts new components in different component directions from the movement range according to a component extraction strategy. These new components are then combined to obtain a fourth motion vector, which is added to the candidate motion vector list.

[0015] Therefore, this method extracts new components in different component directions based on the movement range of the candidate motion vectors, combines the new components in different component directions to obtain a fourth motion vector, and adds the fourth motion vector to the candidate motion vector list. This effectively makes up for the lack of candidate motion vectors in the candidate motion vector list, optimizes the candidate motion vector list for video coding, increases the probability of selecting a better motion vector for coding, and improves the coding effect. Attached Figure Description

[0016] Figure 1a This is a schematic diagram showing the positions of spatially adjacent blocks and temporally adjacent blocks of the current block according to one embodiment of this specification;

[0017] Figure 1b This is an architecture diagram of a video transmission system provided in one embodiment of this specification;

[0018] Figure 2 This is a flowchart illustrating a motion vector processing method provided in one embodiment of this specification;

[0019] Figure 3 This is a flowchart illustrating the process of applying a motion vector processing method provided in one embodiment of this specification during server transcoding.

[0020] Figure 4 This is a flowchart of another embodiment of a motion vector processing method provided in this specification;

[0021] Figure 5 This is a schematic diagram of inter-frame prediction provided in one embodiment of this specification;

[0022] Figure 6 This is a schematic diagram of the equal division of the movement range provided in one embodiment of this specification;

[0023] Figure 7 This is a flowchart illustrating the process of applying the motion vector processing method provided in another embodiment of this specification during server transcoding.

[0024] Figure 8 This is a schematic diagram of the current frame and reference frame provided in one embodiment of this specification;

[0025] Figure 9 This is a schematic diagram of the structure of a motion vector processing device provided in one embodiment of this specification;

[0026] Figure 10 This is a schematic diagram of the structure of a motion vector processing device provided in another embodiment of this specification;

[0027] Figure 11 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0028] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0029] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0030] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0031] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0032] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0033] The candidate motion vector list is a list containing a series of candidate motion vectors, constructed based on spatial motion vectors and temporal motion vectors.

[0034] Spatial motion vectors are the motion vectors of coded neighboring blocks surrounding the current block. They are used to predict the motion vector of the current block, thereby improving prediction accuracy and reducing bit rate. For example... Figure 1aThe diagram shows the positions of the spatial and temporal adjacent blocks of the current block. The spatial adjacent blocks of the current block include A0, A1, B0, B1 and B2. Therefore, the spatial motion vectors of the current block include the motion vectors of A0, A1, B0, B1 and B2.

[0035] The temporal motion vector describes the relative displacement between the current block and the corresponding matching block in the reference frame, and is used to predict the current block. For example... Figure 1a The diagram shows the positions of the spatial and temporal neighboring blocks of the current block. The temporal neighboring blocks of the current block include C1 and C0. Therefore, the temporal motion vector of the current block includes the motion vectors of C1 and C0.

[0036] H.265 / HEVC (High Efficiency Video Coding) and H.266 / VVC (Versatile Video Coding) are video compression standards designed to provide high-efficiency compression.

[0037] A candidate motion vector list is a list containing a series of candidate motion vectors, constructed based on spatial and temporal motion vectors. In inter-frame prediction during video coding, the candidate motion vector list is used to predict the motion vectors of the current block of the video to be encoded, reducing the amount of data transmitted during encoding. In video decoding, the candidate motion vector list is used to reconstruct the current block of the video to be decoded. Due to the crucial role of the candidate motion vector list in video encoding and decoding, optimization of the candidate motion vector list is urgently needed to improve video decoding and encoding performance for a smoother viewing experience.

[0038] Based on this, a motion vector processing method is provided in this specification. This specification also relates to motion vector processing apparatus, computing device, computer-readable storage medium, and computer program product, which will be described in detail in the following embodiments.

[0039] See Figure 1b , Figure 1b An architecture diagram of a video transmission system provided in one embodiment of this specification is shown. The video transmission system may include a server and multiple clients, such as a first client, a second client, etc.

[0040] A client can be either the sender or receiver of the video. For example, a client could be the client associated with the user who initiates a live stream, the client associated with the user who uploads a short video, the client associated with the user watching a live stream, the client associated with the user watching a short video, and so on.

[0041] A server can be used to provide video transmission and processing services between clients.

[0042] In some embodiments, such as live streaming or short video scenarios, a user can send a video stream to a server through a client. The server then transcodes the video stream and pushes it to the client with which the user established communication. In this scenario, the client acting as the video sender can encode the video data (e.g., a video stream captured by the client) for transmission over the network to the server. After transcoding by the server, the data is transmitted to the client acting as the video receiver for decoding and playback. To make online video viewing smoother for users, the client and / or server acting as the video sender can, according to the motion vector processing method provided in the embodiments of this specification, obtain an optimized candidate motion vector list for the current block of the video to be encoded, and encode the current block using the optimized motion vector list. The server and / or the client acting as the video receiver can, according to the motion vector processing method provided in the embodiments of this specification, obtain an optimized candidate motion vector list for the current block of the video to be decoded, and decode the current block using the optimized motion vector list.

[0043] In other embodiments, such as video service scenarios, the server may store abundant video resources and provide these resources to users upon request. In this scenario, the server, acting as both the video storage and transmission end, can utilize the motion vector processing method provided in the embodiments of this specification to obtain an optimized candidate motion vector list for the current block of the video to be encoded, encode the video using the optimized motion vector list, and send the encoded video data to multiple clients acting as video receivers. Any one or more of the multiple clients can utilize another motion vector processing method provided in the embodiments of this specification to obtain an optimized candidate motion vector list for the current block of the video to be decoded, decode the video using the optimized motion vector list, and play it.

[0044] In this process, the client and server establish a connection via a network. The network provides the medium for communication between the client and server. Networks can include various connection types, such as wired or wireless communication links or fiber optic cables. Data transmitted by the client may need to undergo encoding, transcoding, compression, or other processing before being published to the server.

[0045] Clients can be browsers, apps (applications), web applications such as H5 (HyperText Markup Language 5) applications, lightweight applications (also known as mini-programs), or cloud applications. Clients can be developed using software development kits (SDKs) provided by the server, such as Real-Time Communication (RTC) SDKs. Clients can be deployed on electronic devices and depend on the device or certain apps running on the device to function. Electronic devices can have displays and support information browsing, such as personal mobile terminals like smartphones, tablets, and personal computers. Various other types of applications can also be configured on electronic devices, such as human-computer interaction applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, and social media platforms.

[0046] Servers can include servers that provide various services, such as servers that provide communication services for multiple clients, servers that support backend training of models used on clients, and servers that process data sent by clients. It should be noted that servers can be implemented as a distributed server cluster composed of multiple servers, or as a single server. Servers can also be cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or intelligent cloud computing servers or intelligent cloud hosts with artificial intelligence technology.

[0047] In some live streaming scenarios, the video transmission system may further include: uplink nodes, downlink nodes, and a live streaming source station. In a live streaming scenario, the client sends an initial live video stream to the uplink node, which then sends it to the live streaming source station. The live streaming source station receives the initial live video stream from the uplink node, encodes and packages it, and then pushes it to the server. The server, acting as the entry point of the content delivery network or a live streaming center server, decodes the initial live video stream pushed by the live streaming source station to obtain the source live video stream, transcodes the source live video stream to obtain the target live video stream, and sends the target live video stream to other clients through the downlink node so that other clients can play the target live video stream. During this process, the client, server, and / or live streaming source station can obtain an optimized candidate motion vector list based on the motion vector processing method provided in the embodiments of this specification, and use the optimized candidate motion vector list for encoding.

[0048] It should be noted that the video encoding standard that can be used in the video transmission system of the embodiments in this specification is not limited. For example, H.265 / HEVC, H.266 / VVC and other video encoding standards can be used for encoding.

[0049] For example, in this system embodiment, the process of encoding by the encoder at the transmitting end and decoding by the decoder at the receiving end may include:

[0050] The encoder at the transmitting end first constructs an initial candidate motion vector list based on the temporal and spatial domains for the video to be encoded. Then, according to a motion vector processing method of one embodiment of this specification, new motion vectors are added to the candidate motion vector list based on the number of free slots in the initial candidate motion vector list and the priority order of motion vector addition, to obtain a first optimized motion vector list.

[0051] The encoder then uses a motion search algorithm to search for the best candidate motion vector in the first optimized motion vector list. This best candidate motion vector minimizes the difference between the predicted block and the current block. After determining the index value of this best candidate motion vector, the index value is transmitted to the receiving end via a bitstream (the binary data stream after video compression encoding). The motion search algorithm can be any type of algorithm, such as full search, fast search, or hierarchical search; this specification does not impose any restrictions on it.

[0052] In addition, the encoder also needs to transmit the Motion Vector Difference (MVD), i.e., the difference between the predicted block and the current block, in the bitstream. Therefore, according to the motion vector processing method of another embodiment of this specification, the encoder determines the maximum and minimum values ​​of the components of candidate motion vectors in the first optimized motion vector list in different component directions. Based on the maximum and minimum values ​​of the components in different component directions, the encoder determines the movement range of the candidate motion vectors in the first optimized candidate motion vector list in different component directions. According to the component extraction strategy, new components in different component directions are extracted from the movement ranges in different component directions, and the new components in different component directions are combined to obtain a fourth motion vector. The fourth motion vector is added to the candidate motion vector list to obtain a second optimized motion vector list. The encoder obtains the best motion vector prediction value from the second optimized motion vector list. Starting from this best motion vector prediction value, the encoder selects the motion vector actually used in the current block through the motion estimation module. Then, the encoder calculates the difference between the motion vector actually used in the current block and the predicted value of the motion vector selected from the first optimized motion vector list to obtain the MVD, and transmits the MVD to the receiving end through the bitstream.

[0053] After receiving the bitstream of the video to be decoded, the receiver's decoder first constructs an initial candidate motion vector list based on the temporal and spatial domains. Then, according to a motion vector processing method of one embodiment of this specification, based on the number of free spaces in the initial candidate motion vector list and the priority order for adding motion vectors, new motion vectors are added to the candidate motion vector list to obtain a first optimized motion vector list. The decoder obtains the index value in the bitstream, retrieves the candidate motion vector at the corresponding position from the first optimized motion vector list as the predicted value of the motion vector for the current block, adds the predicted value of the motion vector for the current block to the MVD (Motion Vector Decomposition), and obtains the reconstructed block, thus completing the reconstruction of the current block.

[0054] As can be seen from the above process, on the one hand, in this system embodiment, the encoder at the transmitting end and the decoder at the receiving end construct the first optimized candidate motion list through the same process, including: for the current block of the video to be decoded, obtaining the candidate motion vector list of the current block; determining the target motion vector to be added based on the number of free slots in the candidate motion vector list and the motion vector addition priority order; thus, in view of the limitation on the size of the candidate motion vector list caused by the video encoding standard, new motion vectors that are more relevant to the current block are added to the candidate motion vector list first based on the motion vector addition priority order, thereby obtaining an optimized candidate motion vector list. Therefore, the index value in the bitstream sent by the encoder is the best candidate motion vector searched by the motion search algorithm based on the optimized candidate motion list, which increases the probability of finding a better motion vector for decoding. The decoder can obtain the best candidate motion vector from the same optimized candidate motion list based on the index value, thereby improving the decoding effect.

[0055] On the other hand, in this system embodiment, the encoder at the transmitting end obtains a candidate motion vector list (i.e., a first optimized motion vector list) for the current block of the video to be encoded. It determines the maximum and minimum values ​​of the candidate motion vectors in different component directions, and based on these values, determines the movement range of the candidate motion vectors in different component directions. Then, based on these movement ranges, it extracts new components in different component directions and combines them to obtain a first motion vector. This first motion vector is added to the candidate motion vector list, thus obtaining an optimized candidate motion vector list (i.e., a second optimized motion vector list). Therefore, the encoder can obtain the best motion vector prediction value from the further optimized candidate motion vector list. Starting from this best prediction value, the motion estimation module selects the actual motion vector used in the current block. Thus, the difference between the motion vector actually used in the current block calculated by the encoder and the predicted motion vector selected from the first optimized motion vector list is minimized, effectively improving the encoding performance.

[0056] See Figure 2 , Figure 2 A flowchart illustrating a motion vector processing method according to one embodiment of this specification is shown. In one or more embodiments, this motion vector processing method can be applied to an encoder and decoder on a server or client. Figure 2 As shown, the method specifically includes the following steps:

[0057] Step 202: Obtain the candidate motion vector list for the current block of the video to be decoded.

[0058] Videos to be decoded refer to compressed and encoded videos that can be decoded and restored to their original form using a decoder. For example, videos to be decoded can be those needed during transcoding in live streaming or short video scenarios. Another example is videos received by a client from a server that need to be decoded for playback.

[0059] During video encoding or decoding, video frames are divided into multiple smaller data blocks for processing. For example, in some encoding standards, data blocks can be represented as CUs (Coding Units). The current block refers to any data block that is currently being decoded among multiple smaller data blocks.

[0060] The candidate motion vector list provides a series of possible candidate motion vectors. During decoding, a suitable candidate motion vector can be selected from these candidate motion vectors to reconstruct the current block.

[0061] Since the candidate motion vector list constructed based on spatial and temporal motion vectors may lack sufficient candidate motion vectors to accurately describe the motion of the current block, the method provided in the embodiments of this specification can first obtain an initial candidate motion vector list constructed based on spatial and temporal motion vectors, and then add motion vectors to the candidate motion vector list to obtain an optimized candidate motion vector list, thereby increasing the probability of selecting better candidate motion vectors and improving the decoding effect.

[0062] The process of constructing a candidate motion vector list based on spatial and temporal motion vectors can be implemented with reference to general construction processes, and this specification does not impose any limitations on this. For example, a spatial candidate list and a temporal candidate list can be constructed separately, merged, deduplicated, and sorted to obtain the candidate motion vector list. The spatial candidate list includes the motion vectors of the coded blocks adjacent to the current block. The construction process may include: identifying the coded adjacent blocks to the upper left, upper top, and left of the current block; collecting motion vectors from these adjacent blocks; removing redundancy; and sorting to obtain the spatial candidate list. The temporal candidate list is constructed using the motion vectors of the corresponding positions of the current block in previous frames. The construction process may include: finding the corresponding position of the current block in the reference frame; extracting the motion vectors at the corresponding positions; and making appropriate adjustments, such as scaling factors, to adapt to different resolutions or time intervals between the current frame and the reference frame to obtain the temporal candidate list.

[0063] Step 204: Determine the target motion vector to be added based on the number of empty slots in the candidate motion vector list and the priority order for adding motion vectors.

[0064] The number of target motion vectors to be added is less than or equal to the number of free spaces, and the priority order of adding motion vectors includes the order of the priority of adding multiple motion vectors. Among the multiple motion vectors, the target motion vector with the greater relevance to the current block has a higher priority.

[0065] The reason there are empty slots in the candidate motion vector list is that its size depends on the specific video coding standard and has a certain upper limit. If this limit is not reached, there will be some empty slots. Different video coding standards have different regulations regarding the size of the candidate motion vector list. Even when conforming to the video coding standard, empty slots may appear in the candidate motion vector list during construction for various reasons. For example, if motion vectors from adjacent blocks are unavailable, empty slots may appear in the candidate list. Also, duplicate motion vectors may be removed for deduplication, resulting in empty slots. For instance, if a certain video coding standard has a maximum candidate motion vector list size of 16 bits, and the actual candidate motion vector list for the current block of the video to be decoded is 12 bits, then the number of empty slots in this candidate motion vector list is 4. Based on this, a maximum of 4 motion vectors can be added to this candidate motion vector list subsequently.

[0066] The motion vector addition priority order refers to the order in which different motion vectors are added to the candidate motion vector list under the constraint of the number of available bits. This specification does not impose restrictions on the specific order in which available motion vectors are added. By defining the motion vector addition priority order, decisions can be made on which target motion vectors to add when the number of available bits is limited. This allows motion vectors with greater relevance to the current block to be added to the candidate motion vector list, increasing the probability of selecting a better motion vector for decoding.

[0067] For example, the available motion vectors include a first motion vector and a second motion vector. In this case, the priority order for adding motion vectors can be expressed as follows: the first motion vector has a higher priority than the second motion vector. It is understood that the method provided in the embodiments of this specification can set different addition priorities for different available motion vectors based on the difference in their relevance to the current block, with motion vectors that have a greater relevance to the current block having a higher addition priority.

[0068] For example, the priority order for adding motion vectors may include: the priority of adding a first motion vector is higher than the priority of adding a second motion vector, the first motion vector is determined based on the pairwise average of the first two candidate motion vectors in the candidate motion vector list, and the second motion vector is determined based on the recombination of the components of the first two candidate motion vectors.

[0069] Accordingly, based on the number of empty slots in the candidate motion vector list and the priority order for adding motion vectors, the target motion vector to be added is determined, including:

[0070] If, based on the number of available spaces, it is determined that the available spaces in the candidate motion vector list are sufficient to accommodate the first motion vector, but insufficient to accommodate both the first and second motion vectors, then, based on the priority order of adding motion vectors, it is determined that the first motion vector should be added first.

[0071] If, based on the number of available spaces, it is determined that the list of candidate motion vectors has enough available spaces to accommodate the first motion vector and the second motion vector, then it is determined that the first motion vector and the second motion vector are added, with the second motion vector positioned before the first motion vector.

[0072] The pairwise average is the average of the first two candidate motion vectors MV0 and MV1 in the candidate motion vector list {MV0, MV1, MV2, ..., MVn-1} constructed based on the spatial and temporal motion vectors. The first motion vector obtained by the pairwise average can be represented as follows:

[0073]

[0074] Wherein, MV0->x represents the component of candidate motion vector MV0 in the horizontal direction x, MV1->x represents the component of candidate motion vector MV1 in the vertical direction y, MV0->y represents the component of candidate motion vector MV0 in the vertical direction y, and MV1->y represents the component of candidate motion vector MV1 in the vertical direction y.

[0075] Assuming the first two candidate motion vectors in the candidate motion vector list are (x0, y0) and (x1, y1), the components of the two are recombined to obtain the second motion vectors, which include (x0, y1) and (x1, y0).

[0076] For example, the components of the first two candidate motion vectors MV0 and MV1 in the candidate motion vector list are recombined to generate new second motion vectors (x0, y1) and (x1, y0). When added to the candidate motion vector list, (x0, y1) and (x1, y0) are placed before the pairwise average. The candidate motion vector list after the addition is: {(x0, y1), (x1, y0), pairwise average, MV0, MV1, MV2, ..., MVn-1}.

[0077] In this implementation, since the candidate motion vector list is typically constructed by placing the candidate motion vectors with higher prediction accuracy at the beginning of the list (i.e., the first two candidate motion vectors are usually considered to be the two most accurate), adding the first motion vector obtained by the pairwise average of the first two candidate motion vectors and the second motion vector obtained by recombining the components of the first two candidate motion vectors to the candidate motion vector list can effectively improve the optimized candidate motion vector list. Moreover, since the pairwise average of the first two candidate motion vectors has advantages such as smoothing motion estimation, reducing noise, utilizing neighboring block information, improving prediction consistency, reducing prediction error, and adapting to complex motion patterns, its correlation with the current block is greater than that of the motion vector obtained by recombining the components of the first two candidate motion vectors. Therefore, setting the addition priority of the first motion vector determined based on the pairwise average to be higher than the addition priority of the second motion vector determined based on the component recombination can further improve the prediction accuracy of the candidate motion vector list.

[0078] For example, assuming that the initially constructed candidate motion vector list has only one empty slot, it is determined that only the first motion vector determined by the pairwise average is added to the candidate motion vector list; assuming that the initially constructed candidate motion vector list has multiple empty slots, it is determined that the first motion vector and the second motion vector obtained by recombination can be added to the candidate motion vector list, and in the candidate motion vector list, the second motion vector is added in the position before the first motion vector.

[0079] Step 206: Obtain the target motion vector to be added, and add the target motion vector to the candidate motion vector list.

[0080] For example, if it is determined that a first motion vector should be added, the first motion vector can be generated based on the pairwise average of the first two candidate motion vectors in the candidate motion vector list, and the first motion vector can be added to the beginning of the candidate motion vector list.

[0081] For example, if it is determined that a first motion vector should be added, and it is also determined that a second motion vector should be added, then the components of the first two candidate motion vectors are recombined to generate a second motion vector, and the second motion vector is added before the first motion vector in the candidate motion vector list.

[0082] As can be seen, this method addresses the limitation on the size of the candidate motion vector list caused by video coding standards. Under the constraint of the number of empty slots in the candidate motion vector list, it prioritizes adding motion vectors that are more relevant to the current block to the candidate motion vector list based on the priority order of motion vector addition. That is, it prioritizes adding motion vectors with stronger relevance to the current block, and then considers adding motion vectors with relatively weaker relevance. This optimizes the candidate motion vector list used for video decoding, increases the probability of selecting better motion vectors for decoding, and improves the decoding effect.

[0083] For example, based on the priority order of adding motion vectors, the pairwise average of the first two candidate motion vectors is considered first, and then the motion vector obtained by recombining the components of the first two candidate motion vectors is considered. This optimizes the candidate motion vector list for video decoding, increases the probability of selecting a better motion vector for decoding, and improves the decoding effect.

[0084] In one or more embodiments of this specification, considering that zero-value motion vectors simplify the decoding process and, in some cases, improve decoding accuracy, zero-value motion vectors are added to the candidate motion vector list when the number of available spaces allows. Since the correlation between zero-value motion vectors and the current block is weaker than that of second motion vectors, in this embodiment, the priority order for adding motion vectors includes: the priority of adding second motion vectors is higher than the priority of adding zero-value motion vectors. Accordingly, this method can determine whether to add a zero-value motion vector based on the number of available spaces in the candidate motion vector list and the priority order for adding motion vectors. Therefore, in this method, determining the target motion vector to be added based on the number of available spaces in the candidate motion vector list and the priority order for adding motion vectors includes:

[0085] If, based on the number of available spaces, it is determined that the available spaces in the candidate motion vector list are sufficient to accommodate the first motion vector and the second motion vector, but insufficient to accommodate the zero-value motion vector, then based on the priority order of adding motion vectors, it is determined that the zero-value motion vector will not be added.

[0086] If, based on the number of available spaces, it is determined that the list of candidate motion vectors has enough available spaces to accommodate the first motion vector, the second motion vector, and the zero-value motion vector, then it is determined that the zero-value motion vector will be added.

[0087] Among them, the zero-value motion vector is a special motion vector with a value of (0,0), indicating that no movement has occurred.

[0088] As can be seen, in this embodiment, based on the number of empty spaces in the candidate motion vector list, if there are still empty spaces after adding the first and second motion vectors, zero-value motion vectors can be added to the candidate motion vector list, thereby improving decoding accuracy by utilizing zero-value motion vectors.

[0089] In practical applications, if the current block size is small, it indicates that the texture features of the current block differ significantly from those of surrounding data blocks. This can be understood as the current block potentially containing finer details or unique textures. Using zero-value motion vectors can better match blocks at the same location in the reference frame, thereby improving prediction accuracy. Therefore, in one or more embodiments of this specification, a coded block size threshold is set to determine whether the current block size is small, and subsequently decide whether to add a zero-value motion vector. Specifically, before adding the zero-value motion vector to the candidate motion vector list, the method further includes:

[0090] Determine whether the size of the current block is less than or equal to the encoding block size threshold;

[0091] If so, proceed to the step of adding the zero-value motion vector to the candidate motion vector list;

[0092] If not, and based on the number of available spaces, it is determined that the available spaces in the candidate motion vector list are sufficient to accommodate new motion vectors, then any two candidate motion vectors are selected from the candidate motion vector list, and a third motion vector is obtained by recombinating the components of the two candidate motion vectors, and the third motion vector is added to the candidate motion vector list.

[0093] The coded block size threshold is used to determine whether the size of the current block is too small. Its value can be determined based on experience or historical data statistics, and this specification does not impose any restrictions on it. Size can refer to any one or more metrics such as luminance pixels and chrominance pixels. For example, the coded block size threshold can be set to 256 luminance pixels. If the luminance pixels of the current block are less than or equal to 256 luminance pixels, a zero-value motion vector can be added. Otherwise, two candidate motion vectors are randomly selected from the candidate motion vector list, their components are recombine to obtain a new third motion vector, and the new third motion vector is added to the candidate motion vector list.

[0094] Selecting any two candidate motion vectors from the candidate motion vector list means choosing from the remaining candidate motion vectors excluding the first two candidate motion vectors.

[0095] Exemplarily, from the candidate motion vector list, any two motion vectors MVi and MVj are taken, where 0 ≤ i, j < n. Assume MVi = (xi, yi) and MVj = (xj, yj), and then use these two motion vectors to combine and generate a new third motion vector, including: (xi, yj) and (xj, yi).

[0096] In the above embodiment, by adding a priority order to the motion vectors to decide whether to add a zero-valued motion vector, the zero-valued motion vector can be reasonably used to better match the same position block in the reference frame, improving the prediction accuracy. Moreover, in the case where the zero-valued motion vector is not used, adding the new third motion vector obtained by recombining the components of any two candidate motion vectors to the candidate motion vector list can also improve the prediction accuracy to a certain extent, thus achieving the purpose of optimizing the candidate motion vector list.

[0097] In one or more other embodiments of this specification, when the number of idle bits is sufficient, in order to further make full use of the zero-valued motion vector to improve the prediction accuracy, the method further includes:

[0098] When the third motion vector is added to the candidate motion vector list, if there are still idle bits in the candidate motion vector list, the zero-valued motion vector is added to the candidate motion vector list.

[0099] That is, when the size of the current block is greater than the coding block size threshold, it is considered that the recombined third motion vector has a greater correlation with the current block than the zero-valued motion vector. At this time, preferentially adding the recombined third motion vector can improve the prediction accuracy. On this basis, if there are still idle bits, the zero-valued motion vector is further added to the candidate motion vector list to further improve the prediction accuracy.

[0100] In order to keep the gap between the newly added motion vector and the existing candidate motion vectors in the candidate motion vector list within a reasonable range and avoid the newly added motion vector being unreasonable and resulting in a decrease in prediction efficiency, in one or more embodiments of this specification, before adding the recombined motion vector to the candidate motion vector list, the method further includes:

[0101] Determine whether the difference between the recombined motion vector and the candidate motion vectors in the candidate motion vector list is within a preset difference threshold range;

[0102] If so, determine to add the recombined motion vector to the candidate motion vector list.

[0103] Among them, the recombined motion vector can refer to the second motion vector and / or the third motion vector.

[0104] The specific value of the preset difference threshold range can be obtained based on experience or statistics, and this specification does not impose any limitations on it. For example, the preset difference threshold range can be expressed as the range between the preset lower limit and the preset upper limit of the difference.

[0105] For example, if the difference between the second motion vector and the candidate motion vectors in the candidate motion vector list is less than the lower limit, or greater than the upper limit, it indicates that the motion vectors will be duplicated or too unrelated, which will reduce prediction efficiency. In this case, the addition of the second motion vector should be abandoned. The same applies to the third motion vector, and will not be elaborated here.

[0106] After adding motion vectors to the candidate motion vector list through one or more of the above embodiments, an optimized candidate motion vector list is obtained, which can then be used for decoding, improving the decoding effect. Specifically, after adding motion vectors to the candidate motion vector list, the method further includes:

[0107] The current block is reconstructed using the candidate motion vector list.

[0108] For example, the decoder can select candidate motion vectors from the candidate motion vector list according to a candidate motion vector selection strategy (such as obtaining index values ​​from the bitstream as described in the previous embodiment) as the predicted motion vector MVP, and use the MVP to reconstruct the current block. The specific process may include: the decoder selecting candidate motion vectors from the candidate motion vector list as the predicted motion vector MVP; if using AMVP (Advanced Motion Vector Prediction, an inter-frame prediction mode in video coding), the residual MVD also needs to be decoded; the MVP and MVD are added to obtain the reconstructed motion vector; the reconstructed motion vector is used to find a matching block in the reference frame, motion compensation is performed, and the final reconstructed current block is obtained.

[0109] See Figure 3 , Figure 3 The flowchart illustrates the process of applying the motion vector processing method provided in one embodiment of this specification during server transcoding, specifically including the following steps:

[0110] Step 302: The server receives the short video uploaded by the client.

[0111] For example, in short video scenarios, creators upload short videos to a server via a client. The server needs to transcode the short video before sending the transcoded video to users for viewing. This process involves decoding and encoding the short video. To minimize the bandwidth of the transcoded video and ensure smoother online viewing for users, the motion vector processing method provided in the embodiments of this specification can be used. During the decoding process, the motion vectors are processed to obtain an optimized candidate motion vector list, which is then used for decoding to improve the decoding effect.

[0112] Correspondingly, the encoder of the client uploading the short video obtains an optimized list of candidate motion vectors through the same process, searches for the index value of the best candidate motion vector, and transmits the index value and motion vector difference (MVD) to the server as the receiving end via bitstream.

[0113] Therefore, in order to improve the decoding effect, in step 302, the server will first receive the short video uploaded by the client so that the candidate motion vector list can be optimized and the short video can be decoded using the optimized candidate motion vector list.

[0114] Step 304: For the current block of the short video to be decoded, obtain a list of candidate motion vectors for the current block.

[0115] For example, referring to the aforementioned embodiments, a candidate motion vector list {MV0,MV1,MV2,...,MVn-1} for the current block can be constructed based on the spatial motion vector and the temporal motion vector. The specific construction process will not be described in detail here.

[0116] Step 306: If there is only one empty space in the candidate motion vector list, add the pairwise average of the first two candidate motion vectors in the candidate motion vector list to the first position of the candidate motion vector list.

[0117] For example, the number of candidate motion vectors in the candidate motion vector list can be determined by traversing the list.

[0118] For example, suppose the number of candidate motion vectors in the candidate motion vector list is Cnt. According to the coding standard, the upper limit threshold of the candidate motion vector list size is maxMrgNum. If Cnt = maxMrgNum – 1, it means that there is only one empty space in the candidate motion vector list. In this case, the pairwise average is added to the candidate motion vector list.

[0119] Step 308: If there are multiple empty slots in the candidate motion vector list, the components of the first two candidate motion vectors in the candidate motion vector list are recombined to obtain the second motion vector.

[0120] For example, assuming that the number of motion vectors Cnt in the motion vector list is not equal to maxMrgNum–1 and is less than maxMrgNum, it means that there are multiple empty positions in the candidate motion vector list. Then, the components of the first two motion vectors MV0(x0,y0) and MV1(x1,y1) in the candidate motion vector list are recombined to generate a new second motion vector, including (x0,y1) and (x1,y0).

[0121] Step 310: Compare the second motion vector with each of the original candidate motion vectors in the candidate motion vector list to obtain the difference between the second motion vector and each candidate motion vector.

[0122] For example, (x0,y1) and (x1,y0) are compared with each motion vector in the candidate motion vector list {MV0,MV1,MV2,...,MVn-1} to obtain the difference between them and each motion vector in {MV0,MV1,MV2,...,MVn-1}.

[0123] Step 312: If the difference between the second motion vector and each candidate motion vector is within the preset difference threshold range, then add the second motion vector to the candidate motion vector list.

[0124] For example, the difference between (x0, y1) and (x1, y0) and each motion vector in {MV0, MV1, MV2, ..., MVn-1} is compared with a preset difference threshold range [thr0, thr1], where thr0 represents the lower limit of the threshold range and thr1 represents the upper limit of the threshold range. If the difference is not within the range [thr0, thr1], it means that the motion vector may be duplicated or the difference is too large, and it should not be added. If the difference is within the range [thr0, thr1], it means that (x0, y1) and (x1, y0) are different from each candidate motion vector in {MV0, MV1, MV2, ..., MVn-1} and the difference is reasonable, so (x0, y1) and (x1, y0) can be added to the candidate motion vector list.

[0125] Therefore, if the difference between (x0,y1) and (x1,y0) and any candidate motion vector is not within the preset difference threshold range, then adding (x0,y1) and (x1,y0) will be abandoned.

[0126] If, after adding the second motion vector in step 312, or after abandoning the addition of the second motion vector, there are still empty slots in the candidate motion vector list, proceed to step 314; otherwise, obtain the current candidate motion vector list as the optimized candidate motion vector list and proceed to step 328, using the optimized candidate motion vector list to reconstruct the current block of the short video to be decoded.

[0127] Step 314: If there are still free positions in the candidate motion vector list, add the pairwise average of the first two candidate motion vectors in the original candidate motion vector list to the candidate motion vector list.

[0128] For example: After adding the second motion vector, or after giving up adding the second motion vector, determine whether Cnt is still less than maxMrgNum. If so, add the pairwise average to the candidate motion vector list.

[0129] If there are still free positions in the candidate motion vector list after step 314, go to step 316; otherwise, obtain the current candidate motion vector list as the optimized candidate motion vector list, go to step 328, and use the optimized candidate motion vector list to reconstruct the current block of the short video to be decoded.

[0130] Step 316: If there are still free positions in the candidate motion vector list, determine whether the size of the current block is less than or equal to the coding block size threshold.

[0131] For example: Determine whether the size of the current block is less than or equal to 256 luminance pixels.

[0132] Step 318: If the size of the current block is less than or equal to the coding block size threshold, add a zero-valued motion vector to the candidate motion vector list.

[0133] Step 320: If the size of the current block is greater than the coding block size threshold, select any two candidate motion vectors from the candidate motion vectors in the original candidate motion vector list, and recombine the components of the any two candidate motion vectors to obtain a third motion vector.

[0134] Exemplarily, assume that any two candidate motion vectors MVi and MVj are taken from the candidate motion vector list, where 0 ≤ i, j < n. Assume MVi = (xi, yi) and MVj = (xj, yj). Recombine the components of these two candidate motion vectors to generate a new third motion vector, including: (xi, yj) and (xj, yi).

[0135] Step 322: Compare the third motion vector with each candidate motion vector in the original candidate motion vector list to obtain the difference from each candidate motion vector.

[0136] Exemplarily, compare the third motion vectors (xi, yj) and (xj, yi) with each candidate motion vector in the candidate motion vector list {MV0, MV1, MV2,..., MVn-1} to obtain the difference from each candidate motion vector in {MV0, MV1, MV2,..., MVn-1}.

[0137] Step 324: If the difference between the third motion vector and each candidate motion vector is within the preset difference threshold range, then add the third motion vector to the candidate motion vector list.

[0138] For example, if the difference between (xi,yj) and each motion vector in {MV0,MV1,MV2,...,MVn-1} is within the range [thr0,thr1], then (xi,yj) is added to the list of candidate motion vectors. The same applies to (xj,yi), which will not be elaborated here.

[0139] Understandably, if the difference between the third motion vector and any candidate motion vector is not within the preset difference threshold range, then adding the third motion vector will be abandoned.

[0140] After adding a third motion vector, or deciding to abandon adding a third motion vector, if there are still empty slots in the candidate motion vector list, proceed to step 326; otherwise, obtain the current candidate motion vector list as the optimized candidate motion vector list, proceed to step 328, and use the optimized candidate motion vector list to reconstruct the current block of the short video to be decoded.

[0141] Step 326: If there are still empty slots in the candidate motion vector list, add the zero-value motion vector to the candidate motion vector list.

[0142] After step 326, the current candidate motion vector list is obtained as the optimized candidate motion vector list, and then step 328 is performed to reconstruct the current block of the short video to be decoded using the optimized candidate motion vector list.

[0143] Step 328: Reconstruct the current block of the short video to be decoded using the optimized candidate motion vector list.

[0144] For example, referring to the foregoing embodiments, the best candidate motion vector can be obtained from the candidate motion vector list based on the index value, and used as the predicted motion vector MVP, and the current block can be reconstructed using the MVP.

[0145] Step 330: After reconstructing the current block of the short video to be decoded, determine the next current block.

[0146] For the next current block, continue with step 304 to reconstruct the next current block until the short video to be decoded is fully decoded.

[0147] Step 332: The short video to be decoded is decoded, and the video data of the decoded short video is obtained.

[0148] In the above embodiment, when there is only one empty slot in the candidate motion vector list, the pairwise average of the first two candidate motion vectors is added first. When there are multiple empty slots, the components of the first two candidate motion vectors are recombinated, along with the pairwise average. The motion vector from the recombination of the components of the first two candidate motion vectors is placed before the pairwise average. If there are still empty slots, the remaining candidate motion vectors are recombinated to generate new motion vectors based on the current block size and added to the motion vector list. This prioritizes adding motion vectors with stronger correlation to the current block, followed by motion vectors with relatively weaker correlation. This optimizes the candidate motion vector list for video decoding, increases the probability of selecting better motion vectors for decoding, and improves the decoding effect.

[0149] See Figure 4 , Figure 4 A flowchart illustrating a motion vector processing method according to another embodiment of this specification is shown. In one or more embodiments, this motion vector processing method can be applied to an encoder on a server or client. Figure 4 As shown, the method specifically includes the following steps:

[0150] Step 402: Obtain the candidate motion vector list for the current block of the video to be encoded.

[0151] The list of candidate motion vectors in this step can be based on Figure 3 The processing procedure shown is used to construct the system.

[0152] In the field of video coding, inter-frame prediction is divided into forward prediction and bidirectional prediction based on the prediction direction. Images coded using forward prediction are called P-frames, and images coded using bidirectional prediction are called B-frames. Figure 5 The diagram illustrates inter-frame prediction. A P-frame has only one motion vector MV0. The block pointed to by MV0 is used to generate the final predicted block for the current block. A B-frame has two motion vectors MV0 and MV1. The blocks pointed to by these two motion vectors are used to generate two predicted blocks for the current block. The weighted average of these two predicted blocks is used as the final predicted block for the current block. To improve video compression efficiency, according to some coding standards, a candidate motion vector list {MV0, MV1, MV2, ..., MVn-1} is constructed for the current block. A suitable candidate motion vector is selected from this list as the motion vector prediction value (MVP) for the current block. Then, encoding is performed based on the MVD (Motion Vector Depth) between the current block's motion vector MV and the MVP.

[0153] Therefore, in order to improve the encoding effect, the candidate motion vector list of the current block of the video to be encoded needs to be optimized. First, the candidate motion vector list of the current block of the video to be encoded needs to be obtained.

[0154] Step 404: Determine the maximum and minimum values ​​of the components of the candidate motion vectors in the candidate motion vector list in different component directions.

[0155] A candidate motion vector list typically contains a series of candidate motion vectors. Each candidate motion vector includes at least two component directions, typically a horizontal and a vertical component direction. However, other component directions may be used depending on the application, and this specification does not impose any restrictions on this. Based on this, for any given component direction, each of these candidate motion vectors has a component in that direction. Therefore, among the components of these candidate motion vectors in that component direction, a maximum value and a minimum value can be identified. In other words, for a candidate motion vector list, a maximum value and a minimum value can be identified for each component direction.

[0156] For example, the candidate motion vector list {MV0, MV1, MV2, ..., MVn-1} has horizontal and vertical component directions. Therefore, for any candidate motion vector MVi, it has a horizontal component (x-direction) xi and a vertical component (y-direction) yi. Thus, based on the candidate motion vector list {MV0, MV1, MV2, ..., MVn-1}, the maximum value x of the component in the x-direction of the candidate motion vector list can be determined. max The minimum value of the component x min And, the maximum value of the component in the y direction, y max The minimum value of the component y min .

[0157] Step 406: Determine the movement range of the candidate motion vectors in the candidate motion vector list in different component directions based on the maximum and minimum values ​​of the components in different component directions.

[0158] The range of movement of a candidate motion vector in one component direction can also be understood as the range between the maximum and minimum values ​​of the component in that component direction.

[0159] For example, suppose there is a list of candidate motion vectors with the maximum value of the component x in the x-direction. max The minimum value of the component x min Then, the range of movement of the candidate motion vectors in the x-direction in the candidate motion vector list is x. min To x max The range of movement of the candidate motion vectors in the y-direction in the candidate motion vector list is y. min to y max The range.

[0160] Step 408: According to the component extraction strategy, extract new components in different component directions from the movement range in different component directions, and combine the new components in different component directions to obtain the fourth motion vector.

[0161] The component extraction strategy can be configured as needed based on the actual application requirements. For example, a new component extracted within the movement range in the x-direction can be extracted via x... min +P*(x max -x min Let ) represent the new component taken out within the range of movement in the y direction, where 0≤P≤1, and y can be used to represent the new component taken out within the range of movement in the y direction. min +P*(y max –y min The fourth motion vector obtained by combining the vectors is (x) min +P*(x max -x min ), y min +P*(y max –y min The component extraction strategy can be expressed as follows: different new components are extracted by taking different values ​​of P. Depending on the value of P, one or more new components can be extracted in the movement range of different component directions. The fourth motion vector obtained by combining the new components in different component directions can also be one or more.

[0162] For example, a new component x is extracted in the x-direction. min +(x max -x min ) / 2, a new component y is extracted in the y direction. min +(y max –y min If ) / 2, then combining the new components, the resulting fourth motion vector can be: (x min +(x max -x min ) / 2, y min +(y max –y min ) / 2).

[0163] Step 410: Add the fourth motion vector to the candidate motion vector list.

[0164] This method extracts new components in different component directions based on the movement range of candidate motion vectors, and combines these new components to obtain a fourth motion vector. This fourth motion vector is then added to the candidate motion vector list, effectively compensating for any deficiencies in the list and optimizing the candidate motion vector list used for video coding. The encoder can obtain the best motion vector prediction value from this further optimized list. Starting from this optimal prediction value, the motion estimation module selects the actual motion vector used in the current block. Thus, the difference between the motion vector actually used in the current block calculated by the encoder and the motion vector prediction value selected from the first optimized motion vector list is minimized, effectively improving the coding performance.

[0165] This increases the probability of selecting a better motion vector for encoding, thus improving the encoding effect.

[0166] In one or more embodiments of this specification, in order to more effectively compensate for the deficiencies of the candidate motion vector list, new components are extracted by equal division, and new motion vectors are combined and added to the candidate motion vector list. Specifically, according to the component extraction strategy, new components in different component directions are extracted from the movement range in the different component directions, and the new components in different component directions are combined to obtain a fourth motion vector, including:

[0167] Divide the movement range into equal parts, and extract the new component corresponding to the division point from the movement range in the horizontal direction;

[0168] Divide the movement range into equal parts, and extract the new component corresponding to the division point from the movement range in the vertical component direction;

[0169] The new component in the horizontal direction is combined with the new component in the vertical direction to obtain the fourth motion vector.

[0170] The method of dividing the movement range into equal parts can be any number of equal parts, such as 2, 3, 4, etc., and this specification does not impose any limitation on this. For example, as Figure 6 The diagram showing the equal division of the movement range is shown. Figure 6 In this method, the movement range is divided into four equal parts, and the new component extracted includes: x in the x-direction. min +(x max -x min ) / 4, x min +(x max -x min ) / 2, x min +3(x max -x min ) / 4, and y in the y directionmin +(y max -y min ) / 4, y min +(y max -y min ) / 2, y min +3(y max -y min ) / 4. Combining these three new components in the x - direction and these three new components in the y - direction can obtain nine fourth motion vectors as shown in Figure 6 . Thus, these nine fourth motion vectors are added to the candidate motion vector list.

[0171] In practical applications, the smaller the movement range, the more effectively the fourth motion vectors combined by equally dividing the new components can compensate for the deficiencies of the original candidate motion vectors in the candidate motion vector list. Based on this, in one or more embodiments of this specification, movement range thresholds in different component directions are also set. Only when the movement range is less than the movement range threshold, the new components are obtained by the method of equal division

[0172] Exemplarily, the movement range threshold in the x - direction may include movement range threshold thr1, and the movement range threshold in the y - direction may include movement range threshold thr2. Thus, when |x max –x min |< thr1 and |y max –y min |< thr2, x min +(x max -x min ) / 4, x min +(x max -x min ) / 2, x min +3(x max -x min ) / 4, and for the y - direction, y min +(y max ​​​​​​​​​​​​​​​​​Since the new components are taken out in the way of equal division according to the moving range, the gaps between the original candidate motion vectors in the candidate motion vector list can be filled more evenly, so as to optimize the candidate motion vector list more reasonably, improve the probability of selecting a better motion vector for coding, and improve the coding effect.

[0174] In one or more embodiments of this specification, the method further includes:

[0175] Select any two candidate motion vectors from the candidate motion vector list, and obtain a fifth motion vector based on the recombination of the components of the any two candidate motion vectors;

[0176] Add the fifth motion vector to the candidate motion vector list.

[0177] Among them, selecting any two candidate motion vectors means selecting any two candidate motion vectors from the original candidate motion vectors in the candidate motion vector list. In practical applications, according to the accuracy requirements, multiple groups of candidate motion vector pairs can be selected, and the components of each group of candidate motion vector pairs are recombined to obtain multiple fifth motion vectors.

[0178] Exemplarily, two motion vectors MVi and MVj can be arbitrarily taken from the candidate motion vector list, where 0 ≤ i, j < n. Assume MVi = (xi, yi) and MVj = (xj, yj), and then use these two motion vectors to combine and generate new fifth motion vectors, including: (xi, yj) and (xj, yi).

[0179] In order to make the gap between the newly added motion vector and the existing candidate motion vectors in the candidate motion vector list within a reasonable range and avoid the reduction of prediction efficiency caused by the unreasonable newly added motion vector, in one or more embodiments of this specification, before adding the fifth motion vector to the candidate motion vector list, it further includes:

[0180] Judge whether the difference between the fifth motion vector and the candidate motion vectors in the candidate motion vector list is within a preset difference threshold range;

[0181] If so, determine to add the fifth motion vector to the candidate motion vector list.

[0182] The specific value of the preset difference threshold range can be obtained according to experience or statistics, and this specification does not limit this. Exemplarily, the preset difference threshold range can be expressed as the range between a preset difference lower limit and a preset difference upper limit.

[0183] For example, if the difference between the fifth motion vector and the candidate motion vectors in the candidate motion vector list is less than the lower limit or higher than the upper limit, it indicates that the motion vectors will be duplicated or too unrelated, which will reduce the prediction efficiency. In this case, the addition of the fifth motion vector should be abandoned.

[0184] In this embodiment, by presetting a difference threshold range, the difference between the newly added motion vector and the existing candidate motion vectors in the candidate motion vector list can be kept within a reasonable range, thus avoiding the reduction in prediction efficiency due to unreasonable newly added motion vectors.

[0185] In one or more embodiments of this specification, the method further includes:

[0186] A new sixth motion vector is obtained based on the pairwise average of the first two candidate motion vectors in the candidate motion vector list;

[0187] Add the sixth motion vector to the candidate motion vector list.

[0188] The specific calculation method for the pairwise average can be implemented with reference to the aforementioned embodiments, and will not be repeated here. It is understood that, since the pairwise average has advantages such as smoothing motion estimation, reducing the impact of noise, utilizing information from adjacent blocks, improving prediction consistency, reducing prediction errors, and adapting to complex motion patterns, this embodiment can effectively improve the coding performance by adding the pairwise average to the candidate motion vector list.

[0189] To further compensate for the shortcomings of the candidate motion vector list, after adding motion vectors from one or more of the above embodiments to the candidate motion vector list, an optimized candidate motion vector list can be obtained, which can then be used to complete the encoding of the current video block. Specifically, after adding motion vectors to the candidate motion vector list, the method further includes:

[0190] Motion estimation is performed on the current block using the candidate motion vector list.

[0191] For example, the motion estimation module of the encoder can use SATD (Sum of Absolute Transformed Differences) or SAD (Sum of Absolute Differences) to measure the error between the current block and the reference block, select a suitable motion vector as the starting point from the candidate motion vector list optimized by the method of the embodiments in this specification, perform motion estimation, and complete the video encoding.

[0192] See Figure 7 , Figure 7This document illustrates a flowchart of the motion vector processing method provided in another embodiment of this specification, applied during server transcoding, specifically including the following steps:

[0193] Step 702: The server retrieves the decoded short video.

[0194] Using the aforementioned short video scenario, after decoding the short video, the server also needs to encode the decoded short video into other formats as needed, so that the re-encoded short video can be sent to the user.

[0195] Therefore, in order to improve the encoding effect, in step 702, the server will obtain the decoded short video so that the candidate motion vector list can be optimized and the optimized candidate motion vector list can be used to encode the short video.

[0196] Step 704: For the current block of the short video to be encoded, obtain a list of candidate motion vectors for the current block.

[0197] In this step, referring to the aforementioned embodiments, a candidate motion vector list {MV0,MV1,MV2,...,MVn-1} for the current block is constructed based on spatial and temporal motion vectors. Then, based on... Figure 2 or Figure 3 The processing shown yields an optimized list of candidate motion vectors, which serves as the candidate motion vector list obtained in this step. The specific process will not be described in detail here.

[0198] Step 706: Select any two candidate motion vectors from the candidate motion vector list, and recombine the components of the two candidate motion vectors to obtain a new motion vector. If the difference between the new motion vector and the original candidate motion vectors in the candidate motion vector list is within a preset difference threshold range, add the new motion vector to the candidate motion vector list.

[0199] Step 708: Add the pairwise average of the top two candidate motion vectors in the candidate motion vector list to the candidate motion vector list.

[0200] Step 710: From the list of candidate motion vectors, take the maximum and minimum values ​​of the components in the x-direction, and the maximum and minimum values ​​of the components in the y-direction.

[0201] Step 712: If the movement range corresponding to the maximum and minimum values ​​of the components in the x-direction is less than the movement range threshold in the x-direction, and the movement range corresponding to the maximum and minimum values ​​of the components in the y-direction is less than the movement range threshold in the y-direction, then move the x-axis... min +(x max -x min ) / 4, xmin +(x max -x min ) / 2, x min +3(x max -x min ) / 4, and y in the y direction min +(y max -y min ) / 4, y min +(y max -y min ) / 2, y min +3(y max -y min Combine ) / 4 to generate new motion vectors and add them to the candidate motion vector list to obtain an optimized candidate motion vector list.

[0202] Step 714: Perform motion estimation on the current block of the short video to be encoded using the optimized candidate motion vector list.

[0203] For example: Figure 8 The diagram shown illustrates the current frame and reference frame. The encoder's motion estimation module measures the error between the current block and the reference block, selects a suitable motion vector from the optimized candidate motion vector list as the starting point, performs motion estimation, and completes the motion estimation of the current block.

[0204] Step 716: After completing motion estimation for the current block of the short video to be encoded, determine the next current block.

[0205] For the next current block, continue with step 704 to perform motion estimation for the next current block until the short video to be encoded is completed.

[0206] Step 718: The short video to be encoded is completed, and the video data of the encoded short video is obtained.

[0207] According to the above embodiments, by supplementing the candidate motion vector list with newly added motion vectors, the encoder can use the newly added motion vectors in the candidate motion vector list as candidate starting positions for motion estimation, thereby improving the accuracy of motion estimation and improving the coding effect.

[0208] Corresponding to the above method embodiments, this specification also provides an embodiment of a motion vector processing device. Figure 9 A schematic diagram of a motion vector processing device according to one embodiment of this specification is shown. Figure 9 As shown, the device includes:

[0209] The decoding list acquisition module 902 is configured to acquire a list of candidate motion vectors for the current block of the video to be decoded;

[0210] The decoding vector determination module 904 is configured to determine the target motion vector to be added based on the number of free slots in the candidate motion vector list and the motion vector addition priority order, wherein the number of target motion vectors to be added is less than or equal to the number of free slots, and the motion vector addition priority order includes the order of addition priorities of multiple motion vectors, wherein the motion vector with greater relevance to the current block has a higher addition priority.

[0211] The decoding vector addition module 906 is configured to obtain the target motion vector to be added and add the target motion vector to the candidate motion vector list.

[0212] Optionally, the priority order for adding motion vectors includes: the priority of adding a first motion vector is higher than the priority of adding a second motion vector, the first motion vector is determined based on the pairwise average of the first two candidate motion vectors in the candidate motion vector list, and the second motion vector is determined based on the recombination of the components of the first two candidate motion vectors;

[0213] The decoding vector determination module is configured to, if, based on the number of available spaces, it is determined that the available spaces in the candidate motion vector list are sufficient to accommodate the first motion vector, but insufficient to accommodate both the first motion vector and the second motion vector, then, based on the motion vector addition priority order, determine to prioritize adding the first motion vector; if, based on the number of available spaces, it is determined that the available spaces in the candidate motion vector list are sufficient to accommodate both the first motion vector and the second motion vector, then determine to add both the first motion vector and the second motion vector, with the second motion vector positioned before the first motion vector.

[0214] Optionally, the priority order for adding motion vectors includes: the priority for adding the second motion vector is higher than the priority for adding the zero-value motion vector.

[0215] The decoding vector determination module is configured to, if based on the number of available spaces, determine that the available spaces in the candidate motion vector list are sufficient to accommodate the first motion vector and the second motion vector, but insufficient to accommodate the zero-value motion vector, then determine not to add the zero-value motion vector according to the motion vector addition priority order; if based on the number of available spaces, determine that the available spaces in the candidate motion vector list are sufficient to accommodate the first motion vector, the second motion vector, and the zero-value motion vector, then determine to add the zero-value motion vector.

[0216] Optionally, the decoding vector addition module is configured to determine whether the size of the current block is less than or equal to the encoding block size threshold before adding the zero-value motion vector to the candidate motion vector list. If yes, the module proceeds to the step of adding the zero-value motion vector to the candidate motion vector list. If no, and based on the number of free spaces, it is determined that the free spaces in the candidate motion vector list are sufficient to accommodate new motion vectors, then any two candidate motion vectors are selected from the candidate motion vector list, and a third motion vector is obtained based on the recombination of the components of the any two candidate motion vectors. The third motion vector is then added to the candidate motion vector list.

[0217] Optionally, the apparatus further includes a zero-value vector addition module, configured to add a zero-value motion vector to the candidate motion vector list if there are still free slots in the candidate motion vector list when a third motion vector is added to the candidate motion vector list.

[0218] Optionally, the decoding vector addition module is configured to determine whether the difference between the recombined motion vector and the candidate motion vectors in the candidate motion vector list is within a preset difference threshold range before adding the recombined motion vector to the candidate motion vector list. If so, it is determined to add the recombined motion vector to the candidate motion vector list.

[0219] Optionally, the apparatus further includes a reconstruction module configured to reconstruct the current block using the candidate motion vector list after the decoding vector addition module adds motion vectors to the candidate motion vector list.

[0220] The above is a schematic scheme of a motion vector processing device according to this embodiment. It should be noted that the technical solution of this motion vector processing device and the technical solution of the motion vector processing method described above belong to the same concept. For details not described in detail in the technical solution of the motion vector processing device, please refer to the description of the technical solution of the motion vector processing method described above.

[0221] Corresponding to the above method embodiments, this specification also provides another embodiment of a motion vector processing device. Figure 10 A schematic diagram of a motion vector processing device according to another embodiment of this specification is shown. Figure 10 As shown, the device includes:

[0222] The encoding list acquisition module 1002 is configured to acquire a list of candidate motion vectors for the current block of the video to be encoded;

[0223] The component range determination module 1004 is configured to determine the maximum and minimum values ​​of the components of the candidate motion vectors in the candidate motion vector list in different component directions, and to determine the movement range of the candidate motion vectors in the candidate motion vector list in different component directions based on the maximum and minimum values ​​of the components in different component directions.

[0224] The component extraction module 1006 is configured to extract new components in different component directions from the movement range in different component directions according to the component extraction strategy, and combine the new components in different component directions to obtain the fourth motion vector.

[0225] The encoding vector addition module 1008 is configured to add the fourth motion vector to the candidate motion vector list.

[0226] Optionally, the component extraction module is configured to extract new components corresponding to the division points from the horizontal component direction of the movement range in a way that divides the movement range equally, and to extract new components corresponding to the division points from the vertical component direction of the movement range in a way that divides the movement range equally, and to combine the new components in the horizontal direction with the new components in the vertical direction to obtain the fourth motion vector.

[0227] Optionally, the apparatus further includes: a vector combination module configured to select any two candidate motion vectors from the candidate motion vector list, and obtain a fifth motion vector based on the recombination of the components of the arbitrary two candidate motion vectors; and an encoded vector addition module configured to add the fifth motion vector to the candidate motion vector list.

[0228] Optionally, the encoding vector adding module is configured to determine, before adding the fifth motion vector to the candidate motion vector list, whether the difference between the fifth motion vector and the candidate motion vectors in the candidate motion vector list is within a preset difference threshold range; if so, then determine to add the fifth motion vector to the candidate motion vector list.

[0229] Optionally, the encoded vector addition module is further configured to obtain a new sixth motion vector based on the pairwise average of the first two candidate motion vectors in the candidate motion vector list, and add the sixth motion vector to the candidate motion vector list.

[0230] Optionally, the apparatus further includes a motion estimation module configured to perform motion estimation on the current block using the candidate motion vector list after the vector addition module adds motion vectors to the candidate motion vector list.

[0231] The above is a schematic scheme of a motion vector processing device according to this embodiment. It should be noted that the technical solution of this motion vector processing device and the technical solution of the motion vector processing method described above belong to the same concept. For details not described in detail in the technical solution of the motion vector processing device, please refer to the description of the technical solution of the motion vector processing method described above.

[0232] Figure 11 A structural block diagram of a computing device 1100 according to one embodiment of this specification is shown. The components of the computing device 1100 include, but are not limited to, a memory 1110 and a processor 1120. The processor 1120 is connected to the memory 1110 via a bus 1130, and a database 1150 is used to store data.

[0233] The computing device 1100 also includes an access device 1140, which enables the computing device 1100 to communicate via one or more networks 1160. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 1140 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.

[0234] In one embodiment of this specification, the aforementioned components of the computing device 1100 and Figure 11 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 11 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0235] The computing device 1100 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 1100 can also be a mobile or stationary server.

[0236] The memory 1110 is used to store computer programs / instructions, and the processor 1120 is used to execute the computer programs / instructions stored in the memory 1110. When the computer programs / instructions are executed by the processor, they implement the steps of the methods described in any of the above embodiments.

[0237] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the technical solution of the method described in any of the above embodiments. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the method described in any of the above embodiments.

[0238] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the methods described in any of the above embodiments.

[0239] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solutions described in any of the above embodiments. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the method described in any of the above embodiments.

[0240] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the methods described in any of the above embodiments.

[0241] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the technical solution of the method described in any of the above embodiments. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solution of the method described in any of the above embodiments.

[0242] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0243] The computer program / instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0244] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0245] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0246] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A method of motion vector processing, the method comprising: include: Get the list of candidate motion vectors for the current block of the video to be decoded; Based on the number of available slots in the candidate motion vector list and the motion vector addition priority order, a target motion vector to be added is determined, wherein the number of target motion vectors to be added is less than or equal to the number of available slots, and the motion vector addition priority order includes the order of addition priorities of multiple motion vectors, wherein the motion vector with greater relevance to the current block has a higher addition priority; the target motion vector to be added is obtained and added to the candidate motion vector list, wherein the motion vector addition priority order includes: the addition priority of a first motion vector is higher than the addition priority of a second motion vector, the first motion vector is determined based on the pairwise average of the first two candidate motion vectors in the candidate motion vector list, and the second motion vector is determined based on the recombination of the components of the first two candidate motion vectors.

2. The method of claim 1, wherein, The step of determining the target motion vector to be added based on the number of free slots in the candidate motion vector list and the priority order for adding motion vectors includes: If, based on the number of available spaces, it is determined that the available spaces in the candidate motion vector list are sufficient to accommodate the first motion vector, but insufficient to accommodate both the first and second motion vectors, then, based on the priority order of adding motion vectors, it is determined that the first motion vector should be added first. If, based on the number of available spaces, it is determined that the list of candidate motion vectors has enough available spaces to accommodate the first motion vector and the second motion vector, then it is determined that the first motion vector and the second motion vector are added, with the second motion vector positioned before the first motion vector.

3. The method of claim 2, wherein, The priority order for adding motion vectors includes: the priority for adding the second motion vector is higher than the priority for adding the zero-value motion vector. Based on the number of available slots in the candidate motion vector list and the priority order for adding motion vectors, the target motion vector to be added is determined, including: If, based on the number of available spaces, it is determined that the available spaces in the candidate motion vector list are sufficient to accommodate the first motion vector and the second motion vector, but insufficient to accommodate the zero-value motion vector, then based on the priority order of adding motion vectors, it is determined that the zero-value motion vector will not be added. If, based on the number of available spaces, it is determined that the list of candidate motion vectors has enough available spaces to accommodate the first motion vector, the second motion vector, and the zero-value motion vector, then it is determined that the zero-value motion vector will be added.

4. The method of claim 3, wherein, Before adding the zero-value motion vector to the candidate motion vector list, the method further includes: Determine whether the size of the current block is less than or equal to the encoding block size threshold; If so, proceed to the step of adding the zero-value motion vector to the candidate motion vector list; If not, and based on the number of available spaces, it is determined that the available spaces in the candidate motion vector list are sufficient to accommodate new motion vectors, then any two candidate motion vectors are selected from the candidate motion vector list, and a third motion vector is obtained based on the recombination of the components of the any two candidate motion vectors, and the third motion vector is added to the candidate motion vector list.

5. The method of claim 4, wherein, Also includes: If a third motion vector is added to the candidate motion vector list, and there are still empty slots in the candidate motion vector list, then a zero-value motion vector is added to the candidate motion vector list.

6. The method according to claim 2 or 4, characterized in that, Before adding the recombined motion vectors to the candidate motion vector list, the following steps are also included: Determine whether the difference between the recombined motion vector and the candidate motion vector in the candidate motion vector list is within a preset difference threshold range; If so, then determine to add the recombined motion vector to the candidate motion vector list.

7. The method of claim 1, wherein, After adding motion vectors to the candidate motion vector list, the following is also included: The current block is reconstructed using the candidate motion vector list.

8. A motion vector processing apparatus, characterized by comprising: include: The decoding list acquisition module is configured to acquire a list of candidate motion vectors for the current block of the video to be decoded; The decoding vector determination module is configured to determine the target motion vector to be added based on the number of free slots in the candidate motion vector list and the motion vector addition priority order, wherein the number of target motion vectors to be added is less than or equal to the number of free slots, and the motion vector addition priority order includes the order of addition priorities of multiple motion vectors, wherein the motion vector with greater relevance to the current block has a higher addition priority, and the motion vector addition priority order includes: the addition priority of a first motion vector is higher than the addition priority of a second motion vector, the first motion vector is determined based on the pairwise average of the first two candidate motion vectors in the candidate motion vector list, and the second motion vector is determined based on the recombination of the components of the first two candidate motion vectors; The decoding vector addition module is configured to obtain the target motion vector to be added and add the target motion vector to the candidate motion vector list.

9. A computing device, comprising: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program / instructions that, when executed by a processor, implement the steps of the method described in any one of claims 1 to 7.

11. A computer program product, characterised in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Motion vector acquisition method and related prediction method and device

    CN110636311A