Dirac Video Codec

# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::EncoderParams Class Reference

Parameters for the encoding process. More...

`#include <common.h>`

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

List of all members.

## Public Member Functions

- EncoderParams (const VideoFormat &video_format, PictureType ftype=INTER_PICTURE, unsigned int num_refs=2, bool set_defaults=true)
    Default constructor.
- bool Verbose () const
    Returns true if we're operating verbosely, false otherwise.
- bool LocalDecode () const
    Returns a flag indicating that we're doing local decoding.
- bool Lossless () const
    Get whether we're doing lossless coding.
- bool FullSearch () const
    Get whether we're doing full-search motion estimation.
- int XRangeME () const
    Get the horizontal search range for full-search motion estimation.
- int YRangeME () const
    Get the vertical search range for full-search motion estimation.
- float Qf () const
    Get the quality factor.
- int NumL1 () const
    Return the nominal number of L1 pictures before the next I picture.
- int L1Sep () const
    Return the separation between L1 pictures (and between L1 and I pictures).
- float UFactor () const
    Return the amount we're weighting noise in the U component.
- float VFactor () const
    Return the amount we're weighting noise in the V component.
- float CPD () const
    Return the number of cycles per degree at the nominal viewing distance for the raster.
- PrefilterType Prefilter () const
    Return what prefiltering is in place.
- int PrefilterStrength () const
    Return the prefiltering strength.
- float ILambda () const
    Return the Lagrangian parameter to be used for I pictures.
- float L1Lambda () const
    Return the Lagrangian parameter to be used for L1 pictures.
- float L2Lambda () const
    Return the Lagrangian parameter to be used for L2 pictures.
- float L1MELambda () const
    Return the Lagrangian ME parameter to be used for L1 pictures.
- float L2MELambda () const
    Return the Lagrangian ME parameter to be used for L2 pictures.
- int GOPLength () const
    Return the size of the GOP.
- char * OutputPath () const
    Return the output path to be used for storing diagnositic data.
- const EntropyCorrector & EntropyFactors () const
    Return a reference to the entropy factors.
- EntropyCorrector & EntropyFactors ()
    Return a reference to the entropy factors - we need to be able to change the values of the entropy factors in situ.
- WltFilter IntraTransformFilter ()
    Return the Wavelet filter to be used for intra pictures.
- WltFilter InterTransformFilter ()
    Return the Wavelet filter to be used for Inter pictures.
- int TargetRate ()
    Return the Target Bit Rate in kbps.
- bool UsingAC () const
    Return true if using Arithmetic coding.
- void SetVerbose (bool v)
    Sets verbosity on or off.
- void SetLocalDecode (const bool decode)
    Sets a flag indicating that we're producing a locally decoded o/p.
- void SetLossless (const bool l)
    Set whether we're doing lossless coding.
- void SetFullSearch (const bool fs)
    Set whether we're doing full-search motion estimation.
- void SetXRangeME (const int xr)
    Set the horizontal search range for full-search motion estimation.
- void SetYRangeME (const int yr)
    Set the vertical search range for full-search motion estimation.
- void SetQf (const float qfac)
    Set the quality factor.
- void SetNumL1 (const int nl)
    Set the nominal number of L1 pictures between I pictures.
- void SetL1Sep (const int lsep)
    Set the separation between L1 pictures.
- void SetUFactor (const float uf)
    Set the amount to weight noise in the U component.
- void SetVFactor (const float vf)
    Set the amount to weight noise in the V component.
- void SetCPD (const float cpd)
    Set the number of cycles per degree at the nominal viewing distance.
- void SetPrefilter (const PrefilterType pf, const int str)
    Set denoising value - true or false.
- void SetOutputPath (const char *op)
    Set the output path to be used for diagnostic data.
- void SetEntropyFactors (EntropyCorrector *entcorrect)
    Sets the entropy factors - TBD: set this up in a constructor and pass encoder params around entirely by reference.
- void SetIntraTransformFilter (unsigned int wf_idx)
    Set the Wavelet filter to be used for intra pictures.
- void SetInterTransformFilter (unsigned int wf_idx)
    Set the Wavelet filter to be used for inter pictures.
- void SetIntraTransformFilter (WltFilter wf)
    Set the Wavelet filter to be used for intra pictures.
- void SetUsualCodeBlocks (const PictureType &ftype)
    Set the number of code blocks for all levels.
- void SetInterTransformFilter (WltFilter wf)
    Set the Wavelet filter to be used for inter pictures.
- void SetTargetRate (const int rate)
    Set the target bit rate.
- void SetUsingAC (bool using_ac)
    Set the arithmetic coding flag.

## Private Member Functions

- void CalcLambdas (const float qf)
    Calculate the Lagrangian parameters from the quality factor.

## Private Attributes

- bool m_verbose
    Code/decode with commentary if true.
- bool m_loc_decode
    Flag indicating we're doing local decoding.
- bool m_lossless
    A flag indicating we're doing lossless coding.
- bool m_full_search
    A flag indicating whether we're doing full-search block matching.
- int m_x_range_me
    The horizontal range for full-search block matching.
- int m_y_range_me
    The vertical range for full-search block matching.
- float m_qf
    Quality factor.
- int m_num_L1
    Number of L1 pictures before next I picture.
- int m_L1_sep
    Separation between L1 pictures.
- float m_ufactor
    factor for weighting U component quantisation errors
- float m_vfactor
    factor for weighting V component quantisation errors
- float m_cpd
    Cycles per degree assumed for viewing the video.
- PrefilterType m_prefilter
    Indicator for prefiltering.
- int m_prefilter_strength
    Prefiltering strength.
- float m_I_lambda
    Lagrangian parameter for Intra picture coding.
- float m_L1_lambda
    Lagrangian parameter for L1 picture coding.
- float m_L2_lambda
    Lagrangian parameter for L2 picture coding.
- float m_L1_me_lambda
    Lagrangian param for L1 motion estimation.
- float m_L2_me_lambda
    Lagrangian param for L2 motion estimation.
- EntropyCorrector * m_ent_correct
    Correction factors for quantiser selection.
- std::string m_output_path
    Output file path.
- WltFilter m_intra_wltfilter
    Wavelet filter for Intra pictures.
- WltFilter m_inter_wltfilter
    Wavelet filter for Inter pictures.
- int m_target_rate
    Target bit rate.
- bool m_using_ac
    Arithmetic coding flag.

## Detailed Description

Parameters for the encoding process, derived from CodecParams.

## Constructor & Destructor Documentation

dirac::EncoderParams::EncoderParams | ( | const VideoFormat & | video_format,
|  | PictureType | ftype = `INTER_PICTURE`,
|  | unsigned int | num_refs = `2`,
|  | bool | set_defaults = `true` |
| ) |  |  |

## Member Function Documentation

bool dirac::EncoderParams::Verbose | ( |  | ) | const`[inline]`

References m_verbose.

bool dirac::EncoderParams::LocalDecode | ( |  | ) | const`[inline]`

References m_loc_decode.

bool dirac::EncoderParams::Lossless | ( |  | ) | const`[inline]`

References m_lossless.

bool dirac::EncoderParams::FullSearch | ( |  | ) | const`[inline]`

References m_full_search.

int dirac::EncoderParams::XRangeME | ( |  | ) | const`[inline]`

References m_x_range_me.

int dirac::EncoderParams::YRangeME | ( |  | ) | const`[inline]`

References m_y_range_me.

float dirac::EncoderParams::Qf | ( |  | ) | const`[inline]`

References m_qf.

int dirac::EncoderParams::NumL1 | ( |  | ) | const`[inline]`

Return the nominal number of L1 pictures before the next I picture. Can be overridden by I-picture insertion

References m_num_L1.

int dirac::EncoderParams::L1Sep | ( |  | ) | const`[inline]`

References m_L1_sep.

float dirac::EncoderParams::UFactor | ( |  | ) | const`[inline]`

References m_ufactor.

float dirac::EncoderParams::VFactor | ( |  | ) | const`[inline]`

References m_vfactor.

float dirac::EncoderParams::CPD | ( |  | ) | const`[inline]`

References m_cpd.

PrefilterType dirac::EncoderParams::Prefilter | ( |  | ) | const`[inline]`

References m_prefilter.

int dirac::EncoderParams::PrefilterStrength | ( |  | ) | const`[inline]`

References m_prefilter_strength.

float dirac::EncoderParams::ILambda | ( |  | ) | const`[inline]`

References m_I_lambda.

float dirac::EncoderParams::L1Lambda | ( |  | ) | const`[inline]`

References m_L1_lambda.

float dirac::EncoderParams::L2Lambda | ( |  | ) | const`[inline]`

References m_L2_lambda.

float dirac::EncoderParams::L1MELambda | ( |  | ) | const`[inline]`

References m_L1_me_lambda.

float dirac::EncoderParams::L2MELambda | ( |  | ) | const`[inline]`

References m_L2_me_lambda.

int dirac::EncoderParams::GOPLength | ( |  | ) | const

char* dirac::EncoderParams::OutputPath | ( |  | ) | const`[inline]`

References m_output_path.

const EntropyCorrector& dirac::EncoderParams::EntropyFactors | ( |  | ) | const`[inline]`

References m_ent_correct.

EntropyCorrector& dirac::EncoderParams::EntropyFactors | ( |  | ) | `[inline]`

References m_ent_correct.

WltFilter dirac::EncoderParams::IntraTransformFilter | ( |  | ) | `[inline]`

References m_intra_wltfilter.

WltFilter dirac::EncoderParams::InterTransformFilter | ( |  | ) | `[inline]`

References m_inter_wltfilter.

int dirac::EncoderParams::TargetRate | ( |  | ) | `[inline]`

References m_target_rate.

bool dirac::EncoderParams::UsingAC | ( |  | ) | const`[inline]`

References m_using_ac.

void dirac::EncoderParams::SetVerbose | ( | bool | v | ) | `[inline]`

References m_verbose.

void dirac::EncoderParams::SetLocalDecode | ( | const bool | decode | ) | `[inline]`

References m_loc_decode.

void dirac::EncoderParams::SetLossless | ( | const bool | l | ) | `[inline]`

References m_lossless.

void dirac::EncoderParams::SetFullSearch | ( | const bool | fs | ) | `[inline]`

References m_full_search.

void dirac::EncoderParams::SetXRangeME | ( | const int | xr | ) | `[inline]`

References m_x_range_me.

void dirac::EncoderParams::SetYRangeME | ( | const int | yr | ) | `[inline]`

References m_y_range_me.

void dirac::EncoderParams::SetQf | ( | const float | qfac | ) | `[inline]`

References CalcLambdas(), and m_qf.

void dirac::EncoderParams::SetNumL1 | ( | const int | nl | ) | `[inline]`

References m_num_L1.

void dirac::EncoderParams::SetL1Sep | ( | const int | lsep | ) | `[inline]`

References m_L1_sep.

void dirac::EncoderParams::SetUFactor | ( | const float | uf | ) | `[inline]`

References m_ufactor.

void dirac::EncoderParams::SetVFactor | ( | const float | vf | ) | `[inline]`

References m_vfactor.

void dirac::EncoderParams::SetCPD | ( | const float | cpd | ) | `[inline]`

References m_cpd.

void dirac::EncoderParams::SetPrefilter | ( | const PrefilterType | pf,
|  | const int | str |
| ) |  |  | `[inline]`

References m_prefilter, and m_prefilter_strength.

void dirac::EncoderParams::SetOutputPath | ( | const char * | op | ) | `[inline]`

References m_output_path.

void dirac::EncoderParams::SetEntropyFactors | ( | EntropyCorrector * | entcorrect | ) | `[inline]`

References m_ent_correct.

void dirac::EncoderParams::SetIntraTransformFilter | ( | unsigned int | wf_idx | ) |

void dirac::EncoderParams::SetInterTransformFilter | ( | unsigned int | wf_idx | ) |

void dirac::EncoderParams::SetIntraTransformFilter | ( | WltFilter | wf | ) | `[inline]`

References m_intra_wltfilter.

void dirac::EncoderParams::SetUsualCodeBlocks | ( | const PictureType & | ftype | ) |

void dirac::EncoderParams::SetInterTransformFilter | ( | WltFilter | wf | ) | `[inline]`

References m_inter_wltfilter.

void dirac::EncoderParams::SetTargetRate | ( | const int | rate | ) | `[inline]`

References m_target_rate.

void dirac::EncoderParams::SetUsingAC | ( | bool | using_ac | ) | `[inline]`

References m_using_ac.

void dirac::EncoderParams::CalcLambdas | ( | const float | qf | ) | `[private]`

Referenced by SetQf().

## Member Data Documentation

bool dirac::EncoderParams::m_verbose`[private]`

Referenced by SetVerbose(), and Verbose().

bool dirac::EncoderParams::m_loc_decode`[private]`

Referenced by LocalDecode(), and SetLocalDecode().

bool dirac::EncoderParams::m_lossless`[private]`

Referenced by Lossless(), and SetLossless().

bool dirac::EncoderParams::m_full_search`[private]`

Referenced by FullSearch(), and SetFullSearch().

int dirac::EncoderParams::m_x_range_me`[private]`

Referenced by SetXRangeME(), and XRangeME().

int dirac::EncoderParams::m_y_range_me`[private]`

Referenced by SetYRangeME(), and YRangeME().

float dirac::EncoderParams::m_qf`[private]`

Referenced by Qf(), and SetQf().

int dirac::EncoderParams::m_num_L1`[private]`

Referenced by NumL1(), and SetNumL1().

int dirac::EncoderParams::m_L1_sep`[private]`

Referenced by L1Sep(), and SetL1Sep().

float dirac::EncoderParams::m_ufactor`[private]`

Referenced by SetUFactor(), and UFactor().

float dirac::EncoderParams::m_vfactor`[private]`

Referenced by SetVFactor(), and VFactor().

float dirac::EncoderParams::m_cpd`[private]`

Referenced by CPD(), and SetCPD().

PrefilterType dirac::EncoderParams::m_prefilter`[private]`

Referenced by Prefilter(), and SetPrefilter().

int dirac::EncoderParams::m_prefilter_strength`[private]`

Referenced by PrefilterStrength(), and SetPrefilter().

float dirac::EncoderParams::m_I_lambda`[private]`

Referenced by ILambda().

float dirac::EncoderParams::m_L1_lambda`[private]`

Referenced by L1Lambda().

float dirac::EncoderParams::m_L2_lambda`[private]`

Referenced by L2Lambda().

float dirac::EncoderParams::m_L1_me_lambda`[private]`

Referenced by L1MELambda().

float dirac::EncoderParams::m_L2_me_lambda`[private]`

Referenced by L2MELambda().

EntropyCorrector* dirac::EncoderParams::m_ent_correct`[private]`

Referenced by EntropyFactors(), and SetEntropyFactors().

std::string dirac::EncoderParams::m_output_path`[private]`

Referenced by OutputPath(), and SetOutputPath().

WltFilter dirac::EncoderParams::m_intra_wltfilter`[private]`

Referenced by IntraTransformFilter(), and SetIntraTransformFilter().

WltFilter dirac::EncoderParams::m_inter_wltfilter`[private]`

Referenced by InterTransformFilter(), and SetInterTransformFilter().

int dirac::EncoderParams::m_target_rate`[private]`

Referenced by SetTargetRate(), and TargetRate().

bool dirac::EncoderParams::m_using_ac`[private]`

Referenced by SetUsingAC(), and UsingAC().

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.