Entropy Coding


Data Structures

struct  _arithmetic_coder_t_
struct  _arithmetic_decoder_t_
struct  vlc_t

Typedefs

typedef unsigned char arithmetic_codec_bit_t
typedef unsigned long arithmetic_codec_register_t
typedef struct _arithmetic_coder_t_ arithmetic_coder_t
typedef struct
_arithmetic_decoder_t_ 
arithmetic_decoder_t

Functions

arithmetic_coder_tarithmetic_coder_new (int precision)
void arithmetic_coder_delete (arithmetic_coder_t *arithmetic_coder)
void arithmetic_coder_start (arithmetic_coder_t *arithmetic_coder, bvec buffer)
int arithmetic_coder_stop (arithmetic_coder_t *arithmetic_coder)
void arithmetic_coder_encode_bit (arithmetic_coder_t *arithmetic_coder, double prob_0, arithmetic_codec_bit_t bit)
void arithmetic_coder_encode_symbol (arithmetic_coder_t *arithmetic_coder, vec pdf, int symbol)
arithmetic_decoder_tarithmetic_decoder_new (int precision)
void arithmetic_decoder_delete (arithmetic_decoder_t *arithmetic_decoder)
void arithmetic_decoder_start (arithmetic_decoder_t *arithmetic_decoder, bvec buffer)
int arithmetic_decoder_stop (arithmetic_decoder_t *arithmetic_decoder)
arithmetic_codec_bit_t arithmetic_decoder_decode_bit (arithmetic_decoder_t *arithmetic_decoder, double prob_zero)
int arithmetic_decoder_decode_symbol (arithmetic_decoder_t *arithmetic_decoder, vec pdf)
vlc_tvlc_new (int n)
vlc_tvlc_clone (const vlc_t *vlc)
void vlc_delete (vlc_t *vlc)
static int vlc_get_cwd (const vlc_t *vlc, int node)
static int vlc_get_cwd_length (const vlc_t *vlc, int node)
static int vlc_get_child0 (const vlc_t *vlc, int s)
static int vlc_get_child1 (const vlc_t *vlc, int s)
static int vlc_is_leaf (const vlc_t *vlc, int s)
static int vlc_is_node (const vlc_t *vlc, int s)
void vlc_quasi_lexicographic (const vlc_t *vlc, const vec pdf, const vec symb)
vlc_tvlc_huffman (const vec pdf)
vlc_tvlc_hu_tucker (const vec pdf)
vlc_tvlc_flc (int nb_bits)
vlc_tvlc_read (const char *s)
void vlc_affect_codewords (vlc_t *vlc)
int vlc_minh (const vlc_t *vlc)
int vlc_maxh (const vlc_t *vlc)
double vlc_kraft_sum (const vlc_t *vlc)
double vlc_mdl (const vlc_t *vlc, const vec pdf)
vec vlc_nodes_pdf (const vlc_t *vlc, vec pdf)
vec vlc_nodes_proba0 (const vlc_t *vlc, vec pdf)
vec vlc_nodes_expectation (const vlc_t *vlc, vec pdf, vec symb)
double vlc_node_variance (const vlc_t *vlc, int node, vec pdf, vec symbols)
vec vlc_nodes_variance (const vlc_t *vlc, vec pdf, vec symb)
vec vlc_nodes_entropy (const vlc_t *vlc, vec pdf)
vec vlc_nodes_delta_energy (const vlc_t *vlc, vec pdf, vec symb)
ivec vlc_energy_order (const vlc_t *vlc, vec pdf, vec symb)
void vlc_print (const vlc_t *vlc)
void vlc_print_all (const vlc_t *vlc, vec pdf, vec symb)
int vlc_nb_bits_required (const vlc_t *vlc, ivec S)
bvec vlc_encode_concat (const vlc_t *vlc, ivec S)
ivec vlc_decode_concat (const vlc_t *vlc, bvec E)
ivec vlc_decode_concat_N (const vlc_t *vlc, bvec E, idx_t N)

Detailed Description


Typedef Documentation

typedef unsigned char arithmetic_codec_bit_t

Definition at line 33 of file arithmetic_codec.h.

typedef unsigned long arithmetic_codec_register_t

Definition at line 34 of file arithmetic_codec.h.


Function Documentation

void arithmetic_coder_delete ( arithmetic_coder_t arithmetic_coder  ) 

Definition at line 150 of file arithmetic_codec.c.

Referenced by main().

void arithmetic_coder_encode_bit ( arithmetic_coder_t arithmetic_coder,
double  prob_0,
arithmetic_codec_bit_t  bit 
)

void arithmetic_coder_encode_symbol ( arithmetic_coder_t arithmetic_coder,
vec  pdf,
int  symbol 
)

Definition at line 258 of file arithmetic_codec.c.

References arithmetic_coder_encode_bit(), and vec_length().

Referenced by main().

arithmetic_coder_t* arithmetic_coder_new ( int  precision  ) 

Definition at line 136 of file arithmetic_codec.c.

References _arithmetic_coder_t_::buffer, and _arithmetic_coder_t_::precision.

Referenced by main().

int arithmetic_coder_stop ( arithmetic_coder_t arithmetic_coder  ) 

arithmetic_codec_bit_t arithmetic_decoder_decode_bit ( arithmetic_decoder_t arithmetic_decoder,
double  prob_zero 
)

int arithmetic_decoder_decode_symbol ( arithmetic_decoder_t arithmetic_decoder,
vec  pdf 
)

Definition at line 287 of file arithmetic_codec.c.

References arithmetic_decoder_decode_bit(), and vec_length().

Referenced by main().

void arithmetic_decoder_delete ( arithmetic_decoder_t arithmetic_decoder  ) 

Definition at line 220 of file arithmetic_codec.c.

Referenced by main().

arithmetic_decoder_t* arithmetic_decoder_new ( int  precision  ) 

Definition at line 208 of file arithmetic_codec.c.

References _arithmetic_decoder_t_::precision.

Referenced by main().

int arithmetic_decoder_stop ( arithmetic_decoder_t arithmetic_decoder  ) 

void vlc_affect_codewords ( vlc_t vlc  ) 

vlc_t* vlc_clone ( const vlc_t vlc  ) 

ivec vlc_decode_concat ( const vlc_t vlc,
bvec  E 
)

Definition at line 915 of file vlc.c.

References bvec_length(), ivec_new_alloc(), ivec_push, vlc_t::map, vlc_t::node_root, vlc_is_leaf(), and vlc_maxh().

Referenced by main().

ivec vlc_decode_concat_N ( const vlc_t vlc,
bvec  E,
idx_t  N 
)

Definition at line 933 of file vlc.c.

References bvec_length(), ivec_new(), ivec_set(), vlc_t::map, vlc_t::node_root, and vlc_is_leaf().

void vlc_delete ( vlc_t vlc  ) 

Definition at line 74 of file vlc.c.

References vlc_t::cwd, vlc_t::cwd_length, ivec_delete(), and vlc_t::map.

Referenced by main().

bvec vlc_encode_concat ( const vlc_t vlc,
ivec  S 
)

Definition at line 896 of file vlc.c.

References bvec_new_alloc(), bvec_push, ivec_length(), vlc_get_cwd(), vlc_get_cwd_length(), and vlc_maxh().

Referenced by main().

vlc_t* vlc_flc ( int  nb_bits  ) 

Definition at line 86 of file vlc.c.

References vlc_t::map, vlc_t::node_root, vlc_affect_codewords(), and vlc_new().

static int vlc_get_child0 ( const vlc_t vlc,
int  s 
) [inline, static]

static int vlc_get_child1 ( const vlc_t vlc,
int  s 
) [inline, static]

static int vlc_get_cwd ( const vlc_t vlc,
int  node 
) [inline, static]

Definition at line 65 of file vlc.h.

References vlc_t::cwd.

Referenced by vlc_encode_concat(), vlc_print(), and vlc_print_all().

static int vlc_get_cwd_length ( const vlc_t vlc,
int  node 
) [inline, static]

Definition at line 70 of file vlc.h.

References vlc_t::cwd_length.

Referenced by vlc_encode_concat(), and vlc_nb_bits_required().

vlc_t* vlc_huffman ( const vec  pdf  ) 

static int vlc_is_leaf ( const vlc_t vlc,
int  s 
) [inline, static]

static int vlc_is_node ( const vlc_t vlc,
int  s 
) [inline, static]

Definition at line 90 of file vlc.h.

References vlc_t::nb_symb.

double vlc_kraft_sum ( const vlc_t vlc  ) 

Definition at line 331 of file vlc.c.

References vlc_t::cwd_length, and vlc_t::nb_symb.

Referenced by vlc_quasi_lexicographic().

int vlc_maxh ( const vlc_t vlc  ) 

Definition at line 308 of file vlc.c.

References vlc_t::cwd_length, and vlc_t::nb_symb.

Referenced by main(), vlc_decode_concat(), vlc_encode_concat(), and vlc_quasi_lexicographic().

double vlc_mdl ( const vlc_t vlc,
const vec  pdf 
)

Definition at line 320 of file vlc.c.

References vlc_t::cwd_length, and vlc_t::nb_symb.

Referenced by main().

int vlc_minh ( const vlc_t vlc  ) 

Definition at line 296 of file vlc.c.

References vlc_t::cwd_length, and vlc_t::nb_symb.

Referenced by main().

int vlc_nb_bits_required ( const vlc_t vlc,
ivec  S 
)

Definition at line 885 of file vlc.c.

References ivec_length(), and vlc_get_cwd_length().

double vlc_node_variance ( const vlc_t vlc,
int  node,
vec  pdf,
vec  symbols 
)

Definition at line 623 of file vlc.c.

References vlc_node_variance_tmp().

Referenced by vlc_nodes_variance().

vec vlc_nodes_delta_energy ( const vlc_t vlc,
vec  pdf,
vec  symb 
)

vec vlc_nodes_entropy ( const vlc_t vlc,
vec  pdf 
)

vec vlc_nodes_expectation ( const vlc_t vlc,
vec  pdf,
vec  symb 
)

vec vlc_nodes_pdf ( const vlc_t vlc,
vec  pdf 
)

vec vlc_nodes_proba0 ( const vlc_t vlc,
vec  pdf 
)

vec vlc_nodes_variance ( const vlc_t vlc,
vec  pdf,
vec  symb 
)

void vlc_print ( const vlc_t vlc  ) 

Definition at line 690 of file vlc.c.

References bit, vlc_t::cwd_length, vlc_t::nb_symb, and vlc_get_cwd().

Referenced by main().

void vlc_print_all ( const vlc_t vlc,
vec  pdf,
vec  symb 
)

vlc_t* vlc_read ( const char *  s  ) 


Hosted by
Copyright (C) 2005-2006 Hervé Jégou
Vivien Chappelier
Francois Cayre
libit logo courtesy of Jonathan Delhumeau