Dirac - A Video Codec
Created by the British Broadcasting Corporation.
Go to the documentation of this file.
91 const T&
operator[](
const int pos)
const {
return ( ( pos==0) ?
x :
y );}
104 temp.
x = x + argument.
x;
105 temp.
y = y + argument.
y;
114 temp.
x = x-argument.
x;
115 temp.
y = y-argument.
y;
144 temp.
x = x<<argument;
145 temp.
y = y<<argument;
154 temp.
x = x>>argument;
155 temp.
y = y>>argument;
164 stream << mv.
x <<
" " << mv.
y;
362 void SetLambdaMap(
const int num_refs ,
const float lambda );
415 int Median(
const int val1,
const int val2,
const int val3);
422 int Median(
const std::vector<int>& val_list);
432 return mv.
x*mv.
x+mv.
y*mv.
y;
437 return abs(mv.
x)+abs(mv.
y);
441 unsigned int GetUMean(std::vector<unsigned int>& values);
444 int GetSMean(std::vector<int>& values);
TwoDArray< PredMode > & Mode()
Get the block prediction modes.
Definition: motion.h:261
MotionVector< T > operator+(const MotionVector< T > &argument) const
Addition.
Definition: motion.h:101
TwoDArray< MVector > MvArray
MvArray is a two-D array of MVectors.
Definition: motion.h:186
Class for all the motion estimation data.
Definition: motion.h:313
@ HORIZONTAL
Definition: motion.h:54
const TwoDArray< PredMode > & Mode() const
Get the block prediction modes.
Definition: motion.h:264
MVector MvMedian(const MVector &mv1, const MVector &mv2, const MVector &mv3)
Return the median of three motion vectors.
float IntraBlockRatio() const
Get the proportion of intra blocks.
Definition: motion.h:356
MvCostData()
Constructor.
Definition: motion.h:196
const TwoDArray< float > & LambdaMap() const
Get a lambda value for a given block and level.
Definition: motion.h:368
Definition of class SequenceHeaderByteIO.
Definition: accessunit_byteio.h:51
Class for recording costs derived in motion estimation.
Definition: motion.h:192
MvElement
Horizontal or vertical.
Definition: motion.h:54
A template class for two-dimensional arrays.
Definition: arrays.h:284
const TwoDArray< int > & GlobalMotionInliers(const int ref_id) const
Get the inliers for each reference.
Definition: motion.h:374
MvData(const PicturePredParams &predparams, const int num_refs)
Constructor.
OneDArray< TwoDArray< int > * > m_inliers
Definition: motion.h:405
MotionVector< int > ImageCoords
ImageCoords class is a vector of ints.
Definition: motion.h:183
int Median(const int val1, const int val2, const int val3)
Return the median of 3 integers.
MvArray & Vectors(const int ref_id)
Get the MVs for a reference.
Definition: motion.h:240
TwoDArray< float > & IntraCosts()
Get the intra costs.
Definition: motion.h:338
TwoDArray< MvCostData > m_bipred_costs
Definition: motion.h:396
float total
Total=SAD+mvcost.
Definition: motion.h:210
const MvArray & GlobalMotionVectors(const int ref_id) const
Get the global MVs for a reference.
Definition: motion.h:249
@ VERTICAL
Definition: motion.h:54
std::istream & operator>>(std::istream &stream, TwoDArray< T > &array)
A function for inserting array data.
Definition: arrays.h:581
void SetTotal(const float lambda)
Definition: motion.h:201
OneDArray< MvArray * > m_vectors
Definition: motion.h:286
const TwoDArray< ValueType > & DC(CompSort cs) const
Get the DC values for each component.
Definition: motion.h:255
MEData(const PicturePredParams &predparams, const int num_refs=2)
Constructor.
TwoDArray< float > m_SB_costs
Definition: motion.h:399
const TwoDArray< float > & IntraCosts() const
Get the intra costs.
Definition: motion.h:341
TwoDArray< float > & SBCosts()
Get the SB costs.
Definition: motion.h:350
OneDArray< OneDArray< float > * > m_gm_params
Definition: motion.h:301
float m_intra_block_ratio
Definition: motion.h:408
MotionVector< T > operator<<(const int argument) const
Bitshift of each component.
Definition: motion.h:141
MotionVector< T > operator*(const float argument) const
Scalar multiplication.
Definition: motion.h:121
MVector MvMean(const MVector &mv1, const MVector &mv2)
Return the mean of two motion vectors.
const OneDArray< float > & GlobalMotionParameters(const int ref_id) const
Get the global motion model parameters.
Definition: motion.h:276
PicturePredParams & GetPicPredParams()
Return a reference to the local picture prediction params.
Definition: motion.h:234
const TwoDArray< MvCostData > & BiPredCosts() const
Get the bipred costs.
Definition: motion.h:347
TwoDArray< float > m_intra_costs
Definition: motion.h:393
const TwoDArray< MvCostData > & PredCosts(const int ref_id) const
Get the block cost structures for each reference.
Definition: motion.h:335
MotionVector< int > MVector
MVector class is a vector of ints.
Definition: motion.h:180
TwoDArray< PredMode > m_modes
Definition: motion.h:292
PicturePredParams m_predparams
Definition: motion.h:280
const MvArray & Vectors(const int ref_id) const
Get the MVs for a reference.
Definition: motion.h:243
float mvcost
The (Lagrangian-weighted) motion vector cost - the difference of a motion vector from its neighbourin...
Definition: motion.h:207
TwoDArray< MvCostData > & BiPredCosts()
Get the bipred costs.
Definition: motion.h:344
const T & operator[](const int pos) const
Array-style element access.
Definition: motion.h:91
void SetLambdaMap(const int num_refs, const float lambda)
Set up the lambda map by detecting motion discontinuities.
TwoDArray< MotionVector< float > > MvFloatArray
An array of float-based motion vectors for doing global motion calcs.
Definition: motion.h:189
friend std::ostream & operator<<(std::ostream &stream, MEData &me_data)
Overloaded operator<< for outputing to (file) stream.
T x
x and y components
Definition: motion.h:95
T & operator[](const int pos)
Array-style element access.
Definition: motion.h:88
OneDArray< TwoDArray< ValueType > * > m_dc
Definition: motion.h:295
MvArray & GlobalMotionVectors(const int ref_id)
Get the global MVs for a reference.
Definition: motion.h:246
Structure to hold motion parameters when motion comp is used.
Definition: common.h:967
float SAD
The Sum of Absolute Differences - easier to compute than Sum-Squared Differences.
Definition: motion.h:204
unsigned int GetUMean(std::vector< unsigned int > &values)
Return the mean of a set of unsigned integer values.
OneDArray< TwoDArray< MvCostData > * > m_pred_costs
Definition: motion.h:390
const TwoDArray< float > & SBCosts() const
Get the SB costs.
Definition: motion.h:353
void SetIntraBlockRatio(const float r)
Set the intra block ratio.
Definition: motion.h:359
Class for all the motion vector data.
Definition: motion.h:219
A template class for one-dimensional arrays.
Definition: arrays.h:89
OneDArray< float > & GlobalMotionParameters(const int ref_id)
Get the global motion model parameters.
Definition: motion.h:273
int GetSMean(std::vector< int > &values)
Return the mean of a set of signed integer values.
MotionVector< T > operator-(const MotionVector< T > &argument) const
Subtraction.
Definition: motion.h:111
Motion vector class - just a pair.
Definition: motion.h:58
const PicturePredParams & GetPicPredParams() const
Return a reference to the local picture prediction params.
Definition: motion.h:237
friend std::istream & operator>>(std::istream &stream, MEData &me_data)
Overloaded operator>> for input of data from (file) stream.
CompSort
Types of picture component.
Definition: common.h:87
int Norm1(const MVector &mv)
Return the sum of the lengths of a motion vector's componets.
Definition: motion.h:436
std::ostream & operator<<(std::ostream &stream, TwoDArray< T > &array)
A function for extracting array data.
Definition: arrays.h:565
TwoDArray< ValueType > & DC(CompSort cs)
Get the DC values for each component.
Definition: motion.h:252
OneDArray< MvArray * > m_gm_vectors
Definition: motion.h:289
TwoDArray< MvCostData > & PredCosts(const int ref_id)
Get the block cost structures for each reference.
Definition: motion.h:332
TwoDArray< int > m_sb_split
Definition: motion.h:298
const TwoDArray< int > & SBSplit() const
Get the SB split level.
Definition: motion.h:270
TwoDArray< int > & GlobalMotionInliers(const int ref_id)
Get the inliers for each reference.
Definition: motion.h:371
void FindTransitions(TwoDArray< bool > &trans_map, const int ref_num)
TwoDArray< int > & SBSplit()
Get the SB split level.
Definition: motion.h:267
TwoDArray< float > m_lambda_map
Definition: motion.h:402
int Norm2(const MVector &mv)
Return the squared length of a motion vector.
Definition: motion.h:431
const OneDArray< TwoDArray< ValueType > * > & DC() const
Get a reference to the vector holding component DC values.
Definition: motion.h:258
void DropRef(int ref_index)
drop the data relating to one reference
T y
Definition: motion.h:95
MotionVector< T > operator>>(const int argument) const
Bitshift of each component.
Definition: motion.h:151
© 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.