Quantization


Data Structures

struct  _quantizer_
struct  _scalar_quantizer_
struct  _uniform_quantizer_
struct  _trellis_coded_quantizer_

Defines

#define IT_QUANTIZER(q)   IT_CAST(it_quantizer_t, q)
#define it_quantizer_quantize(it_this, v)   __it_quantizer_quantize(IT_QUANTIZER(it_this), v)
#define it_quantizer_dequantize(it_this, i)   __it_quantizer_dequantize(IT_QUANTIZER(it_this), i)
#define it_quantizer_get_cardinal(it_this)   __it_quantizer_get_cardinal(IT_QUANTIZER(it_this))
#define IT_SCALAR_QUANTIZER(q)   IT_CAST(it_scalar_quantizer_t, q)
#define it_scalar_quantizer_new(codebook)   it_scalar_quantizer_new_start_index(codebook, 0)
#define it_scalar_quantizer_set_codebook(it_this, codebook, first)   __it_scalar_quantizer_set_codebook(IT_SCALAR_QUANTIZER(it_this), codebook, first)
#define it_scalar_quantizer_get_codebook_range(it_this, start, end)   __it_scalar_quantizer_get_codebook_range(IT_SCALAR_QUANTIZER(it_this), start, end)
#define it_scalar_quantizer_get_codebook(it_this)   it_scalar_quantizer_get_codebook_range(it_this, INT_MIN, INT_MAX)
#define it_scalar_quantizer_get_index_range(it_this, imin, imax)   __it_scalar_quantizer_get_index_range(IT_SCALAR_QUANTIZER(it_this), imin, imax)
#define it_scalar_quantizer_set_index_range(it_this, imin, imax)   __it_scalar_quantizer_set_index_range(IT_SCALAR_QUANTIZER(it_this), imin, imax)
#define it_scalar_quantizer_clear_index_range(it_this)   it_scalar_quantizer_set_index_range(it_this, INT_MIN, INT_MAX)
#define it_scalar_quantizer_scalar_quantize(it_this, v)   __it_scalar_quantizer_scalar_quantize(IT_SCALAR_QUANTIZER(it_this), v)
#define it_scalar_quantizer_scalar_dequantize(it_this, i)   __it_scalar_quantizer_scalar_dequantize(IT_SCALAR_QUANTIZER(it_this), i)
#define IT_UNIFORM_QUANTIZER(q)   IT_CAST(it_uniform_quantizer_t, q)
#define it_uniform_quantizer_get_step(q)   (IT_UNIFORM_QUANTIZER(q)->step)
#define it_uniform_quantizer_get_center(q)   (IT_UNIFORM_QUANTIZER(q)->center)
#define it_uniform_quantizer_get_deadzone_factor(q)   (IT_UNIFORM_QUANTIZER(q)->factor)
#define it_uniform_quantizer_get_deadzone_step(q)   (IT_UNIFORM_QUANTIZER(q)->deadzone)
#define IT_TRELLIS_CODED_QUANTIZER(q)   IT_CAST(it_trellis_coded_quantizer_t, q)
#define it_trellis_coded_quantizer_new_partition(code, quantizer)   __it_trellis_coded_quantizer_new_partition(IT_CONVOLUTIONAL_CODE(code), IT_SCALAR_QUANTIZER(quantizer))
#define it_quantize_mat(q, m)   __it_quantize_mat(IT_QUANTIZER(q), m)
#define it_dequantize_mat(q, m)   __it_dequantize_mat(IT_QUANTIZER(q), m)
#define it_quantize(q, v)   it_scalar_quantizer_scalar_quantize(q, v)
#define it_dequantize(q, i)   it_scalar_quantizer_scalar_dequantize(q, i)
#define it_quantize_vec(q, v)   it_quantizer_quantize(q, v)
#define it_dequantize_vec(q, v)   it_quantizer_dequantize(q, v)
#define it_quantizer_set_codebook(q, codebook, start)   it_scalar_quantizer_set_codebook(q, codebook, start)
#define it_quantizer_get_codebook_range(q, start, end)   it_scalar_quantizer_get_codebook_range(q, start, end)
#define it_quantizer_get_codebook(q)   it_scalar_quantizer_get_codebook(q)
#define it_quantizer_get_index_range(q, imin, imax)   it_scalar_quantizer_get_index_range(q, imin, imax)
#define it_quantizer_set_index_range(q, imin, imax)   it_scalar_quantizer_set_index_range(q, imin, imax)
#define it_quantizer_clear_index_range(q)   it_scalar_quantizer_clear_index_range(q)
#define it_quantizer_scalar_quantize(q, v)   it_scalar_quantizer_scalar_quantize(q, v)
#define it_quantizer_scalar_dequantize(q, i)   it_scalar_quantizer_scalar_dequantize(q, i)
#define it_quantizer_get_step(q)   it_uniform_quantizer_get_step(q)
#define it_quantizer_get_center(q)   it_uniform_quantizer_get_center(q)
#define it_quantizer_get_deadzone_factor(q)   it_uniform_quantizer_get_deadzone_factor(q)
#define it_quantizer_get_deadzone_step(q)   it_uniform_quantizer_get_deadzone_step(q)

Typedefs

typedef struct _quantizer_ it_quantizer_t
typedef struct _scalar_quantizer_ it_scalar_quantizer_t
typedef struct _uniform_quantizer_ it_uniform_quantizer_t
typedef struct
_trellis_coded_quantizer_ 
it_trellis_coded_quantizer_t

Functions

static it_instanciate (it_quantizer_t)
static ivec __it_quantizer_quantize (it_quantizer_t *it_this, vec v)
static vec __it_quantizer_dequantize (it_quantizer_t *it_this, ivec i)
static unsigned int __it_quantizer_get_cardinal (it_quantizer_t *it_this)
 it_instanciate (it_scalar_quantizer_t)
static it_scalar_quantizer_tit_scalar_quantizer_new_start_index (vec codebook, int first)
static void __it_scalar_quantizer_set_codebook (it_scalar_quantizer_t *it_this, vec codebook, int first)
static vec __it_scalar_quantizer_get_codebook_range (it_scalar_quantizer_t *it_this, int start, int end)
static void __it_scalar_quantizer_get_index_range (it_scalar_quantizer_t *it_this, int *imin, int *imax)
static void __it_scalar_quantizer_set_index_range (it_scalar_quantizer_t *it_this, int imin, int imax)
static int __it_scalar_quantizer_scalar_quantize (it_scalar_quantizer_t *it_this, double v)
static double __it_scalar_quantizer_scalar_dequantize (it_scalar_quantizer_t *it_this, int i)
 it_instanciate (it_uniform_quantizer_t)
static it_uniform_quantizer_tit_uniform_quantizer_new_from_center (double center, double step, double factor)
static it_uniform_quantizer_tit_uniform_quantizer_new_from_range (int n, double min, double max)
 it_instanciate (it_trellis_coded_quantizer_t)
static
it_trellis_coded_quantizer_t
__it_trellis_coded_quantizer_new_partition (it_convolutional_code_t *code, it_scalar_quantizer_t *quantizer)
imat __it_quantize_mat (it_quantizer_t *q, mat m)
mat __it_dequantize_mat (it_quantizer_t *q, imat m)
vec lloyd_max (it_function_t function, it_args_t args, double a, double b, int N)

Detailed Description


Define Documentation

#define it_dequantize ( q,
 )     it_scalar_quantizer_scalar_dequantize(q, i)

#define it_dequantize_mat ( q,
 )     __it_dequantize_mat(IT_QUANTIZER(q), m)

Definition at line 318 of file quantizer.h.

#define it_dequantize_vec ( q,
 )     it_quantizer_dequantize(q, v)

Definition at line 325 of file quantizer.h.

Referenced by __it_dequantize_mat(), and test_quantizer().

#define it_quantize ( q,
 )     it_scalar_quantizer_scalar_quantize(q, v)

Definition at line 322 of file quantizer.h.

Referenced by main(), and trellis_coded_quantizer_quantize().

#define it_quantize_mat ( q,
 )     __it_quantize_mat(IT_QUANTIZER(q), m)

Definition at line 316 of file quantizer.h.

#define it_quantize_vec ( q,
 )     it_quantizer_quantize(q, v)

Definition at line 324 of file quantizer.h.

Referenced by __it_quantize_mat(), and test_quantizer().

#define IT_QUANTIZER (  )     IT_CAST(it_quantizer_t, q)

Definition at line 53 of file quantizer.h.

Referenced by it_instanciate(), and main().

#define it_quantizer_clear_index_range (  )     it_scalar_quantizer_clear_index_range(q)

Definition at line 337 of file quantizer.h.

#define it_quantizer_dequantize ( it_this,
 )     __it_quantizer_dequantize(IT_QUANTIZER(it_this), i)

Definition at line 65 of file quantizer.h.

#define it_quantizer_get_cardinal ( it_this   )     __it_quantizer_get_cardinal(IT_QUANTIZER(it_this))

Definition at line 71 of file quantizer.h.

Referenced by print_quantizer(), and trellis_coded_quantizer_get_cardinal().

#define it_quantizer_get_center (  )     it_uniform_quantizer_get_center(q)

#define it_quantizer_get_codebook (  )     it_scalar_quantizer_get_codebook(q)

Definition at line 331 of file quantizer.h.

Referenced by it_instanciate(), and main().

#define it_quantizer_get_codebook_range ( q,
start,
end   )     it_scalar_quantizer_get_codebook_range(q, start, end)

Definition at line 329 of file quantizer.h.

Referenced by main().

#define it_quantizer_get_deadzone_factor (  )     it_uniform_quantizer_get_deadzone_factor(q)

Definition at line 345 of file quantizer.h.

#define it_quantizer_get_deadzone_step (  )     it_uniform_quantizer_get_deadzone_step(q)

#define it_quantizer_get_index_range ( q,
imin,
imax   )     it_scalar_quantizer_get_index_range(q, imin, imax)

Definition at line 333 of file quantizer.h.

Referenced by print_quantizer().

#define it_quantizer_get_step (  )     it_uniform_quantizer_get_step(q)

#define it_quantizer_quantize ( it_this,
 )     __it_quantizer_quantize(IT_QUANTIZER(it_this), v)

Definition at line 60 of file quantizer.h.

#define it_quantizer_scalar_dequantize ( q,
 )     it_scalar_quantizer_scalar_dequantize(q, i)

Definition at line 341 of file quantizer.h.

#define it_quantizer_scalar_quantize ( q,
 )     it_scalar_quantizer_scalar_quantize(q, v)

Definition at line 339 of file quantizer.h.

#define it_quantizer_set_codebook ( q,
codebook,
start   )     it_scalar_quantizer_set_codebook(q, codebook, start)

Definition at line 327 of file quantizer.h.

Referenced by main().

#define it_quantizer_set_index_range ( q,
imin,
imax   )     it_scalar_quantizer_set_index_range(q, imin, imax)

Definition at line 335 of file quantizer.h.

Referenced by main().

#define it_scalar_quantizer_clear_index_range ( it_this   )     it_scalar_quantizer_set_index_range(it_this, INT_MIN, INT_MAX)

Definition at line 187 of file quantizer.h.

Referenced by it_instanciate().

#define it_scalar_quantizer_get_codebook ( it_this   )     it_scalar_quantizer_get_codebook_range(it_this, INT_MIN, INT_MAX)

Definition at line 152 of file quantizer.h.

#define it_scalar_quantizer_get_codebook_range ( it_this,
start,
end   )     __it_scalar_quantizer_get_codebook_range(IT_SCALAR_QUANTIZER(it_this), start, end)

Definition at line 144 of file quantizer.h.

Referenced by uniform_quantizer_get_codebook_range().

#define it_scalar_quantizer_get_index_range ( it_this,
imin,
imax   )     __it_scalar_quantizer_get_index_range(IT_SCALAR_QUANTIZER(it_this), imin, imax)

Definition at line 155 of file quantizer.h.

#define it_scalar_quantizer_new ( codebook   )     it_scalar_quantizer_new_start_index(codebook, 0)

Definition at line 128 of file quantizer.h.

Referenced by it_instanciate(), and main().

#define it_scalar_quantizer_scalar_dequantize ( it_this,
 )     __it_scalar_quantizer_scalar_dequantize(IT_SCALAR_QUANTIZER(it_this), i)

#define it_scalar_quantizer_scalar_quantize ( it_this,
 )     __it_scalar_quantizer_scalar_quantize(IT_SCALAR_QUANTIZER(it_this), v)

Definition at line 190 of file quantizer.h.

Referenced by scalar_quantizer_quantize().

#define it_scalar_quantizer_set_codebook ( it_this,
codebook,
first   )     __it_scalar_quantizer_set_codebook(IT_SCALAR_QUANTIZER(it_this), codebook, first)

Definition at line 131 of file quantizer.h.

#define it_scalar_quantizer_set_index_range ( it_this,
imin,
imax   )     __it_scalar_quantizer_set_index_range(IT_SCALAR_QUANTIZER(it_this), imin, imax)

#define it_trellis_coded_quantizer_new_partition ( code,
quantizer   )     __it_trellis_coded_quantizer_new_partition(IT_CONVOLUTIONAL_CODE(code), IT_SCALAR_QUANTIZER(quantizer))

Definition at line 304 of file quantizer.h.

Referenced by main().

#define IT_UNIFORM_QUANTIZER (  )     IT_CAST(it_uniform_quantizer_t, q)

#define it_uniform_quantizer_get_center (  )     (IT_UNIFORM_QUANTIZER(q)->center)

Definition at line 276 of file quantizer.h.

#define it_uniform_quantizer_get_deadzone_factor (  )     (IT_UNIFORM_QUANTIZER(q)->factor)

Definition at line 279 of file quantizer.h.

#define it_uniform_quantizer_get_deadzone_step (  )     (IT_UNIFORM_QUANTIZER(q)->deadzone)

Definition at line 282 of file quantizer.h.

#define it_uniform_quantizer_get_step (  )     (IT_UNIFORM_QUANTIZER(q)->step)

Definition at line 273 of file quantizer.h.


Typedef Documentation

typedef struct _quantizer_ it_quantizer_t


Function Documentation

mat __it_dequantize_mat ( it_quantizer_t q,
imat  m 
)

Definition at line 653 of file quantizer.c.

References imat_height(), it_dequantize_vec, and Vec_new.

imat __it_quantize_mat ( it_quantizer_t q,
mat  m 
)

Definition at line 641 of file quantizer.c.

References it_quantize_vec, mat_height(), and Vec_new.

static vec __it_quantizer_dequantize ( it_quantizer_t it_this,
ivec  i 
) [inline, static]

Definition at line 66 of file quantizer.h.

References _quantizer_::dequantize.

static unsigned int __it_quantizer_get_cardinal ( it_quantizer_t it_this  )  [inline, static]

Definition at line 72 of file quantizer.h.

References _quantizer_::get_cardinal.

static ivec __it_quantizer_quantize ( it_quantizer_t it_this,
vec  v 
) [inline, static]

Definition at line 61 of file quantizer.h.

References _quantizer_::quantize.

static vec __it_scalar_quantizer_get_codebook_range ( it_scalar_quantizer_t it_this,
int  start,
int  end 
) [inline, static]

Definition at line 147 of file quantizer.h.

References _scalar_quantizer_::get_codebook_range.

static void __it_scalar_quantizer_get_index_range ( it_scalar_quantizer_t it_this,
int *  imin,
int *  imax 
) [inline, static]

Definition at line 166 of file quantizer.h.

References _scalar_quantizer_::get_index_range.

static double __it_scalar_quantizer_scalar_dequantize ( it_scalar_quantizer_t it_this,
int  i 
) [inline, static]

Definition at line 217 of file quantizer.h.

References _scalar_quantizer_::scalar_dequantize.

static int __it_scalar_quantizer_scalar_quantize ( it_scalar_quantizer_t it_this,
double  v 
) [inline, static]

Definition at line 201 of file quantizer.h.

References _scalar_quantizer_::scalar_quantize.

static void __it_scalar_quantizer_set_codebook ( it_scalar_quantizer_t it_this,
vec  codebook,
int  first 
) [inline, static]

Definition at line 138 of file quantizer.h.

References _scalar_quantizer_::set_codebook.

static void __it_scalar_quantizer_set_index_range ( it_scalar_quantizer_t it_this,
int  imin,
int  imax 
) [inline, static]

Definition at line 182 of file quantizer.h.

References _scalar_quantizer_::set_index_range.

static it_trellis_coded_quantizer_t* __it_trellis_coded_quantizer_new_partition ( it_convolutional_code_t code,
it_scalar_quantizer_t quantizer 
) [inline, static]

Definition at line 307 of file quantizer.h.

References it_new_va, and it_va.

static it_instanciate ( it_quantizer_t   )  [inline, static]

Definition at line 55 of file quantizer.h.

References it_construct, and it_set_magic.

static it_scalar_quantizer_t* it_scalar_quantizer_new_start_index ( vec  codebook,
int  first 
) [inline, static]

Definition at line 124 of file quantizer.h.

References it_new_va, and it_va.

static it_uniform_quantizer_t* it_uniform_quantizer_new_from_center ( double  center,
double  step,
double  factor 
) [inline, static]

Definition at line 250 of file quantizer.h.

References it_new_va, and it_va.

Referenced by it_uniform_quantizer_new_from_range(), and main().

static it_uniform_quantizer_t* it_uniform_quantizer_new_from_range ( int  n,
double  min,
double  max 
) [inline, static]

vec lloyd_max ( it_function_t  function,
it_args_t  args,
double  a,
double  b,
int  N 
)

Definition at line 577 of file quantizer.c.

References IT_EPSILON, it_function_args, itf_expectation, itf_integrate, and vec_new_arithm().

Referenced by main().


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