# A High Efficiency Multistage Coder for Lossless Audio Compression using OLS+ and CDCCR Method
## 6 Removing Context-Dependent Cumulate Prediction Error  
Often prediction methods can introduce constant (bias) components in predetermined prediction errors. The nature of component depends on the properties of a context defined as (heuristically selected) a set of features the nearest neighbourhood. In practice, the division into a large number of contexts is used (it can be from several hundred to several thousand), which precisely allows to determine the type of the closest neighbourhood of the coded sample using different features of the previous few samples and previously coded prediction errors. The context number can be represented, e.g., as the \(i\)-bit-number, where each bit can be determined in a separate way; for example, by two-state quantisation of the module of the previous prediction error, checking if the condition \(|e(n-1)|>50\) or checking the condition \(x(n-1)>x(n-2)\). For example, with \(i=11\) different rules of this type, 2048 contexts can be created, and each can adaptively calculate a separate average or median value from previous prediction errors that can be subtracted from the predicted prediction error at the next occurrence of the given context in the coding step. This idea is commonly used in relation to image coding [32]. The adaptive method of removing a constant component is used both in the CALIC [33] and JPEG-LS algorithms [34]. The algorithms are shown in Algorithm 2, where \(j\) is the context number, \(S_{(j)}^{(Ch)}\) is the current cumulative value of prediction error \(e_{K}^{(Ch)}(n)\) in the given context, \(N_{(j)}^{(Ch)}\) is the count of occurrences \begin{table}
\begin{tabular}{c c c c|c c c} \hline \hline \multicolumn{6}{c|}{**Without Three NLMS Blocks**} & \multicolumn{3}{c}{**With Three NLMS Blocks in Cascade**} \\ \hline
**File** & **ALCM+** & **RLS** & **OLS+** & **ALCM+** & **RLS** & **OLS+** \\ \hline ATrain & 8.3507 & 8.1934 & 8.2817 & 7.7531 & 7.7088 & 7.6675 \\ \hline BeautySlept & 9.8388 & 9.7497 & 9.8416 & 8.8806 & 8.8194 & 8.7118 \\ \hline chanchan & 10.3974 & 10.3807 & 10.3537 & 10.2931 & 10.2278 & 10.1932 \\ \hline death2 & 6.4038 & 7.0594 & 6.5856 & 6.6436 & 6.9072 & 6.3777 \\ \hline experiencia & 11.5514 & 11.5710 & 11.5828 & 11.3683 & 11.3198 & 11.2973 \\ \hline female\_spech & 5.8583 & 5.6922 & 5.7743 & 5.7413 & 5.5754 & 5.5857 \\ \hline FloorEssence & 10.4917 & 10.4153 & 10.3952 & 10.1471 & 10.0712 & 10.0134 \\ \hline ItCouldBeSweet & 9.6181 & 9.3986 & 9.4630 & 9.3595 & 9.2149 & 9.2689 \\ \hline Layla & 10.6077 & 10.5589 & 10.6175 & 10.2457 & 10.1759 & 10.1559 \\ \hline LifeShatters & 11.1976 & 11.1492 & 11.1698 & 11.0151 & 10.9659 & 10.9481 \\ \hline macabre & 10.1090 & 10.1758 & 10.1952 & 9.5819 & 9.5489 & 9.5070 \\ \hline MaleSpeech & 5.8177 & 5.7310 & 5.7632 & 5.7054 & 5.6156 & 5.5813 \\ \hline SinceAlways & 11.5095 & 11.3424 & 11.3904 & 11.3111 & 11.2132 & 11.2034 \\ \hline thear1 & 12.0500 & 11.9855 & 12.0026 & 11.9159 & 11.8660 & 11.8490 \\ \hline TomsDiner & 8.2075 & 7.9984 & 8.0337 & 7.9481 & 7.7740 & 7.7600 \\ \hline velvet & 11.4401 & 11.2113 & 11.1379 & 11.0710 & 10.8298 & 10.7851 \\ \hline
**Average 1 st order entropy** & **9.5906** & **9.5383** & **9.5368** & **9.3113** & **9.2396** & **9.1816** \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison first-order entropy using DPCM + ALCM+, DPCM + RLS and OLS+ without and with connection three Normalised Least Mean Square (NLMS) blocks in cascade. of the given context and \(C_{(j)}^{(Ch)}\) is the current correction value that should be added to the predicted value \(e_{K}(n)\) as its corrective value.