MEPP2 Project
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Arithmetic_Codec Class Reference

Arithmetic codec. More...

#include <arithmetic_codec.hpp>

Collaboration diagram for Arithmetic_Codec:
Collaboration graph

Public Member Functions

 Arithmetic_Codec (void)
 
 ~Arithmetic_Codec (void)
 
 Arithmetic_Codec (unsigned max_code_bytes, unsigned char *user_buffer=0)
 
unsigned char * buffer (void)
 
void set_buffer (unsigned max_code_bytes, unsigned char *user_buffer=0)
 
void start_encoder (void)
 
void start_decoder (void)
 
void read_from_file (FILE *code_file)
 
unsigned stop_encoder (void)
 
unsigned write_to_file (FILE *code_file)
 
void stop_decoder (void)
 
void put_bit (unsigned bit)
 
unsigned get_bit (void)
 
void put_bits (unsigned data, unsigned number_of_bits)
 
unsigned get_bits (unsigned number_of_bits)
 
void encode (unsigned bit, Static_Bit_Model &)
 
unsigned decode (Static_Bit_Model &)
 
void encode (unsigned data, Static_Data_Model &)
 
unsigned decode (Static_Data_Model &)
 
void encode (unsigned bit, Adaptive_Bit_Model &)
 
unsigned decode (Adaptive_Bit_Model &)
 
void encode (unsigned data, Adaptive_Data_Model &)
 
unsigned decode (Adaptive_Data_Model &)
 
unsigned calculate_current_decoded_size (void)
 

Private Member Functions

void propagate_carry (void)
 
void renorm_enc_interval (void)
 
void renorm_dec_interval (void)
 

Private Attributes

unsigned char * code_buffer
 
unsigned char * new_buffer
 
unsigned char * ac_pointer
 
unsigned base
 
unsigned value
 
unsigned length
 
unsigned buffer_size
 
unsigned mode
 

Detailed Description

Arithmetic codec.

Definition at line 153 of file arithmetic_codec.hpp.

Constructor & Destructor Documentation

◆ Arithmetic_Codec() [1/2]

Arithmetic_Codec::Arithmetic_Codec ( void  )
inline

Definition at line 582 of file arithmetic_codec.inl.

◆ ~Arithmetic_Codec()

Arithmetic_Codec::~Arithmetic_Codec ( void  )
inline

Definition at line 598 of file arithmetic_codec.inl.

◆ Arithmetic_Codec() [2/2]

Arithmetic_Codec::Arithmetic_Codec ( unsigned  max_code_bytes,
unsigned char *  user_buffer = 0 
)
inline

Definition at line 589 of file arithmetic_codec.inl.

Here is the call graph for this function:

Member Function Documentation

◆ buffer()

unsigned char* Arithmetic_Codec::buffer ( void  )
inline

Definition at line 161 of file arithmetic_codec.hpp.

◆ calculate_current_decoded_size()

unsigned Arithmetic_Codec::calculate_current_decoded_size ( void  )
inline

Definition at line 192 of file arithmetic_codec.hpp.

Here is the caller graph for this function:

◆ decode() [1/4]

unsigned Arithmetic_Codec::decode ( Adaptive_Bit_Model M)
inline

Definition at line 333 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ decode() [2/4]

unsigned Arithmetic_Codec::decode ( Adaptive_Data_Model M)
inline

Definition at line 509 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ decode() [3/4]

unsigned Arithmetic_Codec::decode ( Static_Bit_Model M)
inline

Definition at line 271 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decode() [4/4]

unsigned Arithmetic_Codec::decode ( Static_Data_Model M)
inline

Definition at line 402 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ encode() [1/4]

void Arithmetic_Codec::encode ( unsigned  bit,
Adaptive_Bit_Model M 
)
inline

Definition at line 299 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ encode() [2/4]

void Arithmetic_Codec::encode ( unsigned  bit,
Static_Bit_Model M 
)
inline

Definition at line 243 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ encode() [3/4]

void Arithmetic_Codec::encode ( unsigned  data,
Adaptive_Data_Model M 
)
inline

Definition at line 470 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ encode() [4/4]

void Arithmetic_Codec::encode ( unsigned  data,
Static_Data_Model M 
)
inline

Definition at line 367 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ get_bit()

unsigned Arithmetic_Codec::get_bit ( void  )
inline

Definition at line 175 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ get_bits()

unsigned Arithmetic_Codec::get_bits ( unsigned  number_of_bits)
inline

Definition at line 221 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ propagate_carry()

void Arithmetic_Codec::propagate_carry ( void  )
inlineprivate

Definition at line 116 of file arithmetic_codec.inl.

Here is the caller graph for this function:

◆ put_bit()

void Arithmetic_Codec::put_bit ( unsigned  bit)
inline

Definition at line 151 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ put_bits()

void Arithmetic_Codec::put_bits ( unsigned  data,
unsigned  number_of_bits 
)
inline

Definition at line 197 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_from_file()

void Arithmetic_Codec::read_from_file ( FILE *  code_file)
inline

Definition at line 672 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ renorm_dec_interval()

void Arithmetic_Codec::renorm_dec_interval ( void  )
inlineprivate

Definition at line 139 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ renorm_enc_interval()

void Arithmetic_Codec::renorm_enc_interval ( void  )
inlineprivate

Definition at line 127 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_buffer()

void Arithmetic_Codec::set_buffer ( unsigned  max_code_bytes,
unsigned char *  user_buffer = 0 
)
inline

Definition at line 604 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_decoder()

void Arithmetic_Codec::start_decoder ( void  )
inline

Definition at line 653 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start_encoder()

void Arithmetic_Codec::start_encoder ( void  )
inline

Definition at line 636 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop_decoder()

void Arithmetic_Codec::stop_decoder ( void  )
inline

Definition at line 757 of file arithmetic_codec.inl.

Here is the call graph for this function:

◆ stop_encoder()

unsigned Arithmetic_Codec::stop_encoder ( void  )
inline

Definition at line 697 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_to_file()

unsigned Arithmetic_Codec::write_to_file ( FILE *  code_file)
inline

Definition at line 732 of file arithmetic_codec.inl.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ ac_pointer

unsigned char * Arithmetic_Codec::ac_pointer
private

Definition at line 206 of file arithmetic_codec.hpp.

◆ base

unsigned Arithmetic_Codec::base
private

Definition at line 207 of file arithmetic_codec.hpp.

◆ buffer_size

unsigned Arithmetic_Codec::buffer_size
private

Definition at line 208 of file arithmetic_codec.hpp.

◆ code_buffer

unsigned char* Arithmetic_Codec::code_buffer
private

Definition at line 206 of file arithmetic_codec.hpp.

◆ length

unsigned Arithmetic_Codec::length
private

Definition at line 207 of file arithmetic_codec.hpp.

◆ mode

unsigned Arithmetic_Codec::mode
private

Definition at line 208 of file arithmetic_codec.hpp.

◆ new_buffer

unsigned char * Arithmetic_Codec::new_buffer
private

Definition at line 206 of file arithmetic_codec.hpp.

◆ value

unsigned Arithmetic_Codec::value
private

Definition at line 207 of file arithmetic_codec.hpp.


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