A VVC intra-frame fast coding method based on probability size
Through the VVC intra-frame fast encoding method based on the possibility size, the VVC encoding complexity is optimized, combined with edge texture complexity and gradient change value, and optimized division and prediction, efficient encoding in ordinary devices is achieved, solving the VVC encoding complexity and texture complex block prediction problems significantly reduce encoding time.
Patent Information
- Application Number
- CN202310331439.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2043-03-30
AI Technical Summary
The high complexity of VVC encoding makes it difficult to implement in ordinary video devices. The existing fast encoding methods have poor results in predicting texture complex blocks, and the introduction of machine learning models is too high, resulting in prediction errors.
Using the VVC intra-frame fast encoding method based on the possibility size, by calculating the edge texture complexity and gradient change values of the encoding unit, optimizing the division mode and intra prediction, terminating unnecessary division and prediction in advance, reducing the number of mode traversals, and using Decision tree model and MIP/ISP technology optimized encoding.
While ensuring encoding quality, the encoding time is reduced by 42% on average, which reduces the encoding complexity, changes in the bit rate distortion performance, and significantly reduces the encoding time.
Smart Images

Figure CN116456088B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of video coding, and in particular relates to a VVC intra-frame fast coding method based on possibility size. Background Art
[0002] The intra-frame coding complexity of VVC is about 20 times that of HEVC, and the mode selection complexity is about 30 times that of HEVC. The CU division process based on QTMT accounts for 97% of the total coding time. For most video devices, the computing power of the device is limited, which makes VVC difficult to implement in ordinary video devices. Therefore, while maintaining the original coding performance, significantly reducing the coding complexity has become a hot topic in the current video compression research field. This also plays a big role in promoting the widespread application of VVC.
[0003] There are two main methods to reduce the complexity of VVC coding. The first is the traditional fast coding method based on spatial correlation and texture features. However, this method relies too much on statistical experimental results and has poor prediction effect on blocks with complex textures. The second is a fast coding method based on machine learning. However, since the coding complexity of the VVC coding standard is too high, importing a large machine learning model will increase the computational complexity. When machine learning makes predictions, the most likely result is used as the prediction result. When the probability of several categories is not much different, prediction errors may occur. Summary of the invention
[0004] To solve the above problems, the present invention provides a VVC intra-frame fast encoding method based on possibility size, comprising the following steps:
[0005] S1. Determine the current coding unit CU i Is the size of 32×32? If so, get CU according to the partition possibility method i If not, the existing encoder is used to obtain CU i List of partitions;
[0006] S2. CU is divided according to the division mode in the division list i Divide and get sub-block CU i,j , j = 1, 2, ..., J;
[0007] S3. Using intra-frame prediction possibility method to predict sub-block CU i,j Perform intra-frame prediction to obtain the sub-block CU i,j A rough selection table of intra prediction modes;
[0008] S4. Based on sub-block CU i,j The partition mode rough selection table uses the sub-block early termination prediction method to terminate the CU in advance i division.
[0009] Furthermore, if the current coding unit CU i The size of is 32×32, then according to the partition possibility method, CU is obtained i The process of partitioning the list includes:
[0010] S11. Calculate CU using Prewitt operator i The edge texture complexity in the horizontal, vertical, 45° and 135° directions, which are denoted as G1, G2, G3 and G4 respectively;
[0011] S12. Calculate CU i The overall horizontal gradient change value G5 and the overall vertical gradient change value G6;
[0012] S13. Calculate CU i The mean difference G7 of the two sub-blocks after BTH division, and CU i The mean difference G8 between the two sub-blocks after BTV division;
[0013] S14. Calculate CU i The quantization parameter G9 and the overall variance G 10 ;
[0014] S15. Calculate the probability of the six partition modes of no split, QT, BTH, BTV, TTH and TTV respectively according to the 10 values calculated in S11-S14, and eliminate the partition mode with a probability of 0 to obtain CU i List of partitions.
[0015] Furthermore, CU i The calculation formula of edge texture complexity G1 in the horizontal direction is:
[0016]
[0017] CU i The calculation formula of edge texture complexity G2 in the vertical direction is:
[0018]
[0019] CU i The calculation formula of edge texture complexity G3 in the 45° direction is:
[0020]
[0021] CU i The calculation formula of edge texture complexity G4 in the 135° direction is:
[0022]
[0023] CU i The calculation formula of the overall horizontal gradient change value G5 is:
[0024]
[0025] CU i The calculation formula of the overall vertical gradient change value G6 is:
[0026]
[0027] CU i The calculation formula of the mean difference G7 of two sub-blocks after BTH division is:
[0028]
[0029] CU i The calculation formula of the mean difference G8 of two sub-blocks after BTV division is:
[0030]
[0031] Where m represents the coding unit CU i The height of n represents the coding unit CU i The width, p (i,j) Represents the coding unit CU i For the pixel point with coordinates (i, j), abs() represents the absolute value, mean1 represents the mean of a sub-block after BTH division, mean2 represents the mean of another sub-block after BTH division, mean3 represents the mean of a sub-block after BTV division, and mean4 represents the mean of another sub-block after BTV division.
[0032] Furthermore, step S3 uses the intra-frame prediction possibility method to predict the sub-block CU i,j Perform intra-frame prediction to obtain the sub-block CU i,j The intra-frame prediction mode rough selection table includes:
[0033] S31. Set the intra prediction mode threshold δ and calculate the sub-block CU i,j Possibility of using MIP technologyPro mip and the possibility of using traditional intra mode predictionPro Intra =1-Pro mip ; If you meet Pro mip >δ, then execute step S32; if Pro mip >δ, then execute step S33;
[0034] S32. Using the quantization step selection method to obtain the sub-block CUi,j A rough selection table of intra prediction modes;
[0035] S33. Use Planar mode, DC mode and 65 angle modes to predict and calculate the corresponding preliminary cost Hcost, and then calculate the possibility of using ISP technology Pro isp , if Pro isp >δ, then execute step S34; if Pro isp >δ, then execute step S35;
[0036] S34. Arrange all the preliminary costs Hcost in ascending order, select the prediction modes corresponding to the first N preliminary costs Hcost to form an initial ISP list, add the N prediction modes in the initial ISP list to the MPM list, and obtain the sub-block CU i,j A rough selection table of intra prediction modes;
[0037] S35. Arrange all the preliminary costs Hcost in ascending order, select the prediction modes corresponding to the first N preliminary costs Hcost and add them to the MPM list to obtain the sub-block CU i,j A rough selection table of intra prediction modes.
[0038] Furthermore, step S32 uses a quantization step size selection method to obtain a sub-block CU i,j The intra-frame prediction mode rough selection table includes:
[0039] S321. Design the judgment condition based on the quantization step size, expressed as:
[0040]
[0041] in, Indicates the value of the i-th column and j-th row of the weight matrix with mode number m. Size indicates the maximum number of columns in the weight matrix. Input i represents the input vector after downsampling of the reference pixel, Q step Indicates the quantization step size;
[0042] S322. Judge each MIP mode; select the MIP mode that meets the judgment condition for the sub-block CU i,j Make predictions and calculate the corresponding primary cost Hcost;
[0043] S323. Arrange all the preliminary costs Hcost in ascending order, select the MIP modes corresponding to the first N preliminary costs Hcost and add them to the MPM list to obtain the sub-block CU i,j A rough selection table of intra prediction modes.
[0044] Furthermore, the sub-block early termination prediction method includes:
[0045] S41. Determine sub-block CU i,j Is the size of 32×32? If so, execute step S42; if not, execute step S44;
[0046] S42. Determine sub-block CU i,j Whether it is a coding unit CU i If yes, execute step S44, if no, execute step S43;
[0047] S43. According to the coding unit CU i Divide to get sub-block CU i,j The division mode selects an early termination judgment method, and determines whether to terminate early according to the selected early termination judgment method. If yes, terminate early, and if not, execute step S44;
[0048] S44. Calculate sub-block CU i,j The RDO cost of each prediction mode in the intra-frame prediction mode rough selection table is determined, and it is determined whether there is an initial ISP list. If so, step S45 is executed; if not, step S46 is executed;
[0049] S45. Reconstruct the initial ISP list, calculate the RDO cost of each prediction mode in the reconstructed ISP list, and select the prediction mode corresponding to the minimum RDO cost for encoding;
[0050] S46. Select the prediction mode corresponding to the minimum RDO cost for encoding.
[0051] Further, step S45 includes:
[0052] S451. Construct Planar judgment model, DC judgment model, horizontal and vertical judgment model and other angle judgment models, and set judgment thresholds for the four judgment models respectively;
[0053] S452. Calculate sub-block CU i,j The RDO cost of each prediction mode in the intra-frame prediction mode rough selection table is selected, and the prediction mode corresponding to the minimum RDO cost is selected and recorded as BEST Intra model;
[0054] S453. Reconstruct the initial ISP list according to the RDO cost to obtain a reconstructed ISP list, BEST Intra The mode is also in the rebuilding ISP list;
[0055] S454. Calculate BEST Intra Mode and rebuild ISP list BESTIntra RDOcost ratio between the modes after the mode;
[0056] S455.According to BEST Intra Select the corresponding judgment model for the prediction mode type to which the mode belongs, input the RDOcost ratio calculated in S454 into the judgment model to calculate the skip possibility, and if the skip possibility is greater than the skip threshold, skip rebuilding the BEST in the ISP list Intra The prediction mode behind the mode.
[0057] Furthermore, the early termination judgment method includes a QT early termination judgment method, a BT early termination judgment method and an MT early termination judgment method.
[0058] Beneficial effects of the present invention:
[0059] An optimization method is proposed for the partitioning process and intra-frame prediction process in VVC encoding, which can reduce the encoding time by an average of 42% while ensuring the encoding quality and reduce the encoding complexity.
[0060] The optimization directions for the existing VVC coding technology usually include partition mode optimization and intra-frame prediction mode optimization. In terms of VVC partition mode optimization, existing algorithms usually optimize before coding partitioning or during coding partitioning, and rarely combine the two points to propose an optimization method. The present invention proposes a partition possibility method to optimize before coding partitioning, thereby reducing the number of partition modes that need to be traversed. A method for determining whether to terminate early during the coding process terminates early for some incorrect partition modes and reduces the number of recursions. Experimental results show that the percentage change in the rate-distortion performance (Bjontegaard-Deltarate, BD-rate) of this algorithm increases by an average of 0.63%, and the encoding time decreases by an average of 41.5%.
[0061] In terms of intra-frame prediction mode optimization of VVC, there are currently few optimization methods for newly added coding technologies. The present invention reduces the coding complexity by proposing optimization methods for newly added coding technologies MIP and ISP. First, a decision tree model is constructed to skip the traversal of some newly added coding technologies. For CUs that need to test MIP and ISP, a mathematical method is used to select the mode to reduce the number of modes that need to be tried. Experimental results show that the BD-rate of this algorithm increases by an average of 0.18% and the encoding time is reduced by 13.6%. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a flow chart of the method of the present invention;
[0063] Figure 2 A schematic diagram of a QTMT partition structure according to an embodiment of the present invention;
[0064] Figure 3 It is a CU partition feature weight relationship diagram according to an embodiment of the present invention;
[0065] Figure 4 is a MIP feature weight map according to an embodiment of the present invention;
[0066] Figure 5 This is a size distribution diagram of ISP technology according to an embodiment of the present invention;
[0067] Figure 6 Schematic diagram of ISP local variance calculation according to an embodiment of the present invention;
[0068] Figure 7 It is a diagram of the relationship between the patterns in the Planar judgment model, the DC judgment model, the horizontal and vertical judgment model, and other angle judgment models according to an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0070] The present invention provides a VVC intra-frame fast encoding method based on possibility size, such as Figure 1 As shown, the following steps are included:
[0071] S1. Determine the current coding unit CU i Is the size of 32×32? If so, get CU according to the partition possibility method i If not, the existing encoder is used to obtain CU i List of partitions.
[0072] Specifically, the coding unit CU with a size of 32×32 exists as follows Figure 2 Several partition structures are shown:
[0073] A. If a 32×32 coding unit CU is divided into a binary tree (BT), the horizontal division of the binary tree is as follows Figure 2 As shown by the solid line of the third partition structure, two sub-blocks are obtained, namely, the upper and lower sub-blocks; the vertical division of the binary tree partition is as follows Figure 2 As shown by the solid line of the fourth division structure, two sub-blocks are obtained on the left and on the right; the contents of the two sub-blocks obtained in either direction are different.
[0074] B. If the coding unit CU with a size of 32×32 is divided into a ternary tree (TT), the horizontal division of the ternary tree is as follows Figure 2 As shown by the solid line of the first partition structure, the upper, middle and lower sub-blocks are obtained; the vertical division of the ternary tree partition is as follows Figure 2 As shown by the solid line of the second division structure, three sub-blocks are obtained: left, middle and right. Regardless of the direction, the three sub-blocks obtained may have different texture contents, or the texture contents of one sub-block may be different from those of the other two sub-blocks.
[0075] C. If the coding unit CU with a size of 32×32 is divided into a quadtree (QT), the quadtree division is a binary tree division based on the binary tree division, such as Figure 2 Therefore, in quadtree partitioning, there is often a situation where the texture contents of the four sub-blocks are different, or the texture contents of one sub-block are different from those of the other three sub-blocks.
[0076] When the coding unit CU is not divided, the coding unit CU often has simple texture content. According to the above rule, the present invention designs a division possibility method according to the overall texture complexity and edge texture complexity of the coding unit CU.
[0077] Specifically, based on the above analysis, this embodiment designs a partition possibility method, in which 10 features are selected, including edge texture complexity of the coding unit CU in the horizontal, vertical, 45° and 135° directions, overall horizontal gradient change value, overall vertical gradient change value, mean difference of two sub-blocks after BTH partitioning, mean difference of two sub-blocks after BTV partitioning, quantization parameter and overall variance, to construct a partition decision tree model, and train it to obtain the following: Figure 3 The feature weight relationship diagram shown in the figure is then used to calculate the possibility of each partition mode to obtain a partition list.
[0078] Preferably, if the current coding unit CU i The size of is 32×32, then according to the partition possibility method, CU is obtained i The process of partitioning the list includes:
[0079] S11. Calculate CU using Prewitt operator i The edge texture complexity in the horizontal, vertical, 45° and 135° directions, which are denoted as G1, G2, G3 and G4 respectively;
[0080]
[0081]
[0082]
[0083]
[0084] S12. Calculate CU i The overall horizontal gradient G5 and the overall vertical gradient G6;
[0085]
[0086]
[0087] S13. Calculate CU i The mean difference G7 between the two sub-blocks after BTH (horizontal binary tree) partitioning, and CU i The mean difference G8 between two sub-blocks after BTV (vertical binary tree) partitioning;
[0088]
[0089]
[0090] Where m represents the coding unit CU i The height of n represents the coding unit CU i The width, p (i,j) Represents the coding unit CU i For the pixel point with coordinates (i, j), abs() represents the absolute value, mean1 represents the mean of a sub-block after BTH division, mean2 represents the mean of another sub-block after BTH division, mean3 represents the mean of a sub-block after BTV division, and mean4 represents the mean of another sub-block after BTV division;
[0091] S14. Calculate CU i The quantization parameter G9 and the overall variance G 10 ;
[0092] S15. Input the 10 feature values calculated by S11-S14 into the partition decision tree model to obtain the current coding unit CU i The probability of using the six partitioning modes of no split, QT, BTH, BTV, TTH (horizontal ternary tree) and TTV (vertical ternary tree) is expressed as [pro no_split ,pro qt ,pro bth ,pro btv ,pro tth ,pro ttv ]; Eliminate the partitioning patterns with a probability of 0 and get CU i List of partitions.
[0093] S2. Read CU i The partitioning mode corresponding to the top of the partitioning list stack is read, and then the partitioning mode is removed from the partitioning list and used to divide the CU i , get the sub-block CU i,j , j=1,2,…,J.
[0094] S3. Using intra-frame prediction possibility method to predict sub-block CU i,j Perform intra-frame prediction to obtain the sub-block CU i,j A rough selection table of intra prediction modes.
[0095] Specifically, in VVC video coding technology, MIP technology is used to adapt to diverse pixel distribution and irregular image texture. This improves the prediction effect of some coding units CU, but also increases the coding complexity. In order to further optimize the MIP technology, the present invention analyzes the characteristics of MIP technology intra-frame coding and selects the following standard video sequences for testing.
[0096] Table 1. Probability statistics of CU size and MIP adoption
[0097]
[0098] Table 2 8x8CU texture feature statistics
[0099]
[0100]
[0101] Where W and H represent the width and height of the coding unit CU, respectively. According to the above experimental results, whether to use the MIP technology is related to the size of the CU, and the MIP technology often appears in some prediction units with relatively simple texture features and slowly changing horizontal and vertical gradients. Based on the above findings, this embodiment selects features to construct a traditional intra-frame mode / MIP mode decision model, and trains to obtain the weight of each feature, such as Figure 4 As shown in the figure, F1 and F2 represent the width and height of CU respectively, F3 and F4 represent the mean and variance of CU respectively, and F5 and F6 represent the overall horizontal gradient change value and the overall vertical gradient change value of CU respectively.
[0102] Specifically, the present invention further analyzes the MIP technology, which includes a variety of different MIP modes, each of which corresponds to a weight matrix. When two MIP modes (i.e., two different weight matrices) are used to predict the pixel at the same position, the difference between the two prediction results is:
[0103]
[0104] Where Z j It indicates the difference between the results when two MIP modes predict the same pixel position. Indicates the value of the jth row and ith column of the weight matrix corresponding to the MIP mode with mode number m. i It represents the i-th input vector after the reference pixel is downsampled. When performing MIP prediction on the same coding unit CU, the input vector is always the same. According to the Cauchy inequality, we can get:
[0105]
[0106] If the predicted pixel difference between two different MIP modes satisfies the following formula:
[0107]
[0108] Satisfying equation (11) is equivalent to satisfying the following equation:
[0109]
[0110] It can be considered that the prediction effects of these two MIP modes are the same at the same location. step is the quantization step size.
[0111] When the predicted pixel differences of the two MIP modes at all positions of the CU satisfy equation (12), it is considered that the two MIP modes have the same prediction effect on the same CU, so it is only necessary to determine whether the maximum value of the predicted pixel difference of the two MIP modes at all positions of the CU satisfies the following conditions:
[0112]
[0113] Therefore, the maximum difference between the current weight matrix and the remaining unpredicted weight matrices can be calculated in advance and imported into the encoder, thereby saving computational complexity.
[0114] Specifically, assuming that there are 7 MIP modes with mode numbers 0-6, the MIP mode with mode number 0 is first calculated and judged. If it and the two MIP modes with mode numbers 1 and 5 satisfy formula (13), it means that the prediction effects of the two MIP modes with mode numbers 1 and 5 are the same as the prediction effect of the MIP mode with mode number 0, then the two MIP modes with mode numbers 1 and 5 are excluded, and the calculation and judgment of the MIP mode with mode number 1 is directly skipped; then the MIP mode with mode number 2 and the MIP modes with mode numbers 3, 4, and 6 are calculated and judged. If it and the two MIP modes with mode numbers 3 and 6 satisfy formula (13), the two MIP modes with mode numbers 3 and 6 are excluded; therefore, the MIP modes with mode numbers 0, 2, and 4 are finally selected for prediction.
[0115] Specifically, in VVC video coding technology, ISP technology is also used for intra-frame prediction. The present invention conducts experimental statistics on the possibility of using ISP technology on the basis of traditional intra-frame mode prediction:
[0116] Table 3
[0117]
[0118]
[0119] ISP technology divides the CU into two or four sub-blocks according to the CU size. Analysis shows that the probability of using ISP when the CU size is 4x8 or 8x4 and is divided into two sub-blocks is similar to the probability of using ISP when the CU size is other sizes and is divided into four sub-blocks. For this reason, we further count the CU sizes that use ISP. For intuitive visualization, we classify the sizes with equal width and height into one category, such as 4x8 and 8x4 into one category for statistics. Figure 5 .
[0120] ISP technology can solve the problem that the energy of participating pixels is concentrated in the farthest area of CU relative to the reference pixel. This problem often occurs in CUs with low correlation between the farthest area and the reference pixel. For this reason, this embodiment studies the difference between CU prediction using traditional intra-frame mode and ISP prediction. In image processing, the variance can often reflect the degree of dispersion of image data. If the variance is small, it means that the offset distance from the mean is small and the correlation inside the image is high. If the variance is large, it means that the correlation inside the image is low and the content of the image is richer. The overall variance and local variance were calculated for the two prediction methods respectively. It was found that the variance of the CU predicted by ISP was smaller than that of the CU predicted by intra-frame mode.
[0121] Specifically, ISP has two types of division: horizontal division and vertical division. Therefore, the calculation of the local variance when CU uses ISP prediction should be divided into two cases. If the optimal division method when CU uses ISP is horizontal division, then Figure 6 After dividing the CU as shown on the left side of the diagram, the overall variance of all sub-blocks is calculated and averaged to obtain the local variance of the CU; if the optimal division method for CU using ISP is vertical division, then Figure 6 After dividing as shown in the schematic diagram on the right, the overall variance of all sub-blocks is calculated and averaged to obtain the local variance of the CU.
[0122] Preferably, based on the above experimental analysis of the MIP technology and the ISP technology, this embodiment designs an intra-frame prediction possibility method. Step S3 uses the intra-frame prediction possibility method to predict the sub-block CU. i,j Perform intra-frame prediction to obtain the sub-block CUi,j The intra-frame prediction mode rough selection table includes:
[0123] S31. Set the intra prediction mode threshold δ and calculate the sub-block CU through the traditional intra mode / MIP mode decision model i,j Possibility of using MIP technologyPro mip and the possibility of using traditional intra mode predictionPro Intra =1-Pro mip ; If you meet Pro mip >δ, then execute step S32; if Pro mip >δ, then execute step S33;
[0124] S32. Using the quantization step selection method to obtain the sub-block CU i,j A rough selection table of intra prediction modes;
[0125] Specifically, step S32 adopts the quantization step size selection method to obtain the sub-block CU i,j The intra-frame prediction mode rough selection table includes:
[0126] S321. Design a judgment condition based on the quantization step size, as shown in formula (13);
[0127] S322. Judge each MIP mode; select the MIP mode that meets the judgment condition for the sub-block CU i,j Make predictions and calculate the corresponding primary cost Hcost;
[0128] S323. Arrange all the preliminary costs Hcost in ascending order, select the MIP modes corresponding to the first N preliminary costs Hcost and add them to the MPM list to obtain the sub-block CU i,j A rough selection table of intra prediction modes.
[0129] S33. Use Planar mode, DC mode and 65 angle modes to predict and calculate the corresponding preliminary cost Hcost, and then calculate the possibility of using ISP technology Pro isp , if Pro isp >δ, then execute step S34; if Pro isp >δ, then execute step S35;
[0130] S34. Arrange all the preliminary costs Hcost in ascending order, select the prediction modes corresponding to the first N preliminary costs Hcost to form an initial ISP list, add the N prediction modes in the initial ISP list to the MPM list, and obtain the sub-block CU i,j A rough selection table of intra prediction modes;
[0131] S35. Arrange all the preliminary costs Hcost in ascending order, select the prediction modes corresponding to the first N preliminary costs Hcost and add them to the MPM list to obtain the sub-block CU i,j A rough selection table of intra prediction modes.
[0132] S4. Based on sub-block CU i,j The partition mode rough selection table uses the sub-block early termination prediction method to terminate the CU in advance i division.
[0133] Preferably, the sub-block early termination prediction method comprises:
[0134] S41. Determine sub-block CU i,j Is the size of 32×32? If so, execute step S42; if not, execute step S44;
[0135] S42. Determine sub-block CU i,j Whether it is a coding unit CU i If yes, execute step S44, if no, execute step S43;
[0136] S43. According to the coding unit CU i Divide to get sub-block CU i,j The division mode selects an early termination judgment method, and determines whether to terminate early according to the selected early termination judgment method. If yes, execute step S48, if not, execute step S44;
[0137] Specifically, based on the coding unit CU i The adopted division mode designs the early termination judgment method, which includes the QT early termination judgment method, the BT early termination judgment method and the TT early termination judgment method.
[0138] If the current sub-block CU i,j By CU i After the QT is divided, the QT early termination judgment method is selected, including: judging the current sub-block CU i,j By CU i The sub-block obtained by QT division, if it is the second sub-block, determine whether to terminate early according to QT early termination model 1; if it is the third sub-block, determine whether to terminate early according to QT early termination model 2; if it is the fourth sub-block, determine whether to terminate early according to QT early termination model 3.
[0139] If the current sub-block CU i,j By CU i After BT division, the BT early termination judgment method is selected, that is, the BT early termination model is selected to predict whether to terminate early.
[0140] If the current sub-block CU i,j By CU i After TT division, the TT early termination judgment method is selected, including: judging the current sub-block CU i,j By CU i The sub-block obtained by TT partitioning, if it is the second sub-block, determine whether to terminate early according to TT early termination model 1; if it is the third sub-block, determine whether to terminate early according to TT early termination model 2.
[0141] Specifically, QT early termination model 1, QT early termination model 2, QT early termination model 3, BT early termination model, TT early termination model 1 and TT early termination model 2 are all set with corresponding termination possibility thresholds. The termination possibility size of the calculated sub-block is compared with the termination possibility threshold. If it is greater than the termination possibility threshold, early termination is performed.
[0142] S44. Calculate sub-block CU i,j The RDO cost of each prediction mode in the intra-frame prediction mode rough selection table is determined, and it is determined whether there is an initial ISP list. If so, step S45 is executed; if not, step S46 is executed;
[0143] S45. Reconstruct the initial ISP list, calculate the RDOcost of each prediction mode in the reconstructed ISP list, and select the prediction mode corresponding to the minimum RDO cost for encoding;
[0144] Preferably, step S45 includes:
[0145] S451. Construct Planar judgment model, DC judgment model, horizontal and vertical judgment model and other angle judgment models, and set judgment thresholds for the four judgment models respectively;
[0146] S452. Calculate sub-block CU i,j The RDO cost of each prediction mode in the intra-frame prediction mode rough selection table is sorted in ascending order according to the RDOcost value, expressed as [RDOcost1, RDOcost2, …, RDOcostN], where N ranges from 3 to 6; the prediction mode corresponding to the minimum RDO cost is selected and recorded as BEST Intra model;
[0147] S453. The initial ISP list is reconstructed to obtain a reconstructed ISP list, in which various prediction modes are arranged in order, expressed as [Planar, BEST Intra , 65 angles, DC];
[0148] Specifically, put Planar mode first in the rebuilt ISP list, and ignore BEST at this time. Intra The specific prediction mode belongs to which one, and put it in the second place of the reconstructed ISP list, and then sort the 65 angle modes and DC mode in ascending order according to the RDO cost of the prediction mode. The main purpose of this step is to determine whether BEST can be skipped Intra The prediction mode behind the mode, and [Planar, BEST Intra , 65 angles, DC] This is just a form of expression; if BEST Intra If the mode is Planar mode, the actual content of the reconstructed ISP list should be expressed as [Planar, 65 angles, DC]; if BEST Intra mode is one of the 65 angle modes, the actual content of the reconstructed ISP list should be expressed as [Planar, BEST Intra , 64 angles, DC]; if BEST Intra If the mode is DC mode, the actual content of the reconstructed ISP list should be expressed as [Planar, DC, 64 angles].
[0149] S454. If BEST Intra If the mode is Planar mode, calculate the RDOcost ratio between Planar mode and the next mode after Planar mode in the rebuilt ISP list; if BEST Intra If the mode is not Planar mode, calculate BEST Intra Mode and rebuild ISP list BEST Intra RDOcost ratio between the modes after the mode;
[0150] Specifically, the calculation formula of the RDOcost ratio is:
[0151]
[0152] Among them, RDcost i Represents the RDO cost of the i-th prediction mode in the reconstructed ISP list. If BEST Intra The mode is Planar mode, i is 1; BEST Intra The mode is not Planar mode and the value of i is 2.
[0153] S455.According to BEST Intra Select the corresponding judgment model for the prediction mode type to which the mode belongs, input the RDOcost ratio calculated in S454 into the judgment model to calculate the skip possibility, and if the skip possibility is greater than the skip threshold, skip rebuilding the BEST in the ISP list IntraThe prediction mode behind the mode.
[0154] Specifically, the pattern relationships among the Planar judgment model, DC judgment model, horizontal and vertical judgment model, and other angle judgment models constructed in S451 are as follows: Figure 7 As shown in (a), (b), (c), and (d), the horizontal axis represents the RDOcost ratio, and the vertical axis represents the skip possibility. The skip possibility can also be considered as the BEST in the reconstructed ISP list. Intra The probability that a mode and its previous predicted mode will become the optimal mode is obtained based on statistical data. Figure 7 As shown in (a) in the figure, if the skip threshold is set to 0.85, the horizontal axis in the figure must be greater than 15% and the vertical axis will be greater than 0.85. Therefore, if the calculated RDOcost ratio is greater than 15%, there is no need to perform the subsequent prediction mode.
[0155] Specifically, the calculation formula for the skip possibility in the pattern relationship is:
[0156]
[0157] Among them, Pro(i) represents the possibility that the first i prediction modes in the reconstructed ISP list become the best, and Idx=1 represents BEST Intra The mode is the Planar mode, α represents the constant value of the mathematical model, and β represents the constant value of the mathematical model.
[0158] S46. Select the prediction mode corresponding to the minimum RDO cost for encoding, and execute step S47;
[0159] S47. Determine sub-block CU i,j Whether it is a coding unit CU i If the last sub-block is divided, then execute step S48, if not, then use the next sub-block CU i,j+1 Return to step S31;
[0160] S48. Determine the coding unit CU i Whether there is still a partitioning mode in the partitioning list, if so, return to S2, if not, complete the current depth CU prediction.
[0161] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A VVC intra-frame fast coding method based on probability size, It is characterized in that The following steps are involved: S1. Determine the current coding unit CU i Is the size of 32×32? If so, get CU according to the partition possibility method i If not, the existing encoder is used to obtain CU i List of partitions; If the current coding unit CU i The size of is 32×32, then according to the partition possibility method, CU is obtained i The process of partitioning the list includes: S11. Calculate CU using Prewitt operator i The edge texture complexity in the horizontal, vertical, 45° and 135° directions is represented by G 1 , G 2 , G 3 and G 4 ; S12. Calculate CU i The overall horizontal gradient change value G 5 And the overall vertical gradient change value G 6 ; S13. Calculate CU i The mean difference G between the two sub-blocks after BTH partitioning 7 , and CU i The mean difference G between the two sub-blocks after BTV division 8 ; S14. Calculate CU i The quantization parameter G 9 and the overall variance G 10 ; S15. Calculate the probability of the six partition modes of no split, QT, BTH, BTV, TTH and TTV respectively according to the 10 values calculated in S11-S14, and eliminate the partition mode with a probability of 0 to obtain CU i List of partitions; S2. CU is divided according to the division mode in the division list i Divide and get sub-block CU i,j , j = 1, 2, ..., J; S3. Using intra-frame prediction possibility method to predict sub-block CU i,j Perform intra-frame prediction to obtain the sub-block CU i,j A rough selection table of intra prediction modes; Step S3 uses the intra-frame prediction possibility method to predict the sub-block CU i,j Perform intra-frame prediction to obtain the sub-block CU i,j The intra-frame prediction mode rough selection table includes: S31. Set the intra prediction mode threshold δ and calculate the sub-block CU i,j Possibility of using MIP technologyPro mip and the possibility of using traditional intra mode predictionPro Intra =1-Pro mip ; If you meet Pro mip >δ, then execute step S32; if Pro mip >δ, then execute step S33; S32. Using the quantization step selection method to obtain the sub-block CU i,j A rough selection table of intra prediction modes; S33. Use Planar mode, DC mode and 65 angle modes to predict and calculate the corresponding preliminary cost Hcost, and then calculate the possibility of using ISP technology Pro isp , if Pro isp >δ, then execute step S34; if Pro isp >δ, then execute step S35; S34. Arrange all the preliminary costs Hcost in ascending order, select the prediction modes corresponding to the first N preliminary costs Hcost to form an initial ISP list, add the N prediction modes in the initial ISP list to the MPM list, and obtain the sub-block CU i,j A rough selection table of intra prediction modes; S35. Arrange all the preliminary costs Hcost in ascending order, select the prediction modes corresponding to the first N preliminary costs Hcost and add them to the MPM list to obtain the sub-block CU i,j A rough selection table of intra prediction modes; S4. Based on sub-block CU i,j The intra-frame prediction mode rough selection table uses the sub-block early termination prediction method to terminate the CU in advance i Division of Sub-block early termination prediction methods include: S41. Determine sub-block CU i,j Is the size of 32×32? If so, execute step S42; if not, execute step S44; S42. Determine sub-block CU i,j Whether it is a coding unit CU i If yes, execute step S44, if no, execute step S43; S43. According to the coding unit CU i Divide to get sub-block CU i,j The division mode selects an early termination judgment method, and determines whether to terminate early according to the selected early termination judgment method. If yes, terminate early, and if not, execute step S44; S44. Calculate sub-block CU i,j The RDO cost of each prediction mode in the intra-frame prediction mode rough selection table is determined, and it is determined whether there is an initial ISP list. If so, step S45 is executed; if not, step S46 is executed; S45. Reconstruct the initial ISP list, calculate the RDO cost of each prediction mode in the reconstructed ISP list, and select the prediction mode corresponding to the minimum RDO cost for encoding; S46. Select the prediction mode corresponding to the minimum RDO cost for encoding.
2. A VVC intra-frame fast encoding method based on probability size according to claim 1, It is characterized in that CU i The edge texture complexity G in the horizontal direction 1 The calculation formula is: CU i The edge texture complexity G in the vertical direction 2 The calculation formula is: CU i Edge texture complexity G in the 45° direction 3 The calculation formula is: CU i Edge texture complexity G in the 135° direction 4 The calculation formula is: CU i The overall horizontal gradient change value G 5 The calculation formula is: CU i The overall vertical gradient change value G 6 The calculation formula is: CU i The mean difference G between the two sub-blocks after BTH partitioning 7 The calculation formula is: CU i The mean difference G between the two sub-blocks after BTV division 8 The calculation formula is: Where m represents the coding unit CU i The height of n represents the coding unit CU i The width, p (i,j) Represents the coding unit CU i The pixel point with coordinates (i, j), abs() represents the absolute value, mean 1 Indicates the mean of a sub-block after BTH division, mean 2 Represents the mean of another sub-block after BTH division, mean 3 Indicates the mean of a sub-block after BTV division, mean 4 Represents the mean value of another sub-block after BTV division.
3. A VVC intra-frame fast encoding method based on probability size according to claim 1, It is characterized in that Step S32 uses the quantization step selection method to obtain the sub-block CU i,j The intra-frame prediction mode rough selection table includes: S321. Design the judgment condition based on the quantization step size, expressed as: in, Indicates the value of the i-th column and j-th row of the weight matrix with mode number m. Size indicates the maximum number of columns in the weight matrix. Input i represents the input vector after downsampling of the reference pixel, Q step Indicates the quantization step size; S322. Judge each MIP mode; select the MIP mode that meets the judgment condition for the sub-block CU i,j Make predictions and calculate the corresponding primary cost Hcost; S323. Arrange all the preliminary costs Hcost in ascending order, select the MIP modes corresponding to the first N preliminary costs Hcost and add them to the MPM list to obtain the sub-block CU i,j A rough selection table of intra prediction modes.
4. The VVC intra-frame fast encoding method based on probability size according to claim 1, It is characterized in that Step S45 includes: S451. Construct Planar judgment model, DC judgment model, horizontal and vertical judgment model and other angle judgment models, and set judgment thresholds for the four judgment models respectively; S452. Calculate sub-block CU i,j The RDO cost of each prediction mode in the intra-frame prediction mode rough selection table is selected, and the prediction mode corresponding to the minimum RDO cost is selected and recorded as BEST Intra Mode; S453. Reconstruct the initial ISP list according to the RDO cost to obtain a reconstructed ISP list, BEST Intra The mode is also in the rebuilding ISP list; S454. Calculate BEST Intra Mode and rebuild ISP list BEST Intra RDOcost ratio between the modes after the mode; S455. According to BEST Intra Select the corresponding judgment model for the prediction mode type to which the mode belongs, input the RDOcost ratio calculated in S454 into the judgment model to calculate the skip possibility, and if the skip possibility is greater than the skip threshold, skip rebuilding the BEST in the ISP list Intra The prediction mode behind the mode.
5. The VVC intra-frame fast encoding method based on probability size according to claim 1, It is characterized in that The early termination judgment methods include the QT early termination judgment method, the BT early termination judgment method and the TT early termination judgment method.
