# A Flexible and Simple Lossless DWT Filter Bank Using a MAXFLAT FIR Half-Band Filter
## 2 Design of Two-Band Lossless Single(s-) Filter Banks  
Consider the two-channel biorthogonal filter bank of Figure 1, with the synthesis bank filters chosen as \(G_{L}(z)=H_{U}(-z)\) and \(G_{U}(z)=-H_{L}(-z)\). The elegant choices of (a pair of) analysis bank filters, \(H_{L}(z)\) and \(H_{U}(z)\), cancel aliasing and yield a PR system. Let \(H_{0}(z)\) be a FIR lowpass filter with the real impulse response \(h_{n}\) of order \(2N\), which can be written as  
\[H_{0}(z)=\sum_{n=0}^{2N}h_{n}z^{-n}=z^{-N}Q_{0}(z) \tag{2}\]  
by using the transfer function  
\[Q_{0}(z)=\sum_{n=-N}^{N}h_{N-n}z^{-n} \tag{3}\]  
where \(Q_{0}(z)\) represents a zero-phase FIR lowpass filter and has a linear-phase property if \(h_{n}=l_{2N-n}\). For a complementary pair of analysis filters with strongly dependent responses (Figure 1), a highpass filter \(H_{U}(z)\) (or lowpass filter \(H_{L}(z)\)) can be reconstructed by subtracting a lowpass filter \(H_{L}(z)=H_{0}(z)\) (or highpass filter \(H_{U}(z)=H_{0}(-z)\)) from allpass (or unity) as  
\[H_{U}(z)=z^{-m}-H_{0}(z)=z^{-N}\Big{\{}z^{-(m-N)}-Q_{0}(z)\Big{\}} \tag{4}\]  
or  
\[H_{L}(z)=z^{-m}-H_{0}(-z)=z^{-N}\Big{\{}z^{-(m-N)}-(-1)^{-N}Q_{0}(-z)\Big{\}} \tag{5}\]  
where \(m\) is a positive integer constant for system causality, and \(z^{-m}\) denotes an (allpass) \(m\)-sample delay. Thus, in the case of Equation (4), the upper-band residual data is obtained by subtracting the lowpass filtered data from the unfiltered (\(m\)-sample delay) original data, i.e., \(\chi_{U}[n]=x[n-m]-x_{L}[n]\) where \(x_{L}[n]\) and \(x_{U}[n]\) are the lower and upper band outputs before subsampling. Then, the value of \(m\) has a significant effect on the subtracted (residual) quantities since \(m\) determines the redundancy between the lower and upper band outputs. This is because the subtraction operation of the analysis filter bank has the same effect which uses the highpass filter (or lowpass filter) with its magnitude response dependent on \(m\). The overall system function \(T_{s}(z)\) of the alias-free s-filter bank can be obtained as  
\[T_{s}(z)=\frac{1}{2}z^{-(N+m)}\Big{\{}(-1)^{-m}Q_{0}(z)-(-1)^{-N}Q_{0}(-z) \Big{\}} \tag{6}\]  
by substituting the results of Equations (2) and (4) into (1). For a given even \(m\), substituting \(N=2K-1(K=1,\ 2,\ 3,\cdots)\) into Equation (6) can yield  
\[T_{s}(z)=\frac{1}{2}z^{-(2K+m-1)}\{Q_{0}(z)+Q_{0}(-z)\} \tag{7}\]  
Figure 2 depicts the proposed single (s-) filter bank structure which consists of one single (analysis) filter and its mirrored subtraction loop. It can be seen that the analysis bank consists of a lowpass (or highpass) filter and a subtraction loop, which has more strongly dependent responses than the conventional QMF form. In addition to alias-free computations, so that \(T_{s}(e^{i\omega})\) of Equation (7) has a unity gain response in the whole frequency domain (i.e., \(\left|T_{s}\left(e^{i\omega}\right)\right|=1,\ -\pi\leq\omega\leq\pi\)), a gain error-free s-filter bank can be achieved by designing \(Q_{0}(z)\). From Equation (7) it can be found that the even number indexed  
coefficient terms \(\left(\,:h_{2n}z^{-(2K-2n-1)},\;n=0,\cdots,\;2K-1\,\right)\) of \(Q_{0}(z)\) completely cancel out those of \(Q_{0}(-z)\) if \(Q_{0}(z)\) is  
\[ \begin{split} Q_{0}(z)=h_{0}z^{-(2K-1)}+h_{2}z^{-(2K-3)}+\ldots+h_{2 K-2}z^{-1}+h_{2K-1}+h_{2K}z+\ldots\\ +h_{4K-4}z^{2K-3}+h_{4K-2}z^{2K-1}\end{split}  \tag{8}\]  
by introducing \(h_{2n-1}=0\;(n=1,\;2,\cdots,\;2K-1)\) into Equation (2) [26; 27; 29]. Thus, substituting Equation (8) to (7) potentially leads to  
\[T_{s}(z)=h_{2K-1}z^{-(2K+m-1)} \tag{9}\]  
From Equation (9), it is shown that even though any \(h_{2n}\;(n=0,\;\cdots,2K-1)\) is chosen, the s-filter bank produces zero distortion and also has a linear phase response.