Dirac - A Video Codec

Created by the British Broadcasting Corporation.


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

A class specially for coding the DC subband of Intra frames. More...

#include <band_codec.h>

Inheritance diagram for dirac::IntraDCBandCodec:
Inheritance graph
[legend]
Collaboration diagram for dirac::IntraDCBandCodec:
Collaboration graph
[legend]

Public Member Functions

 IntraDCBandCodec (SubbandByteIO *subband_byteio, size_t number_of_contexts, const SubbandList &band_list)
 Constructor. More...
 
- Public Member Functions inherited from dirac::GenericIntraDCBandCodec< ArithCodec< CoeffArray > >
 GenericIntraDCBandCodec (SubbandByteIO *subband_byteio, size_t number_of_contexts, const SubbandList &band_list)
 Constructor. More...
 
- Public Member Functions inherited from dirac::GenericBandCodec< ArithCodec< CoeffArray > >
 GenericBandCodec (SubbandByteIO *subband_byteio, size_t number_of_contexts, const SubbandList &band_list, int band_num, const bool is_intra)
 Constructor. More...
 
- Public Member Functions inherited from dirac::ArithCodec< CoeffArray >
 ArithCodec (ByteIO *p_byteio, size_t number_of_contexts)
 Constructor for encoding. More...
 
virtual ~ArithCodec ()
 Destructor. More...
 
int Compress (CoeffArray &in_data)
 Compresses the input and returns the number of bits written. More...
 
void Decompress (CoeffArray &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

void DoWorkCode (CoeffArray &in_data)
 Initialize extra data required for error-feedback DC quantization. More...
 
void DoWorkDecode (CoeffArray &out_data)
 Ditto. More...
 
void CodeCoeff (CoeffArray &in_data, const int xpos, const int ypos)
 Encode a single coefficient using error-feedback DC quantization. More...
 
void DecodeCoeff (CoeffArray &out_data, const int xpos, const int ypos)
 Decode a single coefficient using error-feedback DC quantization. More...
 
 IntraDCBandCodec (const IntraDCBandCodec &cpy)
 Private, bodyless copy constructor: class should not be copied. More...
 
IntraDCBandCodecoperator= (const IntraDCBandCodec &rhs)
 Private, bodyless copy operator=: class should not be assigned. More...
 

Private Attributes

CoeffArray m_dc_pred_res
 

Additional Inherited Members

- Protected Member Functions inherited from dirac::GenericIntraDCBandCodec< ArithCodec< CoeffArray > >
void ClearBlock (const CodeBlock &code_block, CoeffArray &coeff_data)
 When coding a skipped block, propegate the predicted values for future non skipped blocks. More...
 
CoeffType GetPrediction (const CoeffArray &data, const int xpos, const int ypos) const
 Prediction of a DC value from its previously coded neighbours. More...
 
void DecodeCoeffBlock (const CodeBlock &code_block, CoeffArray &out_data)
 Decode codeblock of coefficients and perform DC prediction. More...
 
- Protected Member Functions inherited from dirac::GenericBandCodec< ArithCodec< CoeffArray > >
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...
 
virtual void DoWorkCode (CoeffArray &in_data)=0
 Does the work of actually coding the data. More...
 
virtual void DoWorkDecode (CoeffArray &out_data)=0
 virtual decode-only functions
More...
 
- 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::GenericBandCodec< ArithCodec< CoeffArray > >
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...
 
- Protected Attributes inherited from dirac::ArithCodecBase
std::vector< Contextm_context_list
 List of contexts. More...
 

Detailed Description

A class specially for coding the DC subband of Intra frames, using intra-band prediction of coefficients. It uses the abstract ArithCodec class

Constructor & Destructor Documentation

◆ IntraDCBandCodec() [1/2]

dirac::IntraDCBandCodec::IntraDCBandCodec ( SubbandByteIO subband_byteio,
size_t  number_of_contexts,
const SubbandList band_list 
)
inline

Creates a IntraDCBandCodec object to encode subband data, based on parameters

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

◆ IntraDCBandCodec() [2/2]

dirac::IntraDCBandCodec::IntraDCBandCodec ( const IntraDCBandCodec cpy)
private

Member Function Documentation

◆ CodeCoeff()

void dirac::IntraDCBandCodec::CodeCoeff ( CoeffArray in_data,
const int  xpos,
const int  ypos 
)
privatevirtual

◆ DecodeCoeff()

void dirac::IntraDCBandCodec::DecodeCoeff ( CoeffArray out_data,
const int  xpos,
const int  ypos 
)
privatevirtual

◆ DoWorkCode()

void dirac::IntraDCBandCodec::DoWorkCode ( CoeffArray in_data)
privatevirtual

◆ DoWorkDecode()

void dirac::IntraDCBandCodec::DoWorkDecode ( CoeffArray out_data)
privatevirtual

◆ operator=()

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

Member Data Documentation

◆ m_dc_pred_res

CoeffArray dirac::IntraDCBandCodec::m_dc_pred_res
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.