A fast mode decision method for screen content based on VVC
By using lightweight convolutional neural network and decision tree technology in VVC to divide the coding units and make mode decisions, the problem of high complexity of screen content video coding is solved, and significant coding time reduction and performance improvement are achieved.
Patent Information
- Application Number
- CN202410057279.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-15
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-01-15
AI Technical Summary
Existing video coding methods have high computational complexity when processing screen content videos, and fast feature-based methods are difficult to achieve accurate mapping. Fast content-based methods cannot achieve accurate mapping of all content to patterns, resulting in insufficient coding performance.
A fast mode decision-making method for screen content based on VVC is adopted, and the coding unit is divided into screen content CU, natural content CU and mixed content CU through a lightweight convolutional neural network, and spatial correlation and texture features are combined for mode decision-making, and a decision tree is used Terminate pattern checking early to reduce coding time.
The calculation complexity of VVC SCC is reduced, the encoding time is reduced by 41% on average, and only 0.84% of BDBR is lost, improving the encoding efficiency.
Smart Images

Figure CN117880532B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of video coding, and in particular relates to a VVC-based screen content fast mode decision method. Background Art
[0002] In recent years, more and more screen content video applications have emerged, including screen sharing, web conferencing, online education, etc., which pose great challenges to traditional video coding methods. The fact that all recently developed video coding standards include screen content coding (SCC) features also shows the importance of screen content applications. Screen content is mainly computer-generated and usually has the characteristics of repeated patterns, a large number of flat areas, limited color values, and no sensor noise. However, in H.264 / Advanced Video Coding and H.265 / High Efficiency Video Coding (HEVC), traditional coding methods do not take advantage of these characteristics. In order to take advantage of these special characteristics of screen content videos, the Joint Collaborative Team on Video Coding (JCT-VC) developed the SCC extension based on High Efficiency Video Coding (HEVC), which can achieve more than 50% for typical screen content videos. The delta bit rate (BDBR) is reduced, which is better than HEVC.
[0003] Versatile Video Coding (VVC) inherits the SCC extension of HEVC. In addition to its own Intra mode, it also introduces two important coding modes, namely intra block copy (IBC) and palette mode (PLT). Although the introduction of new coding tools improves coding performance, it also introduces additional computational complexity. In addition, VVC uses new coding technologies including quadtree + multi-type tree (QTMT) coding structure, which further increases the computational complexity of the encoder. The encoder needs to perform exhaustive mode search for coding units (CU) of different sizes. In the search, the Lagrangian cost (RD cost J) is calculated for each mode m. m ) to select the optimal coding structure and mode.
[0004] J m =D m +λ×R m
[0005] where m∈{IBC,Intra,PLT}, λ is the Lagrange multiplier, D m and R m is the distortion and bit cost of CU encoded using mode m.
[0006] Although the diverse coding tree unit (CTU) partition structure and exhaustive pattern search achieve the best coding performance, it imposes a huge computational burden on the encoder. Therefore, in order to meet the needs of practical applications, it is necessary to develop a method to quickly reduce the computational complexity of VVC SCC.
[0007] In recent years, the fast algorithms for SCC can be roughly divided into two types: feature-based fast algorithms and content-based fast algorithms. The feature-based fast method aims to establish a relationship between statistical features and CU mode decisions and partitioning decisions. This feature-based fast method has the advantage of not binding modes. Any mode can be determined whether it will be checked based on features before checking. The content-based fast method uses the strong correlation between image content and coding mode to divide CU into different content categories and assign a corresponding mode check candidate list to each category.
[0008] Although the existing methods have reduced the computational complexity of screen content encoding to a certain extent, they still have some shortcomings. 1. The fast method based on features ignores the strong correlation between image content and encoding mode, and it is difficult to achieve accurate mapping of features to modes. 2. The fast method based on content can achieve high content classification accuracy, but cannot achieve accurate mapping of all content to modes. Summary of the invention
[0009] In order to solve the problems existing in the background technology, the present invention provides a method for fast mode decision of screen content based on VVC, comprising:
[0010] S1: Divide the coding unit into screen content CU, natural content CU and mixed content CU according to the image content using a combination-based classification strategy;
[0011] S2: Make mode decisions for natural content CUs based on the spatial correlation between CUs;
[0012] S3: Make a mode decision for the screen content CU based on the texture features and spatial correlation features of the CU and the intermediate coding information;
[0013] S4: Performing a mode decision on the mixed content CU according to the VVC default mode decision rule.
[0014] Preferably, the step S1 comprises:
[0015] S11: Divide the brightness component of the video frame into a plurality of non-overlapping first image sub-blocks of 16×16, and divide each first image sub-block into four 4×4 second image sub-blocks;
[0016] S12: using a lightweight convolutional neural network (CNN) to predict the category of each first image sub-block, and dividing each first image sub-block into screen content and natural content;
[0017] S13: defining the category of each second image sub-block to be the same as the first image sub-block to which it belongs;
[0018] S14: Divide each CU into a screen content CU, a natural content CU, and a mixed content CU according to the category of the second image sub-blocks constituting each CU.
[0019] Preferably, the step S14 comprises:
[0020] Each CU is composed of multiple second image sub-blocks. When all the second image sub-blocks in the CU are screen content, the CU is divided into a screen content CU; when all the second image sub-blocks in the CU are natural content, the CU is divided into a natural content CU; otherwise, the CU is divided into a mixed content CU.
[0021] Preferably, step S2 comprises: when the optimal modes of the predicted adjacent CUs of the natural content CU are all Intra, skipping the IBC and PLT mode checks of the CU and retaining the Intra mode check; otherwise, performing a mode decision on the natural content CU according to the VVC default mode decision rule.
[0022] Preferably, step S3 comprises:
[0023] S31: Check the IBC-merge mode and calculate the minimum SATD value of the IBC-merge mode;
[0024] S32: extracting texture features and spatial correlation features of the CU, using the first decision tree to obtain the inspection order of each mode, and inspecting each mode in turn according to the inspection order of each mode;
[0025] S33: According to the coding features of the CU in the current mode, the second decision tree is used to predict the probability P1 that the current mode is the optimal mode. If the probability value P1 is greater than the set threshold α, the remaining mode checks are terminated.
[0026] Preferably, if the currently checked mode is the Intra mode, in the rough selection stage of the Intra mode, when the minimum SATD value of the IBC-merge mode is less than the minimum SATD value of the Intra mode, step S321 is executed; otherwise, the Intra mode check is continued and step S322 is executed;
[0027] S321: Calculate the difference D between the minimum SATD value of the Intra mode and the minimum SATD value of the IBC-merge mode SATD, and the difference D SATD Construct a Bayesian decision model for the unique feature and calculate the given CU size s and D through the Bayesian decision model SATD The probability that the Intra mode is the optimal mode under the condition, if the optimal probability is less than the set threshold β, then terminate the Intra mode check and proceed to check the remaining modes, otherwise continue to check the Intra mode and execute step S322;
[0028] S322: After the block-based differential pulse code modulation mode check, check the DTC-2 transformation of the first mode in the rate-distortion optimization list, and use the third decision tree to predict the probability P2 that the optimal mode is BDPCM. If P2>γ, terminate the Intra mode check, where γ represents the set threshold. Otherwise, continue the Intra mode check and execute step S323;
[0029] S323: Before selecting the low-frequency inseparable transform and the multiple transform, the fourth decision tree is used to predict the probability P3 that the optimal transform is DCT-2. If P3>δ, δ represents the set threshold, the checking of the secondary transform and the multiple transform is terminated.
[0030] Preferably, the minimum SATD value of the Intra mode comprises: calculating the SATD of the DC, Planar, horizontal and vertical direction modes in the Intra mode, and using their minimum value to represent the minimum SATD value of the Intra mode.
[0031] The present invention has at least the following beneficial effects
[0032] The present invention adapts to the complex partition structure of VVC, classifies CU by content through CNN model and combination-based classification strategy, skips all SCC modes (IBC and PLT modes) for CU classified as natural content in combination with spatial correlation, and uses decision tree to perform mode check sorting and mode check early termination prediction for CU classified as screen content, thereby reducing the mode check candidate list. In addition, SATD difference, BDPCM prediction and multi-transform / secondary transform prediction are used to optimize the Intra mode of CU with screen content. Experiments show that compared with traditional VVC SCC, the present invention reduces the encoding time by 41% on average and only loses 0.84% of BDBR. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic diagram of the framework of the method flow of the present invention;
[0034] Figure 2 Schematic diagram of the structure of a lightweight convolutional neural network CNN in this embodiment;
[0035] Figure 3 Schematic diagram of the division of coding unit CU;
[0036] Figure 4 This is the flow chart of Intra mode;
[0037] Figure 5 Schematic diagram of directional mode distribution of Intra mode. DETAILED DESCRIPTION
[0038] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0039] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0040] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0041] Compared with traditional VVC, VVC SCC introduces two important coding modes, namely IBC and PLT. Although the introduction of the new mode significantly improves the coding performance, it also brings additional computational complexity. In order to meet the needs of practical applications, the present invention proposes a method for fast mode decision to reduce the computational complexity of VVC SCC. Please refer to Figure 1 The present invention provides a VVC-based screen content fast mode decision method, comprising:
[0042] In this embodiment, in order to better study the fast mode decision algorithm in VVC SCC, the present invention uses VVC reference software VTM-17 to analyze the mode distribution of YUV 4:4:4 format sequence; the test sequence is selected by experts from the Joint Working Group on Video Coding (JCT-VC) and encoded using quantization parameters (QP) of 22, 27, 32 and 37 under the All Intra (AI) configuration defined in the Common Test Condition (CTC); these sequences are divided into four categories according to their content: text and graphics with motion (TGM), mixed content (M), animation (A) and camera-captured content (CC). Table 1 shows the mode distribution of each test sequence, calculated as the percentage of IBC, Intra and PLT coding areas in the sequence. It can be observed that the TGM sequence, which is mostly screen content, has a complex mode distribution, and each mode occupies a certain proportion. For the CC sequence composed entirely of natural content, the proportion of its Intra mode is close to 100%. Based on this, the present invention decides to first classify the content of the coding unit CU.
[0043] Table 1. Pattern distribution of different sequences in VVC
[0044]
[0045] Through the quadtree + multi-type tree (QTMT) partitioning structure of VVC, more than ten types of CUs will be generated. If the classification model is trained for all CU sizes, it will be cumbersome and not conducive to parallel prediction of the encoder. Therefore, the present invention designs a new classification strategy based on combination, which only needs to train the model for one size of CU and can also adapt to the characteristics of VVC complex partitioning; the specific process is as follows:
[0046] Compared with the classifier using manual features, the CNN classifier is more efficient and does not require manual feature extraction. At the same time, CNN can learn more abstract features in the network and has a higher classification accuracy for images. Therefore, the present invention proposes a CU classification model of a lightweight convolutional neural network CNN. In order to simplify the classification process, the model is trained for only one CU size. Considering that a large-sized CU often contains multiple types of image content, if a large classification size is selected, all 4x4 sub-blocks of the entire CU will be classified into the same type, which will cause fine-grained classification failure. A too small classification size will not only increase the consumption of encoding time, but also reduce the classification accuracy due to difficulty in extracting useful features. Finally, the present invention selects the size of 16x16 as a compromise; Figure 2As shown in the figure, the input of the lightweight convolutional neural network CNN is a 16x16 brightness CU, and the final output is the category of the CU; the main structure of the network includes two convolutional layers, each followed by a maximum pooling layer, and then two fully connected layers. In the middle layer of the network, the ReLU activation function is used to introduce nonlinear characteristics, and the Dropout layer is used between the fully connected layers to reduce the risk of overfitting.
[0047] S1: Divide the coding unit into screen content CU (SCU), natural content CU (NCU) and mixed content CU (MCU) according to the image content using a combination-based classification strategy;
[0048] In this embodiment, CUs of different positions and sizes are classified by a combination-based classification strategy; first, the video frame is divided into 16x16 first image sub-blocks, and then a lightweight convolutional neural network CNN is used to predict the category of each 16x16 first image sub-block in parallel; each first image sub-block is divided into 4 4×4 second image sub-blocks; the category of each second image sub-block is defined as the same as the first image sub-block to which it belongs; although VVC will generate a large number of CUs of different sizes, they all have a common feature, that is, they are all composed of 4x4 sub-blocks, so for a CU, when all its sub-blocks are natural content CUs (NCUs), it is classified as NCU. Similarly, when all its sub-blocks are screen content CUs (SCUs), it is classified as SCUs, and other cases are classified as mixed content CUs (MCUs). Figure 3 shown.
[0049] S2: Make mode decisions for natural content CUs based on the spatial correlation between CUs;
[0050] In this embodiment, for the CU classified as NCU, it can be seen from Table 1 that its optimal mode is mostly the Intra mode. In order to avoid classification errors and the small probability that the NCU optimal mode selects non-Intra, the present invention combines spatial correlation. When the optimal modes of the predicted adjacent CUs (left, top, top left) of the NCU are all Intra, the IBC and PLT mode checks of the CU are skipped and the Intra mode check is retained; otherwise, the mode decision is made for the NCU according to the default mode decision rule of the VVC, thereby reducing the mode check candidate list.
[0051] S4: Make a mode decision for the mixed content CU according to the VVC default mode decision rule;
[0052] In this embodiment, for the CU classified as MCU, since it often only exists at the boundary of different image contents and the number is small, no special processing is performed in the present invention, and a mode check is performed based on the default check order of the VTM encoder.
[0053] S3: Make a mode decision for the screen content CU based on the texture features and spatial correlation features of the CU and the intermediate coding information;
[0054] For CU classified as SCU, it can be observed from Table 1 that even for a sequence containing only SCU, all modes have a certain distribution. Therefore, it is difficult to accurately and effectively assign mode candidates to CU simply by content classification. The above is only for the present invention. Therefore, for SCU, further judgment is required to optimize the mode. The original VTM encoder has a relatively fixed order for checking various modes. It will give priority to checking the IBC mode. In fact, for some CUs with obvious directional textures, the IBC mode may not be a suitable choice. Therefore, the present invention does a job to terminate the mode check of CU in advance to skip unnecessary modes. The specific process is as follows:
[0055] S31: Check the IBC-merge mode and calculate the minimum SATD value of the IBC-merge mode;
[0056] In the Intra mode of VVC, the Sum of Absolute Residual Changes (SATD) is used as a rough selection of the directional mode to construct the final rate-distortion optimization list (RD-list). IBC-merge, an independent sub-mode of IBC, takes less time and also has SATD rough selection. Therefore, the present invention ensures that IBC-merge is checked first, and the minimum SATD values of the two modes are compared in the Intra rough selection stage to decide whether to continue the Intra mode check.
[0057] S32: extracting texture features and spatial correlation features of the CU, using the first decision tree to obtain the inspection order of each mode, and inspecting each mode in turn according to the inspection order of each mode;
[0058] In this embodiment, a wide range of texture features and spatial correlation features are first extracted to determine the order of pattern checking through a decision tree. After checking a pattern, a secondary prediction is performed in combination with the encoding information of the pattern to decide whether to skip the remaining pattern checks.
[0059] The selection of the CU coding mode is sensitive to image texture. Those CUs with typical characteristics of screen content (sharp edges, irregular texture) are more likely to be coded as the IBC mode, while those CUs with obvious directional texture are likely to be coded as the Intra mode, and the PLT mode is suitable for those CUs with single color. Based on the above observations, the present invention utilizes these characteristics to change the order of mode checking. Since a large number of predictions are required during the coding process, the present invention selects the first decision tree as the sorting tool. As a widely used classification model, the first decision tree has the advantages of good classification effect and low complexity. At the same time, it can output the probability of each category, and realizes the sorting purpose through the magnitude of the probability. In the embodiments of the present invention, the features selected for sorting include, but are not limited to: CU size (SC), quantization parameter (QP), the number of various modes corresponding to adjacent coded CUs, CU variance (VC), color number (CN), background color proportion (BCP), sum of horizontal gradients (SHG), sum of vertical gradients (SVG), and maximum gradient (MG), etc. Using SC and QP, it is possible to avoid training a separate model for each CU size or each QP. The mode number of adjacent CUs contains spatial correlation features. VC, CN, and BCP can reflect the texture complexity. SHG and SVG can reflect the texture direction, while MG can reflect the sharpness of the texture edge. They are all calculated based on the Prewitt operator, and the calculation formula is as follows:
[0060]
[0061]
[0062] MG = max{|A (i,j) ×P v | + |A (i,j) ×P h |}
[0063] Wherein, A (i,j) is a 3×3 luminance pixel matrix, 1 < i < W, 1 < j < H, where W and H represent the width and height of the CU, and P v , P h are the vertical and horizontal templates of the Prewitt operator.
[0064] After obtaining the new mode detection order, detect the most promising mode. After checking the current candidate mode, determine whether the remaining mode detections can be skipped according to the performance of the mode, that is, step S43.
[0065] S33: Predict the probability P1 that the current mode is the optimal mode according to the coding characteristics of the CU in the current mode by using the second decision tree. If the probability value P1 is greater than the set threshold α, terminate the remaining mode checks.
[0066] In this embodiment, the present invention selects the coding features of the CU of the most representative mode in the current mode, including: the rate-distortion cost (RD cost) and coding bits (CB) of the mode. In addition, the present invention can also add separate features for different modes, for example, adding an ISP flag and a BDPCM flag to the Intra mode, and increasing the BV size for IBC.
[0067] Preferably, if the currently checked mode is the Intra mode, in the rough selection stage of the Intra mode, when the minimum SATD value of the IBC-merge mode is less than the minimum SATD value of the Intra mode, step S321 is executed; otherwise, the Intra mode check is continued and step S322 is executed;
[0068] S321: Calculate the difference D between the minimum SATD value of the Intra mode and the minimum SATD value of the IBC-merge mode SATD , and the difference D SATD Construct a Bayesian decision model for the unique feature and calculate the given CU size s and D through the Bayesian decision model SATD The probability that the Intra mode is the optimal mode under the condition, if the optimal probability is less than the set threshold β, then terminate the Intra mode check and proceed to check the remaining modes, otherwise continue to check the Intra mode and execute step S322;
[0069] S322: After the block-based differential pulse code modulation mode check (BDPCM), the DTC-2 transformation of the first mode in the rate-distortion optimization list is checked, and the probability P2 that the optimal mode is BDPCM is predicted by the third decision tree. If P2>γ, the Intra mode check is terminated, where γ represents the set threshold. Otherwise, the Intra mode check is continued and step S323 is executed;
[0070] S323: Before selecting the low-frequency inseparable transform and the multiple transform, the fourth decision tree is used to predict the probability P3 that the optimal transform is DCT-2. If P3>δ, δ represents the set threshold, then the check of the secondary transform and the multiple transform is terminated to represent the set threshold.
[0071] In this embodiment, in VVC, the Intra mode has a complex process, such as Figure 4As shown on the left, VVC uses coarse mode decision (RMD) to select several modes with the smallest absolute residual change (SATD) from 67 Intra directional prediction modes to construct a rate-distortion optimization list (RD-list) that needs to be traversed later. In addition, multiple modes including matrix-weighted intra prediction technology (MIP) and intra sub-partitioning (ISP) are used to further expand the RD-list. In the rate-distortion optimization (RDO) stage, in addition to DCT-II, VVC also applies low-frequency inseparable transform (LFNST) and multiple change selection (MTS) to improve encoding performance. Although VVC improves its performance by making the Intra mode more complicated, the newly added content of the Intra mode is often not so effective for screen content. Therefore, for a CU classified as an SCU, the present invention optimizes its Intra mode. The optimized flowchart is shown in FIG. Figure 4 As shown on the right, three early termination predictions are added to the original Intra mode process, so as to terminate unnecessary Intra modes to the greatest extent possible;
[0072] In the first prediction, in the rough selection stage of the Intra mode, the minimum SATD values of the two modes are compared to decide whether to continue the Intra mode inspection, such as Figure 5 As shown in the figure, in the Intra mode, the final optimal directional mode is mostly one of the DC, Planar, horizontal, and vertical modes, and their mode IDs are 0, 1, 18, and 50 respectively. In order to further simplify, the present invention calculates the SATD of these four modes and uses their minimum value to represent the minimum SATD value of the Intra mode. When the SATD value of the Intra mode is greater than the SATD value of the IBC-merge mode, the present invention uses the difference D SATD Construct a Bayesian decision model for the unique feature and calculate the given CU size s and D through the Bayesian decision model SATD The probability that the Intra mode is the optimal mode under the given conditions is expressed as follows:
[0073] P s (ω i=Intra |D SATD )<β
[0074]
[0075] Wherein, s is all CUs not including the 64x64 size type. Since the number of 64x64 CUs is small and the regularity is not strong, the present invention does not process this size here; P s (ω i=Intra ) represents the prior probability of the Intra mode, P s (D SATD ) means D under dimension s SATD The total probability density, Ps (D SATD ) can be calculated by the following formula:
[0076]
[0077] Among them, i∈{Intra,non-Intra}, all parameters can be obtained through offline statistics, P s (D SATD |ω i ) is difficult to express with a probability function. In the present invention, a non-parametric estimation method is used to estimate the likelihood function:
[0078]
[0079] in, For size s, with difference D SATD And the mode belongs to ω i The number of CUs, and This means that under size s, all modes belong to ω i The number of CUs due to D SATD Most of the values are below 10,000, so when the difference exceeds 10,000, Intra is terminated in advance, and for the convenience of implementation, D SATD Values are limited to 25 intervals.
[0080] In the second prediction, after the block-based differential pulse code modulation mode check, BDPCM is regarded as an Intra mode in VVC. In the encoder, it is integrated into the Intra mode. Before performing RD-list traversal, BDPCM does not transform the residual and directly quantizes it. This is consistent with the characteristic that the screen content is not suitable for transformation due to the unique texture of the residual. Therefore, BDPCM is very effective for SCU. In the present invention, the proportion of SCU Intra mode that finally selects BDPCM is counted, as shown in Table 2:
[0081] Table 2 BDPCM ratio of SCU Intra mode
[0082] BDPCM(%) Non-BDPCM(%) 40.98 59.02
[0083] As shown in Table 2, for SCU, this ratio is close to half, so it is feasible to predict whether to skip the subsequent complex RDO process after executing BDPCM. Since the encoder needs to make predictions frequently, this requires the classifier to have the ability to make fast predictions. Therefore, the present invention uses the third decision tree as a classification tool for prediction termination; after checking the first mode of the RD-list, the decision tree predicts that the best is the probability P2 of BDPCM, and we will directly terminate Intra if:
[0084] P2>γ
[0085] γ is the optimal threshold for early termination of the Intra mode, which determines the balance between coding performance and computational complexity. When the γ value decreases, more CUs will terminate the Intra mode early.
[0086] When predicting the third decision tree, the present invention takes into account that the calculation of texture features and residual features will introduce additional complexity, and therefore only retains CU size information and intermediate coding information, including CU size (SC), quantization parameter (QP), RD cost and coding bit (CB) of BDPCM mode, and BDPCM flag (BFPC) of parent CU, wherein RD cost and CB can indicate its coding effect, and if parent CU selects BDPCM, child CU is more likely to select BDPCM. To be conservative, the present invention checks the first mode in the RD-list, and takes the difference between the RD cost of the first mode and the RD cost of BDPCM as the feature value. Obviously, when BDPCM is better than the first mode, the probability of BDPCM being the final mode will be greater.
[0087] The third prediction, before the low-frequency non-separable transform (LFNST) and the multi-transform selection (MTS), in VVC, the main transform supports five different transform type combinations. In addition to the traditional (DCT-2, DCT-2), four new MTS combinations are introduced, namely (DST-7, DST-7), (DST-7, DCT-8), (DCT-8, DST-7), (DCT-8, DCT-8). In some cases, MTS can better remove the correlation of the prediction residual. For example, for the Intra mode prediction residual, the prediction error often increases with the distance from the boundary sample. At this time, MTS may have a better effect. In addition, LFNST is introduced as a secondary transform combined with DCT-2 to further reduce the residual space redundancy. However, for SCU, due to its special texture structure, the newly introduced transform is not so effective. The present invention counts the optimal transform selection of the Intra mode of SCU, as shown in Table 3:
[0088] Table 3 Transformation distribution of SCU Intra mode
[0089]
[0090]
[0091] As can be seen from Table 3, for SCU, the possibility that the residual needs to be multi-transformed and secondary transformed is small. Therefore, when the encoder completes the RDO using DCT-2 transform, the present invention constructs the fourth decision tree to predict the probability that the optimal mode is DCT-2 (the probability that secondary transform or multi-transform is not required) P3, and if the following conditions are met, the following LFNST and MTS are skipped:
[0092] P3>δ
[0093] In terms of feature selection of the fourth decision tree, the present invention adds new intermediate coding features, including the size of the transform unit (ST), the quantization parameter (QP), the variance of the residual coefficient (VRC), the RD cost and coding bits (CB) of DCT-2, the transform type (TTC) of the parent CU, and the RD cost of the ISP.
[0094] In summary, the effect of the present invention is affected by the optimal thresholds of different methods. In order to achieve a good trade-off between computational complexity and coding performance, the present invention conducted extensive ablation experiments to determine the optimal thresholds, and selected α=0.95, β=0.15, γ=0.8, δ=0.8 as the final configuration of the present invention, and its effect is shown in Table 4:
[0095] Table 4 Comparison between the fast mode decision method proposed in the present invention and the traditional VVC SCC
[0096]
[0097] It can be seen that all types of sequences of the present invention show considerable performance, and compared with the performance of traditional SCC in VVC, the encoding time is reduced by 41% on average, with only a loss of 0.84% BDBR.
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A fast mode decision method for screen content based on VVC, It is characterized in that include: S1: Divide the coding unit CU into screen content CU, natural content CU and mixed content CU according to the image content using a combination-based classification strategy; The step S1 comprises: S11: Divide the brightness component of the video frame into a plurality of non-overlapping first image sub-blocks of 16×16, and divide each first image sub-block into four 4×4 second image sub-blocks; S12: using a lightweight convolutional neural network (CNN) to predict the category of each first image sub-block, and dividing each first image sub-block into screen content and natural content; S13: defining the category of each second image sub-block to be the same as the first image sub-block to which it belongs; S14: Dividing each coding unit CU into a screen content CU, a natural content CU, and a mixed content CU according to the category of the second image subblock constituting each coding unit CU; The step S14 comprises: Each coding unit CU is composed of a plurality of second image sub-blocks. When all the second image sub-blocks in the coding unit CU are screen contents, the coding unit CU is divided into a screen content CU; when all the second image sub-blocks in the CU are natural contents, the coding unit CU is divided into a natural content CU; otherwise, the coding unit CU is divided into a mixed content CU; S2: Make mode decisions for natural content CUs based on the spatial correlation between coding units CUs; The step S2 comprises: When the optimal modes of the predicted neighboring CUs of the natural content CU are all Intra, the intra block copy IBC and palette PLT mode checks of the CU are skipped, and the intra prediction mode Intra mode check is retained; otherwise, the mode decision is made for the natural content CU according to the default mode decision rule of the multifunctional video coding VVC; S3: Make a mode decision for the screen content CU based on the texture features and spatial correlation features of the CU and the intermediate coding information; The step S3 comprises: S31: checking the intra-block copy merge mode IBC-merge mode, and calculating the minimum absolute residual change and SATD value of the IBC-merge mode; S32: extracting texture features and spatial correlation features of the CU, using the first decision tree to obtain the inspection order of each mode, and inspecting each mode in turn according to the inspection order of each mode; The texture features and spatial correlation features of the CU input into the first decision tree include: one or more features of CU size, quantization parameter, number of various modes corresponding to adjacent encoded CUs, CU variance, number of colors, background color ratio, horizontal gradient sum, vertical gradient sum and maximum gradient; If the current inspection mode is the Intra mode, in the rough selection stage of the Intra mode, when the minimum SATD value of the IBC-merge mode is less than the minimum SATD value of the Intra mode, step S321 is executed; otherwise, the Intra mode inspection is continued and step S322 is executed; S321: Calculate the difference between the minimum SATD value of the Intra mode and the minimum SATD value of the IBC-merge mode , and the difference Construct a Bayesian decision model for the unique feature and calculate the given CU size through the Bayesian decision model and The probability that the Intra mode is the optimal mode under the given conditions is less than the set threshold. , then terminate the Intra mode check and proceed to the checks of other modes; otherwise, continue the Intra mode check and execute step S322; S322: After checking the block-based differential pulse code modulation mode, check the discrete cosine transform DTC-2 transform of the first mode in the rate-distortion optimization list, and use the third decision tree to predict the probability that the optimal mode is block-based differential pulse code modulation BDPCM ,like , then terminate the Intra mode check, indicates setting a threshold, otherwise, continuing the Intra mode check and executing step S323; S323: Before selecting the low-frequency inseparable transform and the multi-transform, using the fourth decision tree to predict the probability that the optimal transform is DCT-2 ,like , If the set threshold is exceeded, the inspection of secondary transformation and multi-transformation is terminated; S33: Predict the probability that the current mode is the optimal mode using the second decision tree according to the coding features of the CU in the current mode , if the probability value Greater than the set threshold , then terminate the remaining mode checks; The coding characteristics of the CU in the current mode include: the rate-distortion cost and coding bits of the mode; S4: Performing a mode decision on the mixed content CU according to the VVC default mode decision rule.
2. A VVC-based screen content fast mode decision method according to claim 1, It is characterized in that The minimum SATD value of the Intra mode includes: calculating the SATD of the direct current mode DC, the planar mode Planar, the horizontal and vertical direction modes in the Intra mode, and using their minimum value to represent the minimum SATD value of the Intra mode.
