1 Introduction

The proliferation of high resolution videos on day-to-day life due to the ubiquitous nature of capture and display devices demands the use of superior compression techniques for the storage and transmission of video. Advancements in capture and display technologies demand the squeezing of information through the bandwidth limited channels. Growing demand for high definition (HD) and ultra-high definition (UHD) video besides the greater desire for video on demand services has led to exponential growth in bandwidth and storage requirements. High efficiency video coding (HEVC) is the latest video compression standard developed by the joint collaborative team on video coding (JCT-VC) to meet these challenges [5, 7, 13, 14]. In addition to delivering improved coding efficiency over its predecessor H.264/AVC (advanced video coding), implementation-friendly features were incorporated into the HEVC standard to address the power and throughput requirements for many of today’s and tomorrows video applications.

In HEVC, intra and inter predictions are extensively used to exploit the data dependency within and across frames for the minimisation of residual energy. HEVC uses angular, planar and DC predictions in the intra-prediction alone for the reduction of the prediction error. HEVC adopts a block-based prediction strategy in all these intra prediction modes which uses the same prediction angle and a common fixed reference row created from previously coded neighbouring blocks. However, as the transformation and quantization stages are bypassed in the lossless mode, sample-based prediction techniques can be employed to improve the prediction accuracy. All the sample-based angular and planar modifications in the literature utilise the availability of reconstructed pixels within the prediction unit (PU) for the performance improvement of HEVC intra prediction. Among these techniques, sample-based angular prediction (SAP) [2224] and improved SAP (ISAP) [2] modify only the block-based angular prediction within HEVC anchor. Similarly, sample-based weighted prediction (SWP) modifies only the planar prediction within the HEVC anchor [16, 17].

All the block-based and the sample-based prediction strategies select the best prediction mode for the current PU, on the basis of a cost function evaluated at the PU level. Hence, the selected prediction mode for a PU may not be generating the best prediction for each and every pixel within the PU. The best way to minimise the prediction error for individual pixels is to select the prediction strategy among block-based or sample-based, whichever gives the minimum error. However, this process requires a huge computational and signalling overhead. To overcome this, the authors [1] proposed a selective intra prediction (SIP) strategy that uses the adaptive switching between the block-based prediction and the sample-based prediction. For the block-based prediction SIP uses the same strategy adopted within HEVC anchor whereas for the sample-based angular prediction; it uses the Modified SAP (MSAP) algorithm. However, in [1], the SIP strategy was restricted to only angular prediction modes.

In this work, we propose two selective intra prediction strategies SIP-A and SIP-C which select the best prediction mode from the block-based and sample-based predictions for each and every pixel within the PU. In the proposed SIP-A algorithm the SIP strategy is applied to only angular prediction modes while the SIP-C algorithm employs the SIP strategy in both the angular and planar prediction modes. However, both SIP-A and SIP-C algorithms use an improved angular prediction strategy (ISAP) proposed by the authors in [2] to further improve the compression efficiency of angular predictions in [1]. As a result of this, the coding improvements for SIP - A are better than SIP [1]. SIP-C outperforms both SIP and SIP-A as it extends the SIP strategy into the planar prediction also. The proposed SIP algorithms are near lossless algorithms that select the best prediction for each and every pixel for the reduction of the residual energy.

The remainder of this paper is organised as follows. Section 2 gives an outline of the HEVC codec along with a brief introduction to the lossless mode. The block-based intra prediction process in HEVC is also reviewed in this section. Section 3 provides an overview of the sample-based prediction strategies in the existing literature. The proposed SIP-A and SIP-C algorithms are presented in Section 4. The experimental results and conclusions are provided in Sections 5 and 6 respectively.

2 Overview of HEVC

HEVC adopts the classic block-based hybrid coding scheme as its forerunners for the exploitation of redundancy within and across frames [13]. In all prior video coding standards by ITU-T and ISO/IEC, macroblocks were the fundamental units for picture partition and processing. Induction of the new quadtree structure as a replacement for macroblocks differentiates HEVC from its ancestors [3]. The residual quadtree structure associated with every coding unit (CU), also defines the splitting of a CU into transform units (TUs) and prediction units (PUs) [6, 19, 20]. Activation of lossless compression in HEVC is done by setting flags that bypass the transformation, quantization, and the in-loop filtering stages. Lossless coding can be enabled at the frame level and CU level with the help of two flags.

2.1 Intra prediction in HEVC

HEVC supports a total of 35 intra prediction modes that comprise 33 angular prediction modes other than the planar and DC modes [10, 21]. The displacement parameter d with values +/-[0,2,5,9,13,17,21,26,32]/32 define the angularity of various horizontal (modes 2-17) as well as vertical prediction modes (modes 18-34) [2]. The prediction process uses two sets of reference arrays from nearby reconstructed PUs that lie to the left and above the current PU for the formation of the extended reference array for the prediction process [11]. The current pixel C x,y is projected to the reference row of pixels with the specified d to determine the two reference samples for the interpolation process [10]. Once the determination of reference samples R i and R i+1 are over; interpolation is performed across the reference pair of pixels at an accuracy of 1/32 as given in (1)

$$ C_{x,y} = ((32- d) * R_{i}+ d * R_{i+1} +16)>> 5 $$
(1)

The angular prediction modes provide better predictions when there are more significant edges in the region being coded while the planar prediction mode performs well for the approximation of gradient structures in a block. The DC prediction is widely used for the prediction of flat surfaces. In planar prediction, the prediction for the block is generated by a weighted average of four reference samples, depending on the sample location as shown in Fig. 1.

$$ P_{h}[x][y] = d * (x+1) + b * (N-(x+1)) $$
(2)
$$ P_{v}[x][y] = a * (y+1) + c * (N-(y+1)) $$
(3)
$$ P_{PL}[x][y] = (P_{h}[x][y] + P_{v}[x][y] + N) >> (log_{2} N+1) $$
(4)
Fig. 1
figure 1

Reference samples for planar prediction

In (1) and (2), d and a are the top right and bottom left samples respectively. In the DC prediction, the average value of the samples on the left reference column and above reference row is used as the prediction value for all samples on the current coding unit.

3 Related works

In this section, we review some of the sample-based prediction schemes implemented on top of HEVC anchor for the lossless/near-lossless compression of video data. Some context-based algorithms used in the development of the proposed sample-based planar prediction GASP are also discussed in this section.

3.1 Sample-based weighted prediction (SWP)

The SWP [16, 17] suggests the replacement of the block-based planar prediction within HEVC anchor with a sample-based prediction strategy where the predictor for the current pixel is calculated as the weighted average of the neighbourhood pixels in a patch. The exponentially decaying weighting factors for the neighbourhood pixels are computed on the basis of the similarity measure, the sum of absolute difference (SAD), between the current pixel and the neighbourhood pixels in a patch. Although the SWP suggests a look-up table approach for the calculation of exponential weights, the computational complexity of this approach is relatively higher than that of HEVC anchor.

3.2 Sample-based angular intra prediction (SAP)

The angular prediction process in SAP [2224] and the conventional BP within HEVC anchor differ only in the selection of the reference samples for the prediction process. In SAP, the reconstructed pixels from just immediate row/column are used for the prediction of the current sample. After the determination of reference pixels for the prediction process, SAP follows the same linear interpolation operation adopted in HEVC anchor. However, SAP does not consider the presence of isolated pixels or abrupt intensity variations within the PU during the prediction process. Moreover, when one of the reference samples on the reference pair is unavailable, it simply extends the available reference sample for the completion of the reference pair and produces the boundary sample prediction error.

3.3 Improved SAP (ISAP)

ISAP is designed to tackle both the drawbacks of SAP mentioned above. When the presence of isolated pixels is detected, ISAP uses the local region characteristics within the PU to fine-tune the prediction process for the non-boundary pixels. When the difference between the current pixel and three of its neighbourhood pixels are greater than a predefined threshold value T, ISAP alters the normal prediction process to transfer the effects of abrupt intensity variations into the prediction process. When the proposed ISAP detects the presence of true edges, it selects appropriate reference pixels and associated weights to alter the normal prediction process in accordance with the intra prediction mode of the current PU. ISAP also eliminates the boundary sample prediction error in SAP through a mode dependent weighted averaging that uses reconstructed neighbouring pixels for the prediction process.

3.4 Selective intra prediction (SIP)

The SIP strategy proposed by the authors [1] uses the adaptive switching between the block-based prediction BP and the sample-based prediction MSAP at the pixel level for better near-lossless video compression. In the SIP strategy, the immense overhead required to convey the choice of selection from encoder to decoder is circumvented through the use of an LSB piggybacking algorithm. However, the MSAP algorithm used in SIP modifies only the boundary sample prediction in SAP. For non-boundary pixels, it follows the same prediction strategy in SAP and ignores the presence of isolated pixels within the PU.

3.5 Context-based prediction strategies

Context-based prediction strategies identify the best subpredictor on the basis of the context of the region. The context for each pixel is determined separately for the selection of the appropriate subpreditors. The following subsections briefly introduce the context-based predictors used for the generation of prediction values in the proposed GASP.

3.5.1 Median edge detection predictor (MED)

MED uses the neighbourhood pixels N, W and NW shown in Fig. 2 for the identification of the horizontal or vertical edges. Although the precision of MED is not the best, it is an optimal combination of simplicity and efficiency. MED [12, 15] selects one of the three optimal sub predictors depending on whether it found the vertical edge, horizontal edge, or smooth region as

figure c
Fig. 2
figure 2

Samples used for gradient calculation in gradient adaptive prediction

3.5.2 Gradient adaptive prediction (GAP)

GAP is a nonlinear adaptive prediction strategy proposed by Wu and Memon [18] as a part of the context-based adaptive lossless image codec (CALIC). GAP adjust itself to the intensity gradients near the current pixel by estimating intensity gradients in vertical and horizontal directions and weighting the neighbouring pixels in accordance with the estimated gradients. GAP estimates intensity gradients with the help of seven causal pixels from the current and previous rows as shown in Fig. 2. Gradients in both directions help GAP to estimate the intensity variation trend in the current location for the generation of the prediction value of the current pixel. In Fig. 2, X denote the location of the current pixel whose value is to be estimated. Gradients in vertical (G v ) and horizontal (G h ) directions are computed as follows.

$$ G_{v} = |NW-W| +|NN-N| +|NNE-NE| $$
(5)
$$ G_{h} = |WW-W| +|NW-N| +|N-NE| $$
(6)

Based on the computed values of G v and G h , GAP classify the edges into three categories namely sharp, normal, and weak and uses a set of thresholds to determine the final equation for the estimation of the prediction value \(\widehat {X}\) [18].

4 Proposed method

Gradient-based prediction methods are designed to identify the presence of edges and adjust the prediction process in accordance with the gradient information of the current pixel.

4.1 Gradient adaptive sample-based prediction (GASP)

In the proposed GASP algorithm, GAP is the default predictor which is used to detect the presence of edges or abrupt changes for the generation of the prediction values in accordance with the local gradient information. Whenever the seven neighbourhood pixels in Fig. 2 for the GAP are not available, GASP uses the MED predictor for the generation of prediction value \(\widehat {X}\).

4.2 Combination of ISAP and GASP (CIG)

The ISAP, a sample-based prediction strategy modifies only the angular prediction modes of HEVC anchor as explained in Section 3.3. Similarly, the GASP (Section 4.1) modifies only the planar predictions mode of HEVC intra prediction. To get the advantages of sample-based prediction strategies in both angular and planar prediction modes, we implemented CIG (Combined ISAP and GASP) which uses ISAP for angular prediction and GASP for planar prediction. The coding gains for CIG are much better than individual ISAP and GASP as it modifies both the angular and planar prediction modes.

4.3 Selective intra prediction (SIP) algorithms

All sample-based prediction modifications replace the conventional block-based predictions within the HEVC anchor for better prediction accuracy. However, due to image peculiarities within the PU, sample-based predictions may produce larger prediction residuals than block-based predictions, at least for a few number of pixels. Although the percentage of such pixels is comparatively small, the analysis reveals that the percentage of such pixels which favour block-based prediction varies among different Classes of test sequences. The SIP algorithm, proposed in [1] performs the adaptive switching between conventional BP within HEVC and sample-based MSAP. In the newly proposed SIP-A algorithm, we use ISAP proposed in [2] instead of MSAP in [1] due to its improved angular prediction performance. The ISAP algorithm modifies the prediction of non-boundary pixels also for improved prediction performance. SIP-A exploits this fact for the reduction of residual energy by selecting the block-based BP for those pixels which prefer it while preserving the sample-based ISAP for rest. A similar situation occurs for the planar prediction also. The majority of pixels in the planar prediction favour the sample-based GASP while the rest favour block-based planar prediction (BPP) within HEVC anchor. The SIP-C algorithm extends the SIP strategy into the planar mode also by performing the adaptive switching between BPP and GASP. Although the performance of SIP-C algorithm is superior to SIP-A, we analyse the performance of SIP-A and SIP-C algorithms to validate the effectiveness of the SIP strategy in angular and planar modes.

4.4 Residual analysis: SIP-A

The residual analysis which resulted in the design of the proposed SIP-A algorithm is discussed in this subsection. When the lossless mode is enabled, the sample-based prediction method ISAP uses nearby reconstructed pixels inside the PU for the prediction process that results in better prediction accuracy. However, a detailed analysis of the prediction residuals revealed that a few number of samples still prefer BP than ISAP. This is due to the presence of fine edges or the texture variations within the PU. Figure 3 shows the screen-shot of the intra prediction process that shows the BP values and ISAP values generated for a sample block of size 4 × 4 in the vertical prediction mode with a displacement value of +26, in the AI Main profile. The common reference row for the BP and the reconstructed sample values generated at the encoder are also shown. The initial rows of both ISAP and BP are same since ISAP also adopts BP for the prediction of the initial row in a block. For the majority of samples, ISAP predictions are closer to original sample values since ISAP uses reconstructed neighbouring rows inside the PU for the prediction of subsequent rows. However, for a few samples, BP values are closer to original sample values (samples shown in boxes) due to image peculiarities. If BP can be selected for such samples and ISAP for the rest, smaller residuals can be ensured for all the samples within the PU.

Fig. 3
figure 3

Prediction value generation in BP and ISAP for a displacement of +26 (vertical prediction)

To obtain the exact figures on the number of samples that prefer each prediction strategy, prediction residuals were computed for both ISAP and BP in all PUs, across various sequences and Classes. Percentage of samples that produces lower residues and prefer ISAP or BP across various Classes is tabulated in Table 1. Although the number of samples that prefers BP is relatively small, a significant reduction in the residual values of all the samples can be achieved if the selection of either BP or ISAP at the pixel level is possible within the PU. The newly introduced SIP-A implements the same through a smart and simple technique. Percentage of samples that choose each strategy justifies the relevance of the proposed SIP-A algorithm for the improvement of coding efficiency. The impact of this improved prediction technique is clearly visible in the AI Main configurations since this mode code all frames as I frames. Hence, the analysis in this regard was restricted to only the AI Main configuration.

Table 1 Intra prediction mode distribution (%) for SIP-A algorithm in AI Main configuration

4.5 Residual analysis : SIP-C

The residual analysis that resulted in the development of the proposed SIP-C algorithm is presented in this section. In planar prediction also, a few number of pixels within each PU may prefer the block-based BPP than the sample-based GASP. The distribution of pixels that favour angular, planar and DC predictions for different sequences from Class A to Class F in the AI Main configuration are provided in Table 2. In SIP-C, for every pixel in angular and planar predictions, the best prediction among the block-based or sample-based prediction are selected for each pixel. In the angular prediction modes, the proposed SIP-C selects either BP or ISAP at the pixel level while the selection is among BPP and GASP when the mode of prediction is planar.

Table 2 Intra prediction mode distribution (%) for SIP-C algorithm in AI Main configuration

Table 2 tabulate the details regarding the percentage of pixels that favour various intra prediction strategies for the SIP-C algorithm. Details regarding the percentage of pixels that opt for BP and ISAP within the angular prediction modes are also provided in the table. Similarly, the distribution of pixels that favour BPP and GASP in planar prediction is also provided in the table. Though the number of pixels which favour block-based angular and planar predictions are comparatively less, a significant reduction in the residual values for all the pixels can be achieved if the selection of the best prediction strategy is possible at the pixel levels. Distribution of pixels that opt different prediction strategies substantiates the relevance of the proposed SIP-C for the improvement of coding efficiency.

4.6 SIP algorithms

The proposed algorithms SIP-A and SIP-C differ only in the application of the SIP strategy in the planar mode. In the proposed SIP-C algorithm, the SIP strategy is applied to both the angular and planar prediction modes for better near-lossless compression of the video. The best prediction mode in both angular and planar prediction modes are selected from the block-based and sample-based prediction methods for the corresponding intra prediction mode. A huge overhead is expected from the proposed SIP algorithms to convey the choice of selected prediction from the encoder to the decoder since the selection of the prediction strategy is performed at the pixel level. To avoid this immense overhead, SIP-C algorithm uses the LSB piggybacking strategy which completely mitigates the additional overhead. In the SIP algorithms, the choice of the prediction strategy is conveyed to the decoder using the LSB of the prediction residual. For the angular predictions in SIP-C algorithm, odd and even prediction residuals are assigned for block-based and sample-based predictions respectively to ensure more zero residuals to the entropy coding stage. The flowchart of the SIP-C algorithm is given in Fig. 4. As shown in Fig. 4, the sample-based predictions ISAP and GASP as well as the block-based predictions BP and BPP are computed for the corresponding intra prediction modes at the encoder. Residual values R B P , R I S A P , R B P P , and R G A S P are also computed in the respective prediction modes to determine the best prediction among the sample-based and block-based predictions in the corresponding intra prediction modes. When the best prediction is block-based, the residuals must be odd. For that, if the residuals are not odd, they are converted to odd by incrementing the block-based prediction values by one [1]. Similarly, when the best prediction is sample-based, the computed sample-based prediction values are incremented by one, if needed, to generate even residuals. Hence, the prediction residuals are always odd for the block-based predictions BP and BPP while they are even for sample-based predictions ISAP and GASP.

Fig. 4
figure 4

Flowchart for SIP-C algorithm

At the decoder, the LSB’s of the prediction residuals are examined to determine the prediction method employed at the encoder. Based on the LSB, the block-based or sample-based prediction values computed at the decoder are added with the entropy decoded residuals to complete the reconstruction process. The reconstructed pixels may differ from the original pixels by a value of ±1 due to the incrementing operations for the sample-based and block-based prediction values, to ensure appropriate LSBs for the signalling of selection of prediction methods. Since the change is restricted to LSBs solely, its visual significance can be ignored as the pixel values are 8-bit or 10-bit.

4.7 Algorithm evaluation

To validate the performance improvement of the proposed SIP-A and SIP-C algorithms, the residual analysis was performed on a subset of test videos listed in Tables 3 and 4. The comparison was performed by choosing one representative sequence from each class and using the AI Main configurations of HEVC anchor, SIP-A and SIP-C implementations. The total absolute error for each sequence and average absolute error for every pixel for the three methods were calculated to validate the efficiency of the proposed SIP algorithms. Since the experiment compares the accuracy of various intra prediction algorithms, only the AI Main configuration and the first frames of each sequence were only used for the analysis. From the experimental results tabulated in Tables 3 and 4, it is clear that the sum of absolute errors for various sequences is considerably lower for both the SIP algorithms when compared with HEVC anchor. As expected, SIP-C provides the lowest absolute residual error/pixel as it employs the SIP strategy in both angular and planar modes. For the SIP-A algorithm, a decrease in average absolute error is more prominent in Classes C and D since the sequences are of low resolution and contain complex textures. However, for the SIP-C algorithm, significant decreases in average absolute errors are obtained for sequences of all Classes since the algorithm modify both planar and angular prediction modes. For sequences in Classes A and B where the percentage of planar prediction are relatively high or the sequences are of high resolution, improvements from SIP-A to SIP-C are relatively large.

Table 3 Residual error comparison for HEVC anchor, ISAP and SIP-A in AI Main configuration
Table 4 Residual error comparison for HEVC anchor, CIG and SIP-C in AI Main configuration

The number of pixels that favour various block sizes in HEVC anchor, ISAP and SIP-A were also compared to verify the effectiveness of the SIP-A modification. Since SIP-A modify the angular prediction modes only, the comparison is performed against ISAP (ISAP also modify only the angular prediction modes). Table 5 tabulate the results of the experiments done in this regard using the same subset of test sequences used for the residual analysis. Experimental results demonstrate that the number of larger blocks (16 × 16 or 32 × 32) are very much higher for ISAP and SIP-A when compared with HEVC anchor. Among the sample-based prediction strategies ISAP and SIP-A, the number of larger blocks is more for SIP-A. Moreover, the total number of blocks for ISAP and SIP-A are much lower than the HEVC anchor. As expected, total number of blocks for SIP-A is smaller than ISAP. A decrease in the total number of blocks decreases the control and header information associated with each block to produce a further increase in compression. Figure 5 also gives an illustration of the same by providing the number of pixels that opt different block sizes for HEVC anchor, ISAP and SIP-A for the representative test sequence Kimono in Class B.

Table 5 Comparison of number of blocks for HEVC anchor, ISAP and SIP-A
Fig. 5
figure 5

Comparison of number of pixels in different block sizes for HEVC anchor, ISAP and SIP-A for test sequence Kimono (1920 × 1080)

To verify the performance of SIP-C algorithm, the comparison is performed among HEVC anchor, CIG and SIP-C. Both CIG and SIP-C algorithms modify angular and planar modes and hence, this comparison is more meaningful. In this comparison, the lowest number of blocks were obtained for the SIP-C algorithm followed by CIG as detailed in Table 6. Figure 6 also confirm the same by providing the number of pixels in various block sizes for HEVC anchor, CIG and SIP-C for the same test sequence Kimono.

Table 6 Comparison of number of blocks for HEVC anchor, CIG and SIP-C
Fig. 6
figure 6

Comparison of number of pixels in different block sizes for HEVC anchor, CIG and SIP-C for test sequence Kimono (1920 × 1080)

5 Experimental results and discussions

Version 15 of HEVC reference software (HM 15.0) [8, 9] and the corresponding JCT-VC common test conditions [4] were used for the performance evaluation of the proposed SIP-A and SIP-C algorithms. Test sequences from Class A to F specified in the common test conditions were used for the experimental analysis as detailed in Table 7. In order to compare the compression efficiency of the proposed SIP-A and SIP-C, bit-rates of both the proposals were compared with that of HEVC anchor, SAP, ISAP, SWP, SIP and CIG. The run-time results of both encoder and decoder were also compared to analyse the computational complexity of various algorithms. Table 8 provides the comparison of the bit-rate savings obtained for different Classes using HEVC anchor, SAP, ISAP, SWP, CIG, SIP, SIP-A and SIP-C in AI, RA, LP and LB configurations with Main 10 and Main profile settings. Bit-rate savings of all methods are tabulated as percentage savings in Table 8, since the frame rates of different sequences, vary within and across Classes. Only the first 100 frames of each sequence in Table 7 were used for the simulations. For the simulations we used Intel® Xeon® E5-1620v2 @ 3.70 GHz processor with 8 GB RAM, on Windows 7 OS platform.

Table 7 Experimental sequences and coding conditions
Table 8 Bit-rate savings(%) of SAP, ISAP, SWP, CIG, SIP, SIP-A and SIP-C over HEVC anchor HM 15.0

Bit-rate savings for both SIP-A and SIP-C over HEVC anchor and the other state-of-the art-works in the literature are greater in the AI the configurations as tabulated in Table 8. Higher savings in bit-rates are observed for the AI configurations since they code all frames as I frames. The savings in bit-rates for the SIP-A algorithm itself are higher when a majority of pixels opts for angular predictions as in Class D, E and F. The additional improvements for SIP-C in such cases are relatively less due to lower usage of planar modes. However, when the percentages of planar prediction are high as in Class A and B, significant additional improvements are observed for the SIP-C algorithm over the SIP-A algorithm. Bit-rate reductions for SIP-A and SIP-C in RA configurations are relatively less when compared with AI configurations. This was as expected since a majority of frames are coded in inter mode for these two configurations. The additional coding gain for SIP-C in these cases are also relatively less due to the same reason. For the LP and LB configurations, the bit-rate reductions for the proposed SIP-C are still lower when compared with the AI and RA configurations. In the LB and LP configurations, all pictures except the initial one are coded using inter prediction. As the proposed SIP algorithms modify only the intra prediction process, lower savings in bit-rates these two configurations are justified.

Run-time results of the encoder and decoder are also compared to analyse the complexity of the proposed SIP algorithms with the HEVC anchor and other state-of-the -art works in the literature. Improvements in bit-rates reduce the entropy coding time for all the sample-based prediction strategies as tabulated in Table 9. In the SIP strategy, prediction residuals are calculated for both block-based prediction and sample-based prediction to determine the best prediction at the pixel level among them. This operation is expected to produce a slight increase in encoding time for both SIP-A and SIP-C over HEVC anchor. However, due to increased accuracy of prediction there are more zero residuals or residuals with smaller amplitudes and hence, the entropy coding of SIP-A and SIP-C are faster. Most importantly, the entropy coding of the prediction residuals, especially in the lossless mode, absorbs the major portion of the encoding time rather than the prediction. The savings in entropy coding time nullify the increase in computation time for the selection of the best prediction mode. Hence, the encoding time for the proposed SIP-A and SIP-C are at par with HEVC anchor as detailed in Table 9.

Table 9 Run-time Comparison of SAP, ISAP, SWP, CIG, SIP, SIP-A and SIP-C with HEVC anchor HM15.0

Significant reductions are observed in the decoding time of the proposed SIP-A and SIP-C algorithms over the HEVC anchor. At the decoder, the SIP algorithms select either block-based prediction or sample-based prediction at the pixel level and hence, the increase in computation time at the decoder are almost nil. Savings in the bit-rates at the encoder justify the reductions in entropy decoding as well as the decoder run-time. The run-time for various sequences vary with their resolution and hence the savings in run-time is tabulated as percentage savings in Table 9. From the table, it is observed that the savings in run-time for SIP-A and SIP-C for the AI configurations are larger than the same for the RA configurations. As the savings in run-time for LB and LP configurations are nominal, they are excluded from the results.

6 Conclusion

In this work, we propose two selective intra prediction strategies to select the best prediction mode from the block-based and sample-based predictions for each and every pixel within the PU. In the proposed SIP-A algorithm the SIP strategy is applied to only angular prediction modes while the SIP-C algorithm employs the SIP strategy in both the angular and planar prediction modes. The proposed SIP algorithms are near lossless algorithms that select the best prediction for each and every pixel for the reduction of the residual energy. SIP algorithms extracts the best out of block-based and sample-based predictions and conveys the same to the decoder without any overhead by piggybacking the selection on the LSB of the transmitted residual of each pixel. The overall compression efficiency of the proposed SIP-C for near-lossless video compression is significantly better than the SIP-A that modifies only the angular prediction modes. The run-time results of the encoder and decoder for SIP-C are also better than HEVC anchor in AI Main 10 and AI Main configurations. For all other configurations, the encoding and decoding time for SIP-C is at par with the HEVC anchor. The major highlight of the proposed SIP algorithms are the significant improvements in coding gains without any additional overhead in transmission or coding time.