# A Flexible and Simple Lossless DWT Filter Bank Using a MAXFLAT FIR Half-Band Filter
## 3 Design of Lossless s-Filter Banks  
Design of the lossless s-filter bank reduces to the design of a FIR lowpass filter given by Equation (8) to yield the PR system satisfying Equation (9). For this reason, the unique lossless condition can characterize a FIR half-band lowpass filter with a linear-phase as below  
\[\begin{split} Q_{0}(z)=h_{0}z^{-(2K-1)}+h_{2}z^{-(2K-3)}+\ldots+h _{2K-2}z^{-1}+\frac{1}{2}+h_{2K-2}z+\cdots\\ +h_{2}z^{2K-3}+h_{0}z^{2K-1}\end{split} \tag{10}\]  
by imposing \(h_{2n}=h_{4K-2n-2}(n=0,1,\cdots,K-1)\) and \(h_{2K-1}=1/2\) on Equation (8). Then, the filter coefficients of Equation (10) can be easily designed by imposing zeros at \(z=-1\) (i.e., a \(\left(1+z^{-1}\right)\) term)--i.e., maximally flat (MAXFLAT) magnitude or relatively narrower transition band response [26; 27; 29]. In other words, the filter can be said to have a MAXFLAT frequency response at \(\omega=\pi\) if \(Q_{0}(z)\) has a maximum number of zeros at \(z=-1\) (i.e., \(z=e^{i\omega}\big{|}_{\omega=\pi}\)) as  
\[\left.\frac{\partial^{k}Q_{0}(\omega)}{\partial\omega^{k}}\right|_{\omega=\pi} =0,\;k=0,1,2,\cdots,\;2K-1 \tag{11}\]  
Thus, this paper focuses on the design superiority of the lossless s-filter bank using MAXFLAT half-band lowpass filter with integer coefficients. Computation of half-band filter coefficients \(h_{2n}\)'s, using Equation (10), had ever been reported in [29; 30]. In a similar way, imposing the MAXFLAT condition of Equation (11) on (10), the filter \(Q_{0}(z)\) can be expressed in terms of \(K\) (:flatness order) as a closed-form half-band solution:  
\[Q_{0}(z)=z^{K}\bigg{(}\frac{1+z^{-1}}{2}\bigg{)}^{2K}\bigg{\{}\sum_{\ell=0}^{ K-1}\binom{K+\ell-1}{\ell}\bigg{(}\frac{2-z-z^{-1}}{4}\bigg{)}^{\ell}\bigg{\}} \tag{12}\]  
From Equation (11), the frequency response of \(Q_{0}(z)\) becomes  
\[Q_{0}(\omega)=\Big{(}cos\frac{\omega}{2}\Big{)}^{2(K-1)}\bigg{\{}\sum_{\ell=0 }^{K-1}\binom{K+\ell-1}{\ell}\Big{(}sin\frac{\omega}{2}\Big{)}^{2\ell}\bigg{\}} \tag{13}\]  
For the computation of the filter coefficients shown in Equation (10), transforming Equation (12) into interpolation-coefficient (\(g_{\ell}\)) form  
\[Q_{0}(z)=z^{K}\bigg{(}\frac{1+z^{-1}}{2}\bigg{)}^{2K}\bigg{\{}g_{K-1}+\sum_{ \ell=1}^{K-1}g_{K-\ell-1}\Big{(}z^{-\ell}+z^{\ell}\Big{)}\bigg{\}} \tag{14}\]  
and mapping Equation (14) to (10), the relationship between \(h_{2n}\) and \(g_{\ell}\) is derived in terms of \(K\) as  
\[h_{2n}=\frac{1}{2^{2K}}\Bigg{\{}\sum_{\ell=0}^{K-1}\binom{2K}{2n-\ell}+\sum_{ \ell=1}^{K-1}\binom{2K}{2n-K-l+1}g_{K-\ell-1}\Bigg{\}},\;n=0,\;1,\;2,\ldots,K-1 \tag{15}\]and  
\[g_{\mathcal{E}}=\frac{(-1)^{K-\mathcal{E}-1}}{2^{2(K-1)}}\sum_{j=0}^{\mathcal{E}}2 ^{2j}\binom{2K-j-2}{K-j-1}\binom{2K-2j-2}{l-j},\ \mathcal{E}=0,\ 1,\ 2,\ldots,K-1 \tag{16}\]  
where \(\binom{A}{B}=0\) if \(A<B\) or \(B<0\). It can be seen from Equations (15) and (16) that both \(2^{2K}h_{2n}\) and \(2^{2(K-1)}g_{\mathcal{E}}\) directly produce integer values for a given \(K\) value where the order of flatness \(K\) is determined by the order of filter \(4K-2\). This implies that the proposed lossless s-filter bank allows MAXFLAT half-band FIR filters with integer coefficients able to minimize computational complexity without calculation error (by using just only addition and shift operation).