Dirac Video Codec

# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::CodecParams Class Reference

Parameters common to coder and decoder operation. More...

`#include <common.h>`

Inheritance diagram for dirac::CodecParams:
[legend]
Collaboration diagram for dirac::CodecParams:
[legend]

List of all members.

## Public Member Functions

- CodecParams (const VideoFormat &video_format=VIDEO_FORMAT_CUSTOM, PictureType ftype=INTRA_PICTURE, unsigned int num_refs=0, bool set_defaults=true)
    Default constructor.
- int PictureCodingMode () const
    Returns the picture coding mode (independent of source format).
- bool FieldCoding () const
    Returns true if the pictures are being coded as fields (mode 1 or 3).
- bool TopFieldFirst () const
    Returns true if the topmost field comes first in time when coding.
- int Xl () const
    Return the picture/field luma width.
- int Yl () const
    Return the picture/field luma height.
- int ChromaXl () const
    Return the picture/field chroma width.
- int ChromaYl () const
    Return the picture/field chroma height.
- unsigned int LumaDepth () const
    Returns the luma depth.
- unsigned int ChromaDepth () const
    Returns the chroma depth.
- bool ZeroTransform () const
    Return zero transform flag being used for picture (de)coding.
- WltFilter TransformFilter () const
    Return the wavelet filter currently being used for picture (de)coding.
- unsigned int TransformDepth () const
    Return the transform depth being used for picture (de)coding.
- CodeBlockMode GetCodeBlockMode () const
    Return multiple quantisers flag being used for picture (de)coding.
- bool SpatialPartition () const
    Return the spatial partitioning flag being used for picture (de)coding.
- const CodeBlocks & GetCodeBlocks (unsigned int level) const
    Return the code blocks for a particular level.
- VideoFormat GetVideoFormat () const
    Return the video format currently being used for picture (de)coding.
- PicturePredParams & GetPicPredParams ()
    Return the picture prediction params.
- const PicturePredParams & GetPicPredParams () const
    Return the picture prediction params.
- void SetPictureCodingMode (int pic_coding)
    Sets whether input is coded as fields or quincunxially.
- void SetTopFieldFirst (bool topf)
    Sets whether the topmost field comes first in time [NB: TBD since this duplicates metadata in the sequence header].
- void SetXl (const int x)
    Set the picture/field luma width.
- void SetYl (const int y)
    Set the picture/field luma height.
- void SetChromaXl (const int x)
    Set the frame/field chroma width.
- void SetChromaYl (const int y)
    Set the frame/field chroma height.
- void SetLumaDepth (unsigned int luma_depth)
    Set Luma Depth.
- void SetChromaDepth (unsigned int chroma_depth)
    Set Chroma Depth.
- void SetZeroTransform (bool zero_transform)
    Set the zero transform flag being used for picture (de)coding.
- void SetTransformFilter (const WltFilter wf)
    Set the wavelet filter used for picture (de)coding.
- void SetTransformFilter (unsigned int wf_idx)
    Set the wavelet filter used for picture (de)coding.
- void SetTransformDepth (unsigned int wd)
    Set the transform depth used for picture (de)coding and allocate for the code blocks array.
- void SetCodeBlockMode (unsigned int cb_mode)
    Set the multiple quantisers flag usedto picture (de)coding.
- void SetSpatialPartition (bool spatial_partition)
    Set the spatial partition flag usedto picture (de)coding.
- void SetCodeBlocks (unsigned int level, unsigned int hblocks, unsigned int vblocks)
    Set the number of code blocks for a particular level.
- void SetVideoFormat (const VideoFormat vd)
    Set the video format used for picture (de)coding.

## Protected Member Functions

- WltFilter TransformFilter (unsigned int wf_idx)
    Return the Wavelet filter associated with the wavelet index.

## Private Attributes

- PicturePredParams m_picpredparams
    The picture prediction parameters.
- int m_pic_coding_mode
    The picture coding mode.
- bool m_topfieldfirst
    True if interlaced and top field is first in temporal order.
- int m_xl
    The frame/field luma width.
- int m_yl
    The frame/field luma height.
- int m_cxl
    The frame/field chroma width.
- int m_cyl
    The frame/field chroma height.
- unsigned int m_luma_depth
    Luma depth - number of bits required for lumz.
- unsigned int m_chroma_depth
    chroma depth - number of bits required for luma
- VideoFormat m_video_format
    The video format being used.
- bool m_zero_transform
    Zero transform flag.
- WltFilter m_wlt_filter
    The wavelet filter being used.
- unsigned int m_wlt_depth
    Wavelet depth.
- CodeBlockMode m_cb_mode
    Code block mode.
- bool m_spatial_partition
    Spatial partitioning flag.
- OneDArray< CodeBlocks > m_cb
    Code block array. Number of entries is m_wlt_depth+1.

## Detailed Description

Parameters used throughout both the encoder and the decoder

## Constructor & Destructor Documentation

dirac::CodecParams::CodecParams | ( | const VideoFormat & | video_format = `VIDEO_FORMAT_CUSTOM`,
|  | PictureType | ftype = `INTRA_PICTURE`,
|  | unsigned int | num_refs = `0`,
|  | bool | set_defaults = `true` |
| ) |  |  |

## Member Function Documentation

int dirac::CodecParams::PictureCodingMode | ( |  | ) | const`[inline]`

Returns the picture coding mode (independent of source format) 0 = Frame coding (no quincunx) 1 = Field coding (no quincunx)

References m_pic_coding_mode.

bool dirac::CodecParams::FieldCoding | ( |  | ) | const`[inline]`

References m_pic_coding_mode.

bool dirac::CodecParams::TopFieldFirst | ( |  | ) | const`[inline]`

References m_topfieldfirst.

int dirac::CodecParams::Xl | ( |  | ) | const`[inline]`

References m_xl.

int dirac::CodecParams::Yl | ( |  | ) | const`[inline]`

References m_yl.

int dirac::CodecParams::ChromaXl | ( |  | ) | const`[inline]`

References m_cxl.

int dirac::CodecParams::ChromaYl | ( |  | ) | const`[inline]`

References m_cyl.

unsigned int dirac::CodecParams::LumaDepth | ( |  | ) | const`[inline]`

References m_luma_depth.

unsigned int dirac::CodecParams::ChromaDepth | ( |  | ) | const`[inline]`

References m_chroma_depth.

bool dirac::CodecParams::ZeroTransform | ( |  | ) | const`[inline]`

References m_zero_transform.

WltFilter dirac::CodecParams::TransformFilter | ( |  | ) | const`[inline]`

References m_wlt_filter.

unsigned int dirac::CodecParams::TransformDepth | ( |  | ) | const`[inline]`

References m_wlt_depth.

CodeBlockMode dirac::CodecParams::GetCodeBlockMode | ( |  | ) | const`[inline]`

References m_cb_mode.

bool dirac::CodecParams::SpatialPartition | ( |  | ) | const`[inline]`

References m_spatial_partition.

const CodeBlocks& dirac::CodecParams::GetCodeBlocks | ( | unsigned int | level | ) | const

VideoFormat dirac::CodecParams::GetVideoFormat | ( |  | ) | const`[inline]`

References m_video_format.

PicturePredParams& dirac::CodecParams::GetPicPredParams | ( |  | ) | `[inline]`

References m_picpredparams.

const PicturePredParams& dirac::CodecParams::GetPicPredParams | ( |  | ) | const`[inline]`

References m_picpredparams.

void dirac::CodecParams::SetPictureCodingMode | ( | int | pic_coding | ) | `[inline]`

References m_pic_coding_mode.

void dirac::CodecParams::SetTopFieldFirst | ( | bool | topf | ) | `[inline]`

References m_topfieldfirst.

void dirac::CodecParams::SetXl | ( | const int | x | ) | `[inline]`

References m_xl.

void dirac::CodecParams::SetYl | ( | const int | y | ) | `[inline]`

References m_yl.

void dirac::CodecParams::SetChromaXl | ( | const int | x | ) | `[inline]`

References m_cxl.

void dirac::CodecParams::SetChromaYl | ( | const int | y | ) | `[inline]`

References m_cyl.

void dirac::CodecParams::SetLumaDepth | ( | unsigned int | luma_depth | ) | `[inline]`

References m_luma_depth.

void dirac::CodecParams::SetChromaDepth | ( | unsigned int | chroma_depth | ) | `[inline]`

References m_chroma_depth.

void dirac::CodecParams::SetZeroTransform | ( | bool | zero_transform | ) | `[inline]`

References m_zero_transform.

void dirac::CodecParams::SetTransformFilter | ( | const WltFilter | wf | ) | `[inline]`

References m_wlt_filter.

void dirac::CodecParams::SetTransformFilter | ( | unsigned int | wf_idx | ) |

void dirac::CodecParams::SetTransformDepth | ( | unsigned int | wd | ) |

void dirac::CodecParams::SetCodeBlockMode | ( | unsigned int | cb_mode | ) |

void dirac::CodecParams::SetSpatialPartition | ( | bool | spatial_partition | ) | `[inline]`

References m_spatial_partition.

void dirac::CodecParams::SetCodeBlocks | ( | unsigned int | level,
|  | unsigned int | hblocks,
|  | unsigned int | vblocks |
| ) |  |  |

void dirac::CodecParams::SetVideoFormat | ( | const VideoFormat | vd | ) | `[inline]`

References m_video_format.

WltFilter dirac::CodecParams::TransformFilter | ( | unsigned int | wf_idx | ) | `[protected]`

## Member Data Documentation

PicturePredParams dirac::CodecParams::m_picpredparams`[private]`

Referenced by GetPicPredParams().

int dirac::CodecParams::m_pic_coding_mode`[private]`

Referenced by FieldCoding(), PictureCodingMode(), and SetPictureCodingMode().

bool dirac::CodecParams::m_topfieldfirst`[private]`

Referenced by SetTopFieldFirst(), and TopFieldFirst().

int dirac::CodecParams::m_xl`[private]`

Referenced by SetXl(), and Xl().

int dirac::CodecParams::m_yl`[private]`

Referenced by SetYl(), and Yl().

int dirac::CodecParams::m_cxl`[private]`

Referenced by ChromaXl(), and SetChromaXl().

int dirac::CodecParams::m_cyl`[private]`

Referenced by ChromaYl(), and SetChromaYl().

unsigned int dirac::CodecParams::m_luma_depth`[private]`

Referenced by LumaDepth(), and SetLumaDepth().

unsigned int dirac::CodecParams::m_chroma_depth`[private]`

Referenced by ChromaDepth(), and SetChromaDepth().

VideoFormat dirac::CodecParams::m_video_format`[private]`

Referenced by GetVideoFormat(), and SetVideoFormat().

bool dirac::CodecParams::m_zero_transform`[private]`

Referenced by SetZeroTransform(), and ZeroTransform().

WltFilter dirac::CodecParams::m_wlt_filter`[private]`

Referenced by SetTransformFilter(), and TransformFilter().

unsigned int dirac::CodecParams::m_wlt_depth`[private]`

Referenced by TransformDepth().

CodeBlockMode dirac::CodecParams::m_cb_mode`[private]`

Referenced by GetCodeBlockMode().

bool dirac::CodecParams::m_spatial_partition`[private]`

Referenced by SetSpatialPartition(), and SpatialPartition().

OneDArray<CodeBlocks> dirac::CodecParams::m_cb`[private]`

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

- common.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.