Optimal motion vector determination method and apparatus, and device and storage medium

By using the early termination method and a binary classification network model in video encoding, the computational complexity of GPM-MMVD is reduced, and the problem of excessive computational complexity in the prior art is solved, and the optimal motion vector prediction in low latency and high transmission efficiency scenarios is achieved.

WO2025167303A1PCT designated stage Publication Date: 2025-08-14ZTE CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/137689
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-08
Filing Date
2024-12-09
Publication Date
2025-08-14

AI Technical Summary

Technical Problem

The existing GPM-MMVD method has too high computational complexity in video encoding, resulting in unfriendly areas of low latency and real-time transmission. Especially in scenarios such as game broadcasting and online live broadcasting, the existing technology lacks fast algorithms.

Method used

The early termination method is used to traverse part of the search direction, and combined with the binary classification network model, the rate distortion optimization cost is calculated only in part of the search direction. By obtaining and comparing the RDO cost of part of the search direction, the optimal motion vector is determined, and the calculation complexity is reduced.

Benefits of technology

It effectively reduces the computational complexity of GPM-MMVD and improves the prediction efficiency of the optimal motion vector. It is suitable for video encoding scenarios with low latency and high transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024137689_14082025_PF_FP_ABST
    Figure CN2024137689_14082025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are an optimal motion vector (MV) determination method and apparatus, and a device and a storage medium. The optimal MV determination method comprises: acquiring a first direction set, wherein the first direction set comprises some search directions in a preset direction set; determining the rate distortion optimization (RDO) cost of a target pixel block in each search direction in the first direction set, so as to obtain a plurality of first RDO costs; and when the plurality of first RDO costs are all greater than or equal to an initial RDO cost corresponding to an initial MV of the target pixel block, using the initial MV as an optimal MV of the target pixel block.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, equipment and storage medium for determining optimal motion vector

[0001] This disclosure claims priority to Chinese patent application No. 202410177374.4, filed on February 8, 2024, the entire contents of which are incorporated herein by reference. Technical Field

[0002] The present disclosure relates to the field of video coding technology, and in particular to a method and apparatus for determining an optimal motion vector, a device, and a storage medium. Background Art

[0003] As video scenes become more diverse, the amount of video data also increases. In order to improve the transmission efficiency of video, it is usually necessary to perform video encoding processes such as acquisition, prediction, transformation and entropy coding on video data to reduce the amount of video data.

[0004] Currently, predictive coding modes for video images generally include the conventional Merge mode, the Merge with Motion Vector Difference (MMVD) mode applied to the Merge mode, and the Geometric Partitioning Mode (GPM-MMVD) mode, which applies MMVD to the GPM mode. The predictive coding process for video images requires predicting the optimal motion vector (MV) for the current pixel block, and then performing encoding based on this optimal motion vector. Summary of the Invention

[0005] Embodiments of the present disclosure provide a method, apparatus, device, and storage medium for determining an optimal motion vector.

[0006] In one aspect, a method for determining an optimal motion vector is provided. The method includes: obtaining a first direction set, the first direction set including some search directions in a preset direction set; determining a rate distortion optimization (RDO) cost of each search direction in the first direction set for a target pixel block to obtain multiple first RDO costs; and if the multiple first RDO costs are all greater than or equal to an initial RDO cost corresponding to an initial motion vector MV of the target pixel block, using the initial MV as the optimal MV of the target pixel block.

[0007] On the other hand, a device for determining an optimal motion vector is provided. The device includes: an acquisition module and a processing module.

[0008] An acquisition module is configured to acquire a first direction set, the first direction set including some search directions in a preset direction set. A processing module is configured to determine a rate-distortion optimization (RDO) cost for each search direction of a target pixel block in the first direction set to obtain a plurality of first RDO costs. The processing module is further configured to, if all of the plurality of first RDO costs are greater than or equal to an initial RDO cost corresponding to an initial motion vector MV of the target pixel block, select the initial MV as the optimal MV for the target pixel block.

[0009] In yet another aspect, a network device is provided, comprising: a memory and a processor. The memory and the processor are coupled. The memory is configured to store a computer program. When the processor executes the computer program, the method for determining an optimal motion vector according to any one of the above aspects or embodiments thereof is implemented.

[0010] On the other hand, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method for determining the optimal motion vector according to any one of the above aspects or embodiments thereof is implemented.

[0011] On the other hand, a computer program product is provided, which includes computer program instructions, and when the computer program instructions are executed by a processor, the method for determining the optimal motion vector according to any one of the above aspects or embodiments thereof is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the present disclosure, the following briefly introduces the drawings required for use in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0013] FIG1 is a framework flow chart of a video encoding method provided by some embodiments of the present disclosure;

[0014] FIG2 is a schematic diagram of a system architecture of an electronic device provided by some embodiments of the present disclosure;

[0015] FIG3 is a flow chart of a method for determining an optimal motion vector provided by some embodiments of the present disclosure;

[0016] FIG4 is a flow chart of another method for determining an optimal motion vector provided by some embodiments of the present disclosure;

[0017] FIG5 is a schematic diagram illustrating an example of a method for determining an optimal motion vector provided by some embodiments of the present disclosure;

[0018] FIG6 is a schematic structural diagram of an apparatus for determining an optimal motion vector according to some embodiments of the present disclosure;

[0019] FIG7 is a schematic structural diagram of a device for determining an optimal motion vector provided by some embodiments of the present disclosure. DETAILED DESCRIPTION

[0020] The following will clearly and completely describe the technical solutions of this disclosure in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this disclosure, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of this disclosure without making any creative efforts shall fall within the scope of protection of this disclosure.

[0021] It should be noted that in this disclosure, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this disclosure as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts by way of example.

[0022] In the following, the terms "first," "second," etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the quantity of the technical features indicated. Therefore, a feature specified as "first," "second," etc. may explicitly or implicitly include one or more of the features.

[0023] In the description of this disclosure, unless otherwise specified, " / " means "or." For example, A / B can mean A or B. "And / or" herein is simply a description of an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: only A, only B, and A and B. Furthermore, "at least one" means one or more, and "a plurality" means two or more.

[0024] Before introducing in detail the method for determining the optimal motion vector provided by the embodiment of the present disclosure, the implementation environment and application scenarios of the embodiment of the present disclosure are first introduced.

[0025] First, the application scenarios of the embodiments of the present disclosure are introduced.

[0026] As video scenes become increasingly diverse, traditional square coding units (CUs) are no longer able to accurately predict the image. This is why GPM was developed. GPM allows for multi-angle segmentation, which adapts to more complex textures and allows for better encoding of certain areas. GPM-MMVD applies MMVD to the GPM model, aiming to further improve MV accuracy, resulting in more accurate predicted images and smaller residuals for encoding.

[0027] In the video coding framework flow chart shown in Figure 1, the original luminance and chrominance (YUV) image (or video) can be coded and compressed through several key functional modules: prediction, transform, quantization, entropy coding, rate control, and post-processing. Image (or video) coding and compression are primarily implemented from two perspectives: temporal redundancy and spatial redundancy. For example, temporal redundancy is achieved by comparing the similarities and differences between two frames over time and transmitting the differences between them, primarily through the inter-frame prediction module. Spatial redundancy is achieved by coding and compressing data within the same frame, primarily through the intra-frame prediction module. The difference between the predicted reconstructed image and the original image, or residual, is transformed and quantized to further reduce redundancy, and then binary encoded through entropy coding. Finally, post-processing modules such as deblocking filtering and sample adaptive offset are used to eliminate blocking artifacts.

[0028] However, the latest generation of enhanced compression model (ECM) video coding uses the GPM technology from the previous generation versatile video coding (VVC) to specifically address the issue of inaccurate prediction for some square CUs. In ECM, a fast machine learning-based geometric partitioning mode with merge motion vector differences (GPM-MMVD) is used to further optimize GPM. However, the high complexity of GPM-MMVD significantly increases the complexity of this part.

[0029] In other words, there's no fast algorithm for GPM-MMVD. Existing GPM-MMVD is extremely complex due to its eight search directions, nine candidate distances, and the traversal of a total of 72 candidate MVs. Both GPM partitions require traversing 72 candidate MVs, resulting in 144 combinations and 144 RDO cost calculations. This complexity is unsuitable for applications requiring low-latency, real-time transmission.

[0030] To address the aforementioned issues, embodiments of the present disclosure provide a method for determining an optimal motion vector. This method is applicable to scenarios where the optimal MV is determined in GPM-MMVD, such as game broadcasts and live webcasts, where low latency, high transmission efficiency, or a high number of GPM partitioning modes (i.e., high encoder complexity) are required. For example, an early termination method is employed for the eight search directions. The four candidate directions (upper, lower, left, and right) are first traversed. If a candidate direction with a low RDO cost is found among these four candidate directions, the remaining four candidate directions (upper left, upper right, lower left, and lower right) are traversed after these four candidate directions are traversed. During the traversal of the nine candidate distances for a particular candidate direction, relevant features are first extracted and input into a binary classification network. Based on the network output, only sub-pixels (1 / 4 pixel, 1 / 2 pixel) or whole pixels (1 pixel, 2 pixels, 3 pixels, 4 pixels, 6 pixels, 8 pixels, and 16 pixels) are traversed. In this way, most of the redundant RDO calculation process can be omitted, reducing the prediction complexity of determining the optimal MV in GPM-MMVD.

[0031] The implementation environment of the embodiments of the present disclosure is introduced below.

[0032] As shown in Figure 2, it is a schematic diagram of the system architecture of an electronic device provided in an embodiment of the present disclosure. The electronic device 200 may include: a prediction module 201, a transformation module 202, a quantization module 203, an encoding module 204, a control module 205 and a post-processing module 206.

[0033] The transform module 202 may divide the original YUV in the input image signal into coding tree units (CTUs), and perform luminance mapping, transformation and inverse transformation, scaling, and chroma scaling on the divided CTUs.

[0034] The prediction module 201 can perform inter-frame estimation, inter-frame prediction, intra-frame prediction, intra-frame / inter-frame joint prediction and motion estimation on the output result of the transformation module 202 through mode selection to obtain corresponding intra-frame prediction data and motion data.

[0035] The quantization module 203 may perform quantization processing on the output result of the transformation module 202 to obtain a corresponding quantization coefficient.

[0036] The post-processing module can perform inverse luminance mapping and loop filtering on the output of the transform module 202 through filter control analysis to obtain corresponding filter control data. The loop filtering process can be implemented based on a deblocking filter (DBF), sample adaptive offset (SAO), and / or an adaptive loop filter (ALF).

[0037] The control module 205 may perform rate control on the output result of the transformation module 202 to obtain corresponding rate control data.

[0038] Based on the rate control data, quantization coefficients, intra-frame prediction data, filter control data, and motion data from the aforementioned modules, the encoding module 204 generates a header-formatted bitstream using context-adaptive binary arithmetic coding (CABAC) entropy coding to achieve image signal encoding compression. Furthermore, the encoding module 204 can output a video signal by caching the decoded image.

[0039] In the embodiment of the present disclosure, the electronic device 200 can encode and compress the video through the video encoding framework process shown in Figure 1.

[0040] It should be noted that the embodiment of the present disclosure does not limit the electronic device 200. For example, the electronic device 200 may be a terminal, or the electronic device 200 may be a server.

[0041] The terminal may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook computer, or other device with transceiver functions. The embodiments of the present disclosure do not impose any particular restrictions on the specific form of the terminal. The terminal may interact with the user through one or more methods such as a keyboard, touchpad, touch screen, remote control, voice interaction, or handwriting device.

[0042] The server can be a single physical server, or a server cluster consisting of multiple servers. Alternatively, the server cluster can be a distributed cluster. Alternatively, the server can be a cloud server. The embodiments of this disclosure do not limit the specific implementation of the server.

[0043] After introducing the application scenario and implementation environment of the embodiment of the present disclosure, the method for determining the optimal motion vector provided by the embodiment of the present disclosure is described in detail below in combination with the above implementation environment.

[0044] The embodiment of the present disclosure provides a method for determining an optimal motion vector. As shown in FIG3 , the method for determining an optimal motion vector may include: S301 - S304 .

[0045] S301: Obtain a first direction set.

[0046] The first direction set includes some search directions in the preset direction set.

[0047] As a possible implementation manner, the preset direction set may include all search directions of GPM-MMVD.

[0048] That is to say, in the process of predictive coding of pixel blocks, predictive coding is performed by using the search direction of GPM-MMVD, aiming to further improve the MV accuracy of the pixel blocks, thereby obtaining more accurate prediction results and reducing the residual error of the pixel blocks in predictive coding.

[0049] It should be noted that, in the embodiment of the present disclosure, the search direction of the GPM-MMVD can be divided into a forward direction and an oblique direction.

[0050] As a possible implementation manner, the first direction set may include all forward directions in the preset direction set.

[0051] Exemplarily, all search directions of GPM-MMVD may include four forward directions: up, down, left, and right, and four oblique directions: upper left, upper right, lower left, and lower right. Then the first direction set may include four directions: up, down, left, and right.

[0052] It can be understood that when predicting a pixel block, the primary search direction (i.e., the forward direction) is selected from all search directions in GPM-MMVD to provide a reference for predicting the optimal MV of subsequent pixel blocks. This avoids calculating the RDO cost for the secondary search direction, omitting most of the redundant RDO cost calculation process in GPM-MMVD and reducing the computational complexity of GPM-MMVD.

[0053] As a possible implementation manner, the first direction set may be obtained by receiving a search direction in the first direction set input by a user.

[0054] As another possible implementation manner, the first direction set may be obtained from a storage space that pre-stores the first direction set.

[0055] That is, the embodiment of the present disclosure does not limit the method for obtaining the first direction set. In this way, the operability of obtaining the first direction set can be improved.

[0056] S302: Determine a rate-distortion optimization cost of the target pixel block in each search direction in the first direction set to obtain a plurality of first rate-distortion optimization costs.

[0057] As a possible implementation, multiple preset search distances are stored. Based on the first search direction in the first direction set and each preset search distance, an RDO cost of the target pixel block in the first search direction from among the multiple first RDO costs can be calculated to obtain multiple third RDO costs corresponding to the first search direction. Each third RDO cost corresponds to a preset search distance.

[0058] Exemplarily, the stored multiple preset search distances include: 1 pixel, 2 pixels, 3 pixels, 4 pixels, 6 pixels, and 8 pixels. If the first search direction is the lower left direction, multiple third RDO costs corresponding to the lower left direction can be determined: RDO cost A, RDO cost B, RDO cost C, RDO cost D, RDO cost E, and RDO cost F. RDO cost A is the RDO cost of the target pixel block in the lower left direction by 1 pixel, RDO cost B is the RDO cost of the target pixel block in the lower left direction by 2 pixels, RDO cost C is the RDO cost of the target pixel block in the lower left direction by 3 pixels, RDO cost D is the RDO cost of the target pixel block in the lower left direction by 4 pixels, RDO cost E is the RDO cost of the target pixel block in the lower left direction by 6 pixels, and RDO cost F is the RDO cost of the target pixel block in the lower left direction by 8 pixels.

[0059] It should be noted that when calculating the RDO cost for a pixel block in a search direction, the RDO cost is typically calculated based on each preset search distance in that search direction. That is, a search direction corresponds to multiple preset search distances, and each search distance contributes to the calculation of the RDO cost for that search direction. The number of RDO costs for a pixel block in a search direction is equal to the number of preset search distances in that search direction. This increases the computational complexity of the RDO cost when there are a large number of preset search distances, leading to a higher computational complexity for GPM-MMVD.

[0060] As a possible implementation, multiple pixel block feature information of a target pixel block in a target search direction can be obtained, and multiple target search distances in the target search direction can be determined based on the multiple pixel block feature information. Next, for each target search distance, a first RDO cost of the target pixel block in the target search direction and target search distance can be determined based on the target search distance and the target search direction to obtain multiple first RDO costs of the target pixel block in the target search direction. The target search direction is any search direction in the first direction set, and each target search distance corresponds to one first RDO cost.

[0061] It is understood that when calculating the RDO cost of a pixel block in each search direction, a portion of the search distances in the corresponding search direction can be selected based on the pixel block feature information in each search direction. Then, based on each search direction and the selected portion of the search distance in each search direction, the RDO cost of the pixel block in each search direction and the selected search distance is calculated. This reduces the computational complexity of the RDO cost of the pixel block and lowers the computational complexity of GPM-MMVD.

[0062] It should be noted that, in the embodiment of the present disclosure, the feature information of the multiple pixel blocks may include at least one of the following information: gradient value, standard deviation, and absolute error.

[0063] In other words, by obtaining characteristic information such as the gradient value, standard deviation, and absolute error of the sub-pixel blocks of a pixel block in a search direction, a reference can be provided for selecting a partial search distance in the search direction, thereby improving the accuracy of the selected search distance and providing an accurate RDO cost reference for the subsequent determination of the optimal MV of the pixel block.

[0064] As a possible implementation, a trained binary classification network model is deployed. In the process of determining multiple target search distances in a target search direction based on multiple pixel block feature information, the multiple pixel block feature information can be input into the trained binary classification network model to obtain multiple target search distances.

[0065] It can be understood that by training the binary classification network model, an association between pixel block feature information and search directions is established, providing a basis for subsequently selecting partial search distances for the pixel block in the search direction, thereby improving the accuracy of the selected search distances. Furthermore, since the binary classification network model outputs only two categories of results, the multiple search distances determined by the trained binary classification network model are all of the same type. This ensures that all RDO costs for a pixel block in a search direction are calculated based on the same type of search distance, thereby reducing the variability in the RDO costs of pixel blocks in the search direction.

[0066] It should be noted that, in the embodiment of the present disclosure, the multiple target search distances are all based on the integer pixel accuracy of GPM-MMVD, or the multiple target search distances are all based on the sub-pixel accuracy of GPM-MMVD.

[0067] That is, the type of search distance may be determined based on pixel accuracy.

[0068] S303: Determine whether there is a first rate-distortion optimization cost among the multiple first rate-distortion optimization costs that is smaller than the initial rate-distortion optimization cost corresponding to the initial motion vector of the target pixel block.

[0069] In some embodiments, if it is determined that the plurality of first RDO costs are all greater than or equal to the initial RDO cost, S304 is executed.

[0070] S304: Use the initial motion vector as the optimal motion vector of the target pixel block.

[0071] It is understood that when predictively encoding a pixel block, the RDO costs for some search directions in a preset set of directions can be first determined. Subsequently, the RDO costs for these search directions can be compared with the initial RDO costs corresponding to the initial MV of the pixel block. When the RDO costs for these search directions are all greater than or equal to the initial RDO costs, the initial MV of the pixel block is used as the optimal MV for the pixel block. This allows the optimal MV to be obtained by simply determining the RDO costs for some search directions. This reduces the computational effort required to calculate the RDO costs for the pixel block, thereby improving the efficiency of predicting the optimal MV for the pixel block.

[0072] In some embodiments, as shown in FIG. 4 , after S303 , when it is determined that there is a first RDO cost smaller than the initial RDO cost among the multiple first RDO costs, the method for determining the optimal motion vector may further include: S401 - S404 .

[0073] S401: Acquire a second direction set.

[0074] The second direction set includes at least one search direction in the preset direction set except the first direction set.

[0075] As a possible implementation manner, the second direction set may include all oblique directions in the preset direction set.

[0076] It can be understood that when it is determined that the main search direction selected in GPM-MMVD is difficult to provide a reference for the prediction of the optimal MV of the pixel block, the secondary search direction (i.e., the oblique direction) in GPM-MMVD can be selected to provide more references for the prediction of the optimal MV of the pixel block, so as to improve the accuracy of the predicted optimal MV of the pixel block.

[0077] S402: Determine a rate-distortion optimization cost of the target pixel block in each search direction in the second direction set to obtain a plurality of second rate-distortion optimization costs.

[0078] It should be noted that, for the process of determining the rate-distortion optimization cost of the target pixel block in each search direction in the second direction set to obtain multiple second rate-distortion optimization costs, reference can be made to the introduction of determining the first RDO cost of the target pixel block in S302 above, which will not be repeated here.

[0079] S403: Determine a target rate-distortion optimization cost from a plurality of first rate-distortion optimization costs and a plurality of second rate-distortion optimization costs.

[0080] The target RDO cost is the minimum RDO cost among the plurality of first RDO costs and the plurality of second RDO costs.

[0081] S404 : Determine the optimal motion vector of the target pixel block based on the search direction corresponding to the target rate-distortion optimization cost.

[0082] It is understandable that when some of the selected search directions are insufficient to provide a reference for predicting the optimal MV for a pixel block, the remaining search directions can be selected to provide more references for predicting the optimal MV for the pixel block, and the search direction with the lowest RDO cost among all the selected search directions can be used as the optimal MV for the pixel block. In this way, by performing RDO cost calculations on all search directions in batches, the computational complexity of the RDO costs for the pixel block can be reduced while ensuring the accuracy of predicting the optimal MV for the pixel block.

[0083] The following describes the method for determining the optimal motion vector provided by the embodiment of the present disclosure with reference to some examples. As shown in FIG5 , the candidate directions of the pixel block include 8 search directions, and each search direction has 9 candidate distances, for a total of 72 combinations.

[0084] For example, first traverse the four candidate directions of up, down, left, and right (i.e., the search directions in the first direction set);

[0085] When traversing each candidate direction, there are a total of 9 candidate distances to choose from. Relevant features (i.e., pixel block feature information) are extracted and input into the binary classification network (trained binary classification network model). Based on the network output, it is determined whether to traverse only sub-pixels (1 / 4 pixel, 1 / 2 pixel) or whole pixels (1 pixel, 2 pixels, 3 pixels, 4 pixels, 6 pixels, 8 pixels, 16 pixels).

[0086] If there is a direction among the four candidate directions of up, down, left, and right that makes the RDO cost lower (that is, there is a first RDO cost among the multiple first RDO costs that is smaller than the initial RDO cost), then continue to traverse the remaining four candidate directions of upper left, upper right, lower left, and lower right. Otherwise, terminate the traversal directly until the optimal candidate MV (that is, the best MV) is determined.

[0087] It is understood that the disclosed embodiments can effectively reduce encoding complexity while keeping decoding complexity unchanged, and at the same time, do not need to transmit corresponding indexes to the decoding end, thereby improving the prediction efficiency of the optimal MV of a pixel block.

[0088] It is understandable that, in order to achieve the above functions, the device for determining the optimal motion vector includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the algorithm steps of each example described in the embodiments of the present disclosure, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present disclosure.

[0089] The embodiment of the present disclosure can divide the functional modules of the optimal motion vector according to the above-mentioned method embodiment. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one functional module. The above-mentioned integrated module can be implemented in the form of hardware or software. It should be noted that the division of modules in the embodiment of the present disclosure is schematic and is only a logical functional division. In actual implementation, there may be other division methods. The following is an example of dividing each functional module corresponding to each function.

[0090] FIG6 is a schematic diagram of the structure of an apparatus for determining an optimal motion vector according to an embodiment of the present disclosure. Apparatus 600 for determining an optimal motion vector can execute the method for determining an optimal motion vector shown in FIG3 or FIG4 in the above-mentioned method embodiment. As shown in FIG6 , apparatus 600 for determining an optimal motion vector includes an acquisition module 601 and a processing module 602.

[0091] An acquisition module 601 is configured to acquire a first direction set, the first direction set including some search directions from a preset direction set. A processing module 602 is configured to determine a rate-distortion optimization (RDO) cost for each search direction in the first direction set for a target pixel block, thereby obtaining multiple first RDO costs. Processing module 602 is further configured to, if all of the multiple first RDO costs are greater than or equal to the initial RDO cost corresponding to the initial motion vector MV of the target pixel block, select the initial MV as the optimal MV for the target pixel block.

[0092] In some embodiments, the acquisition module 601 is further configured to, when a first RDO cost less than the initial RDO cost exists among the multiple first RDO costs, acquire a second direction set, the second direction set including at least one search direction in the preset direction set other than the first direction set. The processing module 602 is further configured to determine the RDO cost of each search direction of the target pixel block in the second direction set to obtain multiple second RDO costs. The processing module 602 is further configured to determine a target RDO cost from the multiple first RDO costs and the multiple second RDO costs, the target RDO cost being the minimum RDO cost among the multiple first RDO costs and the multiple second RDO costs. The processing module 602 is further configured to determine an optimal MV for the target pixel block based on the search direction corresponding to the target RDO cost.

[0093] In some embodiments, the acquisition module 601 may be configured to acquire multiple pixel block feature information of a target pixel block in a target search direction, where the target search direction is any search direction in a first direction set. The processing module 602 may be further configured to determine multiple target search distances in the target search direction based on the multiple pixel block feature information. The processing module 602 may also be configured to determine a first RDO cost for the target pixel block in the target search direction and the target search distance based on the target search distance and the target search direction.

[0094] In some embodiments, the processing module 602 can be used to input feature information of multiple pixel blocks into a trained binary classification network model to obtain multiple target search distances.

[0095] In some embodiments, the multiple target search distances are all integer pixel precisions of the geometric partitioning mode GPM-MMVD based on motion vector offset, or the multiple target search distances are all fractional pixel precisions of GPM-MMVD.

[0096] In some embodiments, the plurality of pixel block feature information includes at least one of the following information: gradient value, standard deviation, and absolute error.

[0097] In some embodiments, the preset direction set includes all search directions of GPM-MMVD.

[0098] In some embodiments, the first direction set may include all forward directions in the preset direction set, and the second direction set may include all oblique directions in the preset direction set.

[0099] When the functions of the aforementioned integrated modules are implemented in hardware, the disclosed embodiments provide another possible network device structure for the apparatus for determining the optimal motion vector involved in the aforementioned embodiments. As shown in Figure 7 , the apparatus for determining the optimal motion vector 700 includes a processor 702 and a bus 704. In some embodiments, the apparatus for determining the optimal motion vector 700 may also include a memory 701; in some embodiments, the apparatus for determining the optimal motion vector 700 may also include a communication interface 703.

[0100] Processor 702 can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of this disclosure. Processor 702 can be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof, and can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the embodiments of this disclosure. Processor 702 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0101] The communication interface 703 is used to connect to other devices via a communication network, such as Ethernet, wireless access network, wireless local area network (WLAN), etc.

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

[0103] As a possible implementation, the memory 701 may exist independently of the processor 702. The memory 701 may be connected to the processor 702 via a bus 704 and used to store instructions or program codes. When the processor 702 calls and executes the instructions or program codes stored in the memory 701, the method for determining the optimal motion vector provided in the embodiment of the present disclosure can be implemented.

[0104] In another possible implementation, the memory 701 and the processor 702 may also be integrated together.

[0105] Bus 704 can be an Extended Industry Standard Architecture (EISA) bus, etc. Bus 704 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG7 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0106] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method for determining the optimal motion vector as described in any of the above embodiments.

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

[0108] An embodiment of the present disclosure provides a computer program product comprising instructions. When the computer program product is run on a computer, the computer is enabled to execute the method for determining the optimal motion vector described in any one of the above embodiments.

[0109] The above is only a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or replacements within the technical scope disclosed in the present disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A method for determining an optimal motion vector, comprising: Acquire a first direction set, where the first direction set includes some search directions in a preset direction set; determining a rate-distortion optimization (RDO) cost of the target pixel block in each search direction in the first direction set to obtain a plurality of first RDO costs; In a case where the plurality of first RDO costs are all greater than or equal to the initial RDO cost corresponding to the initial motion vector MV of the target pixel block, the initial MV is used as the optimal MV of the target pixel block.

2. The method according to claim 1, further comprising: When there is a first RDO cost less than the initial RDO cost among the multiple first RDO costs, acquiring a second direction set, where the second direction set includes at least one search direction in the preset direction set except the first direction set; determining an RDO cost of the target pixel block in each search direction in the second direction set to obtain a plurality of second RDO costs; determining a target RDO cost from the plurality of first RDO costs and the plurality of second RDO costs, the target RDO cost being a minimum RDO cost among the plurality of first RDO costs and the plurality of second RDO costs; An optimal MV of the target pixel block is determined based on a search direction corresponding to the target RDO cost.

3. The method according to claim 1, wherein Determining the RDO cost of the target pixel block in each search direction in the first direction set to obtain a plurality of first RDO costs includes: Acquire feature information of multiple pixel blocks of the target pixel block in a target search direction, where the target search direction is any search direction in the first direction set; determining a plurality of target search distances in the target search direction according to the plurality of pixel block feature information; According to the target search distance and the target search direction among the multiple target search distances, a first RDO cost of the target pixel block under the target search direction and the target search distance is determined.

4. The method according to claim 3, wherein: The determining the multiple target search distances according to the multiple pixel block feature information includes: The plurality of pixel block feature information is input into a trained binary classification network model to obtain the plurality of target search distances.

5. The method according to claim 4, wherein The multiple target search distances are all integer pixel precisions of the geometric partitioning mode GPM-MMVD based on motion vector offset, or, The multiple target search distances are all at the sub-pixel accuracy of GPM-MMVD.

6. The method according to claim 3, wherein: The plurality of pixel block feature information includes at least one of the following information: gradient value, standard deviation, and absolute error sum.

7. The method according to claim 1, wherein The preset direction set includes all search directions of GPM-MMVD.

8. The method according to claim 1, wherein The first direction set includes all forward directions in the preset direction set, and the second direction set includes all oblique directions in the preset direction set.

9. An electronic device comprising: memory and processor; The memory is coupled to the processor; The memory is used to store instructions executable by the processor; When the processor executes the instructions, the method according to any one of claims 1 to 8 is performed.

10. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer instructions, which, when executed on a computer, enable the computer to perform the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and device for determining optimal motion vector, equipment and storage medium

    CN120455706A

  • Motion estimation method and device in video encoding, electronic equipment and storage medium

    CN109660799A

  • Intra-frame fast coding method based on VVC

    CN116233420A

  • Motion estimation method in coding process and related product

    CN116567267A

  • Device for reducing encoding amount in fractal image compression

    JP2006067300A