A HEVC encoding method based on CU depth division and PU mode decision algorithm

By combining the CU coding block depth information and motion uniformity judgment in the spatial and temporal domains, terminating CU division in advance, and using a step-size decreasing search method, the problems of ignoring time domain correlation and high computational complexity in HEVC coding are solved, achieving more efficient coding.

CN119815040BActive Publication Date: 2025-09-30GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411883162.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-09-30
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The existing HEVC coding method relies on the coding features of the current CU in the current frame, ignoring the crucial time domain correlation in the video sequence, resulting in the CU partitioning strategy being overly conservative or radical, increasing the coding complexity; at the same time, the global exhaustive search algorithm has high computational complexity.

Method used

By obtaining the CU coding block depth information in the spatial and temporal domains, the motion uniformity is calculated to determine whether to terminate the CU coding block division in advance, and a search method with decreasing step size is used to screen the optimal prediction mode.

Benefits of technology

It reduces coding complexity, reduces redundant calculations, improves coding efficiency and speed, and finds the optimal prediction mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815040B_ABST
    Figure CN119815040B_ABST
Patent Text Reader

Abstract

The present invention discloses a HEVC encoding method based on CU depth division and PU mode judgment algorithm, which specifically includes the following steps: determining the depth information of the current CU coding block by utilizing three CU coding blocks adjacent to the current CU coding block in the spatial domain and the CU coding block at the same position as the current CU coding block in the temporal domain, and combining the motion uniformity of the current CU coding block to determine whether to terminate the division of the current CU coding block in advance; using a search method with decreasing step size to screen the prediction mode of the PU prediction block. The present invention solves the problems of the existing HEVC fast CU depth division encoding method, which mainly relies on the encoding features of the current CU in the current frame for judgment, ignores the critical temporal correlation in the video sequence, and may cause the CU division strategy to be too conservative or radical, thereby increasing the encoding complexity, and HEVC usually adopts a global exhaustive search algorithm to determine the optimal prediction mode, and the computational complexity of this algorithm is extremely high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of HEVC encoding, and in particular to an HEVC encoding method based on CU depth division and PU mode decision algorithm. Background Art

[0002] High-Efficiency Video Coding (HEVC), one of the most widely used video coding standards, achieves higher compression efficiency and better video quality. Key steps in the HEVC encoding process include CU (coding unit) depth partitioning and PU (prediction unit) mode determination. Regarding CU depth partitioning, a patent proposes a fast HEVC CU depth partitioning encoding method. The core concept of this method is that after a CU has traversed inter- and intra-frame prediction modes, if the current CU meets specific conditions at the current depth—namely, both the CBF (coding block flag) and MVD (motion vector difference) values ​​are 0, and the optimal prediction mode is inter-PU mode and meets a preset inter-PU mode category—the quadtree partitioning of the CU is terminated early. This strategy effectively reduces the CU depth partitioning computation time for the inter-mode portion, thereby improving coding efficiency. However, this patent primarily relies on the coding features of the current CU in the current frame for this determination, ignoring the crucial temporal correlation in the video sequence, namely, the influence of previous frames on the current frame. This limitation can lead to overly conservative or aggressive CU partitioning strategies, resulting in unnecessary or insufficient depth partitioning, increasing coding complexity. In terms of PU mode determination, HEVC usually uses a global exhaustive search algorithm to determine the optimal prediction mode. This algorithm traverses all modes and selects the one with the smallest cost as the optimal mode. The computational complexity of this algorithm is extremely high. Summary of the Invention

[0003] In response to the above-mentioned defects, the present invention proposes an HEVC encoding method based on CU depth division and PU mode decision algorithm, aiming to solve the problems that the existing HEVC fast CU depth division encoding method mainly relies on the coding features of the current CU in the current frame for judgment, ignores the critical time domain correlation in the video sequence, and may cause the CU division strategy to be too conservative or aggressive, thereby increasing the encoding complexity, and HEVC usually adopts a global exhaustive search algorithm to determine the optimal prediction mode, and the computational complexity of this algorithm is extremely high.

[0004] To achieve this object, the present invention adopts the following technical solutions:

[0005] A HEVC encoding method based on CU depth division and PU mode decision algorithm includes the following steps:

[0006] Step S1: Get the current CU coding block;

[0007] Step S2: Obtain depth information of the CU coding blocks located to the left, above, and above the left of the current CU coding block in the spatial domain, and depth information of the CU coding block at the same position as the current CU coding block in the temporal domain;

[0008] Step S3: predicting the depth range of the current CU coding block based on the depth information of the CU coding blocks located to the left, above, and above-left of the current CU coding block in the spatial domain, and the depth information of the CU coding block at the same position as the current CU coding block in the temporal domain, to obtain a predicted depth range of the current CU coding block, and determining the depth range of the current CU coding block based on the predicted depth range of the current CU coding block;

[0009] Step S4: Calculate the motion uniformity of the current CU coding block within the depth range of the current CU coding block to determine whether the current CU coding block has motion consistency. If so, terminate the division of the current CU coding block in advance; if not, proceed with the division of the current CU coding block.

[0010] Step S5: convert the current CU coding block into a PU prediction block;

[0011] Step S6: Divide the PU prediction block into three reference pixel modes, and calculate the smoothness of the reference pixels in each reference pixel mode to determine the prediction mode range;

[0012] Step S7: Use a search method with decreasing step size to screen the prediction modes within the prediction mode range to select the optimal prediction mode.

[0013] Preferably, in step S3, the specific calculation formula for the predicted depth range of the current CU coding block is as follows:

[0014]

[0015] in, Indicates the predicted depth range of the current CU coding block; n indicates the number of reference CU coding blocks; α i represents the weight coefficient of the i-th reference CU coding block; d i Indicates the optimal depth of the i-th reference CU coding block;

[0016] According to the predicted depth range of the current CU coding block, the depth range of the current CU coding block is determined. The specific mathematical formula is as follows:

[0017]

[0018] Where D represents the depth range of the current CU coding block.

[0019] Preferably, in step S4, the motion uniformity of the current CU coding block is calculated within the depth range of the current CU coding block, specifically including the following sub-steps:

[0020] Step S31: Calculate the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above-left of the current CU coding block in the spatial domain respectively;

[0021] Step S32: According to the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above the current CU coding block in the spatial domain, obtain the horizontal motion uniformity values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above the current CU coding block in the spatial domain. x(i,j) And the uniformity of movement in the vertical direction cu y(i,j) ;

[0022] Step S33: obtaining a total range S covered by the current CU coding block, the 4×4 sub-blocks contained in the CU coding block located to the left of the current CU coding block in the spatial domain, the 4×4 sub-blocks contained in the CU coding block located above the current CU coding block in the spatial domain, and the 4×4 sub-blocks contained in the CU coding block located to the upper left of the current CU coding block in the spatial domain;

[0023] Step S34: obtaining the number N of 4×4 sub-blocks in S;

[0024] Step S35: According to cu x(i,j) ,cu y(i,j) , S and N, calculate the motion uniformity of the current CU coding block. The specific calculation formula is as follows:

[0025]

[0026] Among them, CU x Indicates the motion uniformity of the current CU coding block in the horizontal direction; CU y Indicates the vertical motion uniformity of the current CU coding block.

[0027] Preferably, in step S4, it is determined whether the current CU coding block has motion consistency. If so, the division of the current CU coding block is terminated in advance. If not, the division of the current CU coding block is performed, which specifically includes the following sub-steps:

[0028] If CU x and CU y are all less than the threshold, then the current CU coding block is determined to have motion consistency, and the division of the current CU coding block is terminated in advance; if CU x and CU yIf both are greater than or equal to the threshold, it is determined that the current CU coding block does not have motion consistency, and the current CU coding block is divided.

[0029] Preferably, step S6 specifically includes the following sub-steps:

[0030] Step S61: Divide the PU prediction block into three reference pixel modes, the three reference pixel modes being a mode in which all reference pixels are the same, a mode in which all upper reference pixels and all left reference pixels are the same and the upper reference pixels are different from the left reference pixels, and a mode in which all reference pixels are different.

[0031] Step S62: Calculate the smoothness of the upper reference pixel and the left reference pixel in the three reference pixel modes respectively. The specific calculation formula is as follows:

[0032]

[0033] Among them, H up Indicates the smoothness of the reference pixel; H left Indicates the smoothness of the left reference pixel; m indicates the size of the PU prediction block; represents the upper reference pixel associated with the i-th index; represents the left reference pixel associated with the i-th index; represents the average value of the upper reference pixels; represents the average value of the left reference pixels;

[0034] Step S63: The smoothness H of the upper reference pixel in the three reference pixel modes is up Smoothness H with the left reference pixel left Comparing to determine the prediction mode range of the PU prediction block;

[0035] When H up =H left When H up >H left When H is selected, angle prediction mode 18-34 is selected as the prediction mode range of the PU prediction block; when H is selected, angle prediction mode 18-34 is selected as the prediction mode range of the PU prediction block; up <H left , the angle prediction mode 2-18 is selected as the prediction mode range of the PU prediction block.

[0036] Preferably, step S7 specifically includes the following sub-steps:

[0037] Step S71: Calculate the difference between the two prediction modes at the i-th index and the j-th index to obtain the mode distance e. The specific calculation formula is as follows: e=|ij|, where 2≤i, j≤34;

[0038] Step S72: performing a first screening of the original prediction mode set with e=4 to screen out a first prediction mode set;

[0039] Step S73: performing a second screening on the first prediction mode set with e=2 to screen out a second prediction mode set;

[0040] Step S74 , performing a third screening on the second prediction mode set with e=1 to screen out the optimal prediction mode.

[0041] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:

[0042] In this solution, the depth information of the current CU coding block is determined by utilizing the three CU coding blocks adjacent to the current CU coding block in the spatial domain and the CU coding block at the same position as the current CU coding block in the temporal domain, and the motion uniformity of the current CU coding block is combined to determine whether to terminate the division of the current CU coding block in advance. By combining the CU coding blocks in the spatial domain and the CU coding blocks in the temporal domain, the depth division not only depends on the state of the current frame, but also comprehensively considers the information of the historical frames, which can effectively reduce redundant calculations and depth division operations, thereby reducing the overall coding complexity. This solution determines the optimal prediction mode by adopting a search method with decreasing step size. Compared with the traditional global exhaustive search algorithm, it can effectively skip redundant prediction modes, thereby reducing unnecessary calculations and finding the optimal prediction mode more quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 The present invention is a flowchart of the steps of the HEVC encoding method based on CU depth division and PU mode decision algorithm. DETAILED DESCRIPTION

[0044] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not to be construed as limiting the present invention.

[0045] A HEVC encoding method based on CU depth division and PU mode decision algorithm includes the following steps:

[0046] Step S1: Get the current CU coding block;

[0047] Step S2: Obtain depth information of the CU coding blocks located to the left, above, and above the left of the current CU coding block in the spatial domain, and depth information of the CU coding block at the same position as the current CU coding block in the temporal domain;

[0048] Step S3: predicting the depth range of the current CU coding block based on the depth information of the CU coding blocks located to the left, above, and above-left of the current CU coding block in the spatial domain, and the depth information of the CU coding block at the same position as the current CU coding block in the temporal domain, to obtain a predicted depth range of the current CU coding block, and determining the depth range of the current CU coding block based on the predicted depth range of the current CU coding block;

[0049] Step S4: Calculate the motion uniformity of the current CU coding block within the depth range of the current CU coding block to determine whether the current CU coding block has motion consistency. If so, terminate the division of the current CU coding block in advance; if not, proceed with the division of the current CU coding block.

[0050] Step S5: convert the current CU coding block into a PU prediction block;

[0051] Step S6: Divide the PU prediction block into three reference pixel modes, and calculate the smoothness of the reference pixels in each reference pixel mode to determine the prediction mode range;

[0052] Step S7: Use a search method with decreasing step size to screen the prediction modes within the prediction mode range to select the optimal prediction mode.

[0053] This scheme is a HEVC encoding method based on CU depth division and PU mode decision algorithm, such as Figure 1As shown, the first step is to obtain the current CU coding block. Specifically, by obtaining the CU coding block, it is beneficial to the subsequent depth division processing. The second step is to obtain the depth information of the CU coding blocks located to the left, above, and above the left of the current CU coding block in the spatial domain, as well as the depth information of the CU coding block at the same position as the current CU coding block in the time domain. In this embodiment, since the depth of a CU coding block to be divided is similar to the depth of its spatially adjacent CU coding block, and at the same time, there is a strong temporal and spatial correlation between adjacent frames, the depth of most CU coding blocks is similar to the depth of the divided CU coding block at the same position in the previous frame. Therefore, the depth prediction estimation can be performed with reference to the three CU coding blocks adjacent to the current CU coding block in the spatial domain and the CU coding block at the same position as the current CU coding block in the time domain. The third step is to predict the depth range of the current CU based on the depth information of the CUs located to the left, above, and to the upper left of the current CU in the spatial domain, as well as the depth information of the CUs located at the same position as the current CU in the temporal domain, to obtain the predicted depth range of the current CU. The depth range of the current CU is then determined based on the predicted depth range of the current CU. In this embodiment, determining the depth range of the current CU facilitates the subsequent implementation of the early termination of CU depth splitting strategy based on this. The fourth step is to calculate the motion uniformity of the current CU within the depth range of the current CU to determine whether the current CU exhibits motion consistency. If so, the current CU splitting is prematurely terminated; otherwise, the current CU splitting is continued. In this embodiment, during the video encoding process, regions with simple and uniform textures often exhibit similar motion characteristics. These characteristics make it an efficient option to divide these regions into larger CUs during encoding. Larger-sized CU coding blocks can not only capture and represent the motion characteristics of these areas more effectively, but also avoid the problem of detail loss or quality degradation caused by excessive division. Therefore, accurately judging the motion uniformity of the coding area has become one of the key steps in determining the optimal CU size. This solution can evaluate whether it has motion consistency by calculating the motion uniformity of the current CU coding block. If so, it means that the current CU coding block is the optimal CU size, and the division of the current CU coding block can be terminated in advance, which is conducive to reducing unnecessary coding parameters and calculations, thereby improving the overall efficiency of coding. The fifth step is to convert the current CU coding block into a PU prediction block. In this embodiment, by converting the current CU coding block into a PU prediction block, it is beneficial to the subsequent PU prediction block mode decision.The sixth step is to divide the PU prediction block into three reference pixel modes and calculate the smoothness of each reference pixel mode to determine the prediction mode range. In this embodiment, the three reference pixel modes are respectively a mode in which all reference pixels are the same, a mode in which all upper reference pixels and all left reference pixels are the same and the upper reference pixels are different from the left reference pixels, and a mode in which all reference pixels are different. By calculating the smoothness of the reference pixels under the three reference pixel modes, it is helpful to determine the prediction mode range. The seventh step is to use a search method with a decreasing step size to screen the prediction modes within the prediction mode range to screen out the optimal prediction mode. In this embodiment, the search method with a decreasing step size specifically narrows the search range of the prediction mode with a mode distance of 4, 2, and 1, respectively, to screen out the optimal prediction mode.

[0054] In this solution, the depth information of the current CU coding block is determined by utilizing the three CU coding blocks adjacent to the current CU coding block in the spatial domain and the CU coding block at the same position as the current CU coding block in the temporal domain, and the motion uniformity of the current CU coding block is combined to determine whether to terminate the division of the current CU coding block in advance. By combining the CU coding blocks in the spatial domain and the CU coding blocks in the temporal domain, the depth division not only depends on the state of the current frame, but also comprehensively considers the information of the historical frames, which can effectively reduce redundant calculations and depth division operations, thereby reducing the overall coding complexity. This solution determines the optimal prediction mode by adopting a search method with decreasing step size. Compared with the traditional global exhaustive search algorithm, it can effectively skip redundant prediction modes, thereby reducing unnecessary calculations and finding the optimal prediction mode more quickly.

[0055] Preferably, in step S3, the specific calculation formula for the predicted depth range of the current CU coding block is as follows:

[0056]

[0057] in, Indicates the predicted depth range of the current CU coding block; n indicates the number of reference CU coding blocks; α i represents the weight coefficient of the i-th reference CU coding block; d i Indicates the optimal depth of the i-th reference CU coding block;

[0058] According to the predicted depth range of the current CU coding block, the depth range of the current CU coding block is determined. The specific mathematical formula is as follows:

[0059]

[0060] Where D represents the depth range of the current CU coding block.

[0061] In this embodiment, n is 4, and the reference CU coding blocks are the CU coding blocks located to the left, above, and to the upper left of the current CU coding block in the spatial domain, and the CU coding block at the same position as the current CU coding block in the temporal domain. For the CU coding blocks located to the left and above the current CU coding block in the spatial domain, and the CU coding blocks at the same position as the current CU coding block in the temporal domain, α i Take 0.3, for the CU coding block located in the upper left of the current CU coding block in the spatial domain, α i By determining the depth range of the current CU coding block, it is convenient to implement the early termination of the CU depth division strategy based on this.

[0062] Preferably, in step S4, the motion uniformity of the current CU coding block is calculated within the depth range of the current CU coding block, specifically including the following sub-steps:

[0063] Step S31: Calculate the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above-left of the current CU coding block in the spatial domain respectively;

[0064] Step S32: According to the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above the current CU coding block in the spatial domain, obtain the horizontal motion uniformity values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above the current CU coding block in the spatial domain. x(i,j) And the uniformity of movement in the vertical direction cu y(i,j) ;

[0065] Step S33: obtaining a total range S covered by the current CU coding block, the 4×4 sub-blocks contained in the CU coding block located to the left of the current CU coding block in the spatial domain, the 4×4 sub-blocks contained in the CU coding block located above the current CU coding block in the spatial domain, and the 4×4 sub-blocks contained in the CU coding block located to the upper left of the current CU coding block in the spatial domain;

[0066] Step S34: obtaining the number N of 4×4 sub-blocks in S;

[0067] Step S35: According to cu x(i,j) ,cu y(i,j) , S and N, calculate the motion uniformity of the current CU coding block. The specific calculation formula is as follows:

[0068]

[0069] Among them, CU x Indicates the motion uniformity of the current CU coding block in the horizontal direction; CU yIndicates the vertical motion uniformity of the current CU coding block.

[0070] In this embodiment, by calculating the motion uniformity of the current CU coding block in the horizontal direction and the vertical direction, it is helpful to comprehensively evaluate whether the current CU coding block has motion consistency.

[0071] Preferably, in step S4, it is determined whether the current CU coding block has motion consistency. If so, the division of the current CU coding block is terminated in advance. If not, the division of the current CU coding block is performed, which specifically includes the following sub-steps:

[0072] If CU x and CU y are all less than the threshold, then the current CU coding block is determined to have motion consistency, and the division of the current CU coding block is terminated in advance; if CU x and CU y If both are greater than or equal to the threshold, it is determined that the current CU coding block does not have motion consistency, and the current CU coding block is divided.

[0073] In this embodiment, the threshold is set to 0.5. By terminating the division of the CU coding block with motion consistency in advance, it is beneficial to reduce unnecessary coding parameters and calculation amount, thereby improving the overall coding efficiency.

[0074] Preferably, step S6 specifically includes the following sub-steps:

[0075] Step S61: Divide the PU prediction block into three reference pixel modes, the three reference pixel modes being a mode in which all reference pixels are the same, a mode in which all upper reference pixels and all left reference pixels are the same and the upper reference pixels are different from the left reference pixels, and a mode in which all reference pixels are different.

[0076] Step S62: Calculate the smoothness of the upper reference pixel and the left reference pixel in the three reference pixel modes respectively. The specific calculation formula is as follows:

[0077]

[0078] Among them, H up Indicates the smoothness of the reference pixel; H left Indicates the smoothness of the left reference pixel; m indicates the size of the PU prediction block; represents the upper reference pixel associated with the i-th index; represents the left reference pixel associated with the i-th index; represents the average value of the upper reference pixels; represents the average value of the left reference pixels;

[0079] Step S63: The smoothness H of the upper reference pixel in the three reference pixel modes is up Smoothness H with the left reference pixel left Comparing to determine the prediction mode range of the PU prediction block;

[0080] When H up =H left When H up >H left When H is selected, angle prediction mode 18-34 is selected as the prediction mode range of the PU prediction block; when H is selected, angle prediction mode 18-34 is selected as the prediction mode range of the PU prediction block; up <H left , the angle prediction mode 2-18 is selected as the prediction mode range of the PU prediction block.

[0081] In this embodiment, HEVC intra-frame prediction has a total of 35 prediction modes, which are divided into Planar prediction mode, DC prediction mode and 33 angle prediction modes. Different prediction modes can help the encoder better adapt to different textures and directional structures in the video content, thereby improving video compression efficiency.

[0082] Further explanation: in the process of comparing the smoothness of the upper reference pixel and the left reference pixel, when H up =H left When H up >H left or H up <H left , it indicates that the calculation of the smoothness of the upper reference pixels and the left reference pixels is performed in a mode in which all the upper reference pixels and all the left reference pixels are the same, and the upper reference pixels are different from the left reference pixels, or in a mode in which all the reference pixels are different.

[0083] Preferably, step S7 specifically includes the following sub-steps:

[0084] Step S71: Calculate the difference between the two prediction modes at the i-th index and the i-th index to obtain the mode distance e. The specific calculation formula is as follows: e=|ij|, where 2≤i, j≤34;

[0085] Step S72: performing a first screening of the original prediction mode set with e=4 to screen out a first prediction mode set;

[0086] Step S73: performing a second screening on the first prediction mode set with e=2 to screen out a second prediction mode set;

[0087] Step S74 , performing a third screening on the second prediction mode set with e=1 to screen out the optimal prediction mode.

[0088] In one embodiment, taking the screening of angle prediction modes 2-18 as an example, firstly, the set {2, 6, 10, 14, 18} is selected for cost value calculation, and J SATD Rearrange the set {10, 6, 14, 18, 2}, and perform the first screening of the set {10, 6, 14, 18, 2} with e=4 to screen out the first prediction mode set {10, 6, 14}, where J SATD Represents the sum of the absolute values ​​of the residuals between the current block and the predicted block after Hadamard transformation, which is used as the cost function in the coding algorithm to determine the best prediction mode. Then, in the first prediction mode set {10, 6, 14}, the neighboring modes of e = 2 are {8, 12}, {4, 8} and {12, 16}. The neighboring mode calculation is performed with e = 2, and J is used to calculate the optimal prediction mode. SATD Rearrange the set {8, 10, 6, 4, 12, 14, 16, 18, 2}, and filter out the second prediction mode set {10, 6, 14}. Finally, in the second prediction mode set {10, 6, 14}, the neighbor modes of e=1 are {9, 11}, {5, 7}, and {13, 15}. The neighbor mode calculation is performed with e=1, and J is used to calculate the neighbor mode. SATD Rearrange the set to obtain {8, 9, 10, 7, 6, 11, 5, 4, 12, 14, 16, 18, 2}, from which the optimal prediction mode set {8, 9, 10} is selected.

[0089] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing module, each unit may exist physically separately, or two or more units may be integrated into a single module. The aforementioned integrated modules may be implemented in the form of hardware or in the form of software functional modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.

[0090] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A HEVC encoding method based on CU depth partitioning and PU mode decision algorithm, characterized by: The following steps are involved: Step S1: Get the current CU coding block; Step S2: Obtain depth information of the CU coding blocks located to the left, above, and above the left of the current CU coding block in the spatial domain, and depth information of the CU coding block at the same position as the current CU coding block in the temporal domain; Step S3: predicting the depth range of the current CU coding block based on the depth information of the CU coding blocks located to the left, above, and above-left of the current CU coding block in the spatial domain, and the depth information of the CU coding block at the same position as the current CU coding block in the temporal domain, to obtain a predicted depth range of the current CU coding block, and determining the depth range of the current CU coding block based on the predicted depth range of the current CU coding block; Step S4: Calculate the motion uniformity of the current CU coding block within the depth range of the current CU coding block to determine whether the current CU coding block has motion consistency. If so, terminate the division of the current CU coding block in advance; if not, proceed with the division of the current CU coding block. Step S5: convert the current CU coding block into a PU prediction block; Step S6: Divide the PU prediction block into three reference pixel modes, and calculate the smoothness of the reference pixels in each reference pixel mode to determine the prediction mode range; Step S7: Use a search method with decreasing step size to screen the prediction modes within the prediction mode range to select the optimal prediction mode.

2. The HEVC encoding method based on CU depth division and PU mode decision algorithm according to claim 1, characterized in that: In step S3, the specific calculation formula for the predicted depth range of the current CU coding block is as follows: in, Indicates the predicted depth range of the current CU coding block; n indicates the number of reference CU coding blocks; α i represents the weight coefficient of the i-th reference CU coding block; d i Indicates the optimal depth of the i-th reference CU coding block; According to the predicted depth range of the current CU coding block, the depth range of the current CU coding block is determined. The specific mathematical formula is as follows: Where D represents the depth range of the current CU coding block.

3. The HEVC encoding method based on CU depth division and PU mode decision algorithm according to claim 1, characterized in that: In step S4, the motion uniformity of the current CU coding block is calculated within the depth range of the current CU coding block, which specifically includes the following sub-steps: Step S31: Calculate the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above-left of the current CU coding block in the spatial domain respectively; Step S32: According to the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above the current CU coding block in the spatial domain, obtain the horizontal motion uniformity values ​​of the 4×4 sub-blocks contained in the CU coding blocks located to the left, above, and above the current CU coding block in the spatial domain. x(i,j) And the uniformity of movement in the vertical direction cu y(i,j) ; Step S33: obtaining a total range S covered by the current CU coding block, the 4×4 sub-blocks contained in the CU coding block located to the left of the current CU coding block in the spatial domain, the 4×4 sub-blocks contained in the CU coding block located above the current CU coding block in the spatial domain, and the 4×4 sub-blocks contained in the CU coding block located to the upper left of the current CU coding block in the spatial domain; Step S34: obtaining the number N of 4×4 sub-blocks in S; Step S35: According to cu x(i,j) ,cu y(i,j) , S and N, calculate the motion uniformity of the current CU coding block. The specific calculation formula is as follows: Among them, CU x Indicates the motion uniformity of the current CU coding block in the horizontal direction; CU y Indicates the vertical motion uniformity of the current CU coding block.

4. The HEVC encoding method based on CU depth division and PU mode decision algorithm according to claim 3, characterized in that: In step S4, it is determined whether the current CU coding block has motion consistency. If so, the division of the current CU coding block is terminated in advance. If not, the division of the current CU coding block is performed, which specifically includes the following sub-steps: If CU x and CU y are all less than the threshold, then the current CU coding block is determined to have motion consistency, and the division of the current CU coding block is terminated in advance; if CU x and CU y If both are greater than or equal to the threshold, it is determined that the current CU coding block does not have motion consistency, and the current CU coding block is divided.

5. The HEVC encoding method based on CU depth division and PU mode decision algorithm according to claim 1, characterized in that: In step S6, the following sub-steps are specifically included: Step S61: Divide the PU prediction block into three reference pixel modes, the three reference pixel modes being a mode in which all reference pixels are the same, a mode in which all upper reference pixels and all left reference pixels are the same and the upper reference pixels are different from the left reference pixels, and a mode in which all reference pixels are different. Step S62: Calculate the smoothness of the upper reference pixel and the left reference pixel in the three reference pixel modes respectively. The specific calculation formula is as follows: Among them, H up Indicates the smoothness of the reference pixel; H left Indicates the smoothness of the left reference pixel; m indicates the size of the PU prediction block; represents the upper reference pixel associated with the i-th index; represents the left reference pixel associated with the i-th index; represents the average value of the upper reference pixels; represents the average value of the left reference pixels; Step S63: The smoothness H of the upper reference pixel in the three reference pixel modes is up Smoothness H with the left reference pixel left Comparing to determine the prediction mode range of the PU prediction block; When H up =H left When H up >H left When H is selected, angle prediction mode 18-34 is selected as the prediction mode range of the PU prediction block; when H is selected, angle prediction mode 18-34 is selected as the prediction mode range of the PU prediction block; up <H left , the angle prediction mode 2-18 is selected as the prediction mode range of the PU prediction block.

6. The HEVC encoding method based on CU depth division and PU mode decision algorithm according to claim 1, characterized in that: In step S7, the following sub-steps are specifically included: Step S71: Calculate the difference between the two prediction modes at the i-th index and the j-th index to obtain the mode distance e. The specific calculation formula is as follows: e=|ij|, where 2≤i, j≤34; Step S72: performing a first screening of the original prediction mode set with e=4 to screen out a first prediction mode set; Step S73: performing a second screening on the first prediction mode set with e=2 to screen out a second prediction mode set; Step S74 , performing a third screening on the second prediction mode set with e=1 to screen out the optimal prediction mode.