# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

Public Member Functions | Private Attributes | List of all members
dirac::Subband Class Reference

Class encapsulating all the metadata relating to a wavelet subband.

`#include <wavelet_utils.h>`

## Public Member Functions
| Subband ()
| Default constructor. More...
| Subband (int xpos, int ypos, int xlen, int ylen)
| Constructor. More...
| Subband (int xpos, int ypos, int xlen, int ylen, int d)
| Constructor. More...
| ~Subband ()
| Destructor. More...
int | Xl () const
| Return the width of the subband. More...
int | Xp () const
| Return the horizontal position of the subband. More...
int | Yl () const
| Return the height of the subband. More...
int | Yp () const
| Return the vertical position of the subband. More...
int | Max () const
| Return the index of the maximum bit of the largest coefficient. More...
double | Wt () const
| Return the subband perceptual weight. More...
int | Depth () const
| Return the depth of the subband in the transform. More...
int | Scale () const
| Return the scale of the subband, viewed as a subsampled version of the picture. More...
int | QuantIndex () const
| Return a quantisation index. More...
bool | UsingMultiQuants () const
| Return a flag indicating whether we have separate quantisers for each code block. More...
int | Parent () const
| Return the index of the parent subband. More...
const std::vector< int > & | Children () const
| Return the indices of any child subbands. More...
int | Child (const int n) const
| Return the index of a specific child band. More...
TwoDArray< CodeBlock > & | GetCodeBlocks ()
| Return the code blocks. More...
const TwoDArray< CodeBlock > & | GetCodeBlocks () const
| Return the code blocks. More...
bool | Skipped () const
| Returns true if subband is skipped, false if not. More...
void | SetWt (const float w)
| Set the perceptual weight. More...
void | SetParent (const int p)
| Set the parent index. More...
void | SetDepth (const int d)
| Set the subband depth. More...
void | SetMax (const int m)
| Set the index of the maximum bit of the largest coefficient. More...
void | SetNumBlocks (const int ynum, const int xnum)
| Set the number of (spatial) quantisers in the subband. Creates code block structure. More...
void | SetQuantIndex (const int idx)
| Set the quantisation index. More...
void | SetUsingMultiQuants (const bool multi)
| Set the number of (spatial) quantisers in the subband. Creates code block structure. More...
void | SetSkip (const bool skip)
| Set whether the subband is skipped or not. More...

## Private Attributes
int | m_xp
int | m_yp
int | m_xl
int | m_yl
double | m_wt
int | m_depth
int | m_qindex
int | m_parent
std::vector< int > | m_children
int | m_max_bit
TwoDArray< CodeBlock > | m_code_block_array
bool | m_multi_quants
bool | m_skipped

## Constructor & Destructor Documentation

dirac::Subband::Subband | ( |  | ) |

dirac::Subband::Subband | ( | int | xpos,
|  | int | ypos,
|  | int | xlen,
|  | int | ylen
| ) |  |

The constructor parameters are

Parameters

  xpos | the xposition of the subband when packed into a big array with all the others
  ypos | the xposition of the subband
  xlen | the width of the subband
  ylen | the height of the subband

dirac::Subband::Subband | ( | int | xpos,
|  | int | ypos,
|  | int | xlen,
|  | int | ylen,
|  | int | d
| ) |  |

The constructor parameters are

Parameters

  xpos | the xposition of the subband when packed into a big array with all the others
  ypos | the xposition of the subband
  xlen | the width of the subband
  ylen | the height of the subband
  d | the depth of the subband in the wavelet transform

dirac::Subband::~Subband | ( |  | ) |

## Member Function Documentation

int dirac::Subband::Child | ( | const int | n | ) | const
| inline

References m_children.

const std::vector<int>& dirac::Subband::Children | ( |  | ) | const
| inline

References m_children.

int dirac::Subband::Depth | ( |  | ) | const
| inline

References m_depth.

TwoDArray<CodeBlock>& dirac::Subband::GetCodeBlocks | ( |  | ) |
| inline

References m_code_block_array.

const TwoDArray<CodeBlock>& dirac::Subband::GetCodeBlocks | ( |  | ) | const
| inline

References m_code_block_array.

int dirac::Subband::Max | ( |  | ) | const
| inline

References m_max_bit.

int dirac::Subband::Parent | ( |  | ) | const
| inline

References m_parent.

Referenced by dirac::GenericBandCodec< EntropyCodec >::GenericBandCodec().

int dirac::Subband::QuantIndex | ( |  | ) | const
| inline

References m_qindex.

int dirac::Subband::Scale | ( |  | ) | const
| inline

References m_depth.

void dirac::Subband::SetDepth | ( | const int | d | ) |
| inline

References m_depth.

void dirac::Subband::SetMax | ( | const int | m | ) |
| inline

References m_max_bit.

void dirac::Subband::SetNumBlocks | ( | const int | ynum,
|  | const int | xnum
| ) |  |

void dirac::Subband::SetParent | ( | const int | p | ) |
| inline

References m_parent.

void dirac::Subband::SetQuantIndex | ( | const int | idx | ) |
| inline

References m_qindex.

void dirac::Subband::SetSkip | ( | const bool | skip | ) |
| inline

References m_skipped.

void dirac::Subband::SetUsingMultiQuants | ( | const bool | multi | ) |
| inline

References m_multi_quants.

void dirac::Subband::SetWt | ( | const float | w | ) |

bool dirac::Subband::Skipped | ( |  | ) | const
| inline

References m_skipped.

bool dirac::Subband::UsingMultiQuants | ( |  | ) | const
| inline

References m_multi_quants.

double dirac::Subband::Wt | ( |  | ) | const
| inline

References m_wt.

int dirac::Subband::Xl | ( |  | ) | const
| inline

References m_xl.

int dirac::Subband::Xp | ( |  | ) | const
| inline

References m_xp.

int dirac::Subband::Yl | ( |  | ) | const
| inline

References m_yl.

int dirac::Subband::Yp | ( |  | ) | const
| inline

References m_yp.

## Member Data Documentation

std::vector<int> dirac::Subband::m_children
| private

Referenced by Child(), and Children().

TwoDArray<CodeBlock> dirac::Subband::m_code_block_array
| private

Referenced by GetCodeBlocks().

int dirac::Subband::m_depth
| private

Referenced by Depth(), Scale(), and SetDepth().

int dirac::Subband::m_max_bit
| private

Referenced by Max(), and SetMax().

bool dirac::Subband::m_multi_quants
| private

Referenced by SetUsingMultiQuants(), and UsingMultiQuants().

int dirac::Subband::m_parent
| private

Referenced by Parent(), and SetParent().

int dirac::Subband::m_qindex
| private

Referenced by QuantIndex(), and SetQuantIndex().

bool dirac::Subband::m_skipped
| private

Referenced by SetSkip(), and Skipped().

double dirac::Subband::m_wt
| private

Referenced by Wt().

int dirac::Subband::m_xl
| private

Referenced by Xl().

int dirac::Subband::m_xp
| private

Referenced by Xp().

int dirac::Subband::m_yl
| private

Referenced by Yl().

int dirac::Subband::m_yp
| private

Referenced by Yp().

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.