int QccWAVLiftingAnalysis(QccVector
signal, int signal_length, int phase, const QccWAVLiftingScheme *lifting_scheme,
int boundary);
int QccWAVLiftingSynthesis(QccVector signal, int signal_length,
int phase, const QccWAVLiftingScheme *lifting_scheme, int boundary);
If phase is QCCWAVWAVELET_PHASE_EVEN, then signal is assumed to start with a even-indexed sample. Otherwise, if phase is QCCWAVWAVELET_PHASE_ODD, it indicates that signal starts with an odd-indexed sample. phase is passed to QccWAVWaveletLWT(3) , the lazy wavelet transform, the first step of lifting analysis, to indicate the signal origin.
In the case that signal_length is even, both the odd and even subbands of produced by lifting analysis are the same length. On the other hand, if signal_length is odd, one of the two subbands will be one sample longer than the other. Which subband will be longer will depend on the value of phase. Specifically, if phase is QCCWAVWAVELET_PHASE_EVEN, then the lowpass subband is one sample longer than the highpass subband. If phase is QCCWAVWAVELET_PHASE_ODD, the the highpass subband is one sample longer than the lowpass subband.
lifting_scheme gives the particular lifting scheme to employ. Lifting implementations of wavelet analysis and synthesis are "hard-coded" into the QccPack library for purposes of execution speed and ease of implementation (this is opposed to the situation for filter-based analysis and synthesis which employ generic filter routines and read coefficients from files). As a consequence, only a limited number of wavelets are current supported, and this list cannot be extended by the user (without modifying the QccPack source code, or course). The currently supported lifting schemes and their corresponding LFT files (see QccWAVLiftingScheme(3) ) are
LWT.lft - Lazy Wavelet transform
CohenDaubechiesFeauveau.5-3.lft - length 9/5 biorthogonal wavelet
CohenDaubechiesFeauveau.9-7.lft - length 9/7 biorthogonal wavelet
Daubechies.4.lft - length 4 orthogonal wavelet
QccWAVLiftingSynthesis() performs one level of wavelet synthesis. The first half of signal is assumed to contain the lowpass subband while the second half contains the highpass subband. Lifting synthesis is performed to produce the output signal which is returned in signal, including a call to QccWAVWaveletInverseLWT(3) to perform an inverse lazy wavelet transform. As with QccWAVLiftingAnalysis(), signal_length may be even or odd. phase indicates whether the output signal is to start with an even- or odd-indexed sample.
boundary indicates how lifting should be handled at the ends of the signal and can be one of the following: QCCWAVWAVELET_BOUNDARY_SYMMETRIC_EXTENSION (symmetric extension, valid only for biorthogonal wavelets), QCCWAVWAVELET_BOUNDARY_PERIODIC_EXTENSION (periodic extension, valid for orthogonal and biorthogonal wavelets), or QCCWAVWAVELET_BOUNDARY_BOUNDARY_WAVELET (boundary wavelet, valid for orthogonal and biorthogonal wavelets). Check the comments at the start of each LFT file for permitted values for boundary for particular lifting schemes. Note that, if periodic extension is used, signal_length must be even (this is due to mathematical constraints).
The case in which signal_length is equal to 1 is degenerate. A wavelet transform is technically not well defined for this situation because it is not clear how to subsample the signal. However, in practice, this degenerate case can be handled in several ways with no problems. In QccPack, the length-one signal is merely multiplied by sqrt(2) and placed in the lowpass subband (in which case the highpass subband has zero length) for phase equal to QCCWAVWAVELET_PHASE_EVEN, or divided by sqrt(2) and placed in the highpass subband (in which case the lowpass subband has zero length) for phase equal to QCCWAVWAVELET_PHASE_ODD.
Note: In general, you will probably want to use QccWAVWaveletDWT1D(3) and QccWAVWaveletInverseDWT1D(3) instead of these routines for implementing a discrete wavelet transform and its inverse since QccWAVWaveletDWT1D(3) and QccWAVWaveletInverseDWT1D(3) allow any number of scales, or levels, of decomposition to be performed, and can be used with either filter-bank or lifting implementations of wavelets.
I. Daubechies and W. Sweldens, "Factoring Wavelet Transforms Into Lifting Steps," J. Fourier Anal. Appl., vol. 4, no. 3, pp. 245-267, 1998.