AVS3 division and intra-frame prediction method based on rapid texture calculation

Through the fast texture calculation method, image texture information is extracted and utilized, CU division and intra prediction in AVS3 encoding are optimized, and the problem of high-resolution video encoding calculation is solved, and efficient real-time encoding is achieved.

CN119420946APending Publication Date: 2025-02-11SICHUAN POLICE COLLEGE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411619315.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In AVS3 encoding, the encoding calculation complexity of high-resolution videos is difficult to meet the real-time requirements. The prior art has a high computing burden and insufficient prediction accuracy when dealing with complex scenarios.

Method used

Using a method based on fast texture calculation, image texture information is extracted through the Sobel operator, and the texture information of the CU is calculated using the integral graph technology to quickly determine the division depth and intra prediction mode of the CU.

Benefits of technology

It significantly reduces the computational complexity of video encoding and improves encoding efficiency. It is especially suitable for real-time encoding of high-definition videos, and solves the problem of texture information overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420946A_ABST
    Figure CN119420946A_ABST
Patent Text Reader

Abstract

The invention discloses an AVS3 division and intra-frame prediction method based on rapid texture calculation, and the method comprises the steps: extracting the texture information of an image at a GPU end through a Sobel operator, and carrying out the parallel calculation of the edge strength and texture direction of the image on the GPU by taking a frame as a unit, and obtaining a detection result; calculating texture information of each CU by using an integrogram technology according to the detection result; quickly determining the division depth of the CU according to the texture information, dividing a region with complex texture into small CUs, and keeping a large CU size in a region with simple texture; in the intra-frame prediction stage, prediction modes are screened layer by layer based on the texture direction of the CU, and the optimal prediction mode is selected according to the texture direction. By optimizing CU division and intra-frame prediction mode selection, the video coding efficiency can be improved, the calculation complexity is remarkably reduced, the method is particularly suitable for real-time coding of high-definition videos, and the overhead problem of using texture information in AVS3 is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of video encoding, and in particular to an AVS3 partitioning and intra-frame prediction method based on fast texture calculation. Background Art

[0002] In the field of audio and video coding and decoding, AVS3, as a new generation of coding standards independently developed by China, introduces more complex coding unit (CU) division and intra-frame prediction mode. This complexity has brought about an improvement in coding efficiency, but it has also significantly increased the computational burden. Most existing coding methods rely on recursive block division and traversal prediction modes. When processing high-resolution videos, the computational complexity increases sharply, making it difficult to meet real-time requirements. Existing technologies attempt to optimize coding efficiency through fast division algorithms based on image texture information, but these methods still have problems with high computational burden and insufficient prediction accuracy when processing complex scenes.

[0003] Traditional video coding standards, such as HEVC and AVS2, use a partitioning strategy based on the largest coding unit (LCU). Each LCU is recursively divided into smaller coding units (CU) according to the quadtree (QT) based on the image content to improve compression efficiency. However, AVS3 introduces the extended quadtree (EQT) and binary tree (BT) partitioning structures on this basis, further increasing the complexity of the partitioning. In terms of intra-frame prediction modes, AVS3 provides 66 different modes, including prediction modes for multiple angles. Although these improvements improve the encoding quality, they also increase the amount of calculation, especially when encoding high-resolution videos, it is difficult to meet real-time requirements. Summary of the invention

[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide an AVS3 partitioning and intra-frame prediction method based on fast texture calculation.

[0005] The objective of the present invention is achieved through the following technical solutions: The present invention provides an AVS3 partitioning and intra-frame prediction method based on fast texture calculation, comprising the following steps: S1. The texture information of the image is extracted by the Sobel operator on the GPU side, and the edge strength and texture direction of the image are calculated in parallel on the GPU in units of frames to obtain the detection result; S2. Calculate the texture information of each CU using the integral map technique according to the detection result described in step S1; S3, according to the texture information in step S2, quickly determine the CU division depth, divide the area with complex texture into small CUs, and keep the large CU size in the area with simple texture; S4. In the intra prediction stage, the prediction modes are screened layer by layer based on the texture direction of the CU, and the optimal prediction mode is selected according to the texture direction.

[0006] Furthermore, the Sobel operator described in step S1 extracts texture information of the image, including: using a 16×16 thread block on the GPU side to read the original data into a shared memory, and because a 3×3 convolution kernel is used, 14×14 threads therein calculate the convolution results of the corresponding pixels with the horizontal and vertical templates of the Sobel operator; after obtaining the Sobel detection result, the result is rotated 90° to obtain the edge direction.

[0007] Furthermore, the integral map technology described in step S2 includes: after obtaining the detection result of step S1, the GPU side will obtain the gradient, horizontal gradient, vertical gradient and edge direction of the current frame; when using the integral map for calculation, first enable the image height pic_height threads, each thread calculates the integral of each row of the three gradient maps, and then enable the image width pic_width threads to calculate the column integral based on the previous step to obtain the final integral map.

[0008] Furthermore, the depth division method described in step S3 includes: after the CU attempts BT division, when the HBT cost is greater than the VBT and the vertical edge strength of the CU is greater than the horizontal edge strength, prohibiting HEQT division, otherwise prohibiting VEQT division.

[0009] Further, the layer-by-layer screening of prediction modes based on the texture direction of the CU described in step S4 includes: dividing the prediction modes into 0~32 and 34~65, first determining the best candidate mode in the 0~32 modes, and then searching for a more accurate mode from 34~65 with the candidate mode as the starting point; reselecting the angle mode of AVS3 in the 0~32 modes with a step size of 4, adding 0, 1 and 2 modes to create an initial search list; then taking the average edge direction of the pixels in the CU as the texture direction of the CU, and adding the angle mode corresponding to the texture direction and its left and right modes to the initial search list; calculating the cost of all modes in the initial search list by the SATD calculation method, and the SATD calculation method is: ; Where M is the width and height of the residual matrix, which is also the width and height of the Hadamard matrix H, represents the original pixel, Represents the predicted pixel; if the three modes with the smallest cost include at least two modes determined according to the texture direction, it is considered that the CU can use the texture direction to determine the prediction mode, otherwise the cost of the remaining modes in modes 0~32 will be calculated; after selecting the three candidate modes with the smallest cost, 6 modes adjacent to the candidate modes on the left and right will be searched in modes 34~65 and the cost will be calculated. Finally, the three modes with the smallest cost will be selected from all the modes with calculated costs to enter the rate-distortion optimization stage.

[0010] The beneficial effects of the present invention are: 1) The present invention can improve video coding efficiency and significantly reduce computational complexity by optimizing CU division and intra-frame prediction mode selection. It is particularly suitable for real-time coding of high-definition video and solves the overhead problem of using texture information in AVS3. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 A schematic flow chart of the steps of an AVS3 partitioning and intra-frame prediction method based on fast texture calculation according to an embodiment of the present invention; Figure 2 A schematic diagram of the general framework of an AVS3 partitioning and intra-frame prediction method based on fast texture calculation according to an embodiment of the present invention; Figure 3 A fast CU partitioning flow chart of an AVS3 partitioning and intra-frame prediction method based on fast texture calculation according to an embodiment of the present invention; Figure 4 A flowchart of a fast search algorithm for intra-frame prediction mode of an AVS3 partitioning and intra-frame prediction method based on fast texture calculation according to an embodiment of the present invention; Figure 5 A rate-distortion curve diagram of the algorithm of the present application and HPM15.0 on the video BasketballDrive according to an embodiment of the present invention; Figure 6 This is a result diagram of comparing a frame of image obtained by encoding and decoding according to the present invention with an image obtained by decoding using HPM15.0. DETAILED DESCRIPTION

[0012] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0013] The present invention provides an AVS3 partitioning and intra-frame prediction method based on fast texture calculation, and the flow chart of its steps is as follows: Figure 1 As shown, the general framework diagram is as follows Figure 2 As shown; specifically including the following steps: S1. The texture information of the image is extracted by the Sobel operator on the GPU side, and the edge strength and texture direction of the image are calculated in parallel on the GPU in units of frames to obtain the detection result; S2. Calculate the texture information of each CU using the integral map technique according to the detection result described in step S1; S3, according to the texture information in step S2, quickly determine the CU division depth, divide the area with complex texture into small CUs, and keep the large CU size in the area with simple texture; S4. In the intra prediction stage, the prediction modes are screened layer by layer based on the texture direction of the CU, and the optimal prediction mode is selected according to the texture direction.

[0014] Specifically, the Sobel operator described in step S1 extracts the texture information of the image, including: using a 16×16 thread block on the GPU side to read the original data into the shared memory, and because a 3×3 convolution kernel is used, 14×14 threads therein calculate the convolution results of the corresponding pixels with the horizontal and vertical templates of the Sobel operator; after obtaining the Sobel detection result, the result is rotated 90° to obtain the edge direction. The Sobel operator can effectively extract the horizontal and vertical edge strength of the image, and its calculation is simple and efficient, and is suitable for parallel acceleration processing of the GPU. In the present invention, the Sobel operator is used to calculate the texture direction and edge strength of each frame of the image, and this information will be used for subsequent CU division and prediction mode selection.

[0015] Specifically, the integral map technology described in step S2 includes: after obtaining the detection result of step S1, the GPU side will obtain the gradient, horizontal gradient, vertical gradient and edge direction of the current frame; when using the integral map for calculation, first enable the image height pic_height threads, each thread calculates the integral of each row of the three gradient maps, and then enable the image width pic_width threads to calculate the column integral based on the previous step to obtain the final integral map. In traditional algorithms, the texture information of each CU needs to be recalculated during the CU division process, resulting in a large number of repeated calculations. The integral map pre-calculates the integral of the edge strength of the pixel points of a frame of the image, so that in the subsequent division process, it is only necessary to query the integral value of the four vertex positions of the corresponding CU, and then obtain the texture information of the current CU through four addition and subtraction operations, avoiding repeated calculations of the same area.

[0016] Specifically, the depth division method described in step S3 includes: after the CU attempts BT division, when the HBT cost is greater than the VBT and the vertical edge strength of the CU is greater than the horizontal edge strength, HEQT division is prohibited, otherwise VEQT division is prohibited. The flowchart of fast CU division is as follows Figure 3As shown in the figure, in the CU division stage, the division depth of the CU is determined according to the extracted texture information. For areas with complex textures, the CU will be divided into smaller units to ensure the encoding quality of the details. For areas with simple textures, the CU maintains a larger size to reduce unnecessary computational burden. In the figure, VBT, HBT, HEQT, and VEQT are the split types of the CU, Gx represents the horizontal gradient of the CU, Gy represents the vertical gradient of the CU, cplx_h represents the ratio of the edge strength of the two sub-blocks after HBT division, and cplx_h represents the ratio of the edge strength of the two sub-blocks after VBT division.

[0017] Specifically, in step S4, the present application filters the prediction mode layer by layer according to the texture direction of the CU. First, all prediction modes are preliminarily screened, and the modes that meet the texture direction are added to the candidate list first. For complex CUs, the algorithm will screen the remaining prediction modes layer by layer, and finally select the optimal prediction mode by calculating the cost function. The layer-by-layer screening of prediction modes based on the texture direction of the CU specifically includes: dividing the prediction modes into 0~32 and 34~65, first determining the best candidate mode in the 0~32 mode, and then searching for a more accurate mode from 34~65 with the candidate mode as the starting point; reselecting the angle mode of AVS3 in the 0~32 mode with a step size of 4, adding modes 0, 1 and 2 to create an initial search list; then taking the average edge direction of the pixels in the CU as the texture direction of the CU, and adding the angle mode corresponding to the texture direction and its left and right modes to the initial search list; calculating the cost of all modes in the initial search list by the SATD calculation method, and the SATD calculation method is: ; Where M is the width and height of the residual matrix, which is also the width and height of the Hadamard matrix H, represents the original pixel, Indicates the predicted pixel; if the three modes with the lowest cost contain at least two modes determined according to the texture direction, it is considered that the CU can use the texture direction to determine the prediction mode, otherwise the cost of the remaining modes in modes 0 to 32 will be calculated; after selecting the three candidate modes with the lowest cost, the six modes adjacent to the candidate modes in modes 34 to 65 will be searched and the cost will be calculated. Finally, the three modes with the lowest cost will be selected from all the modes with calculated costs to enter the rate-distortion optimization stage. The flowchart of the intra-frame prediction mode fast search algorithm is as follows Figure 4 As shown, is the mode determined by the texture direction, These are the three modes with the lowest cost.

[0018] For example, on the video BasketballDrive, the rate distortion curve of HPM15.0 in this application is as follows: Figure 5The result of comparing a frame of image obtained after encoding and decoding in this application with the image decoded by HPM15.0 is shown in FIG. Figure 6 As shown; the experimental results show that the algorithm proposed in the present invention significantly reduces the encoding time while maintaining the image quality, and is particularly suitable for real-time encoding of high-resolution video.

[0019] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. An AVS3 partitioning and intra-frame prediction method based on fast texture calculation, characterized in that: The following steps are involved: S1. The texture information of the image is extracted by the Sobel operator on the GPU side, and the edge strength and texture direction of the image are calculated in parallel on the GPU in units of frames to obtain the detection result; S2. Calculate the texture information of each CU using the integral map technique according to the detection result described in step S1; S3, according to the texture information in step S2, quickly determine the CU division depth, divide the area with complex texture into small CUs, and keep the large CU size in the area with simple texture; S4. In the intra prediction stage, the prediction modes are screened layer by layer based on the texture direction of the CU, and the optimal prediction mode is selected according to the texture direction.

2. The AVS3 partitioning and intra-frame prediction method based on fast texture calculation according to claim 1, characterized in that: The Sobel operator described in step S1 extracts texture information of the image, including: using a 16×16 thread block on the GPU side to read the original data into a shared memory, and because a 3×3 convolution kernel is used, 14×14 threads therein calculate the convolution results of the corresponding pixels with the horizontal and vertical templates of the Sobel operator; after obtaining the Sobel detection result, the result is rotated 90° to obtain the edge direction.

3. The AVS3 partitioning and intra-frame prediction method based on fast texture calculation according to claim 1, characterized in that: The integral graph technology described in step S2 includes: after obtaining the detection result of step S1, the GPU side will obtain the gradient, horizontal gradient, vertical gradient and edge direction of the current frame; when using the integral graph for calculation, first enable the image height pic_height threads, each thread calculates the integral of each row of the three gradient graphs, and then enable the image width pic_width threads to calculate the column integral based on the previous step to obtain the final integral graph.

4. The AVS3 partitioning and intra-frame prediction method based on fast texture calculation according to claim 1, characterized in that: The depth division method described in step S3 includes: after the CU attempts BT division, when the HBT cost is greater than the VBT and the vertical edge strength of the CU is greater than the horizontal edge strength, prohibiting HEQT division, otherwise prohibiting VEQT division.

5. The AVS3 partitioning and intra-frame prediction method based on fast texture calculation according to claim 1, characterized in that: The layer-by-layer screening of prediction modes based on the texture direction of the CU described in step S4 includes: dividing the prediction modes into 0~32 and 34~65, first determining the best candidate mode in the 0~32 modes, and then searching for a more accurate mode from 34~65 with the candidate mode as the starting point; reselecting the angle mode of AVS3 in the 0~32 modes with a step size of 4, adding 0, 1 and 2 modes to create an initial search list; then taking the average edge direction of the pixels in the CU as the texture direction of the CU, and adding the angle mode corresponding to the texture direction and its left and right modes to the initial search list; calculating the cost of all modes in the initial search list by the SATD calculation method, and the SATD calculation method is: ; Where M is the width and height of the residual matrix, which is also the width and height of the Hadamard matrix H, represents the original pixel, Represents the predicted pixel; if the three modes with the smallest cost include at least two modes determined according to the texture direction, it is considered that the CU can use the texture direction to determine the prediction mode, otherwise the cost of the remaining modes in modes 0~32 will be calculated; after selecting the three candidate modes with the smallest cost, 6 modes adjacent to the candidate modes on the left and right will be searched in modes 34~65 and the cost will be calculated. Finally, the three modes with the smallest cost will be selected from all the modes with calculated costs to enter the rate-distortion optimization stage.