# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::WaveletTransform Class Reference

A class to do wavelet transforms. More...

`#include <wavelet_utils.h>`

Collaboration diagram for dirac::WaveletTransform:

[legend]

List of all members.

## Public Member Functions

- WaveletTransform (int d=4, WltFilter f=DAUB9_7)
    Constructor.
- virtual ~WaveletTransform ()
    Destructor.
- void Transform (const Direction d, PicArray &pic_data)
    Transforms the data to and from the wavelet domain.
- SubbandList & BandList ()
    Returns the set of subbands.
- const SubbandList & BandList () const
    Returns the set of subbands.
- void SetBandWeights (const float cpd, const FrameSort &fsort, const ChromaFormat &cformat, const CompSort csort)
    Sets the subband weights.

## Private Member Functions

- WaveletTransform (const WaveletTransform &cpy)
    Private, bodyless copy constructor: class should not be copied.
- WaveletTransform & operator= (const WaveletTransform &rhs)
    Private, bodyless copy operator=: class should not be assigned.
- float PerceptualWeight (float xf, float yf, CompSort cs)
    Given x and y spatial frequencies in cycles per degree, returns a weighting value.

## Private Attributes

- SubbandList m_band_list
- int m_depth
    Depth of the transform.
- WltFilter m_filt_sort
    The filter set to be used.
- VHFilter * m_vhfilter
    A class to do the filtering required.

## Classes

- class PredictStep97
    Class to do two-tap prediction lifting step for Daubechies (9,7). More...
- class PredictStepFourTap
    Class to do symmetric four-tap prediction lifting step. More...
- class PredictStepShift
    Class to do two-tap prediction lifting step. More...
- class UpdateStep97
    Class to do two-tap update lifting step for Daubechies (9,7). More...
- class UpdateStepFourTap
    Class to do symmetric four-tap update lifting step. More...
- class UpdateStepShift
    Class to do two-tap updating lifting step. More...
- class VHFilter
    A virtual parent class to do vertical and horizontal splitting with wavelet filters. More...
- class VHFilterDAUB9_7
    Class to do Daubechies (9,7) filtering operations. More...
- class VHFilterDD13_5
    An extension of DD9_3, with a better low-pass filter but more computation. More...
- class VHFilterDD9_3
    A short filter that's actually close to Daubechies (9,7) but with just two lifting steps. More...
- class VHFilterHAAR0
    Class to do Haar wavelet filtering operations. More...
- class VHFilterHAAR1
    Class to do Haar wavelet filtering operations with a single shift per level. More...
- class VHFilterHAAR2
    Class to do Haar wavelet filtering operations with a double shift per level. More...
- class VHFilterLEGALL5_3
    Class to do (5,3) wavelet filtering operations. More...

## Detailed Description

A class to do forward and backward wavelet transforms by iteratively splitting or merging the lowest frequency band.

## Constructor & Destructor Documentation

dirac::WaveletTransform::WaveletTransform | ( | int | d = `4`,
|  | WltFilter | f = `DAUB9_7` |
| ) |  |  |

virtual dirac::WaveletTransform::~WaveletTransform | ( |  | ) | `[virtual]`

dirac::WaveletTransform::WaveletTransform | ( | const WaveletTransform & | cpy | ) | `[private]`

## Member Function Documentation

void dirac::WaveletTransform::Transform | ( | const Direction | d,
|  | PicArray & | pic_data |
| ) |  |  |

Transforms the data to and from the wavelet domain.

Parameters:

  | d | the direction of the transform
  | pic_data | the data to be transformed

SubbandList& dirac::WaveletTransform::BandList | ( |  | ) | `[inline]`

References m_band_list.

const SubbandList& dirac::WaveletTransform::BandList | ( |  | ) | const`[inline]`

References m_band_list.

void dirac::WaveletTransform::SetBandWeights | ( | const float | cpd,
|  | const FrameSort & | fsort,
|  | const ChromaFormat & | cformat,
|  | const CompSort | csort |
| ) |  |  |

Sets perceptual weights for the subbands. Takes into account both perceptual factors (weight noise less at higher spatial frequencies) and the scaling needed for the wavelet transform.

Parameters:

  | cpd | perctual factor - the number of cycles per degree
  | fsort | the frame sort (I, L1 or L2)
  | cformat | the chroma format
  | csort | the component type (Y, U or V)

WaveletTransform& dirac::WaveletTransform::operator= | ( | const WaveletTransform & | rhs | ) | `[private]`

float dirac::WaveletTransform::PerceptualWeight | ( | float | xf,
|  | float | yf,
|  | CompSort | cs |
| ) |  |  | `[private]`

## Member Data Documentation

SubbandList dirac::WaveletTransform::m_band_list`[private]`

Referenced by BandList().

int dirac::WaveletTransform::m_depth`[private]`

WltFilter dirac::WaveletTransform::m_filt_sort`[private]`

VHFilter* dirac::WaveletTransform::m_vhfilter`[private]`

The documentation for this class was generated from the following file:

- wavelet_utils.h

© 2004 British Broadcasting Corporation. Dirac code licensed under the Mozilla Public License (MPL) Version 1.1.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.