# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

Classes | Typedefs | Enumerations | Functions
dirac Namespace Reference

Definition of class SequenceHeaderByteIO. More...

## Classes
class | ArithCodec
| Abstract binary arithmetic coding class. More...
class | ArithCodecBase
class | ArithCodecToVLCAdapter
class | BiBlockDiff
| A virtual class for bi-directional differences. More...
class | BiBlockEighthPel
| A class for computing a bidirection difference for eighth-pel vectors. More...
class | BiBlockHalfPel
| A class for computing a bidirection difference for half-pel vectors. More...
class | BiBlockQuarterPel
| A class for computing a bidirection difference for quarter-pel vectors. More...
class | BlockDiff
| An abstract class for doing block difference calculations. More...
class | BlockDiffEighthPel
| A class for doing differences with eighth-pixel accurate vectors. More...
class | BlockDiffHalfPel
| A class for doing differences with half-pixel accurate vectors. More...
class | BlockDiffParams
| A class encapsulating parameters for calculating a block difference value (a single instance of matching) More...
class | BlockDiffQuarterPel
| A class for doing differences with quarter-pixel accurate vectors. More...
class | BlockDiffUp
| A virtual class for doing differences with sub-pixel vectors. More...
class | BlockMatcher
| Class to do block matching. More...
class | ByteIO
| Class ByteIO - top-level class for reading/writing bytes to a stream. More...
class | CodeBlock
| Class for encapsulating metadata concerning a block of coefficients in a subband. More...
class | CodeBlocks
| Structure to hold code block sizes when spatial partitioning is used. More...
class | CodecParams
| Parameters common to coder and decoder operation. More...
class | CodingParamsByteIO
| Represents compressed sequence-parameter data used in an AccessUnit. More...
class | CoeffArray
| A class for wavelet coefficient data. More...
class | CommandLine
class | CompCompressor
| Compress a picture component. More...
class | CompDecompressor
| Decompress a picture component. More...
class | ComponentByteIO
| Picture component in Dirac bytestream format. More...
class | Context
class | CostType
| A structure for recording costs, particularly in quantisation. More...
class | DCCodec
| Codes and decodes a set of DC values. More...
class | DecoderParams
| Parameters for the decoding process. More...
class | DiracByteStats
| Class DiracByteStats - for collecting statistics on aspects of the Dirac byte-stream. More...
class | DiracByteStream
| Represents a series of bytes in the Dirac bytestream specfication format. More...
class | DiracException
| DiracException is the class which should be used for all exceptions within Dirac. More...
class | DiracParser
| Dirac Stream Parser Class. More...
class | DownConverter
| A class for fast downconversion of picture data. More...
class | EncoderParams
| Parameters for the encoding process. More...
class | EncPicture
class | EncQueue
| Holds pictures both for reference and to overcome reordering delay. More...
class | EndOfSequenceByteIO
| Signals the end of a sequence in a Dirac-formatted bitstream. More...
class | EntropyCorrector
| A class used for correcting estimates of entropy. More...
class | FieldSequenceCompressor
| Compresses a sequence of fields from a stream. More...
class | FileStreamInput
| Picture input class. More...
class | FileStreamOutput
class | FrameComplexity
class | FrameSequenceCompressor
| Compresses a sequence of frames from a stream. More...
class | GenericBandCodec
| A template class for coding and decoding wavelet subband data. More...
class | GenericIntraDCBandCodec
| A template class specially for coding the DC subband of Intra frames. More...
class | InputStreamBuffer
| Input Stream Buffer Class. More...
class | IntraBlockDiff
| A class for calculating the difference between a block and its DC value (average) More...
class | IntraDCBandCodec
| A class specially for coding the DC subband of Intra frames. More...
class | IntraDCBandVLC
| A class specially for coding the DC subband of Intra frames. More...
class | MEData
| Class for all the motion estimation data. More...
class | MemoryStreamInput
class | MemoryStreamOutput
class | ModeDecider
| Decides between superblock and block prediction modes. More...
class | MotionCompensator
| Abstract Motion compensator class. More...
class | MotionCompensator_EighthPixel
| Eighth Pixel precision Motion compensator class. More...
class | MotionCompensator_HalfPixel
| Half Pixel precision Motion compensator class. More...
class | MotionCompensator_Pixel
| Pixel precision Motion compensator class. More...
class | MotionCompensator_QuarterPixel
| Quarter Pixel precision Motion compensator class. More...
class | MotionVector
| Motion vector class - just a pair. More...
class | MvCostData
| Class for recording costs derived in motion estimation. More...
class | MvData
| Class for all the motion vector data. More...
class | MvDataByteIO
| Represents compressed sequence-parameter data used in an AccessUnit. More...
class | MvDataElementByteIO
| Represents compressed sequence-parameter data used in an AccessUnit. More...
class | OLBParams
| Parameters for overlapped block motion compensation. More...
class | OneDArray
| A template class for one-dimensional arrays. More...
class | ParseParams
| Parameters relating to the complexity of encoder/decoder. More...
class | ParseParamsByteIO
| Represents compressed parse-parameter data used in an AccessUnit. More...
class | ParseUnitByteIO
| Represents a collection of data in a Dirac bytestream that can be parsed as a self-contained unit. More...
class | PelBlockDiff
| A class for doing block differences to pixel accuracy, inherited from BlockDiff. More...
class | PicArray
| A class for picture component data. More...
class | Picture
| A class for encapsulating all the data relating to a picture. More...
class | PictureBuffer
| Holds pictures both for reference and to overcome reordering delay. More...
class | PictureByteIO
| A compressed picture in Dirac bytestream format. More...
class | PictureCompressor
| Compress a single image picture. More...
class | PictureDecompressor
| Compress a single image picture. More...
class | PictureParams
| Parameters for initialising picture class objects. More...
class | PicturePredParams
| Structure to hold motion parameters when motion comp is used. More...
class | PictureSort
| Picture type Class. More...
class | PixelMatcher
class | PredictStep97
| Class to do two-tap prediction lifting step for Daubechies (9,7) More...
class | PredictStepFourTap
| Class to do symmetric four-tap prediction lifting step. More...
class | PredictStepShift
| Class to do two-tap prediction lifting step. More...
class | PredModeCodec
| Codes and decodes the prediction modes. More...
class | QualityMonitor
| Class to monitor the quality of pictures and adjust coding parameters appropriately. More...
class | QuantChooser
| Choose a quantiser. More...
class | QuantiserLists
| Class for encapsulating quantiser data. More...
class | Range
| Range type. More...
class | RateController
| A clas for allocation the bits to each and every types of frames in a GOP. More...
class | Rational
| Class defining a rational number. More...
class | SequenceCompressor
| Compresses a sequence of frames/fields from a stream. More...
class | SequenceDecompressor
| Decompresses a sequence of pictures from a stream. More...
class | SequenceHeaderByteIO
| A random access point within a Dirac bytestream. More...
class | SourceParams
| Parameters relating to the source material being encoded/decoded. More...
class | SourceParamsByteIO
| Represents compressed source-parameter data contained in a sequence header. More...
class | SplitModeCodec
| Codes and decodes the split mode. More...
class | StreamFieldInput
class | StreamFieldOutput
class | StreamFrameInput
class | StreamFrameOutput
class | StreamPicInput
| Picture input class. More...
class | StreamPicOutput
| Class for outputting pictures. More...
class | Subband
| Class encapsulating all the metadata relating to a wavelet subband. More...
class | SubbandByteIO
| Subband Dirac-bytestream input/output. More...
class | SubbandList
| A class encapulating all the subbands produced by a transform. More...
class | SubpelRefine
| The SubpelRefine class takes pixel-accurate motion vectors and refines them to 1/8-pixel accuracy. More...
class | TransformByteIO
| Represents compressed sequence-parameter data used in an AccessUnit. More...
class | TwoDArray
| A template class for two-dimensional arrays. More...
class | UpConverter
| Upconversion class. More...
class | UpdateStep97
| Class to do two-tap update lifting step for Daubechies (9,7) More...
class | UpdateStepFourTap
| Class to do symmetric four-tap update lifting step. More...
class | UpdateStepShift
| Class to do two-tap updating lifting step. More...
class | VectorElementCodec
| Codes and decodes an array of motion vectors. More...
class | VHFilter
| A virtual parent class to do vertical and horizontal splitting with wavelet filters. More...
class | VHFilterDAUB9_7
| Class to do Daubechies (9,7) filtering operations. More...
class | VHFilterDD13_7
| An extension of DD9_7, with a better low-pass filter but more computation. More...
class | VHFilterDD9_7
| A short filter that's actually close to Daubechies (9,7) but with just two lifting steps. More...
class | VHFilterHAAR0
| Class to do Haar wavelet filtering operations. More...
class | VHFilterHAAR1
| Class to do Haar wavelet filtering operations with a single shift per level. More...
class | VHFilterHAAR2
| Class to do Haar wavelet filtering operations with a double shift per level. More...
class | VHFilterLEGALL5_3
| Class to do (5,3) wavelet filtering operations. More...
class | WaveletTransform
| A class to do wavelet transforms. More...

## Typedefs
typedef GenericBandCodec< ArithCodec< CoeffArray > > | BandCodec
| A general class for coding and decoding wavelet subband data. More...
typedef BandCodec | LFBandCodec
typedef GenericBandCodec< ArithCodecToVLCAdapter > | BandVLC
| A general class for coding and decoding wavelet subband data using variable length coding. More...
typedef short | ValueType
| Type of picture data (including motion compensated residuals) More...
typedef int | CoeffType
| Type of wavelet coefficient data (should be larger than ValueType) More...
typedef int | CalcValueType
| Type for performing calculations on ValueType and CoeffType. Should be >ValueType, >=CoeffType. More...
typedef MotionVector< int > | MVector
| MVector class is a vector of ints. More...
typedef MotionVector< int > | ImageCoords
| ImageCoords class is a vector of ints. More...
typedef TwoDArray< MVector > | MvArray
| MvArray is a two-D array of MVectors. More...
typedef TwoDArray< MotionVector< float > > | MvFloatArray
| An array of float-based motion vectors for doing global motion calcs. More...
typedef std::vector< std::vector< MVector > > | CandidateList

## Enumerations
enum | StatType { STAT_TOTAL_BYTE_COUNT =0 , STAT_MV_BYTE_COUNT , STAT_YCOMP_BYTE_COUNT , STAT_UCOMP_BYTE_COUNT , STAT_VCOMP_BYTE_COUNT }
enum | ParseUnitType { PU_SEQ_HEADER =0 , PU_PICTURE , PU_END_OF_SEQUENCE , PU_AUXILIARY_DATA , PU_PADDING_DATA , PU_CORE_PICTURE , PU_LOW_DELAY_PICTURE , PU_UNDEFINED }
enum | PredMode { INTRA , REF1_ONLY , REF2_ONLY , REF1AND2 , UNDEFINED }
| Prediction modes for blocks. More...
enum | CompSort { Y_COMP , U_COMP , V_COMP }
| Types of picture component. More...
enum | AddOrSub { ADD , SUBTRACT }
| Addition or subtraction. More...
enum | Direction { FORWARD , BACKWARD }
| Forward or backward. More...
enum | CtxAliases { SIGN0_CTX , SIGN_POS_CTX , SIGN_NEG_CTX , Z_FBIN1z_CTX , Z_FBIN1nz_CTX , Z_FBIN2_CTX , Z_FBIN3_CTX , Z_FBIN4_CTX , Z_FBIN5_CTX , Z_FBIN6plus_CTX , NZ_FBIN1z_CTX , NZ_FBIN1nz_CTX , NZ_FBIN2_CTX , NZ_FBIN3_CTX , NZ_FBIN4_CTX , NZ_FBIN5_CTX , NZ_FBIN6plus_CTX , INFO_CTX , BLOCK_SKIP_CTX , Q_OFFSET_FOLLOW_CTX , Q_OFFSET_INFO_CTX , Q_OFFSET_SIGN_CTX , TOTAL_COEFF_CTXS }
| Contexts used for coefficient coding. More...
enum | MvCtxAliases { DC_FBIN1_CTX , DC_FBIN2plus_CTX , DC_INFO_CTX , DC_SIGN_CTX , MV_FBIN1_CTX , MV_FBIN2_CTX , MV_FBIN3_CTX , MV_FBIN4_CTX , MV_FBIN5plus_CTX , MV_INFO_CTX , MV_SIGN_CTX , PMODE_BIT0_CTX , PMODE_BIT1_CTX , SB_SPLIT_BIN1_CTX , SB_SPLIT_BIN2_CTX , SB_SPLIT_INFO_CTX , TOTAL_MV_CTXS }
| Contexts used for MV data coding. More...
enum | DiracErrorCode { ERR_UNSUPPORTED_STREAM_DATA =0 , ERR_END_OF_STREAM , ERR_INVALID_VIDEO_FORMAT , ERR_INVALID_CHROMA_FORMAT , ERR_INVALID_PICTURE_RATE , ERR_INVALID_SIGNAL_RANGE , ERR_INVALID_PIXEL_ASPECT_RATIO , ERR_INVALID_VIDEO_DEPTH , ERR_INVALID_MOTION_VECTOR_PRECISION , ERR_INVALID_INIT_DATA }
| Enumeration of Dirac-defined error codes. More...
enum | DiracSeverityCode { SEVERITY_NO_ERROR =0 , SEVERITY_WARNING , SEVERITY_PICTURE_ERROR , SEVERITY_ACCESSUNIT_ERROR , SEVERITY_SEQUENCE_ERROR , SEVERITY_TERMINATE }
| Error-severity states. More...
enum | MvElement { HORIZONTAL , VERTICAL }
| Horizontal or vertical. More...

## Functions
template<class T >
std::ostream & | operator<< (std::ostream &stream, TwoDArray< T > &array)
| A function for extracting array data. More...
template<class T >
std::istream & | operator>> (std::istream &stream, TwoDArray< T > &array)
| A function for inserting array data. More...
VideoFormat | IntToVideoFormat (int video_format)
| Function to convert an integer to a valid VideoFormat. More...
ChromaFormat | IntToChromaFormat (int chroma_format)
| Function to convert an integer to a valid VideoFormat. More...
FrameRateType | IntToFrameRateType (int frame_rate_idx)
| Function to convert an integer to a valid FrameRate type. More...
PixelAspectRatioType | IntToPixelAspectRatioType (int pix_asr_idx)
| Function to convert an integer to a valid PixelAspectRatio type. More...
SignalRangeType | IntToSignalRangeType (int signal_range_idx)
| Function to convert an integer to a valid SignalRange type. More...
MVPrecisionType | IntToMVPrecisionType (int mv_prec)
| Function to convert an integer to a valid motion-vector precision type. More...
ValueType | BChk (const ValueType &num, const ValueType &max)
| A simple bounds checking function, very useful in a number of places. More...
void | dirac_assert (const char *p_fname, int line_number, const char *p_mess)
void | dirac_report (const char *p_fname, int line_number, const char *p_mess)
std::ostream & | operator<< (std::ostream &dst, const DiracException &exception)
template<class T >
std::ostream & | operator<< (std::ostream &stream, MotionVector< T > &mv)
| Overloaded operator<< for MotionVector class for output to stream. More...
template<class T >
std::istream & | operator>> (std::istream &stream, MotionVector< T > &mv)
| Overloaded operator>> for MotionVector class for input from stream. More...
int | Median (const int val1, const int val2, const int val3)
| Return the median of 3 integers. More...
MVector | MvMedian (const MVector &mv1, const MVector &mv2, const MVector &mv3)
| Return the median of three motion vectors. More...
int | Median (const std::vector< int > &val_list)
| Return the median of a set of integers. More...
MVector | MvMedian (const std::vector< MVector > &vect_list)
| Return the median of a set of (up to 4) motion vectors. More...
MVector | MvMean (const MVector &mv1, const MVector &mv2)
| Return the mean of two motion vectors. More...
int | Norm2 (const MVector &mv)
| Return the squared length of a motion vector. More...
int | Norm1 (const MVector &mv)
| Return the sum of the lengths of a motion vector's componets. More...
unsigned int | GetUMean (std::vector< unsigned int > &values)
| Return the mean of a set of unsigned integer values. More...
int | GetSMean (std::vector< int > &values)
| Return the mean of a set of signed integer values. More...
void | SetDefaultCodecParameters (CodecParams &cparams, PictureType ptype, unsigned int num_refs)
| Sets default codec parameters - common to encoder and decoder. More...
void | SetDefaultEncoderParameters (EncoderParams &encparams)
| Sets default encoder parameters. More...
void | SetDefaultSourceParameters (const VideoFormat &vf, SourceParams &sparams)
| Sets default Source parameters. More...
void | SetDefaultBlockParameters (OLBParams &bparams, const VideoFormat &video_format)
| Sets default block parameters. More...
void | SetDefaultBlockParameters (OLBParams &bparams, int pidx)
| Sets default block parameters. More...
unsigned int | BlockParametersIndex (const OLBParams &bparams)
| Returns index of block parameters in Defaults table. More...
void | SetDefaultTransformFilter (const PictureType ptype, const VideoFormat video_format, WltFilter &wf)
| Sets the default Transform filter depending on picture type. More...
void | CWMFilter (Picture &picture, const int strength)
| Denoises an input frame. More...
void | CWMFilterComponent (PicArray &pic_data, const int strength)
ValueType | Median (const ValueType *val_list, const int length)
void | LPFilter (PicArray &pic_data, const float qf, const int strength)
| Denoises a component. More...
void | DiagFilter (PicArray &pic_data, const float qf, const int strength)
| Diagonally filters an input component. More...
void | AddNewVlist (CandidateList &vect_list, const MVector &mv, const int xr, const int yr)
| Add a new motion vector list of neighbours of a vector to the set of lists. More...
void | AddNewVlist (CandidateList &vect_list, const MVector &mv, const int xr, const int yr, const int step)
| Add a new motion vector list to the set of lists for sub-pixel matching. More...
void | AddNewVlistD (CandidateList &vect_list, const MVector &mv, const int xr, const int yr)
| Add a new motion vector list of diagnonal neighbours of a vector to the set of lists. More...
void | AddVect (CandidateList &vect_list, const MVector &mv, const int list_num)
| Add a motion vector to the set of motion vector lists. More...
ValueType | GetVar (const MVector &mv1, const MVector &mv2)
| Get the (absolute) variation between two motion vectors. More...
ValueType | GetVar (const std::vector< MVector > &pred_list, const MVector &mv)
| Get the (absolute) variation between a motion vector and a list of motion vectors. More...

## Detailed Description

Returns structures containing default parameter values for different video-formats.

Definition of class DiracException.

Definition of class TransformByteIO.

Definition of class SubbandByteIO.

Definition of class PictureByteIO.

Definition of class ParseUnitByteIO.

Definition of class ParseParamsByteIO.

Definition of class MvDataElementByteIO.

Definition of class MvDataByteIO.

Definition of class EndOfSequenceByteIO.

Definition of class SourceParamsByteIO.

Definition of class DiracByteStream.

Definition of class DiracByteStats.

Definition of class ComponentByteIO.

Definition of class CodingParamsByteIO.

Definition of class ByteIO.

## Typedef Documentation

## ◆ BandCodec

typedef GenericBandCodec<ArithCodec<CoeffArray> > dirac::BandCodec

A general class for coding and decoding wavelet subband data, deriving from the abstract ArithCodec class.

## ◆ BandVLC

typedef GenericBandCodec<ArithCodecToVLCAdapter> dirac::BandVLC

A general class for coding and decoding wavelet subband data using variable length coding,

## ◆ CalcValueType

typedef int dirac::CalcValueType

## ◆ CandidateList

typedef std::vector< std::vector< MVector > > dirac::CandidateList

## ◆ CoeffType

typedef int dirac::CoeffType

## ◆ ImageCoords

typedef MotionVector<int> dirac::ImageCoords

## ◆ LFBandCodec

typedef BandCodec dirac::LFBandCodec

## ◆ MvArray

typedef TwoDArray<MVector> dirac::MvArray

## ◆ MVector

typedef MotionVector<int> dirac::MVector

## ◆ MvFloatArray

typedef TwoDArray< MotionVector<float> > dirac::MvFloatArray

## ◆ ValueType

typedef short dirac::ValueType

## Enumeration Type Documentation

## ◆ AddOrSub

enum dirac::AddOrSub

Enumerator
ADD |
SUBTRACT |

## ◆ CompSort

enum dirac::CompSort

Enumerator
Y_COMP |
U_COMP |
V_COMP |

## ◆ CtxAliases

enum dirac::CtxAliases

Enumerator
SIGN0_CTX |
SIGN_POS_CTX |
SIGN_NEG_CTX |
Z_FBIN1z_CTX |
Z_FBIN1nz_CTX |
Z_FBIN2_CTX |
Z_FBIN3_CTX |
Z_FBIN4_CTX |
Z_FBIN5_CTX |
Z_FBIN6plus_CTX |
NZ_FBIN1z_CTX |
NZ_FBIN1nz_CTX |
NZ_FBIN2_CTX |
NZ_FBIN3_CTX |
NZ_FBIN4_CTX |
NZ_FBIN5_CTX |
NZ_FBIN6plus_CTX |
INFO_CTX |
BLOCK_SKIP_CTX |
Q_OFFSET_FOLLOW_CTX |
Q_OFFSET_INFO_CTX |
Q_OFFSET_SIGN_CTX |
TOTAL_COEFF_CTXS |

## ◆ DiracErrorCode

enum dirac::DiracErrorCode

Enumerator
ERR_UNSUPPORTED_STREAM_DATA |
ERR_END_OF_STREAM |
ERR_INVALID_VIDEO_FORMAT |
ERR_INVALID_CHROMA_FORMAT |
ERR_INVALID_PICTURE_RATE |
ERR_INVALID_SIGNAL_RANGE |
ERR_INVALID_PIXEL_ASPECT_RATIO |
ERR_INVALID_VIDEO_DEPTH |
ERR_INVALID_MOTION_VECTOR_PRECISION |
ERR_INVALID_INIT_DATA |

## ◆ DiracSeverityCode

enum dirac::DiracSeverityCode

Enumerator
SEVERITY_NO_ERROR |
SEVERITY_WARNING |
SEVERITY_PICTURE_ERROR |
SEVERITY_ACCESSUNIT_ERROR |
SEVERITY_SEQUENCE_ERROR |
SEVERITY_TERMINATE |

## ◆ Direction

enum dirac::Direction

Enumerator
FORWARD |
BACKWARD |

## ◆ MvCtxAliases

enum dirac::MvCtxAliases

Enumerator
DC_FBIN1_CTX |
DC_FBIN2plus_CTX |
DC_INFO_CTX |
DC_SIGN_CTX |
MV_FBIN1_CTX |
MV_FBIN2_CTX |
MV_FBIN3_CTX |
MV_FBIN4_CTX |
MV_FBIN5plus_CTX |
MV_INFO_CTX |
MV_SIGN_CTX |
PMODE_BIT0_CTX |
PMODE_BIT1_CTX |
SB_SPLIT_BIN1_CTX |
SB_SPLIT_BIN2_CTX |
SB_SPLIT_INFO_CTX |
TOTAL_MV_CTXS |

## ◆ MvElement

enum dirac::MvElement

Enumerator
HORIZONTAL |
VERTICAL |

## ◆ ParseUnitType

enum dirac::ParseUnitType

Enumerator
PU_SEQ_HEADER |
PU_PICTURE |
PU_END_OF_SEQUENCE |
PU_AUXILIARY_DATA |
PU_PADDING_DATA |
PU_CORE_PICTURE |
PU_LOW_DELAY_PICTURE |
PU_UNDEFINED |

## ◆ PredMode

enum dirac::PredMode

Enumerator
INTRA |
REF1_ONLY |
REF2_ONLY |
REF1AND2 |
UNDEFINED |

## ◆ StatType

enum dirac::StatType

Enumerator
STAT_TOTAL_BYTE_COUNT |
STAT_MV_BYTE_COUNT |
STAT_YCOMP_BYTE_COUNT |
STAT_UCOMP_BYTE_COUNT |
STAT_VCOMP_BYTE_COUNT |

## Function Documentation

## ◆ AddNewVlist() [1/2]

void dirac::AddNewVlist | ( | CandidateList & | vect_list,
|  | const MVector & | mv,
|  | const int | xr,
|  | const int | yr
| ) |  |

## ◆ AddNewVlist() [2/2]

void dirac::AddNewVlist | ( | CandidateList & | vect_list,
|  | const MVector & | mv,
|  | const int | xr,
|  | const int | yr,
|  | const int | step
| ) |  |

## ◆ AddNewVlistD()

void dirac::AddNewVlistD | ( | CandidateList & | vect_list,
|  | const MVector & | mv,
|  | const int | xr,
|  | const int | yr
| ) |  |

## ◆ AddVect()

void dirac::AddVect | ( | CandidateList & | vect_list,
|  | const MVector & | mv,
|  | const int | list_num
| ) |  |

Add a motion vector to the set of motion vector lists, making sure it's not a duplicate.

## ◆ BChk()

ValueType dirac::BChk | ( | const ValueType & | num,
|  | const ValueType & | max
| ) |  |
| inline

## ◆ BlockParametersIndex()

unsigned int dirac::BlockParametersIndex | ( | const OLBParams & | bparams | ) |

Parameters

  bparams | Params object for getting index

## ◆ CWMFilter()

void dirac::CWMFilter | ( | Picture & | picture,
|  | const int | strength
| ) |  |

## ◆ CWMFilterComponent()

void dirac::CWMFilterComponent | ( | PicArray & | pic_data,
|  | const int | strength
| ) |  |

## ◆ DiagFilter()

void dirac::DiagFilter | ( | PicArray & | pic_data,
|  | const float | qf,
|  | const int | strength
| ) |  |

## ◆ dirac_assert()

void dirac::dirac_assert | ( | const char * | p_fname,
|  | int | line_number,
|  | const char * | p_mess
| ) |  |

Print a message to standard error and abort if in debug mode

## ◆ dirac_report()

void dirac::dirac_report | ( | const char * | p_fname,
|  | int | line_number,
|  | const char * | p_mess
| ) |  |

Print a message to standard error

## ◆ GetSMean()

int dirac::GetSMean | ( | std::vector< int > & | values | ) |

## ◆ GetUMean()

unsigned int dirac::GetUMean | ( | std::vector< unsigned int > & | values | ) |

## ◆ GetVar() [1/2]

ValueType dirac::GetVar | ( | const MVector & | mv1,
|  | const MVector & | mv2
| ) |  |

Return the variation between two motion vectors, computed as the sum of absolute differences of their components.

## ◆ GetVar() [2/2]

ValueType dirac::GetVar | ( | const std::vector< MVector > & | pred_list,
|  | const MVector & | mv
| ) |  |

Return the variation between a motion vector and a list of motion vectos, computed as the sum of absolute differences between the components of the vector and the median vector produced by the list of vectors

## ◆ IntToChromaFormat()

ChromaFormat dirac::IntToChromaFormat | ( | int | chroma_format | ) |

Parameters

  chroma_format | Integer corresponding to a format

Returns
  Valid chroma-format (returns formatNK if no valid format found)

## ◆ IntToFrameRateType()

FrameRateType dirac::IntToFrameRateType | ( | int | frame_rate_idx | ) |

Parameters

  frame_rate_idx | Integer corresponding to a frame-rate in the spec table

Returns
  Valid FrameRateType (returns FRAMERATE_UNDEFINED if no valid frame-rate found)

## ◆ IntToMVPrecisionType()

MVPrecisionType dirac::IntToMVPrecisionType | ( | int | mv_prec | ) |

Parameters

  mv_prec | Integer corresponding to a valid motion-vector precision

Returns
  Valid MVPrecisionType (returns SIGNAL_RANGE_UNDEFINED if no valid precision found)

## ◆ IntToPixelAspectRatioType()

PixelAspectRatioType dirac::IntToPixelAspectRatioType | ( | int | pix_asr_idx | ) |

Parameters

  pix_asr_idx | Integer corresponding to a pixel aspect ratio in the spec table

Returns
  Valid PixelAspectRatioType (returns PIXEL_ASPECT_RATIO_UNDEFINED if no valid pixel aspect ratio found)

## ◆ IntToSignalRangeType()

SignalRangeType dirac::IntToSignalRangeType | ( | int | signal_range_idx | ) |

Parameters

  signal_range_idx | Integer corresponding to a signal-range in the spec table

Returns
  Valid SignalRangeType (returns SIGNAL_RANGE_UNDEFINED if no valid signal-ratio found)

## ◆ IntToVideoFormat()

VideoFormat dirac::IntToVideoFormat | ( | int | video_format | ) |

Parameters

  video_format | Integer corresponding to a format

Returns
  Valid video-format (returns VIDEO_FORMAT_UNDEFINED if no valid format found)

## ◆ LPFilter()

void dirac::LPFilter | ( | PicArray & | pic_data,
|  | const float | qf,
|  | const int | strength
| ) |  |

## ◆ Median() [1/3]

int dirac::Median | ( | const int | val1,
|  | const int | val2,
|  | const int | val3
| ) |  |

## ◆ Median() [2/3]

int dirac::Median | ( | const std::vector< int > & | val_list | ) |

## ◆ Median() [3/3]

ValueType dirac::Median | ( | const ValueType * | val_list,
|  | const int | length
| ) |  |

## ◆ MvMean()

MVector dirac::MvMean | ( | const MVector & | mv1,
|  | const MVector & | mv2
| ) |  |

## ◆ MvMedian() [1/2]

MVector dirac::MvMedian | ( | const MVector & | mv1,
|  | const MVector & | mv2,
|  | const MVector & | mv3
| ) |  |

## ◆ MvMedian() [2/2]

MVector dirac::MvMedian | ( | const std::vector< MVector > & | vect_list | ) |

## ◆ Norm1()

int dirac::Norm1 | ( | const MVector & | mv | ) |
| inline

References dirac::MotionVector< T >::x, and dirac::MotionVector< T >::y.

## ◆ Norm2()

int dirac::Norm2 | ( | const MVector & | mv | ) |
| inline

References dirac::MotionVector< T >::x, and dirac::MotionVector< T >::y.

## ◆ operator<<() [1/3]

std::ostream & dirac::operator<< | ( | std::ostream & | dst,
|  | const DiracException & | exception
| ) |  |

## ◆ operator<<() [2/3]

template<class T >

std::ostream & dirac::operator<< | ( | std::ostream & | stream,
|  | MotionVector< T > & | mv
| ) |  |

References dirac::MotionVector< T >::x, and dirac::MotionVector< T >::y.

## ◆ operator<<() [3/3]

template<class T >

std::ostream & dirac::operator<< | ( | std::ostream & | stream,
|  | TwoDArray< T > & | array
| ) |  |

References dirac::TwoDArray< T >::LengthX(), and dirac::TwoDArray< T >::LengthY().

## ◆ operator>>() [1/2]

template<class T >

std::istream & dirac::operator>> | ( | std::istream & | stream,
|  | MotionVector< T > & | mv
| ) |  |

References dirac::MotionVector< T >::x, and dirac::MotionVector< T >::y.

## ◆ operator>>() [2/2]

template<class T >

std::istream & dirac::operator>> | ( | std::istream & | stream,
|  | TwoDArray< T > & | array
| ) |  |

References dirac::TwoDArray< T >::LengthX(), and dirac::TwoDArray< T >::LengthY().

## ◆ SetDefaultBlockParameters() [1/2]

void dirac::SetDefaultBlockParameters | ( | OLBParams & | bparams,
|  | const VideoFormat & | video_format
| ) |  |

Parameters

  bparams | Params object for setting defaults
  video_format | Video format

## ◆ SetDefaultBlockParameters() [2/2]

void dirac::SetDefaultBlockParameters | ( | OLBParams & | bparams,
|  | int | pidx
| ) |  |

Parameters

  bparams | Params object for setting defaults
  pidx | Index into Block Parameters table

## ◆ SetDefaultCodecParameters()

void dirac::SetDefaultCodecParameters | ( | CodecParams & | cparams,
|  | PictureType | ptype,
|  | unsigned int | num_refs
| ) |  |

Parameters

  cparams | Codec Params objects for setting defaults
  ptype | Picture type i,e, INTRA or INTER
  num_refs | Number of reference frames

## ◆ SetDefaultEncoderParameters()

void dirac::SetDefaultEncoderParameters | ( | EncoderParams & | encparams | ) |

Parameters

  encparams | Params objects for setting defaults

## ◆ SetDefaultSourceParameters()

void dirac::SetDefaultSourceParameters | ( | const VideoFormat & | vf,
|  | SourceParams & | sparams
| ) |  |

Parameters

  vf | Video Format
  sparams | Params object for setting defaults

## ◆ SetDefaultTransformFilter()

void dirac::SetDefaultTransformFilter | ( | const PictureType | ptype,
|  | const VideoFormat | video_format,
|  | WltFilter & | wf
| ) |  |

Parameters

  ptype | Picture type i.e. intra or inter
  video_format | The video format
  wf | WltFilter object for getting the default wavelet filter

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