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

By combining the depth information of CU coded blocks in the airspace and time domains, combining motion uniformity, and using the step-decreasing search method to screen the PU mode, the problems of unreasonable CU division strategy and complex PU mode judgment calculation in the existing HEVC encoding method are solved, and a more efficient coding process is achieved.

CN119815040AActive Publication Date: 2025-04-11GUANGDONG UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing HEVC fast CU depth division encoding method mainly relies on the encoding characteristics of the current CU in the current frame, ignoring the time domain correlation in the video sequence, resulting in the CU division strategy being too conservative or radical, increasing the encoding complexity; at the same time, HEVC adopts a global exhaustive search algorithm in PU mode judgment, and the calculation complexity is extremely high.

Method used

A HEVC encoding method based on CU depth division and PU mode judgment algorithm is proposed. By obtaining the depth information of CU coded blocks in the airspace and time domains, the depth range of the current CU coded block is predicted, and the motion uniformity is used to determine whether the division is aborted in advance; in PU mode judgment, the search method with decreasing step length is used to filter the optimal prediction mode.

Benefits of technology

It effectively reduces redundant calculation and depth division operations, reduces overall coding complexity, and quickly finds the optimal prediction mode, improving coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815040A_ABST
    Figure CN119815040A_ABST
Patent Text Reader

Abstract

The invention discloses an HEVC (High Efficiency Video Coding) method based on CU (Coding Unit) depth division and a PU (Poly Urethane) mode decision algorithm, which specifically comprises the following steps of: determining depth information of a current CU (Coding Unit) coding block by utilizing three CU coding blocks adjacent to the current CU coding block in a space domain and a CU coding block at the same position as the current CU coding block in a time domain; judging whether to stop dividing the current CU coding block in advance or not by combining the motion uniformity of the current CU coding block; and screening the prediction mode of the PU prediction block by using a step length decreasing search method. The method solves the problems that an existing HEVC fast CU depth division coding method mainly depends on coding characteristics of a current CU in a current frame for judgment and ignores crucial time domain correlation in a video sequence, so that a CU division strategy is too conservative or aggressive, coding complexity is increased, and coding efficiency is reduced. And the HEVC generally adopts a global exhaustion search algorithm to determine an optimal prediction mode, and the algorithm is extremely high in calculation complexity.
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 a HEVC encoding method based on CU depth division and PU mode decision algorithm. Background Art

[0002] As one of the currently widely used video coding standards, High Efficiency Video Coding (HEVC) achieves higher compression efficiency and better video quality. The key links of the HEVC encoding process include CU (coding unit) depth division and PU (prediction unit) mode judgment. In terms of CU depth division, a patent proposes a HEVC fast CU depth division encoding method. The core idea of ​​this method is that after the CU traverses the inter-frame and intra-frame prediction modes, if the current CU meets specific conditions at the current depth, that is, the CBF (coding block flag) and MVD (motion vector difference) values ​​are both 0, and the best prediction mode is the inter-frame PU mode and meets the preset inter-frame PU mode category, the quadtree division of the CU is terminated in advance. This strategy effectively reduces the CU depth division operation time of the inter-frame mode part, thereby improving the coding efficiency. However, the patent mainly relies on the coding features of the current CU in the current frame for judgment, ignoring the critical time domain correlation in the video sequence, that is, the impact of historical frames on the current frame. This limitation may cause the CU division strategy to be too conservative or radical, which in turn causes unnecessary depth division or insufficient division, increasing the 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 view of the above defects, the present invention proposes a HEVC encoding method based on CU depth division and PU mode judgment algorithm, aiming to solve the problems that the existing HEVC fast CU depth division encoding method mainly relies on the encoding features of the current CU in the current frame for judgment, ignoring the critical time domain correlation in the video sequence, which 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 the 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 comprises the following steps:

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

[0007] Step S2: Obtain depth information of CU coding blocks located on the left, above, and above-left of the current CU coding block in the spatial domain, and depth information of CU coding blocks 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 according to the depth information of the CU coding blocks located on the left, above and above the 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 the predicted depth range of the current CU coding block, and determining the depth range of the current CU coding block according to the predicted depth range of the current CU coding block;

[0009] Step S4: calculating 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, terminating the division of the current CU coding block in advance; if not, performing 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 of 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 Represents 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] Wherein, 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, which specifically includes the following sub-steps:

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

[0021] Step S32: According to the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located on the left, above and upper left of the current CU coding block in the spatial domain, obtain the motion uniformity cu in the horizontal direction of the 4×4 sub-blocks contained in the CU coding blocks located on the left, above and upper left of 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 sub-blocks of size 4×4 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 uniformity of the motion of the current CU coding block in the vertical direction.

[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 both less than the threshold, 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, in step S6, the following sub-steps are specifically included:

[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 left reference pixels;

[0034] Step S63: The smoothness H of the upper reference pixel in the three reference pixel modes is calculated. up The smoothness H of 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 up <H left , the angle prediction mode 2-18 is selected as the prediction mode range of the PU prediction block.

[0036] Preferably, in step S7, the following sub-steps are specifically included:

[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 on 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 solution provided by the embodiments of the present application may have the following beneficial effects:

[0042] In this scheme, the depth information of the current CU coding block is determined by using 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, and combined with the motion uniformity of the current CU coding block 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 time 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 encoding complexity. This scheme determines the optimal prediction mode by using 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 invention is a flowchart of the steps of 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, and 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 from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

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

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

[0047] Step S2: Obtain depth information of CU coding blocks located on the left, above, and above-left of the current CU coding block in the spatial domain, and depth information of CU coding blocks 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 according to the depth information of the CU coding blocks located on the left, above and above the 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 the predicted depth range of the current CU coding block, and determining the depth range of the current CU coding block according to the predicted depth range of the current CU coding block;

[0049] Step S4: calculating 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, terminating the division of the current CU coding block in advance; if not, performing 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 on the left, above and upper 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 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 can be referred to for depth prediction estimation. The third step is to predict the depth range of the current CU coding block based on the depth information of the CU coding blocks located on the left, above and upper 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 time domain, to obtain the predicted depth range of the current CU coding block, and determine the depth range of the current CU coding block based on the predicted depth range of the current CU coding block. In this embodiment, by determining the depth range of the current CU coding block, it is conducive to the subsequent implementation of the early termination of CU depth division strategy on this basis. The fourth step is to 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, the division of the current CU coding block is terminated in advance. If not, the division of the current CU coding block is performed. In this embodiment, in the video encoding process, for areas with a single and simple texture, their content often exhibits similar motion characteristics. These characteristics make it an efficient choice to divide these areas into larger CU coding blocks 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 scheme 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 are the same 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 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 decreasing step size specifically narrows the search range of the prediction mode with mode distances of 4, 2, and 1 in turn, thereby screening out the optimal prediction mode.

[0054] In this scheme, the depth information of the current CU coding block is determined by using 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, and combined with the motion uniformity of the current CU coding block 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 time 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 encoding complexity. This scheme determines the optimal prediction mode by using 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 of 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 Represents 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] Wherein, 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 on the left, above, and above the left of 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 time domain. For the CU coding blocks located on 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 time domain, α i Take 0.3, for the CU coding block located to the upper left of the current CU coding block in the spatial domain, α i The value is 0.1. By determining the depth range of the current CU coding block, it is helpful to implement the early termination CU depth division strategy on this basis.

[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, which specifically includes the following sub-steps:

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

[0064] Step S32: According to the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located on the left, above and upper left of the current CU coding block in the spatial domain, obtain the motion uniformity cu in the horizontal direction of the 4×4 sub-blocks contained in the CU coding blocks located on the left, above and upper left of 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 sub-blocks of size 4×4 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 uniformity of the motion of the current CU coding block in the vertical direction.

[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 both less than the threshold, 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 helpful to reduce unnecessary coding parameters and calculation amount, thereby improving the overall coding efficiency.

[0074] Preferably, in step S6, the following sub-steps are specifically included:

[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 calculated. up The smoothness H of 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 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, in step S7, the following sub-steps are specifically included:

[0084] Step S71: Calculate the difference between the two prediction modes at the ith index and the ith 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 on 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, a 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 on 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 a cost function in the coding algorithm to determine the best prediction mode. Then, in the first prediction mode set {10, 6, 14}, the neighbor modes of e = 2 are {8, 12}, {4, 8} and {12, 16}. The neighbor mode calculation is performed with e = 2, and J SATD Rearrange the set {8, 10, 6, 4, 12, 14, 16, 18, 2}, and select 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 SATD The set {8, 9, 10, 7, 6, 11, 5, 4, 12, 14, 16, 18, 2} is reordered, from which the optimal prediction mode set {8, 9, 10} is selected.

[0089] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it 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 is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A HEVC encoding method based on CU depth division 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 CU coding blocks located on the left, above, and above-left of the current CU coding block in the spatial domain, and depth information of CU coding blocks 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 according to the depth information of the CU coding blocks located on the left, above and above the 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 the predicted depth range of the current CU coding block, and determining the depth range of the current CU coding block according to the predicted depth range of the current CU coding block; Step S4: calculating 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, terminating the division of the current CU coding block in advance; if not, performing 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 Represents 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: Wherein, 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: respectively calculating the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located on the left, above and above-left of the current CU coding block in the spatial domain; Step S32: According to the motion vector values ​​of the 4×4 sub-blocks contained in the CU coding blocks located on the left, above and upper left of the current CU coding block in the spatial domain, obtain the motion uniformity cu in the horizontal direction of the 4×4 sub-blocks contained in the CU coding blocks located on the left, above and upper left of 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 sub-blocks of size 4×4 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 uniformity of the motion of the current CU coding block in the vertical direction.

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 both less than the threshold, 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 left reference pixels; Step S63: The smoothness H of the upper reference pixel in the three reference pixel modes is calculated. up The smoothness H of 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, angle prediction modes 18-34 are selected as the prediction mode range of the PU prediction block; when H 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 on 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.

Citation Information

Patent Citations

  • Interframe rapid video transcoding method applied to from H. 264 to HEVC

    CN106888379A

  • Method and apparatus for image encoding / decoding

    US20180376137A1

  • Method and Apparatus Using Boundary Matching for Mode Selection in Video Coding System

    US20230224455A1