# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

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

Structure to hold motion parameters when motion comp is used.

`#include <common.h>`

## Public Member Functions
| PicturePredParams ()
bool | UsingGlobalMotion () const
| Return the global motion flag used for encoding/decoding. More...
unsigned int | PictureWeightsBits () const
| Return the number of picture weight precision bits. More...
int | Ref1Weight () const
| Return the Ref1 weight. More...
int | Ref2Weight () const
| Return the Ref2 weight. More...
bool | CustomRefWeights ()
int | XNumSB () const
| Return the number of superblocks horizontally. More...
int | YNumSB () const
| Return the number of superblocks vertically. More...
int | XNumBlocks () const
| Return the number of blocks horizontally. More...
int | YNumBlocks () const
| Returns the number of blocks vertically. More...
const OLBParams & | LumaBParams (int n) const
| Return the Luma block parameters for each macroblock splitting level. More...
const OLBParams & | ChromaBParams (int n) const
| Return the Chroma block parameters for each macroblock splitting level. More...
MVPrecisionType | MVPrecision () const
| Return the number of accuracy bits used for motion vectors. More...
void | SetXNumSB (const int xn)
| Set how many SBs there are horizontally. More...
void | SetYNumSB (const int yn)
| Set how many SBs there are vertically. More...
void | SetXNumBlocks (const int xn)
| Set how many blocks there are horizontally. More...
void | SetYNumBlocks (const int yn)
| Set how many blocks there are vertically. More...
void | SetBlockSizes (const OLBParams &olbparams, const ChromaFormat cformat)
| Set the block sizes for all SB splitting levels given these prototype block sizes for level=2. More...
void | SetLumaBlockParams (const OLBParams &olbparams)
| Set block level luma params. More...
void | SetMVPrecision (const MVPrecisionType p)
| Set the number of accuracy bits for motion vectors. More...
void | SetMVPrecision (const MVPrecisionType p) const
void | SetUsingGlobalMotion (bool gm)
| Set the wavelet filter used for picture (de)coding. More...
void | SetPictureWeightsPrecision (unsigned int wt_prec)
| Set the picture weight precision bits used for (de)coding. More...
void | SetRef1Weight (int wt)
| Set the ref 1 picture weight. More...
void | SetRef2Weight (int wt)
| Set the ref 2 picture weight. More...

## Private Attributes
int | m_x_num_sb
| The number of superblocks horizontally. More...
int | m_y_num_sb
| The number of superblocks verticaly. More...
int | m_x_num_blocks
| The number of blocks horizontally. More...
int | m_y_num_blocks
| The number of blocks vertically. More...
OneDArray< OLBParams > | m_lbparams
OneDArray< OLBParams > | m_cbparams
MVPrecisionType | m_mv_precision
| The precision of motion vectors (number of accuracy bits eg 1=half-pel accuracy) More...
unsigned int | m_picture_weights_bits
| picture predicion parameters - precision More...
int | m_ref1_weight
| picture predicion parameters - reference picture 1 weight More...
int | m_ref2_weight
| picture predicion parameters - reference picture 2 weight More...
bool | m_use_global_motion
| Global motion fields. More...

## Constructor & Destructor Documentation

dirac::PicturePredParams::PicturePredParams | ( |  | ) |
| inline

## Member Function Documentation

const OLBParams& dirac::PicturePredParams::ChromaBParams | ( | int | n | ) | const
| inline

References m_cbparams.

bool dirac::PicturePredParams::CustomRefWeights | ( |  | ) |
| inline

References m_picture_weights_bits, m_ref1_weight, and m_ref2_weight.

const OLBParams& dirac::PicturePredParams::LumaBParams | ( | int | n | ) | const
| inline

References m_lbparams.

MVPrecisionType dirac::PicturePredParams::MVPrecision | ( |  | ) | const
| inline

References m_mv_precision.

unsigned int dirac::PicturePredParams::PictureWeightsBits | ( |  | ) | const
| inline

References m_picture_weights_bits.

int dirac::PicturePredParams::Ref1Weight | ( |  | ) | const
| inline

References m_ref1_weight.

int dirac::PicturePredParams::Ref2Weight | ( |  | ) | const
| inline

References m_ref2_weight.

void dirac::PicturePredParams::SetBlockSizes | ( | const OLBParams & | olbparams,
|  | const ChromaFormat | cformat
| ) |  |

void dirac::PicturePredParams::SetLumaBlockParams | ( | const OLBParams & | olbparams | ) |
| inline

References m_lbparams.

void dirac::PicturePredParams::SetMVPrecision | ( | const MVPrecisionType | p | ) |
| inline

References m_mv_precision, and TESTM.

void dirac::PicturePredParams::SetMVPrecision | ( | const MVPrecisionType | p | ) | const
| inline

References m_mv_precision, and TESTM.

void dirac::PicturePredParams::SetPictureWeightsPrecision | ( | unsigned int | wt_prec | ) |
| inline

References m_picture_weights_bits.

void dirac::PicturePredParams::SetRef1Weight | ( | int | wt | ) |
| inline

References m_ref1_weight.

void dirac::PicturePredParams::SetRef2Weight | ( | int | wt | ) |
| inline

References m_ref2_weight.

void dirac::PicturePredParams::SetUsingGlobalMotion | ( | bool | gm | ) |
| inline

References m_use_global_motion.

void dirac::PicturePredParams::SetXNumBlocks | ( | const int | xn | ) |
| inline

References m_x_num_blocks.

void dirac::PicturePredParams::SetXNumSB | ( | const int | xn | ) |
| inline

References m_x_num_sb.

void dirac::PicturePredParams::SetYNumBlocks | ( | const int | yn | ) |
| inline

References m_y_num_blocks.

void dirac::PicturePredParams::SetYNumSB | ( | const int | yn | ) |
| inline

References m_y_num_sb.

bool dirac::PicturePredParams::UsingGlobalMotion | ( |  | ) | const
| inline

References m_use_global_motion.

int dirac::PicturePredParams::XNumBlocks | ( |  | ) | const
| inline

References m_x_num_blocks.

int dirac::PicturePredParams::XNumSB | ( |  | ) | const
| inline

References m_x_num_sb.

int dirac::PicturePredParams::YNumBlocks | ( |  | ) | const
| inline

References m_y_num_blocks.

int dirac::PicturePredParams::YNumSB | ( |  | ) | const
| inline

References m_y_num_sb.

## Member Data Documentation

OneDArray<OLBParams> dirac::PicturePredParams::m_cbparams
| private

Referenced by ChromaBParams().

OneDArray<OLBParams> dirac::PicturePredParams::m_lbparams
| private

Referenced by LumaBParams(), and SetLumaBlockParams().

MVPrecisionType dirac::PicturePredParams::m_mv_precision
| mutable private

Referenced by MVPrecision(), and SetMVPrecision().

unsigned int dirac::PicturePredParams::m_picture_weights_bits
| private

Referenced by CustomRefWeights(), PictureWeightsBits(), and SetPictureWeightsPrecision().

int dirac::PicturePredParams::m_ref1_weight
| private

Referenced by CustomRefWeights(), Ref1Weight(), and SetRef1Weight().

int dirac::PicturePredParams::m_ref2_weight
| private

Referenced by CustomRefWeights(), Ref2Weight(), and SetRef2Weight().

bool dirac::PicturePredParams::m_use_global_motion
| private

Referenced by SetUsingGlobalMotion(), and UsingGlobalMotion().

int dirac::PicturePredParams::m_x_num_blocks
| private

Referenced by SetXNumBlocks(), and XNumBlocks().

int dirac::PicturePredParams::m_x_num_sb
| private

Referenced by SetXNumSB(), and XNumSB().

int dirac::PicturePredParams::m_y_num_blocks
| private

Referenced by SetYNumBlocks(), and YNumBlocks().

int dirac::PicturePredParams::m_y_num_sb
| private

Referenced by SetYNumSB(), and YNumSB().

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.