The discrete wavelet transform is now extremely well-known and is described in numerous references. In Dirac it plays the same role of the DCT in MPEG-2 in decorrelating data in a roughly frequency-sensitive way, whilst having the advantage of preserving fine details better. In one dimension it consists of the iterated application of a complementary pair of half-band filters followed by subsampling by a factor 2:

Figure: Perfect reconstruction analysis and synthesis filter pairs
These filters are termed the analysis filters. Corresponding synthesis filters can undo the aliasing introduced by the critical sampling and perfectly reconstruct the input. Clearly not just any pair of half-band filters can do this, and there is an extensive mathematical theory of wavelet filter banks. The filters split the signal into a LH and HF part; the wavelet transform then iteratively decomposes the LF component to produce an octave-band decomposition of the signal.
Applied to two-dimensional images, wavelet filters are normally applied in both vertical and horizontal directions to each image component to produce four so-called subbands termed Low-Low (LL), Low-High (LH), High-Low (HL) and High-High (HH). In the case of two dimensions, only the LL band is iteratively decomposed to obtain the decomposition of the two-dimensional spectrum shown below:

Figure: wavelet transform frequency decomposition
The number of samples in each resulting subband is as implied by the diagram: the critical sampling ensures that after each decomposition the resulting bands all have one quarter of the samples of the input signal.

Figure: 3-level wavelet transform of LENA
The choice of wavelet filters has an impact on compression performance, filters having to have both compact impulse response in order to reduce ringing artefacts and other properties in order to represent smooth areas compactly. The filters currently used in Dirac are the Daubechies (9,7) filter set which if applied naively require an average of 8 multiplications per sample for the transform in both directions. However, the lifting-scheme allows wavelet filters to be factorised. The Dirac software uses a lifting implementation with integer approximations to the filters. This is much quicker, and easier to pipeline.
Clearly, applying an N-level wavelet transform requires N levels of subsamplings, and so for reversibility, it is necessary that 2N divides all the dimensions of each component. A fixed 4-level transform is currently implemented by the software (variable-depth transforms are intended for the future) so input picture components must be divisible by 16. This is not the case, for example, for European Standard Definition 720x576 in anything other than 444 format, as the subsampled chroma data won't meet this criterion. So if this condition is not met, the input data frames are padded as they are read in, by edge values for best compression performance. Note that the entire frame is padded even if only the chroma components fail the divisibility test.
This padding is additional to that needed to accommodate the block sizes chosen for motion estimation and compensation. This is because wavelet coding is performed after any motion compensation.
Previous: Transform Coding Architecture Next: Parent-Child Relationships