# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

Public Member Functions | Private Member Functions | Private Attributes | List of all members
dirac::PredModeCodec Class Reference

Codes and decodes the prediction modes. More...

`#include <mv_codec.h>`

Inheritance diagram for dirac::PredModeCodec:

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

## Private Member Functions
| PredModeCodec (const PredModeCodec &cpy)
| Private, bodyless copy constructor: class should not be copied. More...
PredModeCodec & | operator= (const PredModeCodec &rhs)
| Private, bodyless copy operator=: class should not be assigned. More...
void | CodeVal (const MvData &in_data)
void | DecodeVal (MvData &out_data)
void | DoWorkCode (MvData &in_data)
| Does the work of actually coding the data. More...
void | DoWorkDecode (MvData &out_data)
| virtual decode-only functions More...
void | ResetAll ()
unsigned int | Prediction (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
int | m_num_refs

## Additional Inherited Members
Protected Member Functions inherited from dirac::ArithCodecBase
void | InitEncoder ()
| Initialises the Encoder. More...
void | EncodeSymbol (const bool symbol, const int context_num)
| encodes a symbol and writes to output More...
void | EncodeUInt (const unsigned int value, const int bin1, const int max_bin)
void | EncodeSInt (const int value, const int bin1, const int max_bin)
void | FlushEncoder ()
| flushes the output of the encoder. More...
int | ByteCount () const
void | InitDecoder (int num_bytes)
| Initialise the Decoder. More...
bool | DecodeSymbol (int context_num)
| Decodes a symbol given a context number. More...
unsigned int | DecodeUInt (const int bin1, const int max_bin)
int | DecodeSInt (const int bin1, const int max_bin)
Protected Attributes inherited from dirac::ArithCodecBase
std::vector< Context > | m_context_list
| List of contexts. More...

## Detailed Description

Derived from the ArithCodec class, this codes and decodes the prediction mode.

## Constructor & Destructor Documentation

dirac::PredModeCodec::PredModeCodec | ( | ByteIO * | p_byteio,
|  | size_t | number_of_contexts,
|  | const int | num_refs
| ) |  |

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
  num_refs | Number of references

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

## Member Function Documentation

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

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

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

Implements dirac::ArithCodec< MvData >.

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

Implements dirac::ArithCodec< MvData >.

void dirac::PredModeCodec::InitContexts | ( |  | ) |

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

unsigned int dirac::PredModeCodec::Prediction | ( | const TwoDArray< PredMode > & | preddata | ) | const
| private

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

## Member Data Documentation

int dirac::PredModeCodec::m_b_xp
| private

int dirac::PredModeCodec::m_b_yp
| private

int dirac::PredModeCodec::m_num_refs
| private

int dirac::PredModeCodec::m_sb_tlb_x
| private

int dirac::PredModeCodec::m_sb_tlb_y
| private

int dirac::PredModeCodec::m_sb_xp
| private

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