Dirac - A Video Codec

Created by the British Broadcasting Corporation.


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

Class to do block matching.

#include <block_match.h>

Collaboration diagram for dirac::BlockMatcher:
Collaboration graph
[legend]

Public Member Functions

 BlockMatcher (const PicArray &ref_data, const PicArray &pic_data, const OLBParams &bparams, const int precision, const MvArray &mv_array, const TwoDArray< MvCostData > &cost_array)
 Constructor. More...
 
 ~BlockMatcher ()
 
void FindBestMatchPel (const int xpos, const int ypos, const CandidateList &cand_list, const MVector &mv_prediction, const int list_start)
 Find the best matching vector from a list of candidates. More...
 
void FindBestMatchSubp (const int xpos, const int ypos, const CandidateList &cand_list, const MVector &mv_prediction, const float lambda)
 Find the best matching vector from a list of candidates, to sub-pixel accuracy (TBC: merge with FindBestMatch) More...
 
void RefineMatchSubp (const int xpos, const int ypos, const MVector &mv_prediction, const float lambda)
 
ValueType GetVar (const MVector &predmv, const MVector &mv) const
 Get a measure of the difference between a motion vector and a prediction. More...
 
ValueType GetVarUp (const MVector &predmv, const MVector &mv) const
 Get a measure of the difference between a motion vector and a prediction, to 1/8pel accuracy. More...
 
void SetPrecision (const int n)
 

Private Attributes

const PicArraym_pic_data
 
const PicArraym_ref_data
 
const MvArraym_mv_array
 
const TwoDArray< MvCostData > & m_cost_array
 
PelBlockDiff m_peldiff
 
OneDArray< BlockDiffUp * > m_subpeldiff
 
OLBParams m_bparams
 
const int m_var_max
 
const int m_var_max_up
 
int m_precision
 

Constructor & Destructor Documentation

◆ BlockMatcher()

dirac::BlockMatcher::BlockMatcher ( const PicArray ref_data,
const PicArray pic_data,
const OLBParams bparams,
const int  precision,
const MvArray mv_array,
const TwoDArray< MvCostData > &  cost_array 
)

Constructor

Parameters
ref_datathe reference picture component
pic_datathe picture being matched
bparamsthe (overlapped) block parameters to be used for the matching
precisionthe number of bits of precision being used for estimation
mv_arraythe array of vectors we're going to write into
cost_arraythe array of costs we're going to write into

◆ ~BlockMatcher()

dirac::BlockMatcher::~BlockMatcher ( )

Member Function Documentation

◆ FindBestMatchPel()

void dirac::BlockMatcher::FindBestMatchPel ( const int  xpos,
const int  ypos,
const CandidateList cand_list,
const MVector mv_prediction,
const int  list_start 
)

Find the best matching vector from a list of candidates.

Parameters
xposthe horizontal location of the block being matched
yposthe vertical location of the block being matched
cand_listthe list of candidate vectors
mv_predictionPrediction used for each block used to control the variation in the motion vector field.
list_startindex into the candidate vectors list

◆ FindBestMatchSubp()

void dirac::BlockMatcher::FindBestMatchSubp ( const int  xpos,
const int  ypos,
const CandidateList cand_list,
const MVector mv_prediction,
const float  lambda 
)

Find the best matching vector from a list of candidates.

Parameters
xposthe horizontal location of the block being matched
yposthe vertical location of the block being matched
cand_listthe list of candidate vectors
mv_predictionthe prediction for the motion vector
lambdathe Lagrangian parameter

◆ GetVar()

ValueType dirac::BlockMatcher::GetVar ( const MVector predmv,
const MVector mv 
) const

Get a measure of the difference between a motion vector and a prediction

Parameters
predmvthe predicting motion vector
mvthe motion vector

◆ GetVarUp()

ValueType dirac::BlockMatcher::GetVarUp ( const MVector predmv,
const MVector mv 
) const

Get a measure of the difference between a motion vector and a prediction, to 1/8pel accuracy

Parameters
predmvthe predicting motion vector
mvthe motion vector

◆ RefineMatchSubp()

void dirac::BlockMatcher::RefineMatchSubp ( const int  xpos,
const int  ypos,
const MVector mv_prediction,
const float  lambda 
)

◆ SetPrecision()

void dirac::BlockMatcher::SetPrecision ( const int  n)
inline

References m_precision.

Member Data Documentation

◆ m_bparams

OLBParams dirac::BlockMatcher::m_bparams
private

◆ m_cost_array

const TwoDArray< MvCostData >& dirac::BlockMatcher::m_cost_array
private

◆ m_mv_array

const MvArray& dirac::BlockMatcher::m_mv_array
private

◆ m_peldiff

PelBlockDiff dirac::BlockMatcher::m_peldiff
private

◆ m_pic_data

const PicArray& dirac::BlockMatcher::m_pic_data
private

◆ m_precision

int dirac::BlockMatcher::m_precision
private

Referenced by SetPrecision().

◆ m_ref_data

const PicArray& dirac::BlockMatcher::m_ref_data
private

◆ m_subpeldiff

OneDArray<BlockDiffUp* > dirac::BlockMatcher::m_subpeldiff
private

◆ m_var_max

const int dirac::BlockMatcher::m_var_max
private

◆ m_var_max_up

const int dirac::BlockMatcher::m_var_max_up
private

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

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