# Sample-Based Gradient Edge and Angular Prediction for VVC Lossless Intra-Coding
###### Abstract  
Lossless coding is a compression method in the Versatile Video Coding (VVC) standard, which can compress video without distortion. Lossless coding has great application prospects in fields with high requirements for video quality. Since the current VVC standard is mainly designed for lossy coding, the compression efficiency of VVC lossless coding makes it hard to meet people's needs. In order to improve the performance of VVC lossless coding, this paper proposes a sample-based intra-gradient edge detection and angular prediction (SGAP) method. SGAP utilizes the characteristics of lossless intra-coding to employ samples adjacent to the current sample as reference samples and performs prediction through sample iteration. SGAP aims to improve the prediction accuracy for edge regions, smooth regions and directional texture regions in images. Experimental results on the VVC Test Model (VTM) 12.3 reveal that SGAP achieves 7.31% bit-rate savings on average in VVC lossless intra-coding, while the encoding time is only increased by 5.4%. Compared with existing advanced sample-based intra-prediction methods, SGAP can provide significantly higher coding performance gain. versatile Video Coding (VVC); lossless coding; intra-prediction; gradient edge detection; angular prediction +
Footnote †: journal: Medical Image Computing  
**Citation:** [PERSON]; [PERSON]. **Sample-Based Gradient Edge and Angular Prediction for VVC Lossless Intra-Coding. _Appl. Sci._**2024,**_14_, 1653.  
have high energy, which may lead to low compression efficiency of lossless intra-coding. Although lossless coding can provide excellent reconstructed video quality, it is difficult to achieve satisfactory compression efficiency of lossless coding, which greatly limits its practical application. Since the coding tools of VVC are mainly designed for lossy coding, there is a large optimization space for lossless coding. In order to improve the practical application value of lossless coding, it is necessary to explore optimization methods for lossless coding. The existing optimization methods improve lossless coding chiefly from block partition, prediction, transformation, and so on. Among them, improving the intra-prediction step is the most common method. In conventional intra-prediction, the reconstructed samples from the adjacent prediction blocks of the current prediction block serve as reference samples. These reference samples are located outside the current prediction block and are referred to as out-block reference samples. This prediction method uses prediction blocks as the basic prediction unit and is referred to as block-based intra-prediction. In lossless intra-coding, the reconstructed samples on the decoder side are the same as the original samples on the encoder side. Therefore, in-block samples can be employed as reference samples. This prediction method uses samples as the basic prediction unit and performs prediction in an iterative way. The main encoding and decoding framework of sample-based lossless intra-coding is shown in Figure 2. On the encoder side, the adjacent original samples of the current sample are employed as reference samples for prediction. The original samples are subtracted from the prediction samples to obtain residual samples. On the decoder side, the reconstructed samples adjacent to the current sample serve as reference samples for prediction. The residual samples are added to the prediction samples to obtain the reconstructed samples. The reconstructed samples participate in subsequent iterative prediction. In the VVC standard, Block Differential Pulse Code Modulation (BDPCM) [6] is a sample-based prediction tool that can provide performance gain of lossless coding. However, BDPCM only has two prediction modes: horizontal mode and vertical mode. The coding performance gain brought about by BDPCM is limited.