Created by the British Broadcasting Corporation.
A template class for coding and decoding wavelet subband data.
#include <band_codec.h>
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... | |
| GenericBandCodec & | operator= (const GenericBandCodec &rhs) |
| Private, bodyless copy operator=: class should not be assigned. More... | |
| 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
| subband_byteio | input/output for the encoded bits |
| number_of_contexts | the number of contexts used in the encoding process |
| band_list | the set of all the subbands |
| band_num | the number of the subband being coded |
| is_intra | Flag indicating whether the band comes from an intra picture |
References dirac::GenericBandCodec< EntropyCodec >::m_node, dirac::GenericBandCodec< EntropyCodec >::m_pnode, and dirac::Subband::Parent().
|
private |
|
inlineprotected |
References dirac::NZ_FBIN1nz_CTX, dirac::NZ_FBIN1z_CTX, dirac::NZ_FBIN2_CTX, dirac::NZ_FBIN3_CTX, dirac::NZ_FBIN4_CTX, dirac::NZ_FBIN5_CTX, dirac::NZ_FBIN6plus_CTX, dirac::Z_FBIN1nz_CTX, dirac::Z_FBIN1z_CTX, dirac::Z_FBIN2_CTX, dirac::Z_FBIN3_CTX, dirac::Z_FBIN4_CTX, dirac::Z_FBIN5_CTX, and dirac::Z_FBIN6plus_CTX.
|
inlineprotected |
References dirac::INFO_CTX.
|
inlineprotected |
References dirac::SIGN0_CTX, dirac::SIGN_NEG_CTX, and dirac::SIGN_POS_CTX.
|
protectedvirtual |
Reimplemented in dirac::GenericIntraDCBandCodec< EntropyCodec >, dirac::GenericIntraDCBandCodec< ArithCodec< CoeffArray > >, and dirac::GenericIntraDCBandCodec< ArithCodecToVLCAdapter >.
References dirac::CodeBlock::Xend(), dirac::CodeBlock::Xstart(), dirac::CodeBlock::Yend(), and dirac::CodeBlock::Ystart().
|
protectedvirtual |
Reimplemented in dirac::IntraDCBandCodec, and dirac::IntraDCBandVLC.
|
protectedvirtual |
|
protected |
|
inlineprotected |
|
protectedvirtual |
Reimplemented in dirac::IntraDCBandCodec.
|
protectedvirtual |
Reimplemented in dirac::GenericIntraDCBandCodec< EntropyCodec >, dirac::GenericIntraDCBandCodec< ArithCodec< CoeffArray > >, and dirac::GenericIntraDCBandCodec< ArithCodecToVLCAdapter >.
References DIRAC_THROW_EXCEPTION, dirac::ERR_UNSUPPORTED_STREAM_DATA, dirac::SEVERITY_PICTURE_ERROR, dirac::CodeBlock::Xend(), dirac::CodeBlock::Xstart(), dirac::CodeBlock::Yend(), and dirac::CodeBlock::Ystart().
Referenced by dirac::GenericIntraDCBandCodec< EntropyCodec >::DecodeCoeffBlock().
|
protected |
References dirac::Q_OFFSET_FOLLOW_CTX, dirac::Q_OFFSET_INFO_CTX, and dirac::Q_OFFSET_SIGN_CTX.
|
inlineprotected |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in dirac::IntraDCBandCodec.
References dirac::BLOCK_SKIP_CTX, dirac::TwoDArray< T >::FirstX(), dirac::TwoDArray< T >::FirstY(), dirac::TwoDArray< T >::LastX(), dirac::TwoDArray< T >::LastY(), dirac::TwoDArray< T >::LengthX(), dirac::TwoDArray< T >::LengthY(), and dirac::CodeBlock::SetSkip().
|
private |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by dirac::GenericBandCodec< EntropyCodec >::GenericBandCodec().
|
protected |
|
protected |
|
protected |
Referenced by dirac::GenericBandCodec< EntropyCodec >::GenericBandCodec().
|
protected |
|
protected |
|
protected |
© 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.