Motion estimation method, device, electronic device and storage medium

By adaptively selecting the entire pixel search algorithm in video encoding, the target starting block and feature value are used to solve the problem of high motion estimation complexity, and the video encoding speed is improved under the situation of limited encoding quality loss.

CN114040209BActive Publication Date: 2025-02-11BIGO TECH PTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111229207.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-02-11
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

In the prior art, the complexity of motion estimation is high, resulting in slower encoding speed during video encoding. How to reduce the complexity of motion estimation under the premise of limited encoding quality loss and improve the overall encoding speed of video encoding.

Method used

By obtaining the target starting block and feature values ​​corresponding to the prediction block to be predicted in the encoded frame from the reference frame, an appropriate whole pixel search algorithm is adaptively selected based on this information, thereby performing motion estimation.

Benefits of technology

Under the premise of limited encoding quality loss, the complexity of motion estimation is effectively reduced and the overall encoding speed of video encoding processing is improved. Experimental data shows that the video encoding speed is increased by 2% on average, and only an objective compression efficiency loss of 0.02%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114040209B_ABST
    Figure CN114040209B_ABST
Patent Text Reader

Abstract

The present application discloses a motion estimation method, device and electronic device, including: obtaining a target starting block corresponding to a prediction block to be predicted in a coding frame from a reference frame, wherein the target starting block is an image block in the reference frame used as a search starting position, and the matching cost between the target starting block and the prediction block reflects the motion intensity and texture complexity of the prediction block; obtaining a feature value of the prediction block, wherein the feature value reflects the texture complexity of the prediction block; determining a target integer pixel search algorithm based on the prediction block, the target starting block and the feature value; and searching for a target matching block from the reference frame based on the target integer pixel search algorithm with the target starting block as the search starting position. This method can effectively reduce the complexity of motion estimation under the premise of limited coding quality loss, so as to improve the overall coding speed of video coding processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of video encoding, and more specifically, to a motion estimation method, device, electronic device, and computer-readable storage medium. Background Art

[0002] The purpose of video coding (also known as video compression) is to eliminate redundant information between video sequences. In the process of video coding, prediction is required. Prediction is divided into intra-frame prediction and inter-frame prediction. The most critical technology in inter-frame prediction is motion estimation (ME, Motion Estimation). Motion estimation refers to the process of searching for the best matching block in the reference frame for the current prediction block to be predicted in the current coding frame, and determining the motion vector (MV, Motion Vector) between the current prediction block and the best matching block. In the process of video coding, motion estimation is used to find a matching block that matches the prediction block, and the prediction block is encoded based on the matching block, which can effectively reduce the temporal correlation between video frames and greatly improve the efficiency of video compression.

[0003] Motion estimation is very complex in the entire video encoding process. Therefore, how to effectively reduce the complexity of motion estimation under the premise of limited encoding quality loss to improve the overall encoding speed of video encoding has become a problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present disclosure provide a motion estimation method, an apparatus, an electronic device, and a storage medium, which can effectively reduce the complexity of motion estimation under the premise of limited coding quality loss.

[0005] In a first aspect of the present disclosure, a motion estimation method is provided, the method comprising:

[0006] Acquire a target start block corresponding to a prediction block to be predicted in a coding frame from a reference frame, wherein the target start block is an image block in the reference frame used as a search start position, and a matching cost between the target start block and the prediction block reflects a motion intensity and a texture complexity of the prediction block;

[0007] Acquire a feature value of the prediction block, wherein the feature value reflects the texture complexity of the prediction block;

[0008] Determining a target integer pixel search algorithm according to the prediction block, the target starting block and the characteristic value;

[0009] According to the target integer pixel search algorithm, the target starting block is used as the search starting position, and a target matching block is searched from the reference frame.

[0010] According to a second aspect of the present disclosure, there is further provided a motion estimation device, comprising:

[0011] A target start block acquisition module is used to acquire a target start block corresponding to a prediction block to be predicted in a coding frame from a reference frame, wherein the target start block is an image block in the reference frame used as a search start position, and a matching cost between the target start block and the prediction block reflects a motion intensity and a texture complexity of the prediction block;

[0012] A feature value acquisition module, used to acquire a feature value of the prediction block, wherein the feature value reflects the texture complexity of the prediction block;

[0013] A search algorithm determination module, used to determine a target integer pixel search algorithm according to the prediction block, the target starting block and the characteristic value;

[0014] The search module is used to search for a target matching block from the reference frame according to the target integer pixel search algorithm and with the target starting block as the search starting position.

[0015] According to a third aspect of the present disclosure, there is also provided an electronic device, including:

[0016] A memory for storing executable instructions;

[0017] The processor is used to operate the electronic device to execute the method according to the first aspect of the present disclosure under the control of the executable instructions.

[0018] According to a fourth aspect of the present disclosure, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method according to the first aspect of the present disclosure when read and executed by the computer.

[0019] The beneficial effect of the present disclosure lies in that, unlike the prior art in which a matching block matching a prediction block is usually searched from a reference frame based on a preset, single integer pixel search algorithm during motion estimation, in order to reduce the complexity of motion estimation, the method provided by the embodiment of the present disclosure first obtains a target starting block corresponding to the prediction block and reflecting the motion intensity and texture complexity of the prediction block from a reference frame corresponding to the coding frame, and obtains a characteristic value reflecting the texture complexity of the prediction block; thereafter, based on the target starting block and the characteristic value, the electronic device can adaptively select and use a matching target integer pixel search algorithm, and perform motion estimation on the prediction block based on the target integer pixel search algorithm, so as to effectively reduce the complexity of motion estimation under the premise of limited coding quality loss, thereby improving the overall coding speed of video coding processing.

[0020] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] Figure 1 It is a first framework schematic diagram of an existing motion estimation method.

[0023] Figure 2 It is a schematic diagram of searching for matching blocks with integer pixels.

[0024] Figure 3 Schematic diagram of a second framework of an existing motion estimation method.

[0025] Figure 4 It is a schematic diagram of constructing sub-pixels.

[0026] Figure 5 It is a flowchart of the motion estimation method provided by an embodiment of the present disclosure.

[0027] Figure 6a to Figure 6b It is a schematic diagram of a prediction block and a historical prediction block provided by an embodiment of the present disclosure.

[0028] Figure 7 It is a schematic diagram of adjacent coding blocks of a prediction block provided by an embodiment of the present disclosure.

[0029] Figure 8 It is a principle block diagram of a motion estimation device provided by an embodiment of the present disclosure.

[0030] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0032] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0033] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0034] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0035] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein.

[0036] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0037] <Method Example>

[0038] The video sequences in the video data usually have strong correlation in the time dimension, that is, the contents between multiple consecutive video frames usually have strong similarities. Therefore, when transmitting video data, in order to improve the transmission speed and reduce bandwidth consumption, the video data is usually encoded and compressed based on video coding technology to reduce the time domain correlation between video sequences and reduce the data volume of the video data. Existing video coding technology usually divides the video frame into several coding units (CU) of preset sizes, and based on intra-frame prediction or inter-frame prediction technology, removes redundant information in the coding unit to effectively compress the video data, where the coding unit can also be called an image block.

[0039] Generally, in the inter-frame prediction phase of video coding, a motion estimation algorithm is generally used to search for a matching block from a reference frame that best matches the prediction block to be predicted in the current coding frame, so as to obtain the motion vector of the prediction block relative to the matching block and encode the prediction block. Figure 1 , which is a first schematic diagram of the existing motion estimation method. Figure 1 As shown, the existing motion estimation algorithm generally includes an integer pixel search submodule and a sub-pixel search submodule.

[0040] The whole pixel search submodule is used to search the matching block that best matches the prediction block in the current frame using the whole pixel search algorithm from the reference frame. Generally, the sum of absolute difference (SAD) can be used as the distortion measurement criterion for whole pixel search. Figure 2As shown, for the prediction block to be predicted in the current frame, the matching block that best matches the prediction block can be searched from the search range shown in the black dotted box of the reference frame, and the motion vector between the two can be obtained to encode the prediction block, where the motion vector represents the displacement of the prediction block and the matching block in the horizontal and vertical directions. For example, MV(-1,1) means that the matching block is shifted 1 pixel to the left in the horizontal direction and 1 pixel down in the vertical direction relative to the prediction block. Common integer pixel search algorithms generally include: full search algorithm, diamond search algorithm, hexagonal search algorithm, cross diamond search algorithm, cross hexagonal search algorithm, etc. Among them, the full search algorithm has the highest accuracy, but also the highest complexity, and the complexity in the encoder accounts for a very large proportion. Generally, the full search algorithm is not used in a large-scale search, and other search algorithms are fast motion estimation methods, which allow the complexity of motion estimation to be greatly reduced under the premise of reducing a certain accuracy.

[0041] Please see Figure 3 , which is a second schematic diagram of the existing motion estimation method. Figure 3 As shown in the figure, the sub-pixel search submodule is used to improve the accuracy of motion estimation. Based on the matching block obtained by the whole pixel search submodule, the sub-pixel is constructed based on the original whole pixel by interpolation method, so as to perform sub-pixel search at fine-grained pixel precision such as 1 / 2 pixel precision and 1 / 4 pixel precision in the vicinity of the matching block obtained by the whole pixel search submodule, so as to obtain the module of the optimal matching block. Please refer to Figure 4 , which is a schematic diagram of constructing sub-pixels, Figure 4 The circle in the middle is the pixel point at the original integer pixel position, and the triangle is the pixel point at the constructed sub-pixel position, which is generated by integer pixel interpolation.

[0042] Usually in the pixel search submodule, after constructing Figure 4 After the sub-pixel point shown, the matching cost can be calculated based on the interpolated pixel value and the pixel value of the prediction block to search for the optimal sub-pixel position according to the matching cost, wherein the matching cost here can be the absolute error sum of the pixel values ​​in the sub-pixel matching block and the prediction block, or can also be the sum of the absolute values ​​of the coefficients after Hadamard transformation (SATD, Sum of Absolute TransformedDifference). Since the interpolation process in the sub-pixel search submodule involves more multiplication operations, its complexity is relatively high, which also leads to the high complexity of the sub-pixel search process.

[0043] In order to reduce the complexity of the motion estimation process and improve the overall encoding speed of the video encoding process, the embodiment of the present disclosure provides a motion estimation method. Figure 5, which is a flow chart of the motion estimation method provided by the embodiment of the present disclosure. The method can be implemented by an electronic device, which can be a terminal device, for example, a mobile phone, a tablet computer, etc.; or, the electronic device can also be a server, for example, a blade server, a rack server, etc., which is not particularly limited here.

[0044] like Figure 5 The method of this embodiment may include the following steps S5100-S5400, which are described in detail below.

[0045] Step S5100, obtaining a target starting block corresponding to a prediction block to be predicted in a coding frame from a reference frame, wherein the target starting block is an image block in the reference frame used as a search starting position, and a matching cost between the target starting block and the prediction block reflects the intensity of motion and the complexity of texture of the prediction block.

[0046] The coding frame refers to the video frame and / or image frame currently to be coded.

[0047] The prediction block is any one of the multiple coding units obtained after splitting the coding frame into coding units of preset sizes. In the embodiments of the present disclosure, the coding units can be image blocks of 4 pixels * 4 pixels, 8 pixels * 8 pixels and 16 pixels * 16 pixels, and there is no special limitation here.

[0048] A reference frame is a video frame and / or image frame that is related to the content in a coding frame.

[0049] The target start block is an image block in the reference frame used as the search start position. In the disclosed embodiment, for ease of description, the position of the target start block is described by a motion vector between the prediction block and the target start block.

[0050] The accuracy of the target starting block, that is, the starting MV, is very important for whether the global optimal solution can be quickly searched from the reference frame, and it will also affect the accuracy of the selection result of the target integer pixel search algorithm. For example, if the matching cost between the target starting block and the prediction block is large, it means that the motion of the prediction block is more violent and the texture is more complex. At this time, it is often necessary to use a highly complex and accurate integer pixel algorithm to search for the matching block corresponding to the prediction block; otherwise, you can choose to use a faster and relatively less accurate integer pixel search algorithm to search for the matching block corresponding to the prediction block to reduce the encoding complexity and increase the encoding speed. Therefore, if the accuracy of the target starting block can be improved, it will provide a greater reference for the selection of the target integer pixel search algorithm.

[0051] In the prior art, an image block in the reference frame with the same position as the prediction block is generally used as a starting block. However, in the case of violent motion between video sequences, this starting block is often not the optimal solution. In order to improve the accuracy of the target starting block, so that the electronic device can adaptively select the target integer pixel search algorithm to search for the target matching block corresponding to the prediction block, the embodiment of the present disclosure determines the target starting block through the following steps: from the reference frame, at least one image block that has an association relationship with the prediction block in the time domain and / or spatial domain is obtained as a candidate block to construct a candidate block set; by calculating the first distortion value between each candidate block in the candidate block set and the prediction block, a distortion value set is obtained, wherein the first distortion value represents the matching cost between the corresponding candidate block and the prediction block; from the distortion value set, the candidate block corresponding to the first distortion value with the minimum value is selected as the target starting block.

[0052] In an embodiment of the present disclosure, the first distortion value between the candidate block and the prediction block may be obtained by calculating the sum of absolute errors of pixel values ​​of all pixels in the two image blocks.

[0053] Specifically, since image blocks between video sequences often have a certain correlation in the time domain, and the correlation between adjacent image blocks in the same frame in the spatial domain is often large, in an embodiment of the present disclosure, at least one image block that has an association relationship with the prediction block in the time domain and / or spatial domain can be selected in the reference frame as a candidate block to construct a set of candidate blocks.

[0054] The following first describes in detail how to filter and obtain candidate blocks from a reference frame to construct a candidate block set.

[0055] In one embodiment, the candidate block may be obtained by the following process: from a reference frame, an image block whose motion vector with the prediction block satisfies a preset condition is obtained as a candidate block.

[0056] Specifically, since the motion in the video data is continuous, the image motion amplitude between several adjacent video frames is often relatively small, which makes it more likely that the target matching block of the current prediction block is located near the prediction block. Therefore, one or more image blocks in the reference frame that are near the position shown by the prediction block can be used as candidate blocks.

[0057] In this embodiment, the preset condition may be that the displacement represented by the motion vector between the image block in the reference frame and the prediction block is not greater than a preset displacement threshold. For example, when the preset displacement threshold is 1, the candidate block may be an image block whose motion vector between the image block in the reference frame and the prediction block is MV(-1,0), MV(0,-1), MV(0,0), MV(0,1), MV(1,0).

[0058] In specific implementation, considering that the probability that the target starting block is an image block in the reference frame with the same position as the prediction block is usually high, therefore, in order to improve the accuracy of the target starting block, in a preferred embodiment of the present disclosure, the image block in the reference frame with a motion vector MV(0,0) between the image block and the prediction block can also be directly used as a candidate block, that is, the image block in the reference frame with the same position as the prediction block can be used as a candidate block.

[0059] In one embodiment, the candidate block can also be obtained by the following processing: obtaining a historical prediction block corresponding to the prediction block from the coding frame, and taking a historical starting block of the historical prediction block in the reference frame as the candidate block, wherein the historical prediction block is an image block obtained when the coding frame is divided into blocks based on a preset block division method and has the same position as the prediction block.

[0060] The historical prediction block is an image block at the same position as the prediction block in the coded frame. The historical prediction block may be an image block at the same position as the prediction block obtained based on different block division methods.

[0061] Specifically, in the latest video coding standards, for example, video coding standards AVS3, VVS and AV1, more complex image blocks, that is, coding unit division methods, are usually used. This means that different division methods may combine to form the same image block. This means that when performing motion estimation, the prediction block currently being processed may have been decided and processed before, that is, there is corresponding starting block information.

[0062] Please see Figure 6a and Figure 6b , which are schematic diagrams of the prediction block and the historical prediction block provided by the embodiments of the present disclosure. Figure 6a As shown, the prediction block CU1 in the upper left corner can be obtained by combining a quadtree (QT, Quad-Tree) with a binary tree (BT, Binary Tree) partition, or can be obtained by combining a quadtree (QT, Quad-Tree) with QT; according to Figure 6b As shown, Figure 6b The upper left corner is obtained by dividing the parent image block where CU1 is located again, and Figure 6b CU1' shown in the upper left corner is actually the same image block as CU1, only the identification name obtained by recombining is different. Therefore, CU1 can actually be regarded as the historical prediction block of CU1', and CU1 can be regarded as the current prediction block. Since CU1 has been decided, the historical starting block corresponding to CU1 can be directly used as a candidate block of CU1' to improve the accuracy of the current prediction block, that is, the target starting block of CU1.

[0063] In one embodiment, the candidate block may also be obtained by the following process: obtaining, from the reference frame, a reference start block obtained when preprocessing the prediction block as the candidate block.

[0064] Specifically, when encoding video frames in video data based on a video coding standard that includes a preprocessing module, in the preprocessing module, a preliminary decision is usually made based on a low-resolution coding frame corresponding to the coding frame; in this case, during the motion estimation process, the reference starting block obtained when making a decision on the low-resolution image block of the prediction block in the preprocessing module can be used as a candidate block to improve the accuracy of the target starting block.

[0065] In an embodiment, the candidate block may also be obtained by the following process: from the coded frame, obtaining a starting block of other prediction blocks within a preset range of the prediction block in the reference frame as the candidate block.

[0066] Please see Figure 7 , which is a schematic diagram of adjacent coding blocks of a prediction block provided by an embodiment of the present disclosure. Figure 7 As shown, for the current prediction block CU5 to be predicted, the neighboring coding blocks CU2, CU3, and CU4 within its neighborhood have been motion estimated, that is, the starting blocks corresponding to CU2, CU3, and CU4 are known, and based on the principle of spatial correlation between neighboring image blocks in the same video frame, that is, the images in other image blocks around the current prediction block CU5 often have strong similarities, the starting blocks CU2, CU3, CU4, etc. within the preset range of the current prediction block CU5 can be used as candidate blocks of CU5, thereby providing reference information for obtaining the target starting block.

[0067] It should be noted that, in specific implementation, the candidate block corresponding to the current prediction block can be obtained by at least one of the following processes to obtain the candidate block to construct a candidate block set. Of course, other processes can also be used to obtain the candidate block, which is not specifically limited here.

[0068] After obtaining the candidate block set through the above processing, since the candidate blocks in the candidate block set are often image blocks close to the optimal solution, after obtaining the candidate block set, the candidate block corresponding to the minimum distortion value can be used as the target starting block, that is, the candidate block in the candidate block set with the minimum matching cost with the prediction block is used as the target starting block.

[0069] Step S5200: Acquire a characteristic value of the prediction block, wherein the characteristic value reflects the texture complexity of the prediction block.

[0070] In one embodiment, the characteristic value of the prediction block can be obtained by the following steps: calculating the variance of the pixel values ​​of all pixels in the prediction block as the characteristic value.

[0071] Step S5300, determining a target integer pixel search algorithm according to the target starting block and the eigenvalue.

[0072] In the prior art, a matching block that matches the prediction block is usually searched from a reference frame based on a pre-set, single integer pixel search algorithm. However, the accuracy and complexity of different integer pixel search algorithms are often different. For example, the complexity of the diamond search algorithm and the hexagonal search algorithm is low, but it is easier to fall into the local optimal solution; while the cross diamond algorithm and the cross hexagonal search algorithm are easier to find the global optimal solution, but the complexity is often higher. It can be seen that no matter which type of integer pixel search algorithm is used for the existing integer pixel search processing, the motion estimation result will have certain defects.

[0073] To solve this problem, in an embodiment of the present disclosure, by obtaining a target starting block and a feature value reflecting the texture complexity of a prediction block, the electronic device can adaptively select a target integer pixel search algorithm that is more suitable for searching the current prediction block based on the target starting block and the feature value. According to the target integer pixel search algorithm, the problems existing in the existing search processing based on a single integer pixel search algorithm can be overcome. The following is a detailed description of how to determine the target integer pixel search algorithm.

[0074] In one embodiment, determining the target integer pixel search algorithm based on the prediction block, the target starting block and the eigenvalue includes: when the eigenvalue is less than a first preset threshold, determining a first integer pixel search algorithm as the target integer pixel search algorithm; and / or, when the eigenvalue is not less than the first preset threshold, determining a second integer pixel search algorithm as the target integer pixel search algorithm; wherein the algorithm complexity of the first integer pixel search algorithm is lower than that of the second integer pixel search algorithm.

[0075] The first integer pixel search algorithm may be an integer pixel search algorithm with low complexity and lower accuracy than the second integer pixel search algorithm, such as a diamond search algorithm and a hexagonal search algorithm.

[0076] The second integer pixel search algorithm may be an integer pixel search algorithm with high complexity and higher accuracy than the first integer pixel search algorithm, such as a cross diamond search algorithm and a cross hexagon search algorithm.

[0077] Specifically, when the eigenvalue of the prediction block is less than the first preset threshold, that is, smaller, it means that the texture in the prediction block is relatively flat, and the difficulty of searching for the target matching block is often lower. Therefore, at this time, the first integer pixel search algorithm with lower complexity and faster speed can be used as the target integer pixel search algorithm to improve the speed of the integer pixel search under the premise of limited coding quality loss; if the eigenvalue of the prediction block is not less than the first preset threshold, it means that the texture in the prediction block is relatively complex, and the difficulty of searching for the target matching block is often higher. At this time, in order to improve the accuracy, the second integer pixel search algorithm with higher accuracy can be selected as the target integer pixel search algorithm to ensure that the coding quality loss is within the set range.

[0078] In one embodiment, determining the target integer pixel search algorithm based on the prediction block, the target starting block and the characteristic value may also include: calculating a second distortion value between the target starting block and the prediction block; when the second distortion value is less than a second preset threshold, determining the first integer pixel search algorithm as the target integer pixel search algorithm; and / or, when the second distortion value is not less than a second preset threshold, determining the second integer pixel search algorithm as the target integer pixel search algorithm; wherein the algorithm complexity of the first integer pixel search algorithm is lower than that of the second integer pixel search algorithm.

[0079] Specifically, when the second distortion value between the target starting block and the prediction block, for example, the sum of the absolute errors between the target starting block and the prediction block is less than the second preset threshold, it means that the current search starting position is relatively close to the position of the target matching block; in this case, a first integer pixel search algorithm with lower complexity and faster speed can be used as the target integer pixel search algorithm to improve the speed of the integer pixel search under the premise of limited coding quality loss; and if the second distortion value is not less than the first preset threshold, it means that the position deviation between the current starting position and the target matching block is large. In order to improve the accuracy, a second integer pixel search algorithm with high accuracy can be selected as the target integer pixel search algorithm to ensure that the coding quality loss is within the set range.

[0080] In one embodiment, determining a target integer pixel search algorithm based on the prediction block, the target starting block and the characteristic value includes: calculating a motion vector between the prediction block and the target starting block, and calculating a predicted motion vector (MVP, Motion Vector Prediction) of the prediction block; obtaining a difference (MVD, Motion Vector Difference) between the motion vector and the predicted motion vector, and obtaining a bit rate (mvdBits) corresponding to the difference; when the bit rate is less than a third preset threshold, determining a first integer pixel search algorithm as the target integer pixel search algorithm; and / or, when the bit rate is not less than the third preset threshold, determining a second integer pixel search algorithm as the target integer pixel search algorithm; wherein the algorithm complexity of the first integer pixel search algorithm is lower than that of the second integer pixel search algorithm.

[0081] How to calculate the predicted motion vector of the predicted block, the difference and the bit rate corresponding to the difference will not be described in detail here.

[0082] Specifically, in the implementation of the present disclosure, it is found through repeated experiments that the matching blocks of the prediction block are often distributed in an area with a lower bit rate, that is, an area near the image block corresponding to the predicted motion vector; experimental data show that the probability that the target matching block of the prediction block is the image block represented by its predicted motion vector is 87%, and the probability of being distributed in a smaller diamond area near the image block shown by the predicted motion vector is 97%. Therefore, if the bit rate is small, it means that the starting position shown by the target starting block is close to the position of the target matching block. At this time, a first integer pixel search algorithm with relatively low complexity but relatively low accuracy can be used as the target integer pixel search algorithm to improve the speed of the integer pixel search under the premise of limited coding quality loss; and if the bit rate is large, it means that the starting position shown by the target starting block has a large deviation from the position of the target matching block. In order to improve the accuracy, a second integer pixel search algorithm with relatively high complexity but relatively high accuracy can be selected as the target integer pixel search algorithm to ensure that the coding quality loss is within the set range.

[0083] It should be noted that, in specific implementation, at least one of the above processes may be used to determine the target search algorithm, and no special limitation is made here.

[0084] Step S5400 , according to the target integer pixel search algorithm, with the target start block as the search start position, searching from the reference frame to obtain a target matching block.

[0085] After the electronic device determines the target integer pixel search algorithm for integer pixel search processing according to the relevant information of the prediction block through the above steps, the target starting block can be used as the search starting position, and the target integer pixel search algorithm is used to search for the target matching block from the reference frame.

[0086] According to the above description, the motion estimation method provided by the embodiment of the present disclosure is different from the prior art method in which a matching block matching the prediction block is usually searched from a reference frame based on a preset, single integer pixel search algorithm when performing motion estimation. In order to reduce the complexity of motion estimation, the method provided by the embodiment of the present disclosure first obtains a target starting block corresponding to the prediction block and reflecting the motion intensity and texture complexity of the prediction block from a reference frame corresponding to the coding frame, and obtains a feature value reflecting the texture complexity of the prediction block; thereafter, based on the target starting block and the feature value, the electronic device can adaptively select and use a matching target integer pixel search algorithm, and perform motion estimation on the prediction block based on the target integer pixel search algorithm, so as to effectively reduce the complexity of motion estimation under the premise of limited coding quality loss, thereby improving the overall coding speed of video coding processing.

[0087] After the motion estimation algorithm provided by the embodiment of the present disclosure is used for actual video encoding processing, experimental data show that the method can improve the video encoding speed by 2% on average and only cause a 0.02% objective compression efficiency loss. That is, the method can improve the encoding speed of the entire video encoding process without almost reducing the objective performance of the video encoding process and maintaining consistent subjective picture quality, thereby increasing the usage of computing resources on the server side and saving server costs. It can also improve the video decoding speed to reduce the CPU usage of the client and improve the user experience.

[0088] <Device Example>

[0089] Corresponding to the above method embodiment, in this embodiment, a motion estimation device is also provided, such as Figure 8 As described above, the device 100 may include a target starting block acquisition module 110 , a feature value acquisition module 120 , a search algorithm determination module 130 and a search module 140 .

[0090] The target starting block acquisition module 110 is used to acquire a target starting block corresponding to a prediction block to be predicted in a coding frame from a reference frame, wherein the target starting block is an image block in the reference frame used as a search starting position, and the matching cost between the target starting block and the prediction block reflects the motion intensity and texture complexity of the prediction block; the feature value acquisition module 120 is used to acquire a feature value of the prediction block, wherein the feature value reflects the texture complexity of the prediction block; the search algorithm determination module 130 is used to determine a target integer pixel search algorithm according to the prediction block, the target starting block and the feature value; the search module 140 is used to search for a target matching block from the reference frame according to the target integer pixel search algorithm and with the target starting block as the search starting position.

[0091] <Equipment Embodiment>

[0092] In this embodiment, an electronic device is also provided. Fig. 9 As described above, the electronic device 200 may further include a processor 220 and a memory 210, wherein the memory 210 is used to store executable instructions; the processor 220 is used to operate the electronic device according to the control of the instructions to execute the method according to any embodiment of the present disclosure.

[0093] The electronic device 200 may be a terminal device, or may also be a server, which is not limited here.

[0094] <Medium Example>

[0095] Corresponding to the above method embodiments, in this embodiment, a computer-readable storage medium is also provided, which stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method described in any of the above embodiments of the present disclosure when read and executed by the computer.

[0096] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of an instruction, and the module, a program segment or a part of an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.

[0097] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims

1. A motion estimation method, characterized in that: include: Acquire a target start block corresponding to a prediction block to be predicted in a coding frame from a reference frame, wherein the target start block is an image block in the reference frame used as a search start position, and a matching cost between the target start block and the prediction block reflects a motion intensity and a texture complexity of the prediction block; Acquire a feature value of the prediction block, wherein the feature value reflects the texture complexity of the prediction block; Determining a target integer pixel search algorithm according to the prediction block, the target starting block and the characteristic value; According to the target integer pixel search algorithm, taking the target starting block as the search starting position, searching from the reference frame to obtain a target matching block, Wherein, determining the target integer pixel search algorithm according to the prediction block, the target starting block and the characteristic value includes performing at least one of the following processing: When the eigenvalue is less than a first preset threshold, determining a first integer pixel search algorithm as the target integer pixel search algorithm; and / or, when the eigenvalue is not less than the first preset threshold, determining a second integer pixel search algorithm as the target integer pixel search algorithm; Calculating a second distortion value between the target starting block and the prediction block; determining the first integer pixel search algorithm as the target integer pixel search algorithm when the second distortion value is less than a second preset threshold; and / or determining the second integer pixel search algorithm as the target integer pixel search algorithm when the second distortion value is not less than the second preset threshold; Calculating a motion vector between the prediction block and the target starting block, and calculating a predicted motion vector of the prediction block; obtaining a difference between the motion vector and the predicted motion vector, and obtaining a bit rate corresponding to the difference; determining a first integer pixel search algorithm as the target integer pixel search algorithm when the bit rate is less than a third preset threshold; and / or determining a second integer pixel search algorithm as the target integer pixel search algorithm when the bit rate is not less than the third preset threshold, The algorithm complexity of the first integer pixel search algorithm is lower than that of the second integer pixel search algorithm.

2. The method according to claim 1, characterized in that The step of obtaining, from the reference frame, a target starting block corresponding to a prediction block in the coding frame comprises: Acquire, from the reference frame, at least one image block that is associated with the prediction block in the time domain and / or the spatial domain as a candidate block to construct a candidate block set; Obtaining a set of distortion values ​​by calculating a first distortion value between each candidate block in the set of candidate blocks and the prediction block, wherein the first distortion value represents a matching cost between the corresponding candidate block and the prediction block; From the distortion value set, a candidate block corresponding to a first distortion value with a minimum value is selected as the target starting block.

3. The method according to claim 2, characterized in that The candidate block is obtained according to at least one of the following processes: From the reference frame, an image block whose motion vector with the prediction block satisfies a preset condition is obtained as the candidate block; Acquire a historical prediction block corresponding to the prediction block from the coding frame, and use a historical starting block of the historical prediction block in the reference frame as the candidate block, wherein the historical prediction block is an image block obtained when the coding frame is divided into blocks based on a preset block division method and has the same position as the prediction block; From the reference frame, obtaining a reference start block obtained when preprocessing the prediction block as the candidate block; From the coded frame, a starting block of other prediction blocks located within a preset range of the prediction block in the reference frame is obtained as the candidate block.

4. The method according to claim 1, characterized in that: The obtaining the characteristic value of the prediction block comprises: The variance of the pixel values ​​of all pixels in the prediction block is calculated as the feature value.

5. A motion estimation device, characterized in that: include: A target start block acquisition module is used to acquire a target start block corresponding to a prediction block to be predicted in a coding frame from a reference frame, wherein the target start block is an image block in the reference frame used as a search start position, and a matching cost between the target start block and the prediction block reflects the intensity of motion of content in the prediction block; A feature value acquisition module, used to acquire a feature value of the prediction block, wherein the feature value reflects the texture complexity of the prediction block; A search algorithm determination module, used to determine a target integer pixel search algorithm according to the prediction block, the target starting block and the characteristic value; A search module is used to search for a target matching block from the reference frame according to the target integer pixel search algorithm and with the target starting block as the search starting position. The search algorithm determination module is specifically used to perform at least one of the following processes: When the eigenvalue is less than a first preset threshold, determining a first integer pixel search algorithm as the target integer pixel search algorithm; and / or, when the eigenvalue is not less than the first preset threshold, determining a second integer pixel search algorithm as the target integer pixel search algorithm; Calculating a second distortion value between the target starting block and the prediction block; determining the first integer pixel search algorithm as the target integer pixel search algorithm when the second distortion value is less than a second preset threshold; and / or determining the second integer pixel search algorithm as the target integer pixel search algorithm when the second distortion value is not less than the second preset threshold; Calculating a motion vector between the prediction block and the target starting block, and calculating a predicted motion vector of the prediction block; obtaining a difference between the motion vector and the predicted motion vector, and obtaining a bit rate corresponding to the difference; determining a first integer pixel search algorithm as the target integer pixel search algorithm when the bit rate is less than a third preset threshold; and / or determining a second integer pixel search algorithm as the target integer pixel search algorithm when the bit rate is not less than the third preset threshold, The algorithm complexity of the first integer pixel search algorithm is lower than that of the second integer pixel search algorithm.

6. An electronic device, characterized in that: include: A memory for storing executable instructions; A processor is used to operate the electronic device to execute the method according to any one of claims 1 to 4 under the control of the instruction.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that can be read and executed by a computer, and the computer program is used to execute the method according to any one of claims 1 to 4 when being read and executed by the computer.

Citation Information

Patent Citations

  • Motion estimation device and method of video coding system

    CN101227614A

  • Image element motion estimating method and apparatus

    CN101431675A