# Research on VVC Intra-Frame Bit Allocation Scheme Based on Significance Detection
## 3 Model and Proposed Method
### Analysis of Rate Control Model
\[SATD=\sum_{i=0}^{N-1}\sum_{j=0}^{N-1}|h_{ij}|,N=128\] (6) \[C=\frac{SATD}{N_{pixels}}\] (7)  
Finally, based on the code rate complexity \(C\) and the number of remaining bits for each pixel, the appropriate QP value can be determined to achieve the goal of rate control, QP is determined as shown in (8). \[QP=4.2005 ln\lambda+13.7122+0.5 \tag{8}\]  
There are typically two modes of operation for intra-frame rate control:  
* Using the constant \(\lambda\) for the entire frame. Parameters \(\alpha\) and \(\beta\) can be updated after each frame is encoded. * Parameters \(\alpha\) and \(\beta\) are kept constant throughout the frame, but bits are allocated to each CTU based on the number of remaining bits allocated to the frame. The value of \(\lambda\) is calculated for each CTU using Equation (5). While the HEVC coding standard adopts the first mode of rate control as its intra-mode, the VVC standard uses the second mode for its intra-mode, which is also known as Bitrate-based Rate Control. In this mode, the value of \(\lambda\) for each CTU will be calculated based on the number of remaining bits of that CTU and the parameters \(\alpha\), \(\beta\), and \(\gamma\) (limiting the number of bit counts at the frame and image level). In this way, the remaining bit count will be equally distributed to each CTU to achieve the target bit rate for the whole frame. This ensures that the image quality is balanced across CTUs and reduces the space occupation. However, the research in [30] mentions the phenomenon that in the actual coding process, the bit cost of the last one of a set of CTUs to be assigned is often much larger than the bit cost of all the preceding CTUs. Some of the results of the verification using the official test sequences provided by the VVC standard with the default rate control algorithm turned on in the coding mode of all intra are shown in Figure 2. In the figure, we use some of the official test sequences to observe the bit cost allocation per CTU under different bit cost conditions in intra mode. From Figure 2, we can see that the bpp of all the previous CTUs is maintained at a low level, while the bpp of the last CTU is significantly higher than the others. This phenomenon only occurs in all intra modes, which is because the predefined intra-frame rate control parameters of the default intra-frame rate control algorithm are always useless for coding, and since each coding unit is coded independently, the encoder is unable to utilize the information of the inter-frame prediction for code rate allocation. As a result, all the preceding CTUs may be allocated fewer bits because the encoder tries to save as many bits as possible while maintaining the image quality. While the last CTU increases the number of coding bits due to the need to reach the set target bit rate, this may result in the last CTU being allocated significantly more code rate than all the previous CTUs, leading to an overall uneven code rate distribution. Since frames undergoing intra-frame mode coding are used as reference frames by subsequent P- and B-frames to continue coding, especially the first frame of the whole sequence, improving the efficiency of intra-framecode rate control at the target bit rate remains a challenge. This experiment addresses this characteristic by introducing two significance detection algorithms and the coding complexity originally used in the process of determining the quantization parameters for the R-\(\lambda\) model into the bit allocation process, resulting in an even distribution of the bit cost of the coding units at the same level.