# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

Public Member Functions | Private Member Functions | Private Attributes
dirac::VectorElementCodec Class Reference

Codes and decodes an array of motion vectors. More...

`#include <mv_codec.h>`

Inheritance diagram for dirac::VectorElementCodec:

List of all members.

## Public Member Functions
| VectorElementCodec (ByteIO *p_byteio, int ref_id, MvElement horvert, size_t number_of_contexts)
| Constructor.
void | InitContexts ()
| Initialises the contexts.
Public Member Functions inherited from dirac::ArithCodec< MvData >
| ArithCodec (ByteIO *p_byteio, size_t number_of_contexts)
| Constructor for encoding.
virtual | ~ArithCodec ()
| Destructor.
int | Compress (MvData &in_data)
| Compresses the input and returns the number of bits written.
void | Decompress (MvData &out_data, const int num_bytes)
| Decompresses the bitstream and writes into the output.
Public Member Functions inherited from dirac::ArithCodecBase
| ArithCodecBase (ByteIO *p_byteio, size_t number_of_contexts)
| Constructor.
virtual | ~ArithCodecBase ()
| Destructor.

## Private Member Functions
| VectorElementCodec (const VectorElementCodec &cpy)
| Private, bodyless copy constructor: class should not be copied.
VectorElementCodec & | operator= (const VectorElementCodec &rhs)
| Private, bodyless copy operator=: class should not be assigned.
void | CodeVal (const MvData &in_data)
void | DecodeVal (MvData &out_data)
void | DoWorkCode (MvData &in_data)
| Does the work of actually coding the data.
void | DoWorkDecode (MvData &out_data)
| virtual decode-only functions ////////////////////////////
void | ResetAll ()
int | Prediction (const MvArray &mvarray, const TwoDArray< PredMode > &preddata) const

## Private Attributes
int | m_b_xp
int | m_b_yp
int | m_sb_xp
int | m_sb_yp
int | m_sb_tlb_x
int | m_sb_tlb_y
const int | m_ref
const MvElement | m_hv

## Additional Inherited Members

## Detailed Description

Derived from the ArithCodec class, this codes and decodes a motion vector element (vertical or horizontal)

## Constructor & Destructor Documentation

dirac::VectorElementCodec::VectorElementCodec | ( | ByteIO * | p_byteio,
|  | int | ref_id,
|  | MvElement | horvert,
|  | size_t | number_of_contexts
| ) |  |

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

Parameters:

  p_byteio | Input/output for the encoded bits
  ref_id | The identity of the reference (1 or 2)
  horvert | The identity of the vector element (horizontal or vertical)
  number_of_contexts | the number of contexts used

dirac::VectorElementCodec::VectorElementCodec | ( | const VectorElementCodec & | cpy | ) |
| private

## Member Function Documentation

void dirac::VectorElementCodec::CodeVal | ( | const MvData & | in_data | ) |
| private

void dirac::VectorElementCodec::DecodeVal | ( | MvData & | out_data | ) |
| private

void dirac::VectorElementCodec::DoWorkCode | ( | MvData & | in_data | ) |
| private virtual

Implements dirac::ArithCodec< MvData >.

void dirac::VectorElementCodec::DoWorkDecode | ( | MvData & | out_data | ) |
| private virtual

Implements dirac::ArithCodec< MvData >.

void dirac::VectorElementCodec::InitContexts | ( |  | ) |

VectorElementCodec& dirac::VectorElementCodec::operator= | ( | const VectorElementCodec & | rhs | ) |
| private

int dirac::VectorElementCodec::Prediction | ( | const MvArray & | mvarray,
|  | const TwoDArray< PredMode > & | preddata
| ) |  | const
| private

void dirac::VectorElementCodec::ResetAll | ( |  | ) |
| private

## Member Data Documentation

int dirac::VectorElementCodec::m_b_xp
| private

int dirac::VectorElementCodec::m_b_yp
| private

const MvElement dirac::VectorElementCodec::m_hv
| private

const int dirac::VectorElementCodec::m_ref
| private

int dirac::VectorElementCodec::m_sb_tlb_x
| private

int dirac::VectorElementCodec::m_sb_tlb_y
| private

int dirac::VectorElementCodec::m_sb_xp
| private

int dirac::VectorElementCodec::m_sb_yp
| 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.