Dirac - A Video Codec

Created by the British Broadcasting Corporation.


dirac::DCCodec Class Reference

Codes and decodes a set of DC values. More...

#include <mv_codec.h>

Inheritance diagram for dirac::DCCodec:
Collaboration diagram for dirac::DCCodec:

Public Member Functions

 DCCodec (ByteIO *p_byteio, const CompSort csort, 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

 DCCodec (const DCCodec &cpy)
 Private, bodyless copy constructor: class should not be copied.
DCCodecoperator= (const DCCodec &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 ()
ValueType Prediction (const TwoDArray< ValueType > &dcdata, const TwoDArray< PredMode > &preddata) const

Private Attributes

const CompSort m_csort
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

Additional Inherited Members

Protected Member Functions inherited from dirac::ArithCodecBase
void InitEncoder ()
 Initialises the Encoder.
void EncodeSymbol (const bool symbol, const int context_num)
 encodes a symbol and writes to output
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.
int ByteCount () const
void InitDecoder (int num_bytes)
 Initialise the Decoder.
bool DecodeSymbol (int context_num)
 Decodes a symbol given a context number.
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< Contextm_context_list
 List of contexts.

Detailed Description

Derived from the ArithCodec class, this codes and decodes all the DC values for a component

Constructor & Destructor Documentation

◆ DCCodec() [1/2]

dirac::DCCodec::DCCodec ( ByteIO * p_byteio,
const CompSort csort,
size_t number_of_contexts )

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

Parameters
p_byteioInput/output for the encoded bits
csortThe identity of the component (Y, U or V)
number_of_contextsthe number of contexts used

Referenced by DCCodec(), and operator=().

◆ DCCodec() [2/2]

dirac::DCCodec::DCCodec ( const DCCodec & cpy)
private

References DCCodec().

Member Function Documentation

◆ CodeVal()

void dirac::DCCodec::CodeVal ( const MvData & in_data)
private

◆ DecodeVal()

void dirac::DCCodec::DecodeVal ( MvData & out_data)
private

◆ DoWorkCode()

void dirac::DCCodec::DoWorkCode ( MvData & in_data)
privatevirtual

◆ DoWorkDecode()

void dirac::DCCodec::DoWorkDecode ( MvData & out_data)
privatevirtual

◆ InitContexts()

void dirac::DCCodec::InitContexts ( )

◆ operator=()

DCCodec & dirac::DCCodec::operator= ( const DCCodec & rhs)
private

References DCCodec().

◆ Prediction()

ValueType dirac::DCCodec::Prediction ( const TwoDArray< ValueType > & dcdata,
const TwoDArray< PredMode > & preddata ) const
private

◆ ResetAll()

void dirac::DCCodec::ResetAll ( )
private

Member Data Documentation

◆ m_b_xp

int dirac::DCCodec::m_b_xp
private

◆ m_b_yp

int dirac::DCCodec::m_b_yp
private

◆ m_csort

const CompSort dirac::DCCodec::m_csort
private

◆ m_sb_tlb_x

int dirac::DCCodec::m_sb_tlb_x
private

◆ m_sb_tlb_y

int dirac::DCCodec::m_sb_tlb_y
private

◆ m_sb_xp

int dirac::DCCodec::m_sb_xp
private

◆ m_sb_yp

int dirac::DCCodec::m_sb_yp
private

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

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