A method for partitioning coding units based on image characteristics

By classifying coding units using a combination of the Sobel operator and sub-block variance, the problem of H.265/HEVC encoders not considering image characteristics when dividing coding units is solved, resulting in more efficient video coding and coding effects that are more in line with human visual perception.

CN116527907BActive Publication Date: 2026-04-03HEFEI JUNZHENG TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing H.265/HEVC encoders fail to fully consider image characteristics when dividing encoding units, resulting in video encoding distortion distribution that does not conform to human subjective perception, and encoding efficiency needs to be improved.

Method used

The Sobel operator and sub-block variance are combined to determine a reasonable partitioning strategy by classifying coding units into flat, edge, and texture types, and then combining RDCost to partition the coding units.

Benefits of technology

It improves the compression efficiency of video encoding, better matches the subjective perception of the human eye, reduces the bitrate, and supports parallel operation of multiple tree coding units.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527907B_ABST
    Figure CN116527907B_ABST
Patent Text Reader

Abstract

This invention provides a method for partitioning coding units based on image features. Assuming a CTU size of 32x32, the four sub-blocks CU16 of the CTU32 are classified into flat, textured, and edge types, and their classification states are recorded. Partitioning is then performed based on these classification states. A threshold judgment is conducted using the Sobel operator and sub-block variance to determine the flatness, edge, and texture type of the current block. A corresponding partitioning strategy is then provided based on the current block type. Partitioning edge blocks while leaving flat blocks unpartitioned, and partitioning texture blocks based on RDcost, improves the subjective perception for the human eye. Simultaneously, it saves bitrate and makes the partitioning method more reasonable as the number of quantization points (QP) changes. Furthermore, multiple tree coding units (CTUs) are partitioned independently, enabling parallel operations. The method using a combination of Sobel and sub-block variance determines the flatness, edge, and texture type of the current block. Providing a corresponding partitioning strategy based on the current block type improves video compression efficiency while better aligning with subjective human perception.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method for dividing coding units based on image characteristics. Background Technology

[0002] With the widespread application of high-definition video, the original video coding technology can no longer meet the requirements of higher resolution videos. The new technology H.265 / HEVC adapts to larger video sizes based on the original H.264 / AVC. Like H.264 / AVC, it still uses a hybrid coding framework with modules such as intra-frame prediction, inter-frame prediction, transform quantization, inverse transform inverse quantization, filtering, and entropy coding.

[0003] The H.265 / HEVC encoder can flexibly divide the coding unit (CU). The encoder typically determines whether to divide the CU by calculating the RDCost of the current block and the RDCost of its four sub-blocks, and selecting the scheme with the smallest RDCost. That is, if the RDCost for not dividing is smaller than the RDCost for dividing, then no division is performed; otherwise, division is performed.

[0004] Based on the characteristics of human vision, the human eye is more sensitive to flat and edge areas, while paying less attention to complex textured areas. Since video encoding introduces some distortion, introducing this distortion into flat and edge areas can easily reduce the subjective quality of the video. However, introducing distortion into textured areas does not have a significant impact on subjective quality because distortion in complex textured areas is less noticeable to the human eye. Simply put, making messy areas even messier doesn't have a major effect.

[0005] The H.265 / HEVC source code uses RDCost to divide the CU (Compute Unit). It selects the division method with the smallest RDCost by comparing the sum of the RDCost of the current block and its four sub-blocks. However, this division method only determines whether to divide based on the comparison of RDCost and cannot take into account the characteristics of the image, which may not conform to the subjective perception of the human eye in some cases.

[0006] In addition, the commonly used terms in the prior art are as follows:

[0007] H.265 / HEVC: A new video coding protocol.

[0008] CTU: is an independent tree coding unit in H.265 / HEVC, and its size can be 64x64, 32x32, or 16x16.

[0009] CU: Encoding Unit. A CTU contains multiple encoding units (CUs), whose sizes can be 64x64, 32x32, 16x16, or 8x8. In this paper, the CTU is set to 32x32.

[0010] CU quadtree partitioning: In order to adapt to the characteristics of image texture, in H.265 / HEVC, CTU or CU can be divided into 4 sub-CUs; at the same time, it is also possible not to partition, which is more flexible.

[0011] RDCost: In H.265 / HEVC, the value that measures the balance between distortion and bit rate is calculated as RDCost = Distortion + λ * Bit Rate. Distortion is usually represented by the difference between the original pixel value and the pixel value after encoding and decoding. Bit Rate is usually the number of bits required to encode the current block, and λ is the Lagrange multiplier.

[0012] Flat block: All pixels within the CU block remain unchanged or change only slightly.

[0013] Edge block: The area within a CU block where the grayscale changes drastically between objects and is continuous in one direction.

[0014] Texture blocks: Regular or irregular patterns or lines on the surface of objects within a CU block. Variance: Describes the fluctuation of data in a data sample around the mean; the higher the value, the greater the fluctuation. Its formula is...

[0015] Sobel operator: An operator that describes the gradient of an image. Summary of the Invention

[0016] To address the aforementioned issues, this application aims to: divide edge blocks while leaving flat blocks undivided, and divide texture blocks according to RDcost, thus improving the subjective perception for the human eye. Simultaneously, it saves bitrate and makes the partitioning method more reasonable as the number of quantization units (QP) changes. Furthermore, multiple tree coding units (CTUs) are partitioned independently, enabling parallel operations.

[0017] The flatness, edge, and texture type of the current block are determined using a combination of Sobel and sub-block variance.

[0018] By defining the corresponding segmentation strategy based on the type of the current block, the compression efficiency of the video can be improved while better aligning with the subjective perception of the human eye.

[0019] Specifically, the present invention provides a method for partitioning coding units based on image features. In the method, the size of the CTU is set to 32x32. The four sub-blocks CU16 of CTU32 are classified as flat texture edges, and their classification status is recorded. The partitioning is performed based on the classification status. Threshold judgment is performed by using the Sobel operator and the sub-block variance to determine the flatness, edge, and texture type of the current block. The corresponding partitioning strategy is given according to the type of the current block.

[0020] The method includes:

[0021] The four sub-blocks CU16 of CTU32 are classified for flat texture edges, and their classification status is recorded. The sub-blocks are then divided based on their classification status. The process is as follows:

[0022] S1. Calculate the average luminance value avg16 of CU16. Where p(x,y) is the pixel value at the current sub-block coordinates (x,y) and its variance var16. Where p(x,y) is the pixel value of the current sub-block coordinates (x,y). If the intra-block variance of CU16 is less than the threshold of 75 (a fixed value for the experiment), it is determined to be flat and no further division is needed; otherwise, the following steps are performed:

[0023] S2. Calculate the average brightness of the four sub-blocks CU8 in the current CU16. Where p(x,y) is the pixel value at the current sub-block coordinates (x,y), which is...

[0024] The variances of the four sub-blocks CU8 (avg16_sub0, avg16_sub1, avg16_sub2, avg16_sub3) are calculated using the following formula:

[0025] var16_sub=((avg16-avg16_sub0)*(avg16-avg16_sub0)+(avg16-avg16_sub1)*(avg16-avg16_s ub1)+(avg16-avg16_sub2)*(avg16-avg16_sub2)+(avg16-avg16_sub3)*(avg16-avg16_sub3)) / 4

[0026] If the variance among the current four sub-blocks is greater than the threshold of 200 (a fixed value in the experiment), it is determined to be an edge and needs to be divided. If this condition is not met, proceed with the following steps:

[0027] S3. Iterate through the current pixels of CU16, and use the Sobel operators in the x and y directions respectively to calculate the gradients sobel_x and sobel_y of the current pixel in the x and y directions, and calculate the gradient sum sobel_sum = sqrt(sobel_x*sobel_x + sobel_y*sobel_y).

[0028] If the sum of gradients of the current pixel is greater than the threshold 80, this is a fixed value for the experiment of CU16 only. If it is less than 80, no processing is done. Then the current pixel is determined to be a strong gradient point, and the number of strong gradient points of the current CU16 is counted.

[0029] If the total number of strong gradient points in the current CU16 is less than the experimental fixed value of the low threshold low_thrd(30), it is determined to be a flat block and no further division is required.

[0030] If the total number of strong gradient points is greater than or equal to the low threshold low_thrd(30) and less than the experimentally fixed value of the high threshold high_thrd(160), then it is determined to be an edge block and needs to be divided.

[0031] The rest are texture blocks, divided according to the current CU16's RDCost and the RDCost of the sub-blocks;

[0032] S4. The types of the four sub-blocks of CU32 have been classified. If there are edges or divisions in the four sub-blocks CU16, then CU32 needs to be divided.

[0033] Calculate the average value (avg32) of the current CU32 and the average value of the four sub-blocks CU16.

[0034] avg32_sub0, avg32_sub1, avg32_sub2, avg32_sub3, and calculate the variance of the current four sub-blocks CU16.

[0035] var32_sub = ((avg32-avg32_sub0)*(avg32-avg32_sub0)+(avg32-avg32_sub1)*(avg32-avg32_sub1)+(avg32-avg32_sub2)*(avg32-avg32_sub2)+(avg32-avg32_sub3)*(avg32-avg32_sub3)) / 4. If the variance of the four sub-blocks of the current CU32 is greater than the threshold of 200, then partitioning is required; if the sub-blocks of the current CU32 contain both flat blocks and textured blocks, then partitioning is required; if all four sub-blocks are flat, then partitioning is not required; partitioning in other cases is based on the RDCost of the current CU32 and the sub-blocks.

[0036] The method further includes:

[0037] S0, input CTU32×32 blocks;

[0038] S1, determine if the four-sub-block CU16 traversal is complete?

[0039] S1.1, if the four sub-blocks CU16 have not been traversed completely, then continue calculating the mean and variance of the current CU16; further...

[0040] S1.1.1, Determine if the variance is greater than 75?

[0041] If it is less than 75, then CU16 is flat and not divided, and then the process returns to S1 to determine whether the four sub-blocks CU16 have been traversed.

[0042] If it is not less than 75, calculate the mean and variance of the four sub-blocks CU8 of CU16; further in S2, determine whether the variance between the four sub-blocks is greater than 200.

[0043] If it is greater than 200, then CU16 is the edge, and it is divided, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed.

[0044] If it is not greater than 200, then further...

[0045] S3, determine if pixel traversal is complete?

[0046] S3.1, if the pixel traversal is not complete, calculate the current CU16's x and y gradients and the sum of gradients; further...

[0047] S3.1.1, Determine if the sum of gradients of the current pixel is greater than 80?

[0048] If it is greater than 80, it is determined to be a strong gradient point, and then the process returns to step S3 to determine whether the pixel traversal is complete.

[0049] If the value is not greater than 80, it is determined to be a weak gradient point, and then the process returns to step S3.1 to determine whether the pixel traversal is complete; while determining whether the current pixel is a strong gradient point, the strong gradient points are counted, which is the process of counting the number of strong gradient points in the current CU16.

[0050] S3.2, if pixel traversal is complete, then further...

[0051] S3.2.1, Determine if the number of strong gradient points in the current block is less than 30?

[0052] If it is less than 30, then CU16 is flat and not divided, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed.

[0053] If it is not less than 30, then further

[0054] S3.2.2, Determine if the number of strong gradient points in the current block is less than 160?

[0055] If it is less than 160, then CU16 is the edge, and the partition is performed, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed.

[0056] If the value is not less than 160, the current block is determined to be a texture, and the partitioning depends on Rdcost;

[0057] This leads back to step S2, which checks whether the four-sub-block CU16 traversal is complete.

[0058] S1.2, if the traversal of the four-sub-block CU16 is complete, then further...

[0059] S4, determine if the sub-block exists?

[0060] If a sub-block exists, CU32 determines it as a partition; proceed to S5 to end;

[0061] If no sub-block partition exists, calculate the mean and variance of the four sub-blocks CU16 of CU32; further...

[0062] S4.1 Determine if the variance between the four sub-blocks is greater than 200?

[0063] If the value is greater than 200, CU32 determines that partitioning is required; proceed to step S5 to end.

[0064] If it is not greater than 200, then further...

[0065] S4.2, Determine if four sub-blocks simultaneously possess both flatness and texture?

[0066] If both exist simultaneously, CU32 determines that partitioning is required; proceed to step S5 to end.

[0067] If they do not exist simultaneously, then further...

[0068] S4.3, Determine if all sub-blocks are flat?

[0069] If the entire surface is flat, then CU32 is not divided; proceed to S5 and end.

[0070] If not all areas are flat, then the CU32 partition depends on RDCost; proceed to S5 to end;

[0071] S5, End.

[0072] The Sobel operator,

[0073] The x-direction operator is The y-direction operator is G x G y The absolute value of represents the gradient intensity of a pixel in the x and y directions, with the positive and negative signs indicating the direction. The formulas are as follows: Similarly, G is obtained y Where A is a 3x3 block centered on the current pixel, * denotes convolution operation, and the total gradient intensity is... The direction of the total gradient is

[0074] In the method, when the size of the tree coding unit (CTU) is 32×32, it is only necessary to determine the partitioning state of CU16×16 and CU32×32.

[0075] The tree coding unit (CTU) size is set to 32x32. Since HEVC specifies that the minimum size of the CU is 8, it is only necessary to determine the partitioning state of CU16x16 and CU32. At the same time, due to HEVC's bottom-up coding strategy, if CU16 is in a partitioning state, then CU32 must be in a partitioning state.

[0076] Therefore, the advantage of this application is that the method is simple, and the corresponding partitioning strategy is given according to the type of the current block, which improves the compression efficiency of the video while being more in line with the subjective perception of the human eye. Attached Figure Description

[0077] The accompanying drawings, which are provided to further illustrate the invention and form part of this application, are not intended to limit the scope of the invention.

[0078] Figure 1 This is a flowchart illustrating the method of the present invention.

[0079] Figure 2 This is a schematic diagram of the workflow of a specific method according to the present invention. Detailed Implementation

[0080] To better understand the technical content and advantages of the present invention, the present invention will now be described in further detail with reference to the accompanying drawings.

[0081] In this embodiment, the CTU size is set to 32x32. Since HEVC specifies that the minimum CU size is 8, it is only necessary to determine the partitioning state of CU16x16 and CU32. Furthermore, due to HEVC's bottom-up encoding strategy, if CU16 is in a partitioned state, then CU32 must also be in a partitioned state.

[0082] The four sub-blocks CU16 of CTU32 are classified according to their flat texture edges, and their classification status is recorded. The classification status is then used for further subdivision. The process is as follows: Figure 1 As shown:

[0083] S1. Calculate the average luminance value avg16 of CU16. Where p(x,y) is the pixel value at the current sub-block coordinates (x,y) and its variance var16. Where p(x,y) is the pixel value of the current sub-block coordinates (x,y). If the intra-block variance of CU16 is less than the threshold of 75, which is a fixed value in the experiment, it is determined to be flat and no division is required; otherwise, the following steps are performed:

[0084] S2. Calculate the average brightness of the four sub-blocks CU8 in the current CU16.

[0085] Where p(x,y) represents the pixel value at coordinates (x,y) of the current sub-block, and is avg16_sub0, avg16_sub1, avg16_sub2, and avg16_sub3. The variance among the four sub-blocks CU8 is calculated using the formula:

[0086] var16_sub=((avg16-avg16_sub0)*(avg16-avg16_sub0)+(avg16-avg16_sub1)*(avg16-avg16_su b1)+(avg16-avg16_sub2)*(avg16-avg16_sub2)+(avg16-avg16_sub3)*(avg16-avg16_sub3)) / 4;

[0087] If the variance among the current four sub-blocks is greater than the threshold of 200 (which is a fixed experimental value), then it is considered an edge and needs to be divided. If this condition is not met, proceed with the following steps:

[0088] S3. Iterate through the current pixels of CU16, and use the Sobel operators in the x and y directions respectively to calculate the gradients sobel_x and sobel_y of the current pixel in the x and y directions, and calculate the gradient sum sobel_sum = sqrt(sobel_x*sobel_x + sobel_y*sobel_y).

[0089] If the sum of gradients of the current pixel is greater than the threshold 80, this is a fixed value for the experiment of CU16 only. If it is less than 80, no processing is done. Then the current pixel is determined to be a strong gradient point, and the number of strong gradient points of the current CU16 is counted.

[0090] If the total number of strong gradient points in the current CU16 is less than the low threshold low_thrd(30), it is determined to be a flat block and no further division is required;

[0091] If the total number of strong gradient points is greater than or equal to the low threshold low_thrd(30) and less than the high threshold high_thrd(160), it is determined to be an edge block and needs to be divided.

[0092] The rest are texture blocks, divided according to the current CU16's RDCost and the RDCost of the sub-blocks;

[0093] S4. The types of the four sub-blocks of CU32 have been classified. If there are edges or divisions in the four sub-blocks CU16, then CU32 needs to be divided.

[0094] Calculate the average value (avg32) of the current CU32 and the average value of the four sub-blocks CU16.

[0095] avg32_sub0, avg32_sub1, avg32_sub2, avg32_sub3, and calculate the variance of the current four sub-blocks CU16.

[0096] var32_sub = ((avg32-avg32_sub0)*(avg32-avg32_sub0)+(avg32-avg32_sub1)*(avg32-avg32_sub1)+(avg32-avg32_sub2)*(avg32-avg32_sub2)+(avg32-avg32_sub3)*(avg32-avg32_sub3)) / 4. If the variance of the four sub-blocks of the current CU32 is greater than the threshold of 200, then partitioning is required; if the sub-blocks of the current CU32 contain both flat blocks and textured blocks, then partitioning is required; if all four sub-blocks are flat, then partitioning is not required; partitioning in other cases is based on the RDCost of the current CU32 and the sub-blocks.

[0097] like Figure 2 The flowchart shown further describes the workflow of the method:

[0098] S0, input CTU32×32 blocks;

[0099] S1, determine if the four-sub-block CU16 traversal is complete?

[0100] S1.1, if the four sub-blocks CU16 have not been traversed completely, then continue calculating the mean and variance of the current CU16; further...

[0101] S1.1.1, Determine if the variance is greater than 75?

[0102] If it is less than 75, then CU16 is flat and not divided, and then the process returns to S1 to determine whether the four sub-blocks CU16 have been traversed.

[0103] If it is not less than 75, calculate the mean and variance of the four sub-blocks CU8 of CU16; further in S2, determine whether the variance between the four sub-blocks is greater than 200.

[0104] If it is greater than 200, then CU16 is the edge, and it is divided, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed.

[0105] If it is not greater than 200, then further...

[0106] S3, determine if pixel traversal is complete?

[0107] S3.1, if the pixel traversal is not complete, calculate the current CU16's x and y gradients and the sum of gradients; further...

[0108] S3.1.1, Determine if the sum of gradients of the current pixel is greater than 80?

[0109] If it is greater than 80, it is determined to be a strong gradient point, and then the process returns to step S3 to determine whether the pixel traversal is complete.

[0110] If the value is not greater than 80, it is determined to be a weak gradient point, and then the process returns to step S3.1 to determine whether the pixel traversal is complete; while determining whether the current pixel is a strong gradient point, the strong gradient points are counted, which is the process of counting the number of strong gradient points in the current CU16.

[0111] S3.2, if pixel traversal is complete, then further...

[0112] S3.2.1, Determine if the number of strong gradient points in the current block is less than 30?

[0113] If it is less than 30, then CU16 is flat and not divided, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed.

[0114] If it is not less than 30, then further

[0115] S3.2.2, Determine if the number of strong gradient points in the current block is less than 160?

[0116] If it is less than 160, then CU16 is the edge, and the partition is performed, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed.

[0117] If the value is not less than 160, the current block is determined to be a texture, and the partitioning depends on Rdcost; then return to step S2 to determine whether the four-sub-block CU16 traversal is complete;

[0118] S1.2, if the traversal of the four-sub-block CU16 is complete, then further...

[0119] S4, determine if the sub-block exists?

[0120] If a sub-block exists, CU32 determines it as a partition; proceed to S3 to end.

[0121] If no sub-block partition exists, calculate the mean and variance of the four sub-blocks CU16 of CU32; further...

[0122] S4.1 Determine if the variance between the four sub-blocks is greater than 200?

[0123] If the value is greater than 200, CU32 determines that partitioning is required; proceed to step S5 to end.

[0124] If it is not greater than 200, then further...

[0125] S4.2, Determine if four sub-blocks simultaneously possess both flatness and texture?

[0126] If both exist simultaneously, CU32 determines that partitioning is required; proceed to step S5 to end.

[0127] If they do not exist simultaneously, then further...

[0128] S4.3, Determine if all sub-blocks are flat?

[0129] If the entire surface is flat, then CU32 is not divided; proceed to S5 and end.

[0130] If not all areas are flat, then the CU32 partition depends on RDCost; proceed to S5 to end;

[0131] S5, End.

[0132] In summary, this application aims to determine the flatness, edge, and texture type of the current block using a scheme that combines Sobel and sub-block variance.

[0133] By defining the corresponding segmentation strategy based on the type of the current block, the compression efficiency of the video can be improved while better aligning with the subjective perception of the human eye.

[0134] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for partitioning coding units based on image features, characterized in that, In the method described, the size of the tree coding unit (CTU) is set to 32x32. Since HEVC specifies that the minimum size of the CU is 8, it is only necessary to determine the partitioning state of CU16x16 and CU32. The four sub-blocks CU16 of CTU32 are classified as flat texture edges, and their classification states are recorded. The partitioning is performed based on the classification states. Threshold judgment is performed using the Sobel operator and sub-block variance to determine the flatness, edge, and texture type of the current block. The corresponding partitioning strategy is given according to the type of the current block. The method further includes: S1. Calculate the average luminance value avg16 of CU16. Where p(x,y) is the pixel value at the current sub-block coordinates (x,y) and its variance var16. Where p(x,y) is the pixel value at the current sub-block coordinates (x,y); if the intra-block variance of CU16 is less than the threshold of 75, it is determined to be flat and no further division is needed; otherwise, the following steps are performed: The average value of the four sub-blocks CU8 in the current CU16 is calculated to be avg16_sub0, avg16_sub1, avg16_sub2, and avg16_sub3. Where p(x,y) is the pixel value at coordinates (x,y) of the current sub-block, the variance among the four sub-blocks CU8 is calculated using the formula: var16_sub=((avg16-avg16_sub0)*(avg16-avg16_sub0) +(avg16-avg16_sub1)*(avg16-avg16_sub1) +(avg16-avg16_sub2)*(avg16-avg16_sub2) +(avg16-avg16_sub3)*(avg16-avg16_sub3)) / 4; S2. If the variance among the current four sub-blocks is greater than the threshold of 200, it is determined to be an edge and needs to be divided. If not, proceed to the following steps: S3. Iterate through the current pixels of CU16, and use the Sobel operator in the x and y directions respectively to calculate the gradients sobel_x and sobel_y of the current pixel in the x and y directions, and calculate the gradient sum sobel_sum = sqrt(sobel_x*sobel_x + sobel_y*sobel_y). If the sum of gradients of the current pixel is greater than the threshold 80, the current pixel is determined to be a strong gradient point, and the number of strong gradient points in the current CU16 is counted; if it is less than 80, no processing is done; if the total number of strong gradient points in the current CU16 is less than the low threshold low_thrd(30), it is determined to be a flat block and no division is required. If the total number of strong gradient points is greater than or equal to the low threshold low_thrd(30) and less than the high threshold high_thrd(160), it is determined to be an edge block and needs to be divided. The rest are texture blocks, divided according to the current CU16's RDCost and the RDCost of the sub-blocks; S4. Due to HEVC's bottom-up encoding strategy, if CU16 is in a partitioned state, then the current CU32 must be in a partitioned state. The types of the four sub-blocks of the current CTU32 have all been classified. If there are edges or partitions in the four sub-blocks CU16, that is, when judging CTU32, the partitioning status of CU16 has been obtained, then the current CTU32 needs to be partitioned. Calculate the current average value avg32 of CTU32 and the average brightness values ​​avg32_sub0, avg32_sub1, avg32_sub2, and avg32_sub3 of the four sub-blocks CU16. Where p(x,y) is the pixel value at the current sub-block coordinates (x,y), and the variance of the current four sub-blocks CU16 is calculated. var32_sub=((avg32-avg32_sub0)*(avg32-avg32_sub0) +(avg32-avg32_sub1)*(avg32-avg32_sub1) +(avg32-avg32_sub2)*(avg32-avg32_sub2) +(avg32-avg32_sub3)*(avg32-avg32_sub3)) / 4, If the variance of the current CTU32 four sub-blocks is greater than the threshold of 200, then it needs to be divided. If both flat blocks and textured blocks exist in the current CTU32 sub-blocks, and the sub-blocks of the CU have already been determined when the current CU is determined, then it needs to be divided. If all four sub-blocks are flat, then no partitioning is needed; The division of other cases is based on the current CTU32 and the RDCost of the sub-block.

2. The method for dividing coding units based on image features according to claim 1, characterized in that, The method further includes: S0, input CTU32×32 blocks; S1, determine if the four-sub-block CU16 traversal is complete? S1.1, if the four sub-blocks CU16 have not been traversed completely, then continue calculating the mean and variance of the current CU16; further... S1.1.1, Determine if the variance is greater than 75? If it is less than 75, then CU16 is flat and not divided, and then the process returns to S1 to determine whether the four sub-blocks CU16 have been traversed. If it is not less than 75, calculate the mean and variance of the four sub-blocks CU8 of CU16; further in S2, determine whether the variance between the four sub-blocks is greater than 200. If it is greater than 200, then CU16 is the edge, and it is divided, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed. If it is not greater than 200, then further... S3, determine if pixel traversal is complete? S3.1, if the pixel traversal is not complete, calculate the current CU16's x and y gradients and the sum of gradients; further... S3.1.1, Determine if the sum of gradients of the current pixel is greater than 80? If it is greater than 80, it is determined to be a strong gradient point, and then the process returns to step S3 to determine whether the pixel traversal is complete. If the value is not greater than 80, it is determined to be a weak gradient point, and then the process returns to step S3.1 to determine whether the pixel traversal is complete; while determining whether the current pixel is a strong gradient point, the strong gradient points are counted, which is the process of counting the number of strong gradient points in the current CU16. S3.2, if pixel traversal is complete, then further... S3.2.1, Determine if the number of strong gradient points in the current block is less than 30? If it is less than 30, then CU16 is flat and not divided, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed. If it is not less than 30, then further S3.2.2, Determine if the number of strong gradient points in the current block is less than 160? If it is less than 160, then CU16 is the edge, and the partition is performed, and then the process returns to step S1 to determine whether the four sub-blocks CU16 have been traversed. If the value is not less than 160, the current block is determined to be a texture, and the partitioning depends on Rdcost; then return to step S2 to determine whether the four-sub-block CU16 traversal is complete; S1.2, if the traversal of the four-sub-block CU16 is complete, then further... S4, determine if the sub-block exists? If a sub-block exists, CU32 determines it as a partition; proceed to S5 to end; If no sub-block partition exists, calculate the mean and variance of the four sub-blocks CU16 of CU32; further... S4.1 Determine if the variance between the four sub-blocks is greater than 200? If the value is greater than 200, CU32 determines that partitioning is required; proceed to step S5 to end. If it is not greater than 200, then further... S4.2, Determine if four sub-blocks simultaneously possess both flatness and texture? If both exist simultaneously, CU32 determines that partitioning is required; proceed to step S5 to end. If they do not exist simultaneously, then further... S4.3, Determine if all sub-blocks are flat? If the entire surface is flat, then CU32 is not divided; proceed to S5 and end. If not all areas are flat, then the CU32 partition depends on RDCost; proceed to S5 to end; S5, End.

3. The method for dividing coding units based on image features according to claim 1, characterized in that, The Sobel operator The x-direction operator is The y-direction operator is G x G y The absolute value of represents the gradient intensity of a pixel in the x and y directions, with the positive and negative signs indicating the direction. The formulas are as follows: Similarly, G is obtained y Where A is a 3x3 block centered on the current pixel, * denotes convolution operation, and the total gradient intensity is... The direction of the total gradient is 4. The method for dividing coding units based on image features according to claim 1, characterized in that, In the method, When the tree coding unit (CTU) size is 32×32, it is only necessary to determine the partitioning state of CU16×16 and CU32×32.

Citation Information

Patent Citations

  • Fast algorithm suitable for intra-frame prediction division judgment of VVC standard

    CN111818332A