# A High Efficiency Multistage Coder for Lossless Audio Compression using OLS+ and CDCCR Method
## 2 Basic Prediction Method  
Among the basic prediction methods, i.e., constant and static linear predictive models, presented in the literature [19], lossless audio compression uses two approaches of an adaptive predictive modelling: forward adaptation and backward adaptation. In the coding of audio, the method of determining the predicted value based on a linear prediction (which is based on the MMSE criterion) is most frequently used at the pre-modelling stage [13]. It requires a solution system of equations with \(r\) variables \(w_{j}\) that create vector of coefficients \(\mathbf{w}=[w_{1},w_{2},\ldots,w_{r}]^{\mathrm{T}}\). Due to how the varied nature of the data in different parts of the sound work,methods with the current adaptation of the prediction coefficients allow achieving a high degree of compression. Forward adaptation is an asymmetrical method of time, and its advantage is fast decoding time. The encoding process can be much longer because is possible perform initial coding multiple times, choosing the best parameters for the final version of the encoded file. In addition to the classic solutions used in MP4-ALS-RM23 (default version), it is possible look for better prediction models using extended data analysis [20], using other predictive techniques than the basic LPC computed using the Levinson-Durbin method, such as using Laguerre filters [21], and also due to cascading block connections with different lengths and prediction orders [22]. The predominantly used version is prediction with forward adaptation, which requires saving of prediction coefficients for individual encoded frames (the vector \(\mathbf{w}\) of prediction coefficients is determined by optimising the mean error of prediction in the entire frame which requires access to it for analysis before coding [20; 23]). In backward adaptation, the access to future samples is not required because the adaptation of vector of prediction coefficients is based on already coded samples [23; 24]. The literature shows that prediction methods with backward adaptation achieve higher compression efficiencies because of the possibility of using higher orders of prediction and quick adaptation to changes in signal characteristics over time (adaptation of parameters every single sample of data). For this reason, this work focuses on this approach. In addition, we are currently focusing only on the CD standard parameters, i.e., 44,100 samples per second, with a resolution of 16 bits, as it is still the most common format for commercial use of music. In stereo CD standard existing dependencies between channels allow to use in \(r\)-order predictive models using samples from both channels, left \(x_{L}(n-i)\) and right \(x_{R}(n-j)\). \[ \begin{array}{l}\hat{x}_{L}(n)=\sum\limits_{i=1}^{r_{L}}a_{i}\cdot x_{L}(n- i)+\sum\limits_{j=1}^{r_{R}}b_{j}\cdot x_{R}(n-j)\\ \hat{x}_{R}(n)=\sum\limits_{j=1}^{r_{L}}c_{j}\cdot x_{R}(n-j)+\sum\limits_{i=0 }^{r_{R}-1}d_{i}\cdot x_{L}(n-i)\end{array}  \tag{2}\]  
Based on the general form \(\mathbf{w}_{Ch}=[w_{1}\), \(w_{2}\),... \(w_{r}]^{\mathsf{T}}\), according to Formula (2) (where \(Ch\) is the channel \(L\) (left) or \(R\) (right)), we can distinguish vectors of prediction coefficients for the left channel \(\mathbf{w}_{L}=[a_{1},a_{2},\ldots,a_{r_{L}},b_{1},b_{2},\ldots,b_{r_{R}}]^{ \mathsf{T}}\) and for right channel \(\mathbf{w}_{R}=\left[c_{1},c_{2},\ldots,c_{r_{L}},d_{0},d_{1},\ldots,d_{r_{R} -1}\right]^{\mathsf{T}}\). There are two formulas because by coding (decoding) the value of the right channel sample \(x_{R}(n)\), there is already access to the current sample of the left channel \(x_{L}(n)\). The result of the bit average can be influenced by the selection of which channels are coded in the first order. Note that the \(r_{L}\) ordering in both cases concerns the set of samples of the currently coded channel, whereas \(r_{R}\) is number samples of the opposite channel, in addition \(r=r_{L}+r_{R}\). There is a problem with the selection of the universal \(r_{R}/r_{L}\) ratio.