Motion estimation methods, devices, equipment, storage media, and computer program products

By employing a multi-step search strategy in video compression, the problem of high computational complexity is solved, achieving more efficient video compression and reduced hardware power consumption.

CN114449294BActive Publication Date: 2026-06-02SHENZHEN AIXIESHENG TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN AIXIESHENG TECH CO LTD
Filing Date
2022-02-15
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies employ exhaustive search strategies in video compression, resulting in high computational complexity, hindering real-time transmission of compressed display streams, and increasing hardware power consumption.

Method used

By employing a multi-step search strategy in the motion estimation method, the number of search points is gradually reduced, including searches with first, second, and third steps, to determine the target search point for vector calculation.

Benefits of technology

It reduces the computational complexity of motion estimation for coded sub-blocks, improves search speed and efficiency, and reduces the energy consumption of hardware circuits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114449294B_ABST
    Figure CN114449294B_ABST
Patent Text Reader

Abstract

This application relates to a motion estimation method, apparatus, computer device, storage medium, and computer program product. The method includes: acquiring a coded sub-block and a starting search point in a current coded block; searching with the starting search point as the center and using a first step length to obtain a first search point; determining a preset number of second search points according to the distortion values ​​of the first search points from smallest to largest; searching with each of the second search points as the center and using a second step length to obtain a third search point; the second step length is smaller than the first step length; and determining a target search point based on the distortion value of the third search point, wherein the target search point is used to calculate the vector between itself and the coded sub-block. This application significantly reduces the number of search positions for motion estimation of the coded sub-block by searching with a decreasing number of search points, thereby reducing the computational complexity of motion estimation for the coded sub-block and improving the search speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video compression technology, and in particular to a motion estimation method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the rapid development of mobile internet, cloud media, and virtual / augmented reality (VR / AR) applications, and the continuous improvement of video display resolution / dynamic range, various display terminals have placed higher demands on the data transmission bandwidth of the display link. To alleviate the contradiction between the increasing physical bandwidth of the display link and actual needs, the Video Electronics Standards Association (VESA) released a new Display Stream Compression (DSC) standard in 2014. It is a lightweight, low-cost, and visually lossless image coding standard suitable for display links. In 2019, VESA launched the latest VESA Display Compression-M, or VDC-M for mobile devices. VDC-M can be considered an upgrade to DSC, increasing the compression ratio from 2:1 or 3:1 to 4:1 or 5:1.

[0003] To achieve low-cost, visually lossless, and efficient video compression in the display link, VDC-M employs many advanced compression coding tools, such as Block Prediction (BP). Traditional techniques typically use an exhaustive search strategy, which searches for the optimal search position from all search points. This method can effectively improve the efficiency of compression coding, but it leads to high computational complexity. Summary of the Invention

[0004] Therefore, it is necessary to provide a motion estimation method, apparatus, computer device, computer-readable storage medium, and computer program product that can reduce computational complexity in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a motion estimation method. The method includes:

[0006] Get the encoded sub-blocks and the starting search point in the current encoded block;

[0007] Using the starting search point as the center, and employing a first step length for searching, the first search point is obtained;

[0008] A preset number of second search points are determined based on the distortion value of the first search point, from smallest to largest.

[0009] Using each second search point as the center, a search is performed with a second step size to obtain a third search point; the second step size is smaller than the first step size.

[0010] The target search point is determined based on the distortion value of the third search point, and the target search point is used to calculate the vector between the target search point and the coded sub-block.

[0011] In one embodiment, determining the target search point based on the distortion value of the third search point includes:

[0012] The third search point with the smallest distortion value is selected as the candidate search point;

[0013] Centered on the candidate search point, search the left and right positions of the candidate search point using a third step length as the interval; the third step length is less than the second step length.

[0014] The point with the smallest distortion value between the two positions to the left and right of the candidate search point is selected as the target search point.

[0015] In one embodiment, the preset quantity is at least two.

[0016] In one embodiment, the preset quantity is 1, and the step of searching with a second step size centered on each of the second search points to obtain the third search point includes:

[0017] Using the second search point as the center, search the two positions to the left and right of the second search point at intervals of the second step size to obtain two third search points;

[0018] The step of determining the target search point based on the distortion value of the third search point includes:

[0019] The third search point with the smaller distortion value among the two third search points is selected as the target search point.

[0020] In one embodiment, the second step length is half the length of the first step.

[0021] In one embodiment, the distortion value of the search point is calculated as follows:

[0022] Calculate the difference between each pixel in the coded sub-block and the same color component of the corresponding search point;

[0023] The absolute values ​​of the differences of the same color component are summed to obtain the median value of the color component.

[0024] The intermediate values ​​corresponding to each color component are summed to obtain the distortion value corresponding to the search point.

[0025] Secondly, this application also provides a motion estimation device. The device includes:

[0026] The acquisition module is used to acquire the encoded sub-blocks and the starting search point in the current encoded block;

[0027] The first search module is used to search with the starting search point as the center and using a first step length to obtain the first search point;

[0028] The first determining module is used to determine a preset number of second search points according to the distortion value of the first search point from smallest to largest.

[0029] The second search module is used to search for a third search point by taking each second search point as the center and using a second step size; the second step size is smaller than the first step size.

[0030] The second determining module is used to determine the target search point based on the distortion value of the third search point, wherein the target search point is used to calculate the vector between the target search point and the coded sub-block.

[0031] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0032] Get the encoded sub-blocks and the starting search point in the current encoded block;

[0033] Using the starting search point as the center, and employing a first step length for searching, the first search point is obtained;

[0034] A preset number of second search points are determined based on the distortion value of the first search point, from smallest to largest.

[0035] Using each second search point as the center, a search is performed with a second step size to obtain a third search point; the second step size is smaller than the first step size.

[0036] The target search point is determined based on the distortion value of the third search point, and the target search point is used to calculate the vector between the target search point and the coded sub-block.

[0037] Fourthly, this application also provides a computer-readable storage medium. The computer storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0038] Get the encoded sub-blocks and the starting search point in the current encoded block;

[0039] Using the starting search point as the center, and employing a first step length for searching, the first search point is obtained;

[0040] A preset number of second search points are determined based on the distortion value of the first search point, from smallest to largest.

[0041] Using each second search point as the center, a search is performed with a second step size to obtain a third search point; the second step size is smaller than the first step size.

[0042] The target search point is determined based on the distortion value of the third search point, and the target search point is used to calculate the vector between the target search point and the coded sub-block.

[0043] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0044] Get the encoded sub-blocks and the starting search point in the current encoded block;

[0045] Using the starting search point as the center, and employing a first step length for searching, the first search point is obtained;

[0046] A preset number of second search points are determined based on the distortion value of the first search point, from smallest to largest.

[0047] Using each second search point as the center, a search is performed with a second step size to obtain a third search point; the second step size is smaller than the first step size.

[0048] The target search point is determined based on the distortion value of the third search point, and the target search point is used to calculate the vector between the target search point and the coded sub-block.

[0049] The aforementioned motion estimation method, apparatus, computer equipment, storage medium, and computer program product acquire the coded sub-blocks and starting search point in the current coded block; perform a search with the starting search point as the center and a first step length to obtain a first search point; determine a preset number of second search points according to the distortion values ​​of the first search points from smallest to largest; perform a search with each second search point as the center and a second step length to obtain a third search point; the second step length is smaller than the first step length; and determine a target search point based on the distortion value of the third search point, the target search point being used to calculate the vector between the target search point and the coded sub-block. This application significantly reduces the number of search positions for motion estimation of the coded sub-block by searching with a decreasing number of search points, thereby reducing the computational complexity of motion estimation for the coded sub-block and improving the search speed. Attached Figure Description

[0050] Figure 1 This is a diagram illustrating the application environment of the motion estimation method in one embodiment;

[0051] Figure 2This is a flowchart illustrating the motion estimation method in one embodiment;

[0052] Figure 3 This is a schematic diagram of the full search for search points in VDC-M motion estimation;

[0053] Figure 4 This is a flowchart illustrating step 210 in one embodiment;

[0054] Figure 5 This is a flowchart illustrating the method for calculating the distortion value of a search point in one embodiment;

[0055] Figure 6 This is a flowchart illustrating the motion estimation method in another embodiment;

[0056] Figure 7 This is a structural block diagram of a motion estimation device in one embodiment;

[0057] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0059] The motion estimation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Terminal 102 receives a video or image and sends it to the server. The server selects a preset encoding block in each frame of the video or image and obtains the encoding sub-block and starting search point within the current encoding block. It then determines a preset number of second search points based on the distortion value of the first search point, from smallest to largest. Using each second search point as the center, it performs a search with a second step size to obtain a third search point. The second step size is smaller than the first step size. Based on the distortion value of the third search point, it determines a target search point, which is used to calculate the vector between the target search point and the encoding sub-block.

[0060] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0061] It is understood that the motion estimation method provided in this application embodiment can also be applied to application scenarios with a single terminal or a single server.

[0062] Motion estimation is a widely used technique in video coding. Because there is significant information redundancy between original video images, motion estimation and motion compensation techniques are needed to eliminate this redundancy and improve coding efficiency. Motion estimation refers to calculating the motion vector between the current frame and a reference frame during compression coding. Motion compensation is the process of recovering the next frame based on the motion vector and the current frame during decoding. In inter-frame predictive coding, since there is a certain correlation between objects in neighboring frames of a moving image, the moving image can be divided into several blocks or macroblocks. The position of each block or macroblock in neighboring frames is then searched, and the relative spatial offset between them is calculated. This relative offset is what is commonly referred to as the motion vector, and the process of obtaining the motion vector is called motion estimation.

[0063] VESA has developed a new display interface compression standard for mobile / smartphone displays, called VESA Display Compression-M (VDC-M). As a new display compression standard, VDC-M aims for a higher compression ratio than Display Stream Compression (DSC) while maintaining lossless visual quality, but at the cost of increased complexity. VDC-M is a fixed-bitrate display stream codec with a fixed bit rate and can support compression ratios as low as 6 bits per pixel for RGB 4:4:4 sources. VDC-M is a block-based codec with a block size of 8 × 2 pixels.

[0064] To achieve low-cost, visually lossless, and efficient video compression in the display link, VDC-M employs many advanced compression coding tools, such as Block Prediction (BP). BP divides the coded block into 2x2 and 2x1 sub-blocks. For example, an 8x2 coded block can be divided into four 2x2 or eight 2x1 sub-blocks. Each 2x2 or 2x1 sub-block performs motion estimation at 64 positions relative to the adjacent encoded pixels of the current coded block, selecting the optimal position as the optimal prediction position for the sub-block, thus eliminating spatial information redundancy. During motion estimation for each 2x2 or 2x1 sub-block, to obtain the optimal prediction, the distortion values ​​of 64 positions need to be calculated, and then the position with the smallest distortion value is selected as the optimal search position. This exhaustive search strategy effectively improves the efficiency of compression coding, but it also introduces considerable computational complexity. It severely hinders the real-time transmission of the compressed display stream and increases the energy consumption of its hardware circuitry.

[0065] In one embodiment, such as Figure 2 As shown, a motion estimation method is provided, which can be applied to... Figure 1 Taking a server or terminal as an example, the following steps are included:

[0066] Step 202: Obtain the encoded sub-blocks and the starting search point in the current encoded block.

[0067] For any frame in a video, the frame can be divided into multiple coded blocks, and each coded block can be further divided into multiple coded sub-blocks. Each coded block can be divided into multiple sub-blocks of the same size, or into multiple sub-blocks of different sizes. For example, in a VDC-M encoder, where the coded block size is 8*2 pixels, a coded block can be divided into four 2x2 sub-blocks or eight 2x1 sub-blocks. Motion estimation is performed on a block-by-block basis; that is, when an optimal search position is found for one coded block, the search proceeds to the next coded block. The coded block currently undergoing motion estimation is designated as the current coded block.

[0068] In this embodiment, the starting search point is determined based on the position of the coded block, or it can be determined based on the position of the coded sub-blocks within the coded block. During motion estimation, a single starting search point can be determined for each coded block, meaning all coded sub-blocks within the coded block share the same starting search point; alternatively, different starting search points can be determined for different coded sub-blocks within the coded block. In one possible implementation, a preset number of locations closest to the coded block can be selected as candidate search points. The distortion value between each candidate search point and the coded sub-block is calculated, and the candidate search point with the smallest distortion value is selected as the starting search point for that coded sub-block; that is, each coded sub-block corresponds to one starting search point. In this embodiment, selecting a corresponding starting search point for each coded sub-block improves the accuracy of the starting search point selection, further enhancing the accuracy of motion estimation. In another possible implementation, a preset number of locations closest to the coded block can be selected as candidate search points. The distortion value between each candidate search point and the coded block is calculated, and the candidate search point with the smallest distortion value is selected as the starting search point; that is, all coded sub-blocks within the coded block correspond to the same starting search point. In this embodiment, each coded sub-block in the same coded block corresponds to the same starting search point, which can reduce computational complexity.

[0069] Step 204: Using the starting search point as the center, perform a search using the first step length to obtain the first search point.

[0070] In this embodiment, the server can use the starting search point as the center and perform a search using a first step length to obtain a first search point. The number of first search points is at least one. The search direction includes at least one of horizontal search, vertical search, and diagonal search. For example, in the full search for fast motion estimation in VDC-M, such as... Figure 3 As shown, the starting search point (0 pixels in the diagram) performs a horizontal search of 32 points from the top of the coded block and another 32 points from the left. The first step length can be set according to requirements. The first step length is greater than 0 and less than the maximum number of searchable points minus 1. For example, in VDC-M motion estimation, a maximum of 64 points can be searched, so the first step length N is greater than 0 and less than 63. Using the first step length for searching can be understood as obtaining the search points after a one-step interval from the starting search point.

[0071] Step 206: Determine a preset number of second search points according to the distortion value of the first search point from smallest to largest.

[0072] The distortion value between the first search point and the current coded sub-block is calculated, and a preset number of second search points are determined according to the distortion values, from smallest to largest. The preset number can be set based on the maximum number of searchable points; generally, the more searchable points, the larger the preset number can be. For example, in VDC-M motion estimation with a maximum of 64 searchable points, the preset number can be 3. The distortion value characterizes the similarity between the first search point and the coded sub-block. The smaller the distortion value, the greater the similarity between the corresponding first search point and the coded sub-block, meaning that the first search point is more likely to be the optimal search point and serve as the starting point for the next search or the calculation benchmark for the motion vector.

[0073] Step 208: Using each second search point as the center, perform a search using a second step length to obtain a third search point; wherein the second step length is less than the first step length.

[0074] In this embodiment, a second step size is used as the center for each second search point, and the search direction is not limited, to obtain a third search point. The second step size is smaller than the first step size. Specifically, the second step size can be 1 / 2, 1 / 3, 1 / 4, 1 / 5, 1 / 6, etc. of the first step size.

[0075] Step 210: Determine the target search point based on the distortion value of the third search point. The target search point is used to calculate the vector between the target search point and the coded sub-block.

[0076] The distortion value between the third search point and the corresponding coded sub-block is calculated, and the target search point is determined based on the distortion value. In an optional embodiment, the third search point with the smallest distortion value is used as the target search point. The target search point is used to calculate the vector between coded sub-blocks, and the target search point is the optimal search point. The vector between the target search point and the coded sub-block is used as the motion vector. During decoding, the corresponding original coded block data can be obtained based on the motion vector and the known coded blocks.

[0077] The aforementioned motion estimation method involves: acquiring the coded sub-blocks and the starting search point in the current coded block; searching with the starting search point as the center and using a first-step length to obtain a first search point; determining a preset number of second search points according to the distortion values ​​of the first search points from smallest to largest; searching with each second search point as the center and using a second-step length to obtain a third search point; the second step length being smaller than the first step length; and determining a target search point based on the distortion value of the third search point. The target search point is used to calculate the vector between itself and the coded sub-block. This embodiment of the application significantly reduces the number of search positions for motion estimation of the coded sub-block by searching with a decreasing number of search points, thereby reducing the computational complexity of motion estimation for the coded sub-block and improving the search speed.

[0078] In one embodiment, such as Figure 4As shown, step 210, determining the target search point based on the distortion value of the third search point, includes:

[0079] Step 402: Select the third search point with the smallest distortion value as a candidate search point.

[0080] Step 404: Using the candidate search point as the center, search the left and right positions of the candidate search point at intervals of the third step length; wherein the third step length is less than the second step length.

[0081] Step 406: Select the position with the smallest distortion value between the left and right positions of the candidate search point as the target search point.

[0082] In this embodiment, the third search point with the smallest distortion value is selected as the candidate search point. Centered on the candidate search point, the search is performed on the left and right sides of the candidate search point at intervals of a third step size. The position with the smallest distortion value between the two positions is selected as the target search point. The third step size is smaller than the second step size. For example, if the third step size is 1 pixel, then the search is performed horizontally on the left and right sides of the candidate search point at intervals of 1 pixel, and the position with the smallest distortion value between the two positions is selected as the target search point.

[0083] In one embodiment, a search is performed centered on the initial search point, using a first step length, to obtain a first search point. A preset number of second search points are then determined based on the distortion values ​​of the first search points, from smallest to largest, wherein the preset number is at least two. A search is then performed centered on each second search point, using a second step length, to obtain a third search point. The third search point with the smallest distortion value is selected as a candidate search point. Using the candidate search point as the center, the search is performed on the left and right sides of the candidate search point at intervals of a third step length. The position with the smallest distortion value between the left and right positions of the candidate search point is selected as the target search point.

[0084] In one embodiment, the preset quantity is 1. In step 208, a third search point is obtained by searching with a second step size centered on each of the second search points, including:

[0085] Using the second search point as the center, search the two positions to the left and right of the second search point with the second step size as the interval to obtain two third search points;

[0086] The target search point is determined based on the distortion value of the third search point, including:

[0087] Choose the third search point with the smaller distortion value from the two third search points as the target search point.

[0088] In this embodiment, when the preset quantity is 1, the first search point with the smallest distortion value is selected as the second search point. Using the second search point as the center, the search is performed on the left and right sides of the second search point at intervals of a second step size, resulting in two third search points. The third search point with the smaller distortion value is selected as the target search point. This motion estimation method enables rapid determination of the target search point while minimizing computational complexity.

[0089] In one embodiment, the second step size is half the first step size. In this embodiment, after determining the starting search point, a search is performed using the first step size with the starting search point as the center to obtain the first search point. A preset number of second search points are determined according to the distortion values ​​of the first search points from smallest to largest. A search is performed using the second step size with each second search point as the center to obtain the third search point. The second step size is half the first step size. In this way, shortening the search step size when using the second search point as the center can greatly improve the search efficiency.

[0090] In one embodiment, such as Figure 5 As shown, the methods for calculating the distortion value of the search point include:

[0091] Step 502: Calculate the difference between each pixel in the coded sub-block and the same color component of the corresponding search point.

[0092] Typically, an coded sub-block comprises multiple pixels, and each pixel contains multiple color components. In this embodiment, the search point corresponding to the coded sub-block is the pixel located at that search point. For example, if RGB color components are used to represent pixels, for each pixel in the coded sub-block, the difference between the R component of each pixel in the coded sub-block and the corresponding search point pixel is first calculated, then the difference between the G component of each pixel in the coded sub-block and the corresponding search point pixel is calculated, and finally the difference between the B component of each pixel in the coded sub-block and the corresponding search point pixel is calculated.

[0093] Step 504: Sum the absolute values ​​of the differences of the same color component to obtain the median value of the color component.

[0094] For the same color component, the differences between the color components of all pixels in the same coded sub-block and the corresponding search point pixel are summed to obtain the median value of the color component.

[0095] Step 506: Sum the intermediate values ​​corresponding to each color component to obtain the distortion value corresponding to the search point.

[0096] Each pixel contains multiple color components, specifically represented by R, G, B, H, S, V, Y, U, V, or other color components. The intermediate values ​​corresponding to each color component are summed to obtain the distortion value between the search point and the coded sub-block.

[0097] In one possible implementation, the distortion value D between an encoded sub-block and the search point is calculated as follows:

[0098]

[0099]

[0100] Where k∈{0,1,2} represents the three color components corresponding to the pixels in the coded sub-block; Represents the pixel value of the coded sub-block; This represents the pixel value of the search point corresponding to the coded sub-block; w and h are the width and height of the coded sub-block, respectively. For example, if it is a 2*1 coded sub-block, the width of the coded sub-block is 2 and the height is 1; i and j are the horizontal and vertical coordinates of the pixels in the coded sub-block, respectively.

[0101] In one embodiment, such as Figure 6 As shown, the motion estimation method may include the following steps:

[0102] Step 602: Obtain the encoded sub-blocks and the starting search point in the current encoded block.

[0103] Motion estimation searches on a block-by-block basis, with each block further divided into sub-blocks. Searching is then performed on sub-blocks, and the search results for all sub-blocks are combined to obtain the search result for the entire block, thus improving search efficiency. Specifically, the starting search point can be determined based on the current block, or based on a sub-block; each sub-block corresponds to a single starting search point.

[0104] Step 604: Using the starting search point as the center, perform a search using the first step length to obtain the first search point; where the first step length is N.

[0105] After determining the starting search point, the search is performed with the starting search point as the center and the first step length N is used to obtain multiple first search points. The step length N is greater than 0 and less than the maximum number of searchable points minus 1. For example, in the encoding process of VDC-M, the maximum number of searchable points is 64, that is, the step length N is greater than 0 and less than 63.

[0106] Step 606: Determine three second search points according to the distortion value of the first search point from smallest to largest.

[0107] Calculate the distortion value between the first search point and the corresponding coded sub-block, and take the three first search points corresponding to the three smallest distortion values ​​as the second search points.

[0108] Step 608: Using each second search point as the center, search the two positions to the left and right of the second search point with a second step size to obtain the third search point; where the second step size is N / 2.

[0109] Using each second search point as the center, search the two positions to the left and right of the second search point with a step size of N / 2. A total of 6 third search points are obtained from the three second search points.

[0110] Step 610: Select the third search point with the smallest distortion value as a candidate search point.

[0111] Step 612: Using the candidate search point as the center, search the two positions to the left and right of the candidate search point at intervals of three steps. Select the position with the smallest distortion value between the two positions to the left and right of the candidate search point as the target search point. The target search point is used to calculate the vector between the target search point and the coded sub-block. The third step is 1 pixel.

[0112] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0113] Based on the same inventive concept, this application also provides a motion estimation device for implementing the motion estimation method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more motion estimation device embodiments provided below can be found in the limitations of the motion estimation method described above, and will not be repeated here.

[0114] In one embodiment, such as Figure 7 As shown, a motion estimation device is provided, comprising: an acquisition module 702, a first search module 704, a first determination module 706, a second search module 708, and a second determination module 710, wherein:

[0115] The acquisition module 702 is used to acquire the encoded sub-blocks and the starting search point in the current encoded block;

[0116] The first search module 704 is used to perform a search with the starting search point as the center and a first step length to obtain the first search point;

[0117] The first determining module 706 is used to determine a preset number of second search points according to the distortion value of the first search point from smallest to largest.

[0118] The second search module 708 is used to search for a third search point by taking each second search point as the center and using a second step size; the second step size is smaller than the first step size.

[0119] The second determining module 710 is used to determine a target search point based on the distortion value of the third search point, wherein the target search point is used to calculate the vector between the target search point and the coded sub-block.

[0120] In one embodiment, the second determining module 710 is further configured to:

[0121] The third search point with the smallest distortion value is selected as the candidate search point;

[0122] Centered on the candidate search point, search the left and right positions of the candidate search point using a third step length as the interval; the third step length is less than the second step length.

[0123] The point with the smallest distortion value between the two positions to the left and right of the candidate search point is selected as the target search point.

[0124] In one embodiment, the second search module 708 is further configured to search for two position points to the left and right of the second search point with the second search point as the center and a second step size as the interval, to obtain two third search points;

[0125] The second determining module 710 is further configured to select the third search point with the smaller distortion value among the two third search points as the target search point.

[0126] In one embodiment, the motion estimation device further includes a calculation module for:

[0127] Calculate the difference between each pixel in the coded sub-block and the same color component of the corresponding search point;

[0128] The absolute values ​​of the differences of the same color component are summed to obtain the median value of the color component.

[0129] The intermediate values ​​corresponding to each color component are summed to obtain the distortion value corresponding to the search point.

[0130] Each module in the aforementioned motion estimation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0131] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores distortion data for search points. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a motion estimation method.

[0132] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described motion estimation method embodiment.

[0134] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described motion estimation method embodiment.

[0135] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described motion estimation method embodiment.

[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0137] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A motion estimation method, characterized in that, The method includes: Obtain a preset number of candidate search points that are closest to the coded block; The coded block is divided into multiple coded sub-blocks, and one coded sub-block in the current coded block is obtained. The candidate search point with the smallest distortion value relative to the coded sub-block is taken as the starting search point of the coded sub-block; wherein, one coded sub-block corresponds to one starting search point. Centered on the starting search point, a search is performed using a first step length to obtain the first search point; wherein the search direction includes at least one of horizontal, vertical, or diagonal directions; A preset number of second search points are determined based on the distortion value of the first search point, from smallest to largest; the preset number is 3. Using each second search point as the center, a search is performed with a second step size to obtain a third search point; the second step size is half of the first step size. The third search point with the smallest distortion value is selected as the candidate search point; Centered on the candidate search point, search the left and right positions of the candidate search point using a third step length as the interval; the third step length is less than the second step length. The position with the smallest distortion value between the left and right positions of the candidate search point is selected as the target search point. The target search point is used to calculate the vector between itself and the coded sub-block. The search results of all coded sub-blocks are combined to obtain the search results of the coded block.

2. The method according to claim 1, characterized in that, The method further includes: The candidate search point with the smallest distortion value relative to the coded block is taken as the starting search point of the coded block.

3. The method according to claim 1, characterized in that, The distortion value of the first search point is used to characterize the similarity between the first search point and the coded sub-block; the smaller the distortion value, the greater the similarity between the first search point and the coded sub-block.

4. The method according to claim 1, characterized in that, The preset quantity is 1, and the process of searching for the third search point by using a second step size centered on each of the second search points includes: Using the second search point as the center, search the two positions to the left and right of the second search point at intervals of the second step size to obtain two third search points; The method further includes: The third search point with the smaller distortion value among the two third search points is selected as the target search point.

5. The method according to claim 1, characterized in that, The third step has a length of 1 pixel.

6. The method according to claim 1, characterized in that, The methods for calculating the distortion value of a search point include: Calculate the difference between each pixel in the coded sub-block and the same color component of the corresponding search point; The absolute values ​​of the differences of the same color component are summed to obtain the median value of the color component. The intermediate values ​​corresponding to each color component are summed to obtain the distortion value corresponding to the search point.

7. A motion estimation device, characterized in that, The device includes: The acquisition module is used to acquire a preset number of candidate search points that are closest to the encoding block; divide the encoding block into multiple encoding sub-blocks, acquire one encoding sub-block in the current encoding block, and take the candidate search point with the smallest distortion value with the encoding sub-block as the starting search point of the encoding sub-block; wherein, each encoding sub-block corresponds to one starting search point; The first search module is used to search with the starting search point as the center and using a first step length to obtain the first search point; wherein the search direction includes at least one of horizontal, vertical or diagonal. The first determining module is used to determine a preset number of second search points according to the distortion value of the first search point from smallest to largest; the preset number is 3. The second search module is used to search for a third search point by taking each second search point as the center and using a second step size; the second step size is half of the first step size. The second determining module is used to select the third search point with the smallest distortion value as a candidate search point; with the candidate search point as the center, search the two positions to the left and right of the candidate search point at an interval of a third step size; the third step size is smaller than the second step size; select the position point with the smallest distortion value among the two positions to the left and right of the candidate search point as the target search point, the target search point is used to calculate the vector between the target search point and the coded sub-block; combine the search results of all coded sub-blocks to obtain the search results of the coded block.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.