Created by the British Broadcasting Corporation.
Abstract Motion compensator class. More...
#include <mot_comp.h>
Public Member Functions | |
MotionCompensator (const PicturePredParams &ppp) | |
Constructor. | |
virtual | ~MotionCompensator () |
Destructor. | |
void | CompensatePicture (const AddOrSub direction, const MvData &mv_data, Picture *in_pic, Picture *refsptr[2]) |
Compensate a picture. |
Static Public Member Functions | |
static void | CompensatePicture (const PicturePredParams &ppp, const AddOrSub direction, const MvData &mv_data, Picture *in_pic, Picture *refptr[2]) |
Convenience function to perform motion compensation on a picture. |
Protected Attributes | |
PicturePredParams | m_predparams |
The codec parameters. | |
ChromaFormat | m_cformat |
The chroma format. | |
bool | luma_or_chroma |
AddOrSub | m_add_or_sub |
OLBParams | m_bparams |
TwoDArray< ValueType > * | m_block_weights |
TwoDArray< ValueType > * | m_macro_block_weights |
TwoDArray< ValueType > * | m_sub_block_weights |
Private Member Functions | |
MotionCompensator (const MotionCompensator &cpy) | |
MotionCompensator & | operator= (const MotionCompensator &rhs) |
void | CompensateComponent (Picture *pic, Picture *refsptr[2], const MvData &mv_data, const CompSort cs) |
Motion-compensate a component. | |
void | DCBlock (TwoDArray< ValueType > &block_data, const ValueType dc) |
void | ReConfig () |
void | CalculateWeights (int xbsep, int ybsep, TwoDArray< ValueType > *wt_array) |
void | CreateBlock (int xbsep, int ybsep, bool FullX, bool FullY, TwoDArray< ValueType > &WeightArray) |
Calculates a weighting block. | |
void | FlipX (const TwoDArray< ValueType > &Original, TwoDArray< ValueType > &Flipped) |
Flips the values in an array in the x direction. | |
void | FlipY (const TwoDArray< ValueType > &Original, TwoDArray< ValueType > &Flipped) |
Flips the values in an array in the y direction. | |
virtual void | CompensateBlock (TwoDArray< ValueType > &pic_data, const ImageCoords &pos, const ImageCoords &orig_pic_size, PredMode block_mode, ValueType dc, const PicArray &ref1up_data, const MVector &mv1, const PicArray &ref2up_data, const MVector &mv2, const TwoDArray< ValueType > &Weights) |
virtual void | BlockPixelPred (TwoDArray< ValueType > &block_data, const ImageCoords &pos, const ImageCoords &orig_pic_size, const PicArray &refup_data, const MVector &mv)=0 |
Predict pixels in a block. Pure virtual. SubClasses need to define it. | |
void | AdjustBlockByRefWeights (TwoDArray< ValueType > &val1_block, TwoDArray< ValueType > &val2_block, PredMode block_mode) |
void | AdjustBlockBySpatialWeights (TwoDArray< ValueType > &val_block, const ImageCoords &pos, const TwoDArray< ValueType > &wt_array) |
Motion compensator class, for doing motion compensation with two references and overlapped blocks, using raised-cosine roll-off. This is an abstract class. It must be sub-classed and the BlockPixelPred must be defined in the sub-classes.
dirac::MotionCompensator::MotionCompensator | ( | const PicturePredParams & | ppp | ) |
Constructor initialises using codec parameters.
Referenced by MotionCompensator(), and operator=().
|
virtual |
|
private |
References MotionCompensator().
|
private |
|
private |
|
privatepure virtual |
|
private |
|
privatevirtual |
|
private |
void dirac::MotionCompensator::CompensatePicture | ( | const AddOrSub | direction, |
const MvData & | mv_data, | ||
Picture * | in_pic, | ||
Picture * | refsptr[2] ) |
Perform motion compensated addition/subtraction on a picture using parameters \param direction whether we're subtracting or adding
`
mv_data | the motion vector data |
in_pic | Pointer to picture being motion compensated |
refsptr | Array of pointers to reference pictures. |
|
static |
Static function that motion compensates a picture. It uses the MV precision value in the PicturePredParams to instantiate the appropriate MotionCompensation sub-class.
ppp | Picture prediction parameters |
direction | whether we're subtracting or adding |
mv_data | the motion vector data |
in_pic | Pointer to picture being motion compensated |
refptr | Array of pointers to reference pictures. |
|
private |
Params defines the block parameters so the relevant weighting arrays can be created. FullX and FullY refer to whether the weight should be adjusted for the edge of an image. eg. 1D Weighting shapes in x direction FullX true FullX false
|
private |
Recalculate the weight matrix and store other key block related parameters. DC-compensate an individual block
|
private |
|
private |
|
private |
References MotionCompensator().
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
© 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.