# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

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

Class for all the motion estimation data. More...

`#include <motion.h>`

Inheritance diagram for dirac::MEData:

## Public Member Functions
| MEData (const PicturePredParams &predparams, const int num_refs=2)
| Constructor. More...
| ~MEData ()
| Destructor. More...
void | DropRef (int ref_index)
| drop the data relating to one reference More...
TwoDArray< MvCostData > & | PredCosts (const int ref_id)
| Get the block cost structures for each reference. More...
const TwoDArray< MvCostData > & | PredCosts (const int ref_id) const
| Get the block cost structures for each reference. More...
TwoDArray< float > & | IntraCosts ()
| Get the intra costs. More...
const TwoDArray< float > & | IntraCosts () const
| Get the intra costs. More...
TwoDArray< MvCostData > & | BiPredCosts ()
| Get the bipred costs. More...
const TwoDArray< MvCostData > & | BiPredCosts () const
| Get the bipred costs. More...
TwoDArray< float > & | SBCosts ()
| Get the SB costs. More...
const TwoDArray< float > & | SBCosts () const
| Get the SB costs. More...
float | IntraBlockRatio () const
| Get the proportion of intra blocks. More...
void | SetIntraBlockRatio (const float r)
| Set the intra block ratio. More...
void | SetLambdaMap (const int num_refs, const float lambda)
| Set up the lambda map by detecting motion discontinuities. More...
void | SetLambdaMap (const int level, const TwoDArray< float > &l_map, const float wt)
| Set up the lambda map by averaging the lambda map from a lower level. More...
const TwoDArray< float > & | LambdaMap () const
| Get a lambda value for a given block and level. More...
TwoDArray< int > & | GlobalMotionInliers (const int ref_id)
| Get the inliers for each reference. More...
const TwoDArray< int > & | GlobalMotionInliers (const int ref_id) const
| Get the inliers for each reference. More...
Public Member Functions inherited from dirac::MvData
| MvData (const PicturePredParams &predparams, const int num_refs)
| Constructor. More...
| ~MvData ()
| Destructor. More...
PicturePredParams & | GetPicPredParams ()
| Return a reference to the local picture prediction params. More...
const PicturePredParams & | GetPicPredParams () const
| Return a reference to the local picture prediction params. More...
MvArray & | Vectors (const int ref_id)
| Get the MVs for a reference. More...
const MvArray & | Vectors (const int ref_id) const
| Get the MVs for a reference. More...
MvArray & | GlobalMotionVectors (const int ref_id)
| Get the global MVs for a reference. More...
const MvArray & | GlobalMotionVectors (const int ref_id) const
| Get the global MVs for a reference. More...
TwoDArray< ValueType > & | DC (CompSort cs)
| Get the DC values for each component. More...
const TwoDArray< ValueType > & | DC (CompSort cs) const
| Get the DC values for each component. More...
const OneDArray< TwoDArray< ValueType > * > & | DC () const
| Get a reference to the vector holding component DC values. More...
TwoDArray< PredMode > & | Mode ()
| Get the block prediction modes. More...
const TwoDArray< PredMode > & | Mode () const
| Get the block prediction modes. More...
TwoDArray< int > & | SBSplit ()
| Get the SB split level. More...
const TwoDArray< int > & | SBSplit () const
| Get the SB split level. More...
OneDArray< float > & | GlobalMotionParameters (const int ref_id)
| Get the global motion model parameters. More...
const OneDArray< float > & | GlobalMotionParameters (const int ref_id) const
| Get the global motion model parameters. More...

## Private Member Functions
void | InitMEData ()
void | FindTransitions (TwoDArray< bool > &trans_map, const int ref_num)

## Private Attributes
OneDArray< TwoDArray< MvCostData > * > | m_pred_costs
TwoDArray< float > | m_intra_costs
TwoDArray< MvCostData > | m_bipred_costs
TwoDArray< float > | m_SB_costs
TwoDArray< float > | m_lambda_map
OneDArray< TwoDArray< int > * > | m_inliers
float | m_intra_block_ratio

## Friends
std::ostream & | operator<< (std::ostream &stream, MEData &me_data)
| Overloaded operator<< for outputing to (file) stream. More...
std::istream & | operator>> (std::istream &stream, MEData &me_data)
| Overloaded operator>> for input of data from (file) stream. More...

## Additional Inherited Members
Protected Member Functions inherited from dirac::MvData
void | InitMvData ()
Protected Attributes inherited from dirac::MvData
PicturePredParams | m_predparams
OneDArray< MvArray * > | m_vectors
OneDArray< MvArray * > | m_gm_vectors
TwoDArray< PredMode > | m_modes
OneDArray< TwoDArray< ValueType > * > | m_dc
TwoDArray< int > | m_sb_split
OneDArray< OneDArray< float > * > | m_gm_params

## Detailed Description

Motion estimation data: derived from MvData class, also incorporates costs for blocks and macroblocks

## Constructor & Destructor Documentation

dirac::MEData::MEData | ( | const PicturePredParams & | predparams,
|  | const int | num_refs = `2`
| ) |  |

Constructor takes:

Parameters

  predparams | the picture prediction parameters
  num_refs | the number of references being used for the picture

dirac::MEData::~MEData | ( |  | ) |

## Member Function Documentation

TwoDArray<MvCostData>& dirac::MEData::BiPredCosts | ( |  | ) |
| inline

References m_bipred_costs.

const TwoDArray<MvCostData>& dirac::MEData::BiPredCosts | ( |  | ) | const
| inline

References m_bipred_costs.

void dirac::MEData::DropRef | ( | int | ref_index | ) |

void dirac::MEData::FindTransitions | ( | TwoDArray< bool > & | trans_map,
|  | const int | ref_num
| ) |  |
| private

TwoDArray<int>& dirac::MEData::GlobalMotionInliers | ( | const int | ref_id | ) |
| inline

References m_inliers.

const TwoDArray<int>& dirac::MEData::GlobalMotionInliers | ( | const int | ref_id | ) | const
| inline

References m_inliers.

void dirac::MEData::InitMEData | ( |  | ) |
| private

float dirac::MEData::IntraBlockRatio | ( |  | ) | const
| inline

References m_intra_block_ratio.

TwoDArray<float>& dirac::MEData::IntraCosts | ( |  | ) |
| inline

References m_intra_costs.

const TwoDArray<float>& dirac::MEData::IntraCosts | ( |  | ) | const
| inline

References m_intra_costs.

const TwoDArray<float>& dirac::MEData::LambdaMap | ( |  | ) | const
| inline

References m_lambda_map.

TwoDArray<MvCostData>& dirac::MEData::PredCosts | ( | const int | ref_id | ) |
| inline

References m_pred_costs.

const TwoDArray<MvCostData>& dirac::MEData::PredCosts | ( | const int | ref_id | ) | const
| inline

References m_pred_costs.

TwoDArray<float>& dirac::MEData::SBCosts | ( |  | ) |
| inline

References m_SB_costs.

const TwoDArray<float>& dirac::MEData::SBCosts | ( |  | ) | const
| inline

References m_SB_costs.

void dirac::MEData::SetIntraBlockRatio | ( | const float | r | ) |
| inline

References m_intra_block_ratio.

void dirac::MEData::SetLambdaMap | ( | const int | num_refs,
|  | const float | lambda
| ) |  |

void dirac::MEData::SetLambdaMap | ( | const int | level,
|  | const TwoDArray< float > & | l_map,
|  | const float | wt
| ) |  |

## Friends And Related Function Documentation

std::ostream& operator<< | ( | std::ostream & | stream,
|  | MEData & | me_data
| ) |  |
| friend

std::istream& operator>> | ( | std::istream & | stream,
|  | MEData & | me_data
| ) |  |
| friend

## Member Data Documentation

TwoDArray<MvCostData> dirac::MEData::m_bipred_costs
| private

Referenced by BiPredCosts().

OneDArray< TwoDArray<int>* > dirac::MEData::m_inliers
| private

Referenced by GlobalMotionInliers().

float dirac::MEData::m_intra_block_ratio
| private

Referenced by IntraBlockRatio(), and SetIntraBlockRatio().

TwoDArray<float> dirac::MEData::m_intra_costs
| private

Referenced by IntraCosts().

TwoDArray<float> dirac::MEData::m_lambda_map
| private

Referenced by LambdaMap().

OneDArray< TwoDArray<MvCostData>* > dirac::MEData::m_pred_costs
| private

Referenced by PredCosts().

TwoDArray<float> dirac::MEData::m_SB_costs
| private

Referenced by SBCosts().

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

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