# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::MvDataCodec Class Reference

Codes and decodes all the Motion Vector data. More...

`#include <mv_codec.h>`

Inheritance diagram for dirac::MvDataCodec:

[legend]
Collaboration diagram for dirac::MvDataCodec:

[legend]
List of all members.

## Public Member Functions

- MvDataCodec (ByteIO *p_byteio, size_t number_of_contexts, const ChromaFormat &cf)
    Constructor.
- void InitContexts ()
    Initialises the contexts.

## Private Member Functions

- MvDataCodec (const MvDataCodec &cpy)
    Private, bodyless copy constructor: class should not be copied.
- MvDataCodec & operator= (const MvDataCodec &rhs)
    Private, bodyless copy operator=: class should not be assigned.
- void CodeMBSplit (const MvData &in_data)
- void CodeMBCom (const MvData &in_data)
- void CodePredmode (const MvData &in_data)
- void CodeMv1 (const MvData &in_data)
- void CodeMv2 (const MvData &in_data)
- void CodeDC (const MvData &in_data)
- void DecodeMBSplit (MvData &out_data)
- void DecodeMBCom (MvData &out_data)
- void DecodePredmode (MvData &out_data)
- void DecodeMv1 (MvData &out_data)
- void DecodeMv2 (MvData &out_data)
- void DecodeDC (MvData &out_data)
- void DoWorkCode (MvData &in_data)
- void DoWorkDecode (MvData &out_data)
- void ResetAll ()
    The method by which _all_ the counts are resized.
- unsigned int MBSplitPrediction (const TwoDArray< int > &mbdata) const
- bool MBCBModePrediction (const TwoDArray< bool > &mbdata) const
- unsigned int BlockModePrediction (const TwoDArray< PredMode > &preddata, const unsigned int num_refs) const
- MVector Mv1Prediction (const MvArray &mvarray, const TwoDArray< PredMode > &preddata) const
- MVector Mv2Prediction (const MvArray &mvarray, const TwoDArray< PredMode > &preddata) const
- ValueType DCPrediction (const TwoDArray< ValueType > &dcdata, const TwoDArray< PredMode > &preddata) const

## Private Attributes

- int m_MB_count
- const int m_reset_num
- const ChromaFormat & m_cformat
- int m_b_xp
- int m_b_yp
- int m_mb_xp
- int m_mb_yp
- int m_mb_tlb_x
- int m_mb_tlb_y

## Detailed Description

Derived from the ArithCodec class, this codes and decodes all the motion vector data.

## Constructor & Destructor Documentation

dirac::MvDataCodec::MvDataCodec | ( | ByteIO * | p_byteio,
|  | size_t | number_of_contexts,
|  | const ChromaFormat & | cf |
| ) |  |  |

Creates a MvDataCodec object to encode MV data, based on parameters

Parameters:

  | p_byteio | Input/output for the encoded bits
  | number_of_contexts | the number of contexts used
  | cf | the chroma format

dirac::MvDataCodec::MvDataCodec | ( | const MvDataCodec & | cpy | ) | `[private]`

## Member Function Documentation

unsigned int dirac::MvDataCodec::BlockModePrediction | ( | const TwoDArray< PredMode > & | preddata,
|  | const unsigned int | num_refs |
| ) |  |  | const`[private]`

void dirac::MvDataCodec::CodeDC | ( | const MvData & | in_data | ) | `[private]`

void dirac::MvDataCodec::CodeMBCom | ( | const MvData & | in_data | ) | `[private]`

void dirac::MvDataCodec::CodeMBSplit | ( | const MvData & | in_data | ) | `[private]`

void dirac::MvDataCodec::CodeMv1 | ( | const MvData & | in_data | ) | `[private]`

void dirac::MvDataCodec::CodeMv2 | ( | const MvData & | in_data | ) | `[private]`

void dirac::MvDataCodec::CodePredmode | ( | const MvData & | in_data | ) | `[private]`

ValueType dirac::MvDataCodec::DCPrediction | ( | const TwoDArray< ValueType > & | dcdata,
|  | const TwoDArray< PredMode > & | preddata |
| ) |  |  | const`[private]`

void dirac::MvDataCodec::DecodeDC | ( | MvData & | out_data | ) | `[private]`

void dirac::MvDataCodec::DecodeMBCom | ( | MvData & | out_data | ) | `[private]`

void dirac::MvDataCodec::DecodeMBSplit | ( | MvData & | out_data | ) | `[private]`

void dirac::MvDataCodec::DecodeMv1 | ( | MvData & | out_data | ) | `[private]`

void dirac::MvDataCodec::DecodeMv2 | ( | MvData & | out_data | ) | `[private]`

void dirac::MvDataCodec::DecodePredmode | ( | MvData & | out_data | ) | `[private]`

void dirac::MvDataCodec::DoWorkCode | ( | MvData & | in_data | ) | `[private]`

void dirac::MvDataCodec::DoWorkDecode | ( | MvData & | out_data | ) | `[private]`

void dirac::MvDataCodec::InitContexts | ( |  | ) | `[virtual]`

Implements dirac::ArithCodecBase.

bool dirac::MvDataCodec::MBCBModePrediction | ( | const TwoDArray< bool > & | mbdata | ) | const`[private]`

unsigned int dirac::MvDataCodec::MBSplitPrediction | ( | const TwoDArray< int > & | mbdata | ) | const`[private]`

MVector dirac::MvDataCodec::Mv1Prediction | ( | const MvArray & | mvarray,
|  | const TwoDArray< PredMode > & | preddata |
| ) |  |  | const`[private]`

MVector dirac::MvDataCodec::Mv2Prediction | ( | const MvArray & | mvarray,
|  | const TwoDArray< PredMode > & | preddata |
| ) |  |  | const`[private]`

MvDataCodec& dirac::MvDataCodec::operator= | ( | const MvDataCodec & | rhs | ) | `[private]`

void dirac::MvDataCodec::ResetAll | ( |  | ) | `[private, virtual]`

Implements dirac::ArithCodecBase.

## Member Data Documentation

int dirac::MvDataCodec::m_b_xp`[private]`

int dirac::MvDataCodec::m_b_yp`[private]`

const ChromaFormat& dirac::MvDataCodec::m_cformat`[private]`

int dirac::MvDataCodec::m_MB_count`[private]`

int dirac::MvDataCodec::m_mb_tlb_x`[private]`

int dirac::MvDataCodec::m_mb_tlb_y`[private]`

int dirac::MvDataCodec::m_mb_xp`[private]`

int dirac::MvDataCodec::m_mb_yp`[private]`

const int dirac::MvDataCodec::m_reset_num`[private]`

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

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