# A High Efficiency Multistage Coder for Lossless Audio Compression using OLS+ and CDCCR Method
## 5 Cascade Connection of Prediction Method  
In the solution described in [24] based on prediction models with backward adaptation, a cascade connection of individual five stages (blocks) is used. The first one is the constant predictor DPCM, whereas the second block uses the RLS method for example with an order \(r_{\text{RLS}}=16\) (using \(\mathbf{w}\) vector with eight \(w_{j}\) coefficients per channel in stereo mode [24; 29]). The remaining three blocks (see Figure 1) use the NLMS method (see Section 3), wherein each subsequent block the smaller prediction order is used; the outputs of subsequent blocks are dependent on the values calculated in the preceding blocks. For the NLMS blocks, the following prediction orders were proposed, \(r_{i}=\) [384; 112; 16]. Our previous approach in [16] also uses a cascade of five blocks including three subsequent blocks of the modified version of NLMS with orders {1000, 25, 10}. In the solution proposed here, which is an extension of the codec from work [16], the prediction order in the middle NLMS block has been increased from \(r=25\) to \(r=380\). Instead of the OLS block, an  
Figure 1: Cascaded RLS-LMS prediction in MPEG-4 lossless audio coding [24; 29]. has been introduced, whose simplified version has been successfully used earlier in lossless image compression [30; 31]. In Section 4, two new approaches to the initial prediction stage (ALCM+ and OLS+) are proposed. In Figure 2, the proposed solution with the ALCM+ block (of lower complexity) is shown. The higher complexity version differs only in that the OLS+ block has been introduced in place of DPCM and ALCM+ blocks. If we define \(\mathbf{w}^{(j)}(n)\) as a vector that stores the prediction coefficients used in the \(j\)-th stage of the cascade, then the relationships between the successive stages of the cascading system are as follows,  
\[y_{1}(n)=x(n-1) \tag{19}\]  
\[y_{j}(n)=\sum_{i=1}^{r_{j}}w_{i}^{(j)}(n)\cdot e_{j-1}(n-i),\ \text{for}j>1 \tag{20}\]  
\[e_{1}(n)=x(n)-y_{1}(n), \tag{21}\]  
\[e_{j}(n)=e_{j-1}(n)-y_{j}(n),\ \text{for}\ j>1. \tag{22}\]  
Compared to the original approach presented in [24; 29], the initial DPCM block has been abandoned (\(y_{1}(n)=0\)), and the RLS block has been replaced with the extended OLS+ block, where interchannel dependencies are removed. After \(K\) stages of prediction blocks as the last block of determining the final version of the predicted \(\hat{x}(n)=y_{K}\) value, the method of removing the cumulative prediction error was added where the \(C_{\text{mix}}\) value is calculated as the constant component (bias), depending on the individual number of the context for each successively coded \(x(n)\) sample (see Section 6). This method earlier was successfully used only in lossless image compression [32]. This block is marked as Context-Dependent Constant Component Removing (CDCCR) and, similarly to the development of NLMS blocks, has been described in detail in Section 3. The final prediction error is calculated from  
\[e(n)=x(n)-\big{\lfloor}y_{1}(n)+y_{2}(n)+\ldots+y_{K}(n)+C_{\text{mix}}+0.5 \big{\rfloor}. \tag{23}\]  
The last two blocks (marked in Figure 2 as Golomb Code and CABAC) in the cascade audio data compression system proposed here are used to efficiently code prediction errors \(e(n)\) into the resulting binary data stream (see Section 7). In Table 1, the first-order entropy results for 16 test files are presented (more about first-order entropy in Section 7). The first three columns contain entropy results after applying DPCM + ALCM+, DPCM + RLS and OLS+, respectively. The last three columns present the results of the same set, but with an additional three NLMS blocks with prediction orders {1000, 380, 10}, respectively. In both RLS and OLS+, blocks the prediction order of \(r=20\) was used (the average first order entropy of the whole database was bold in the last row of Table 1.). Figure 2: Schema of our approach for lossless audio coding.