Dirac - A Video Codec

Created by the British Broadcasting Corporation.


Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
dirac::GenericBandCodec< EntropyCodec > Class Template Reference

A template class for coding and decoding wavelet subband data.

#include <band_codec.h>

Inheritance diagram for dirac::GenericBandCodec< EntropyCodec >:
Inheritance graph
[legend]
Collaboration diagram for dirac::GenericBandCodec< EntropyCodec >:
Collaboration graph
[legend]

Public Member Functions

 GenericBandCodec (SubbandByteIO *subband_byteio, size_t number_of_contexts, const SubbandList &band_list, int band_num, const bool is_intra)
 Constructor. More...
 

Protected Member Functions

void CodeVal (CoeffArray &in_data, const int xpos, const int ypos, const CoeffType val)
 Code an individual quantised value and perform inverse-quantisation. More...
 
void DecodeVal (CoeffArray &out_data, const int xpos, const int ypos)
 Decode an individual quantised value and perform inverse-quantisation. More...
 
void CodeQuantIndexOffset (const int offset)
 Encode the offset for a code block quantiser. More...
 
int DecodeQuantIndexOffset ()
 Decode the offset for a code block quantiser. More...
 
void SetToVal (const CodeBlock &code_block, CoeffArray &coeff_data, const CoeffType val)
 Set a code block area to a given value. More...
 
virtual void ClearBlock (const CodeBlock &code_block, CoeffArray &coeff_data)
 Set all block values to 0. More...
 
virtual void DoWorkCode (CoeffArray &in_data)
 
virtual void DoWorkDecode (CoeffArray &out_data)
 
virtual void CodeCoeffBlock (const CodeBlock &code_block, CoeffArray &in_data)
 
virtual void DecodeCoeffBlock (const CodeBlock &code_block, CoeffArray &out_data)
 
virtual void CodeCoeff (CoeffArray &in_data, const int xpos, const int ypos)
 
virtual void DecodeCoeff (CoeffArray &in_data, const int xpos, const int ypos)
 
int ChooseFollowContext (const int bin_number) const
 A function for choosing the context for "follow bits". More...
 
int ChooseInfoContext () const
 A function for choosing the context for "information bits". More...
 
int ChooseSignContext (const CoeffArray &data, const int xpos, const int ypos) const
 A function for choosing the context for sign bits. More...
 

Protected Attributes

bool m_is_intra
 Flag indicating whether the band comes from an intra picture. More...
 
int m_bnum
 variables More...
 
const Subband m_node
 the subband being coded More...
 
int m_last_qf_idx
 the quantisation index of the last codeblock More...
 
int m_qf
 quantisation value More...
 
CoeffType m_offset
 reconstruction point More...
 
bool m_nhood_nonzero
 True if neighbours non-zero. More...
 
Subband m_pnode
 the parent subband More...
 
int m_pxpos
 position of the parent coefficient More...
 
int m_pypos
 
bool m_parent_notzero
 True if the parent of a coeff is not zero. More...
 

Private Member Functions

 GenericBandCodec (const GenericBandCodec &cpy)
 Private, bodyless copy constructor: class should not be copied. More...
 
GenericBandCodecoperator= (const GenericBandCodec &rhs)
 Private, bodyless copy operator=: class should not be assigned. More...
 

Constructor & Destructor Documentation

◆ GenericBandCodec() [1/2]

template<typename EntropyCodec >
GenericBandCodec::GenericBandCodec ( SubbandByteIO subband_byteio,
size_t  number_of_contexts,
const SubbandList band_list,
int  band_num,
const bool  is_intra 
)

Constructor for encoding.

Creates a BandCodec object to encode subband data

Parameters
subband_byteioinput/output for the encoded bits
number_of_contextsthe number of contexts used in the encoding process
band_listthe set of all the subbands
band_numthe number of the subband being coded
is_intraFlag indicating whether the band comes from an intra picture

References dirac::GenericBandCodec< EntropyCodec >::m_node, dirac::GenericBandCodec< EntropyCodec >::m_pnode, and dirac::Subband::Parent().

◆ GenericBandCodec() [2/2]

template<typename EntropyCodec >
dirac::GenericBandCodec< EntropyCodec >::GenericBandCodec ( const GenericBandCodec< EntropyCodec > &  cpy)
private

Member Function Documentation

◆ ChooseFollowContext()

template<typename EntropyCodec >
int GenericBandCodec::ChooseFollowContext ( const int  bin_number) const
inlineprotected

◆ ChooseInfoContext()

template<typename EntropyCodec >
int GenericBandCodec::ChooseInfoContext
inlineprotected

References dirac::INFO_CTX.

◆ ChooseSignContext()

template<typename EntropyCodec >
int GenericBandCodec::ChooseSignContext ( const CoeffArray data,
const int  xpos,
const int  ypos 
) const
inlineprotected

◆ ClearBlock()

template<typename EntropyCodec >
void GenericBandCodec::ClearBlock ( const CodeBlock code_block,
CoeffArray coeff_data 
)
protectedvirtual

◆ CodeCoeff()

template<typename EntropyCodec >
void GenericBandCodec::CodeCoeff ( CoeffArray in_data,
const int  xpos,
const int  ypos 
)
protectedvirtual

◆ CodeCoeffBlock()

template<typename EntropyCodec >
void GenericBandCodec::CodeCoeffBlock ( const CodeBlock code_block,
CoeffArray in_data 
)
protectedvirtual

◆ CodeQuantIndexOffset()

template<typename EntropyCodec >
void GenericBandCodec::CodeQuantIndexOffset ( const int  offset)
protected

◆ CodeVal()

template<typename EntropyCodec >
void GenericBandCodec::CodeVal ( CoeffArray in_data,
const int  xpos,
const int  ypos,
const CoeffType  val 
)
inlineprotected

◆ DecodeCoeff()

template<typename EntropyCodec >
void GenericBandCodec::DecodeCoeff ( CoeffArray in_data,
const int  xpos,
const int  ypos 
)
protectedvirtual

Reimplemented in dirac::IntraDCBandCodec.

◆ DecodeCoeffBlock()

template<typename EntropyCodec >
void GenericBandCodec::DecodeCoeffBlock ( const CodeBlock code_block,
CoeffArray out_data 
)
protectedvirtual

◆ DecodeQuantIndexOffset()

template<typename EntropyCodec >
int GenericBandCodec::DecodeQuantIndexOffset
protected

◆ DecodeVal()

template<typename EntropyCodec >
void GenericBandCodec::DecodeVal ( CoeffArray out_data,
const int  xpos,
const int  ypos 
)
inlineprotected

◆ DoWorkCode()

template<typename EntropyCodec >
void GenericBandCodec::DoWorkCode ( CoeffArray in_data)
protectedvirtual

◆ DoWorkDecode()

template<typename EntropyCodec >
void GenericBandCodec::DoWorkDecode ( CoeffArray out_data)
protectedvirtual

◆ operator=()

template<typename EntropyCodec >
GenericBandCodec & dirac::GenericBandCodec< EntropyCodec >::operator= ( const GenericBandCodec< EntropyCodec > &  rhs)
private

◆ SetToVal()

template<typename EntropyCodec >
void GenericBandCodec::SetToVal ( const CodeBlock code_block,
CoeffArray coeff_data,
const CoeffType  val 
)
inlineprotected

Member Data Documentation

◆ m_bnum

template<typename EntropyCodec >
int dirac::GenericBandCodec< EntropyCodec >::m_bnum
protected

◆ m_is_intra

template<typename EntropyCodec >
bool dirac::GenericBandCodec< EntropyCodec >::m_is_intra
protected

◆ m_last_qf_idx

template<typename EntropyCodec >
int dirac::GenericBandCodec< EntropyCodec >::m_last_qf_idx
protected

◆ m_nhood_nonzero

template<typename EntropyCodec >
bool dirac::GenericBandCodec< EntropyCodec >::m_nhood_nonzero
protected

◆ m_node

template<typename EntropyCodec >
const Subband dirac::GenericBandCodec< EntropyCodec >::m_node
protected

◆ m_offset

template<typename EntropyCodec >
CoeffType dirac::GenericBandCodec< EntropyCodec >::m_offset
protected

◆ m_parent_notzero

template<typename EntropyCodec >
bool dirac::GenericBandCodec< EntropyCodec >::m_parent_notzero
protected

◆ m_pnode

template<typename EntropyCodec >
Subband dirac::GenericBandCodec< EntropyCodec >::m_pnode
protected

◆ m_pxpos

template<typename EntropyCodec >
int dirac::GenericBandCodec< EntropyCodec >::m_pxpos
protected

◆ m_pypos

template<typename EntropyCodec >
int dirac::GenericBandCodec< EntropyCodec >::m_pypos
protected

◆ m_qf

template<typename EntropyCodec >
int dirac::GenericBandCodec< EntropyCodec >::m_qf
protected

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

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