Real-Time lifting wavelet transform algorithm Zdenek Prusa and Pavel Rajmic Brno University of Technology, Faculty of Electrical Engineering and Communication, Department of Telecommunications, Purkyňova 118, 612 00 Brno Email: zdenek.prusa@phd.feec.vutbr.cz, rajmic@feec.vutbr.cz Abstract – When performing a wavelet transform of one-dimensional signals, it is often impractical or even impossible to load whole input signal at once. This is the case of long audio files or live performances, when real-time processing is necessary. The algorithm presented in this paper allows computation of the forward and inverse lifting wavelet transform of independent segments of the input signal much like well known overlap-add or overlap-save algorithms works for convolution. The goal of the algorithm is to find such overlaps between segments so there is no border distortion which may occur when no overlaps are used due to the difference of wavelet coefficients at the segment borders. 1 Introduction The discrete wavelet transform has been extensively stud- ied over the past 20 years. Many applications have been proposed but the power of wavelet transform lies in its per- formance in compression and denoising schemes. The exis- tence of fast algorithms for its computation is another im- portant factor. The well known Mallat’s algorithm (DWT – Discrete Wavelet Transform) employs two-channel filter bank iteratively and the filter bank can be equally repre- sented by a polyphase lifting scheme. Iterative application of the lifting scheme (LWT – Lifting Wavelet Transform) results in the same coefficients as the DWT does. The lifting scheme was rediscovered by Sweldens in [1] and according to [2], every wavelet filter bank can be de- composed into a lifting scheme. The computation itself can be done in-place (no external memory needed) and the computation cost can be reduced compared to convo- lution. The factorizations are not unique so considerable effort was devoted to finding effective ones [2, 3, 4] because not every factorization is more effective than original filter bank. The most famous is the 9/7 CDF wavelet factoriza- tion, employed in the JPEG2000 standard [5]. Another feature of the lifting scheme is that rounding the results of predict and update operation allows transforma- tion which maps integers to integers, usable especially for lossless data compression [1]. The LWT can also be generalized to non-translation in- variant grids and allows adaptivity of subsequent lifting steps [6]. However, these extensions are not concerned in this work. In this paper, a novel algorithm of segmented computa- tion of LWT is proposed, called Segmented Lifting Wavelet transform – SLWT. The main idea of the forward trans- form is: 1. Read a segment from the input, calculate its proper left and right extensions and read samples according to them. 2. Perform the LWT of the extended segment. 3. Crop redundant samples in each level of decomposi- tion from both sides. Repeat these steps until all samples are processed. The fair generality of the algorithm lies in choosing the segment lengths, which are not restricted to the power of two and can be chosen arbitrarily (up to some minimal length) and can even differ from each other. The inverse transform is similar: 1. Read the corresponding sets of coefficients and extend them from both sides with zeros. 2. Perform the inverse LWT. 3. Place the segment to the correct position (within the output), add overlaps to the neighboring segments. Again, repeat these steps until all samples are processed. The reconstructed signal does not suffer from border dis- tortion as it would when no overlaps were exploited. The organization of the paper is the following. Section 2 discuses other approaches to segmented wavelet transform and to the lifting scheme and it also deals with theoretical background of the LWT. Section 3 describes the respective algorithm for segmented LWT and it formulates several examples. In section 4, possible applications and future extensions are discussed. This paper follows the reproducible research paradigm, therefore it is accompanied by the software bundle for Mat- lab at [7]. 1.1 Related work We can identify several attempts to compute the wavelet transform segmentwise in the history of a wavelet trans- form. VOL. 2, NO. 3, SEPTEMBER 2011 53