Motion search processing method, system and device for video coding, and storage medium

By determining the starting point based on the entire pixel search in video encoding and performing pixel searches, combining gradient information and distortion cost judgment, unnecessary search process is skipped, and the problem of long-term motion search of video encoding is solved, and efficiency is achieved Improvement and quality assurance.

WO2025001886A1PCT designated stage expired Publication Date: 2025-01-02PENINSULA INFORMATION TECH INC

Patent Information

Application Number
PCT/CN2024/099372
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-28
Filing Date
2024-06-14
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

The existing video encoding motion search solution takes a long time and is difficult to meet real-time requirements, affecting the user experience.

Method used

During the video encoding motion search process, the optimal starting point is determined based on the entire pixel search, and pixel-by-pixel search is performed from the optimal starting point, the gradient information is calculated and the threshold is set, and the comparison is not skipped according to the comparison result. The necessary pixel-by-pixel search process is used to obtain the sum of the minimum distortion cost and the predicted residual absolute values ​​to determine whether the search process is skipped.

Benefits of technology

Simplifies the motion search process, reduces time-consuming, improves video encoding efficiency, and ensures coding quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024099372_02012025_PF_FP_ABST
    Figure CN2024099372_02012025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present application are a motion search processing method, system and device for video coding, and a storage medium. The technical solution provided in the embodiments of the present application comprises: during a motion search process of video coding, determining an optimal start point on the basis of an integer pixel search, and performing a sub-pixel search on reference blocks one by one starting from a reference block corresponding to the optimal start point (S110); during the sub-pixel search, calculating gradient information in a direction corresponding to the current reference block, comparing the gradient information with a set gradient threshold value, according to a comparison result, performing skip determination on a sub-pixel search flow in the direction corresponding to the current reference block, and under a first set situation, skipping the sub-pixel search flow in the direction corresponding to the current reference block (S120); and acquiring a real-time minimum distortion cost of the current reference block and the sum of absolute values of prediction residuals of an optimal mode, performing skip determination on sub-pixel search flows in all directions of the current reference block according to the gradient information, the minimum distortion cost and the sum of the absolute values of the prediction residuals, and skipping the sub-pixel search flows in all directions of the current reference block under a second set situation (S130). By means of the method, during a pixel search, parts having relatively small gradients are screened out and sub-pixel search flows thereof are skipped, thereby reducing the time consumption of a motion search, and thus improving the video coding efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Motion search processing method, system, device and storage medium for video coding

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 28, 2023, with application number 202310777782.9, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of video coding technology, and in particular to a motion search processing method, system, device, and storage medium for video coding. Background Art

[0003] Currently, motion search is used throughout the video encoding process to improve coding information. The basic idea behind motion search is to divide each frame of an image sequence into non-overlapping macroblocks, assuming that the displacement of all pixels within a macroblock is the same. Then, for each macroblock within a given search range in the reference frame, a matching criterion is used to find the block most similar to the current block. This is known as the matching block. The relative displacement between the matching block and the current block is the motion vector. During video compression, simply saving the motion vector and residual data allows complete recovery of the current block.

[0004] However, to improve video encoding performance, related motion search solutions require complex computational processes, which are time-consuming. For scenarios where real-time video encoding is crucial, complex motion search processes struggle to meet these requirements, resulting in a poor user experience.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a motion search processing method, system, device and storage medium for video coding, which can simplify the motion search process while ensuring the quality of video coding, improve video coding efficiency, and solve the technical problem that related motion search solutions are time-consuming.

[0007] In a first aspect, an embodiment of the present application provides a motion search processing method for video coding, comprising:

[0008] In the motion search process of video coding, the optimal starting point is determined based on the integer pixel search, and the pixel-by-pixel search is performed on each reference block starting from the reference block corresponding to the optimal starting point;

[0009] During the sub-pixel search process, the gradient information of the direction corresponding to the current reference block is calculated, the gradient information is compared with the set gradient threshold, and a judgment is made on skipping the sub-pixel search process in the direction corresponding to the current reference block based on the comparison result. In the first setting case, the sub-pixel search process in the direction corresponding to the current reference block is skipped;

[0010] Obtain the real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode. Based on the gradient information, the minimum distortion cost, and the sum of the absolute values ​​of the prediction residuals, make a judgment on whether to skip the sub-pixel search process in all directions of the current reference block. In the second setting, skip the sub-pixel search process in all directions of the current reference block.

[0011] In a second aspect, an embodiment of the present application provides a motion search processing system for video coding, comprising:

[0012] A motion search module configured to determine an optimal starting point based on an integer pixel search during a motion search process for video encoding, and to perform pixel-by-pixel search on each reference block starting from a reference block corresponding to the optimal starting point;

[0013] A first process skipping module is configured to calculate gradient information of a direction corresponding to a current reference block during a sub-pixel search process, compare the gradient information with a set gradient threshold, and make a skipping decision for the sub-pixel search process corresponding to the current reference block based on the comparison result. Under a first setting, the sub-pixel search process corresponding to the current reference block is skipped;

[0014] The second process skipping module is used to obtain the real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode, and to make a skipping judgment on the sub-pixel search process in all directions of the current reference block based on the gradient information, the minimum distortion cost and the sum of the absolute values ​​of the prediction residuals. Under the second setting, the sub-pixel search process in all directions of the current reference block is skipped.

[0015] In a third aspect, an embodiment of the present application provides a motion search processing device for video coding, comprising:

[0016] memory and one or more processors;

[0017] The memory is configured to store one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the motion search processing method for video coding as described in the first aspect.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a computer processor, they are configured to perform the motion search processing method for video encoding as described in the first aspect.

[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes instructions. When the instructions are executed on a computer or a processor, the computer or the processor executes the motion search processing method for video coding as described in the first aspect.

[0021] The embodiment of the present application determines the optimal starting point based on an integer pixel search during the motion search process for video coding, and performs a pixel-by-pixel search on each reference block starting from the reference block corresponding to the optimal starting point. During the pixel-by-pixel search process, the gradient information of the corresponding direction of the current reference block is calculated, the gradient information is compared with a set gradient threshold, and a decision is made based on the comparison result whether to skip the pixel-by-pixel search process in the corresponding direction of the current reference block. In a first setting, the pixel-by-pixel search process in the corresponding direction of the current reference block is skipped. The real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode are obtained, and the pixel-by-pixel search process in all directions of the current reference block is skipped based on the gradient information, the minimum distortion cost, and the sum of the absolute values ​​of the prediction residuals. In a second setting, the pixel-by-pixel search process in all directions of the current reference block is skipped. By using the above technical means, the sub-pixel search process can be skipped by screening the parts with smaller gradients during the pixel search process, thereby simplifying the motion search process, reducing the time consumption of the motion search, and thereby improving video coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a flowchart of a motion search processing method for video coding provided by an embodiment of the present application;

[0023] FIG2 is a flow chart of motion search provided by an embodiment of the present application;

[0024] FIG3 is a skip flowchart of pixel-by-pixel search in an embodiment of the present application;

[0025] FIG4 is a schematic structural diagram of a motion search processing system for video coding provided by an embodiment of the present application;

[0026] FIG5 is a structural diagram of a motion search processing device for video coding provided by an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. It should also be noted that, for ease of description, only parts related to the present application, not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0028] The motion search processing method for video coding provided in this application aims to simplify the motion search process and improve the motion search efficiency by screening some reference blocks with smaller gradients during pixel search and skipping their pixel-by-pixel search process.

[0029] In relevant video coding scenarios, in order to achieve performance gains in video coding, the computational complexity of the coding process is relatively large. As for the motion search process, the whole process takes a long time. However, in specific applications, there are some encoders and coding scenarios that have almost stringent requirements for real-time performance, and due to different services, the characteristics of the sequences to be encoded are also different. For example, natural videos with violent and irregular motion and videos that are mainly live broadcasts have different effects when using different algorithms. For these scenarios with high real-time requirements for video coding, complex motion search processes are difficult to meet real-time requirements. Based on this, a motion search processing method for video coding in an embodiment of the present application is provided to optimize the motion search process, improve video coding efficiency, and solve the technical problem that the relevant motion search schemes take a long time.

[0030] Example:

[0031] FIG1 is a flowchart of a motion search processing method for video coding provided in an embodiment of the present application. The motion search processing method for video coding provided in this embodiment can be performed by a motion search processing device for video coding. The motion search processing device for video coding can be implemented in software and / or hardware. The motion search processing device for video coding can be composed of two or more physical entities or a single physical entity. Generally speaking, the motion search processing device for video coding can be an encoder device, a computer, a mobile phone, a tablet, or other computing device.

[0032] The following description will be made by taking the video coding motion search processing device as the main body of the video coding motion search processing method as an example. Referring to FIG1 , the video coding motion search processing method specifically includes:

[0033] S110, during a motion search process for video coding, determining an optimal starting point based on an integer pixel search, and performing pixel-wise search on each reference block starting from a reference block corresponding to the optimal starting point;

[0034] S120: During the sub-pixel search process, calculate the gradient information of the direction corresponding to the current reference block, compare the gradient information with the set gradient threshold, and make a skip decision on the sub-pixel search process corresponding to the direction of the current reference block based on the comparison result. In a first setting, skip the sub-pixel search process corresponding to the direction of the current reference block.

[0035] S130. Obtain the real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode, and make a judgment on whether to skip the sub-pixel search process in all directions of the current reference block based on the gradient information, the minimum distortion cost and the sum of the absolute values ​​of the prediction residuals. In the second setting, skip the sub-pixel search process in all directions of the current reference block.

[0036] When performing motion search processing for video encoding, this application screens part of the motion search process, selects part of the motion search process that has less impact on motion search results and video encoding quality, and skips this part of the process, so as to optimize the motion search process, shorten the motion search time, and improve video encoding efficiency.

[0037] Taking the HEVC encoder as an example, referring to Figure 2, when performing motion search for the current coding block, the motion vectors (mv, motion vector) of the coding blocks surrounding the current reference block are first obtained, and the optimal motion vector (mvp, motion vector predict) is predicted by traversing each motion vector. Then, based on the optimal motion vector found, an integer pixel search is performed sequentially to find the optimal motion vector for the integer pixel search. A half-pixel search is performed based on the optimal motion vector for the integer pixel search to find the optimal motion vector for the half-pixel search. A quarter-pixel search is performed based on the best motion vector for the half-pixel search to calculate the optimal motion vector for the quarter-pixel search, thereby obtaining the corresponding optimal reference block, i.e., the matching block, completing the motion search process.

[0038] Based on the above-mentioned motion search process, the present application optimizes the motion search process of the embodiment of the present application by screening out some of the processes that have little impact on the motion search results and skipping them. Since this part of the process has little impact on the motion search results and has little impact on the final encoding quality, this part of the process can be skipped. Moreover, since pre-coding is an indispensable part in the actual encoding process, a large amount of coding information can be obtained by pre-fetching uncoded frames, down-sampling them and performing simple analysis on them, so as to provide some guidance for the subsequent code control and actual encoding projects. Motion search operations are also required in the pre-coding process. The motion search for pre-coding in HEVC is consistent with the motion search for actual coding, so the motion search process for pre-coding can also be adaptively screened and skipped.

[0039] The motion search in the pre-coding step involves obtaining the motion vectors mv in the coding blocks surrounding the current reference block to calculate the optimal motion vector mvp. Based on the optimal motion vector mvp, the rate-distortion cost mvpcost of the optimal motion vector mvp is calculated. Because the pre-coding step is not part of the formal coding process and accounts for a significant portion of the formal coding process, the entire motion search process can be skipped for coding blocks with a rate-distortion cost below a certain threshold, achieving significant coding acceleration with minimal quality loss.

[0040] In addition, if the entire motion search process is not directly skipped during the pre-encoding process, it can be further determined whether the integer pixel search part of the motion search can be skipped. Since the pre-encoding step has already downsampled the image, the image information distribution is more concentrated, and the integer pixel search can be skipped for some special blocks. For example, a live video sequence is often mainly the anchor moving, and the background of the anchor is relatively constant. Therefore, the coding tree units in the bottom row of the sequence are often relatively fixed, and skipping the integer pixel search of these blocks will not lead to loss of encoding results; similarly, for reference blocks with a small rate-distortion cost mvpcost of the best motion vector mvp, it can be considered that the best motion vector mvp prediction is already relatively accurate, and there is no need to perform complex integer pixel search. Therefore, reference blocks with a small best motion vector mvp can also directly skip the integer pixel search process.

[0041] Afterwards, motion search is also required in the formal encoding of the video. After the integer pixel search, since the approximate range of the reference block has been determined, the offset reference block can be obtained. At this time, the optimal starting point of the sub-pixel search is determined based on the best motion vector MVP determined by the integer pixel search, and the sub-pixel search is performed on each reference block starting from the reference block corresponding to the optimal starting point. During the sub-pixel search, the gradient information of the corresponding direction (horizontal and vertical directions) of the current reference block is first calculated. If the gradient information of the corresponding direction is small and lower than the set gradient threshold, it is determined that the current state is in the first setting, and the sub-pixel search process in the corresponding direction of the current reference block is skipped.

[0042] In addition, the present application also obtains the current reference block's real-time minimum distortion cost and the sum of the absolute values ​​of the prediction residuals of the optimal mode, and combines this gradient information to further determine whether to skip the sub-pixel search process in all directions of the current reference block. If the gradient information, minimum distortion cost, and the sum of the absolute values ​​of the prediction residuals are used to determine that the current state is in the second setting, it is determined that the gradient information around the current reference block is relatively small, and the entire sub-pixel search process can be directly skipped.

[0043] In this way, by skipping the motion search process in different situations, the motion search can be simplified and accelerated, and the encoding effect can be improved. It should be noted that in actual applications, the pre-encoded sub-pixel search process, the entire motion search process of formal encoding, or the integer pixel search process can also be adaptively skipped. Through actual tests, the embodiment of the present application determined that skipping the above-mentioned pre-encoded motion search process or integer pixel search process, as well as the formally encoded sub-pixel search process can improve the motion search efficiency while ensuring the encoding quality, so adaptive motion search skipping judgment is selected. According to the actual process simplification requirements, the corresponding motion search process can be adaptively selected for simplification. The embodiment of the present application does not impose fixed restrictions on the specific simplification details, and they are not described here one by one.

[0044] Specifically, during the motion search process of video precoding, the rate-distortion cost of the predicted optimal motion vector is compared with a first set cost threshold. If the rate-distortion cost is less than or equal to the set cost threshold, the motion search of video precoding is skipped.

[0045] According to the encoder logic, the pre-coding function estimateCuCost will estimate the rate distortion cost (rdcost, Rate Distortion cost) between the current block and the reference block. When looking for the best reference block, first obtain the motion vector mv of the surrounding blocks, then calculate the reference block corresponding to the motion vector in the reference frame, and calculate the sum of the absolute values ​​of the prediction residuals of the reference block and the current block after motion compensation. Traverse all motion vectors, and the motion vector with the smallest sum of the absolute values ​​of the prediction residuals is saved as the best motion vector mvp, and the corresponding rate distortion cost is mvpcost. In the original logic, the motion search process will be performed directly, and the searched mvcost will be compared with the previously obtained mvpcost to select the optimal mv. This application adds a precondition to the motion search process of pre-coding. Only when the rate distortion cost of the best motion vector is greater than the set cost threshold (i.e. mvpcost>K1, K1 is 256) will the motion search be entered. Otherwise, the current mvp is directly used as the best motion vector to complete the entire motion search process of pre-coding.

[0046] After comparing the rate-distortion cost of the predicted optimal motion vector with the first set cost threshold, the method further includes: performing integer pixel search on each reference block, determining a reference block in a set motion-smoothing state, and skipping the integer pixel search process for the corresponding reference block.

[0047] If the motion search is not skipped during pre-encoding, the function MotionEstimate will be directly entered. At this time, the whole pixel search part of the motion search can still be simplified. For the last row in the pre-encoding, it is often considered that it is more likely to be a background block with slow motion or no motion. It is considered that this part of the reference blocks is set to a slow motion state and does not require more motion searches. For these blocks, the flag skipPixelSearch=1 is set, and the reference blocks with the flag skipPixelSearch=1 are directly skipped by whole pixels. It should be noted that in actual applications, according to the distribution position of the background blocks with slow motion or no motion in the actual video image, the reference blocks at the corresponding positions can be adaptively set to be in a set slow motion state for flag marking.

[0048] In addition, after comparing the rate-distortion cost of the predicted best motion vector with the first set cost threshold, it also includes: performing integer pixel search for each reference block one by one, and when the rate-distortion cost of the best motion vector of the current reference block is less than the optimal rate-distortion cost within the frame of the current reference block, and the rate-distortion cost is less than the second set cost threshold, skipping the integer pixel search process of the current reference block.

[0049] It can be understood that when the rate-distortion cost mvpcost of the predicted best motion vector is less than the optimal intra-frame rate-distortion cost intracost of the current reference block, and the rate-distortion cost mvpcost of the best motion vector is less than the second set cost threshold (mvpcost<K2, K2=min(1024,intracost)), it is considered that the current block has a better prediction effect using the best motion vector mvp, and a relatively simpler motion search algorithm can be used, and the flag skipPixelSearch of the current reference block is also set to 1. In the subsequent motion search, if the reference block's skipPixelSearch=1, its whole pixel search process is directly skipped and the pixel search is entered, so that the encoding quality is not lost and the encoding speed is significantly improved.

[0050] Furthermore, after completing the simplification of the motion search in the above-mentioned pre-coding process, the present application further processes the pixel-by-pixel search of the formal coding motion search during the formal coding process. The above-mentioned motion search optimizations are all optimizations in the pre-coding process, and since the motion search in normal coding is more complex, there is more room for optimization. And since the video resolution is high, directly skipping the motion search or skipping the whole pixel search will result in a large loss in video coding quality. Therefore, during the formal coding process, the present application will choose to try to skip the half-pixel search and quarter-pixel search of its motion search, so as to achieve the optimization of the motion search process in the formal coding process.

[0051] The motion search in formal encoding is the same as that in pre-encoding. Both methods first attempt to find the optimal motion vector (MVP), then perform searches based on the corresponding position of the optimal motion vector using different search algorithms. In mobile live streaming, the simplest diamond search method is generally used. This method searches through whole pixels to find the optimal motion vector for whole pixel search. Based on the optimal motion vector found in the whole pixel search, half-pixel and quarter-pixel searches are then performed.

[0052] The sub-pixel search in this application includes a half-pixel search and a quarter-pixel search. The quarter-pixel search is performed after the half-pixel search, and the judgment criteria for skipping the sub-pixel search process are updated in real time. By updating the judgment criteria for the quarter-pixel search after the half-pixel search, more accurate motion search process judgment can be achieved. The updated judgment criteria specifically include the set gradient threshold and related comparison information for the gradient information, minimum distortion cost, and the sum of absolute values ​​of the prediction residuals in the second set condition.

[0053] Specifically, referring to FIG3 , the gradient threshold is set based on the bidirectional prediction information, the height and width of the current reference block, and the corresponding directions include the vertical direction and the horizontal direction;

[0054] In the first setting case, skip the sub-pixel search process in the corresponding direction of the current reference block, including:

[0055] S1201. When the gradient information in the vertical direction is less than the set gradient threshold, skip the sub-pixel search process in the vertical direction of the current reference block;

[0056] S1202. When the gradient information in the horizontal direction is less than the set gradient threshold, skip the sub-pixel search process in the horizontal direction of the current reference block.

[0057] Since the reference block corresponding to the best starting point has been found after the integer-pixel search and is already relatively close to the optimal reference block, in order to generally understand the reference block information, the gradient of the current reference block can be directly calculated starting from the starting point, mainly calculating the horizontal direction gradient and the vertical direction gradient. Set the gradient threshold M. In the encoder: M = (2 + bBipred) * blockheight * blockwidth >> 1

[0058] Where bBipred represents whether bidirectional prediction is enabled, blockheight represents the height of the current reference block, and blockwidth represents the width of the current reference block. Let vgrad represent the gradient of the current reference block in the vertical direction. If vgrad < M, then skip the half-pixel search process in the vertical direction of the current reference block. Similarly for the horizontal direction, by calculating its gradient information in the horizontal direction and comparing it with the above gradient threshold M, when the gradient information in the horizontal direction is less than the set gradient threshold, skip the sub-pixel search process in the horizontal direction of the current reference block.

[0059] In the second setting case, skip the sub-pixel search process in all directions of the current reference block, including:

[0060] Determine that the pixels of the current reference block are in a set smooth state according to the gradient information, the minimum distortion cost, and the sum of the absolute values of the prediction residuals, and skip the sub-pixel search process in all directions of the current reference block.

[0061] In addition to the above sub-pixel search process skip judgment steps, the present application also synchronously performs the sub-pixel search process skip judgment in the second setting case. Let the minimum distortion cost of the current reference block be bcost, and let the sum of the absolute values of the prediction residuals of the best mode be bestSatd. Then when the following formula is satisfied: hgrad + vgrad < 7 * bcost / 8 or, ibcost - ((vgrad + hgrad) >> 2) > bestSatd

[0062] It is considered that the current block is relatively flat and in the second setting situation. At this time, it is no longer the reason for the large bcost. Therefore, the sub-pixel search process in all directions of the current reference block is skipped.

[0063] Thus, the half-pixel search of the current reference block is completed. After that, in the quarter-pixel search process, referring to the judgment of the above first setting situation, the gradient information of the reference block is calculated. If vgrad < 2 * M, the quarter-pixel search in the corresponding direction of the current reference block is skipped. The half-pixel search process and the quarter-pixel search process are only updated in the search process skip judgment condition, and other processes remain unchanged, which will not be elaborated here. For the judgment of the quarter-pixel search process in the second setting situation, similarly, since bcost has been updated after the half-pixel search, the termination condition for judging and jumping out of the quarter-pixel search should be updated at this time. When the following formula is satisfied: hgrad + vgrad < bcost or (bcost - ((vgrad + hgrad) >> 2) > (3 * bestSatd >> 2))

[0064] Then the quarter-pixel search can be directly jumped out. It should be noted that since the content of blocks of the same size in high resolution is sparser and the motion search redundancy is relatively large, the effect of jumping out of the sub-pixel search is better. On the contrary, the content of low-resolution sequence videos is too concentrated and not suitable for relevant optimizations. Therefore, the optimization of skipping the sub-pixel search has a better effect in the corresponding resolution situation. In practical applications, the resolution of the video to be encoded can be identified, and the video to be encoded with the corresponding resolution can be selected to execute the motion search processing flow of video encoding to achieve the optimization of motion search and improve the video encoding efficiency.

[0065] It should be noted that in practical applications, during the formal encoding process, the motion search process can also be optimized through the above motion estimation skip logic and integer pixel skip logic. Similarly, during the pre-encoding process, the above sub-pixel skip logic can also be used to optimize the motion search process. According to the actual tests of this application embodiment, it is selected to skip using the motion estimation skip logic and integer pixel skip logic during the pre-encoding process, and use the sub-pixel skip logic during the formal encoding process, which can simplify the motion search process and improve the video encoding efficiency while ensuring the encoding quality. According to the actual encoding quality loss situation and the optimization benefits of the motion search process, the corresponding skip logic can be adaptively selected to optimize the motion search process.

[0066] In the above-mentioned process, during the motion search process for video coding, the optimal starting point is determined based on the whole pixel search, and a sub-pixel search is performed on each reference block starting from the reference block corresponding to the optimal starting point; during the sub-pixel search process, the gradient information of the corresponding direction of the current reference block is calculated, the gradient information is compared with the set gradient threshold, and a judgment is made based on the comparison result whether to skip the sub-pixel search process in the corresponding direction of the current reference block. In the first setting, the sub-pixel search process in the corresponding direction of the current reference block is skipped; the real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode are obtained, and a judgment is made based on the gradient information, the minimum distortion cost, and the sum of the absolute values ​​of the prediction residuals in all directions of the current reference block to skip the sub-pixel search process. In the second setting, the sub-pixel search process in all directions of the current reference block is skipped. By using the above-mentioned technical means, the sub-pixel search process can be skipped by screening the parts with smaller gradients during the pixel search process, thereby simplifying the motion search process, reducing the time consumption of the motion search, and thereby improving the efficiency of video coding.

[0067] Based on the above embodiment, FIG4 is a schematic diagram of the structure of a motion search processing system for video coding provided by this application. Referring to FIG4, the motion search processing system for video coding provided by this embodiment specifically includes: a motion search module 21, a first process skip module 22, and a second process skip module 23.

[0068] The motion search module 21 is configured to determine the optimal starting point based on the integer pixel search during the motion search process of the video encoding, and perform pixel-by-pixel search on each reference block starting from the reference block corresponding to the optimal starting point;

[0069] The first process skipping module 22 is configured to calculate the gradient information of the direction corresponding to the current reference block during the sub-pixel search process, compare the gradient information with the set gradient threshold, and make a skipping decision on the sub-pixel search process corresponding to the current reference block based on the comparison result. In the first setting case, the sub-pixel search process corresponding to the current reference block is skipped.

[0070] The second process skipping module 23 is used to obtain the real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode, and perform a skipping judgment on the sub-pixel search process in all directions of the current reference block based on the gradient information, the minimum distortion cost and the sum of the absolute values ​​of the prediction residuals. Under the second setting, the sub-pixel search process in all directions of the current reference block is skipped.

[0071] Specifically, during the motion search process of video precoding, the rate-distortion cost of the predicted optimal motion vector is compared with a first set cost threshold. If the rate-distortion cost is less than or equal to the set cost threshold, the motion search of video precoding is skipped.

[0072] After comparing the first set cost threshold according to the rate-distortion cost of the predicted best motion vector, the method further includes:

[0073] Perform integer pixel search on each reference block one by one, determine the reference block in the set motion smooth state, and skip the integer pixel search process of the corresponding reference block.

[0074] Perform integer pixel search for each reference block. If the rate-distortion cost of the best motion vector of the current reference block is less than the intra-frame optimal rate-distortion cost of the current reference block, and the rate-distortion cost is less than a second set cost threshold, skip the integer pixel search process for the current reference block.

[0075] Specifically, the sub-pixel search includes a half-pixel search and a quarter-pixel search. The quarter-pixel search is performed after the half-pixel search, and the judgment condition for skipping judgment of the sub-pixel search process is updated in real time.

[0076] Specifically, the gradient threshold is set based on the bidirectional prediction information, the height and width of the current reference block, and the corresponding directions include vertical and horizontal directions;

[0077] In the first setting case, skipping the sub-pixel search process in the direction corresponding to the current reference block includes:

[0078] When the vertical gradient information is less than the set gradient threshold, the vertical sub-pixel search process of the current reference block is skipped;

[0079] When the gradient information in the horizontal direction is less than the set gradient threshold, the sub-pixel search process in the horizontal direction of the current reference block is skipped.

[0080] In the second setting, the sub-pixel search process in all directions of the current reference block is skipped, including:

[0081] According to the gradient information, the minimum distortion cost and the sum of the absolute values ​​of the prediction residuals, it is determined that the pixels of the current reference block are in a set flat state, and the pixel-wise search process in all directions of the current reference block is skipped.

[0082] In the above-mentioned process, during the motion search process for video coding, the optimal starting point is determined based on the whole pixel search, and a sub-pixel search is performed on each reference block starting from the reference block corresponding to the optimal starting point; during the sub-pixel search process, the gradient information of the corresponding direction of the current reference block is calculated, the gradient information is compared with the set gradient threshold, and a judgment is made based on the comparison result whether to skip the sub-pixel search process in the corresponding direction of the current reference block. In the first setting, the sub-pixel search process in the corresponding direction of the current reference block is skipped; the real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode are obtained, and a judgment is made based on the gradient information, the minimum distortion cost, and the sum of the absolute values ​​of the prediction residuals in all directions of the current reference block to skip the sub-pixel search process. In the second setting, the sub-pixel search process in all directions of the current reference block is skipped. By using the above-mentioned technical means, the sub-pixel search process can be skipped by screening the parts with smaller gradients during the pixel search process, thereby simplifying the motion search process, reducing the time consumption of the motion search, and thereby improving the efficiency of video coding.

[0083] The motion search processing system for video coding provided in the embodiment of the present application can be configured to execute the motion search processing method for video coding provided in the above embodiment, and has corresponding functions and beneficial effects.

[0084] Based on the above practical example, an embodiment of the present application further provides a motion search processing device for video coding. Referring to FIG5 , the motion search processing device for video coding includes: a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The memory, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the motion search processing method for video coding described in any embodiment of the present application (e.g., the motion search module, the first process skip module, and the second process skip module in the motion search processing system for video coding). The communication module is configured to perform data transmission. The processor executes the software programs, instructions, and modules stored in the memory to execute various functional applications and data processing of the device, thereby implementing the above-mentioned motion search processing method for video coding. The input device can be configured to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device can include a display device such as a display screen. The above-mentioned motion search processing device for video coding can be configured to execute the motion search processing method for video coding described in the above-mentioned embodiments, and has the corresponding functions and beneficial effects.

[0085] Based on the above embodiments, embodiments of the present application further provide a computer-readable storage medium storing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are configured to execute a motion search processing method for video coding. The storage medium can be any of various types of memory devices or storage devices. Of course, the computer-executable instructions of the computer-readable storage medium provided in embodiments of the present application are not limited to the motion search processing method for video coding described above, but can also execute related operations in the motion search processing method for video coding provided in any embodiment of the present application.

[0086] Based on the above embodiments, the embodiments of the present application also provide a computer program product. The essence of the technical solution of the present application or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer program product is stored in a storage medium and includes a number of instructions for enabling a computer device, a mobile terminal or a processor therein to execute all or part of the steps of the motion search processing method for video coding described in each embodiment of the present application.

Claims

1. A motion search processing method for video coding, wherein: include: In the motion search process of video coding, an optimal starting point is determined based on an integer pixel search, and pixel-by-pixel search is performed on each reference block starting from a reference block corresponding to the optimal starting point; In the sub-pixel search process, the gradient information of the direction corresponding to the current reference block is calculated, the gradient information is compared with the set gradient threshold, and the sub-pixel search process of the direction corresponding to the current reference block is skipped according to the comparison result. In the first setting case, the sub-pixel search process of the direction corresponding to the current reference block is skipped; The real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode are obtained, and a judgment is made on whether to skip the sub-pixel search process in all directions of the current reference block based on the gradient information, the minimum distortion cost and the sum of the absolute values ​​of the prediction residuals. In the second setting, the sub-pixel search process in all directions of the current reference block is skipped.

2. The motion search processing method for video coding according to claim 1, wherein: The setting of the gradient threshold is based on the bidirectional prediction information, the height and the width of the current reference block, and the corresponding direction includes a vertical direction and a horizontal direction; In the first setting case, skipping the sub-pixel search process in the direction corresponding to the current reference block includes: When the gradient information in the vertical direction is less than the set gradient threshold, skipping the sub-pixel search process in the vertical direction of the current reference block; When the gradient information in the horizontal direction is less than the set gradient threshold, the sub-pixel search process in the horizontal direction of the current reference block is skipped.

3. The motion search processing method for video coding according to claim 1, wherein: In the second setting, the sub-pixel search process of skipping all directions of the current reference block includes: It is determined that the pixels of the current reference block are in a set flat state according to the gradient information, the minimum distortion cost and the sum of the absolute values ​​of the prediction residuals, and the pixel-by-pixel search process in all directions of the current reference block is skipped.

4. The motion search processing method for video coding according to any one of claim 1, wherein: The sub-pixel search includes a half-pixel search and a quarter-pixel search. The quarter-pixel search is performed after the half-pixel search, and the judgment condition for skipping judgment of the sub-pixel search process is updated in real time.

5. The motion search processing method for video coding according to claim 1, wherein: Before motion search in video coding, it also includes: In the motion search process of video precoding, the rate-distortion cost of the predicted best motion vector is compared with a first set cost threshold, and the motion search of video precoding is skipped when the rate-distortion cost is less than or equal to the set cost threshold.

6. The motion search processing method for video coding according to claim 5, wherein: After comparing the first set cost threshold according to the rate-distortion cost ratio of the predicted best motion vector, the method further includes: An integer pixel search is performed on each reference block one by one to determine a reference block in a set motion smoothing state, and the integer pixel search process of the corresponding reference block is skipped.

7. The motion search processing method for video coding according to claim 5, wherein: After comparing the first set cost threshold according to the rate-distortion cost ratio of the predicted best motion vector, the method further includes: Integer pixel search is performed for each reference block. If the rate-distortion cost of the best motion vector of the current reference block is less than the intra-frame optimal rate-distortion cost of the current reference block, and the rate-distortion cost is less than a second set cost threshold, the integer pixel search process of the current reference block is skipped.

8. A motion search processing system for video coding, wherein: include: A motion search module configured to determine an optimal starting point based on an integer pixel search during a motion search process for video encoding, and to perform pixel-by-pixel search on reference blocks one by one starting from a reference block corresponding to the optimal starting point; A first process skipping module is configured to calculate the gradient information of the direction corresponding to the current reference block during the sub-pixel search process, compare the gradient information with a set gradient threshold, and perform a skipping judgment of the sub-pixel search process corresponding to the current reference block according to the comparison result. Under a first setting, the sub-pixel search process corresponding to the current reference block is skipped; The second process skipping module is used to obtain the real-time minimum distortion cost of the current reference block and the sum of the absolute values ​​of the prediction residuals of the optimal mode, and perform a skipping judgment on the sub-pixel search process in all directions of the current reference block based on the gradient information, the minimum distortion cost and the sum of the absolute values ​​of the prediction residuals. Under the second setting, the sub-pixel search process in all directions of the current reference block is skipped.

9. A motion search processing device for video coding, wherein: include: memory and one or more processors; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the motion search processing method for video coding as described in any one of claims 1-7.

10. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a computer processor, they are configured to execute the motion search processing method for video encoding according to any one of claims 1-7.

11. A computer program product, wherein: The computer program product includes instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the motion search processing method for video coding according to any one of claims 1-7.

Citation Information

Patent Citations

  • Motion search processing method, system and equipment for video coding and storage medium

    CN116962697A

  • Video content self-adaptation motion search method

    CN104811728A

  • Improved HEVC inter-frame motion estimation pixel search method

    CN112954365A

  • Video coding method and system and storage medium

    CN113438476A

  • Video coding method, device, equipment and product

    CN114071148A

Cited By

  • Remote video conference data transmission method, system and equipment

    CN120238660A

  • Video coding mode determination method and device, encoder, medium and product

    CN121418564A