#include <stdarg.h>
#include <it/types.h>
#include <it/vec.h>
#include <it/math.h>
#include <it/quantizer.h>
#include <it/io.h>
Go to the source code of this file.
#define gray_to_bin | ( | x | ) | ((x) ^ (x >> 1)) |
it_function | ( | lloyd_max_distortion | ) |
Definition at line 561 of file quantizer.c.
it_function_args | ( | lloyd_max_distortion | ) |
Definition at line 554 of file quantizer.c.
static vec scalar_quantizer_dequantize | ( | it_quantizer_t * | it_this, | |
ivec | q | |||
) | [static] |
Definition at line 237 of file quantizer.c.
References IT_SCALAR_QUANTIZER, it_scalar_quantizer_scalar_dequantize, ivec_length(), and vec_new().
Referenced by it_instanciate().
static void scalar_quantizer_destructor | ( | it_object_t * | it_this | ) | [static] |
Definition at line 113 of file quantizer.c.
References _scalar_quantizer_::codebook, _scalar_quantizer_::it_overloaded(), IT_SCALAR_QUANTIZER, and vec_delete().
Referenced by it_instanciate().
static unsigned int scalar_quantizer_get_cardinal | ( | it_quantizer_t * | it_this | ) | [static] |
Definition at line 251 of file quantizer.c.
References IT_SCALAR_QUANTIZER.
Referenced by it_instanciate().
static vec scalar_quantizer_get_codebook_range | ( | it_scalar_quantizer_t * | q, | |
int | start, | |||
int | end | |||
) | [static] |
Definition at line 124 of file quantizer.c.
References _scalar_quantizer_::codebook, _scalar_quantizer_::imax, _scalar_quantizer_::imin, and vec_get_subvector().
Referenced by it_instanciate().
static void scalar_quantizer_get_index_range | ( | it_scalar_quantizer_t * | q, | |
int * | _imin, | |||
int * | _imax | |||
) | [static] |
Definition at line 134 of file quantizer.c.
References _scalar_quantizer_::imax, and _scalar_quantizer_::imin.
Referenced by it_instanciate().
static ivec scalar_quantizer_quantize | ( | it_quantizer_t * | it_this, | |
vec | v | |||
) | [static] |
Definition at line 223 of file quantizer.c.
References IT_SCALAR_QUANTIZER, it_scalar_quantizer_scalar_quantize, ivec_new(), and vec_length().
Referenced by it_instanciate().
static double scalar_quantizer_scalar_dequantize | ( | it_scalar_quantizer_t * | it_this, | |
int | q | |||
) | [static] |
Definition at line 197 of file quantizer.c.
References _scalar_quantizer_::codebook, and _scalar_quantizer_::first.
Referenced by it_instanciate().
static int scalar_quantizer_scalar_quantize | ( | it_scalar_quantizer_t * | q, | |
double | v | |||
) | [static] |
Definition at line 165 of file quantizer.c.
References _scalar_quantizer_::codebook, _scalar_quantizer_::first, _scalar_quantizer_::imax, and _scalar_quantizer_::imin.
Referenced by it_instanciate().
static void scalar_quantizer_set_codebook | ( | it_scalar_quantizer_t * | it_this, | |
vec | codebook, | |||
int | first | |||
) | [static] |
Definition at line 205 of file quantizer.c.
References _scalar_quantizer_::codebook, _scalar_quantizer_::first, it_scalar_quantizer_set_index_range, vec_clone(), vec_length(), and vec_sort().
Referenced by it_instanciate().
static void scalar_quantizer_set_index_range | ( | it_scalar_quantizer_t * | q, | |
int | _imin, | |||
int | _imax | |||
) | [static] |
Definition at line 141 of file quantizer.c.
References _scalar_quantizer_::codebook, _scalar_quantizer_::first, _scalar_quantizer_::imax, _scalar_quantizer_::imin, and vec_length().
Referenced by it_instanciate().
static vec trellis_coded_quantizer_dequantize | ( | it_quantizer_t * | it_this, | |
ivec | q | |||
) | [static] |
Definition at line 505 of file quantizer.c.
References _trellis_coded_quantizer_::code, _trellis_coded_quantizer_::coset_quantizers, it_cc_encode_symbolic, it_dequantize, IT_TRELLIS_CODED_QUANTIZER, ivec_delete(), ivec_length(), ivec_new(), and vec_new().
Referenced by it_instanciate().
static void trellis_coded_quantizer_destructor | ( | it_object_t * | it_this | ) | [static] |
Definition at line 439 of file quantizer.c.
References _trellis_coded_quantizer_::code, _trellis_coded_quantizer_::coset_quantizers, it_delete, _trellis_coded_quantizer_::it_overloaded(), IT_TRELLIS_CODED_QUANTIZER, and _convolutional_code_::n.
Referenced by it_instanciate().
static unsigned int trellis_coded_quantizer_get_cardinal | ( | it_quantizer_t * | it_this | ) | [static] |
Definition at line 539 of file quantizer.c.
References _trellis_coded_quantizer_::code, _trellis_coded_quantizer_::coset_quantizers, it_quantizer_get_cardinal, IT_TRELLIS_CODED_QUANTIZER, and _convolutional_code_::k.
Referenced by it_instanciate().
static ivec trellis_coded_quantizer_quantize | ( | it_quantizer_t * | it_this, | |
vec | v | |||
) | [static] |
Definition at line 456 of file quantizer.c.
References _trellis_coded_quantizer_::code, _trellis_coded_quantizer_::coset_quantizers, imat_delete(), imat_new(), it_cc_encode_symbolic, it_dequantize, it_quantize, IT_TRELLIS_CODED_QUANTIZER, it_viterbi_decode_symbolic(), ivec_delete(), ivec_new(), mat_delete(), mat_new(), _convolutional_code_::n_labels, and vec_length().
Referenced by it_instanciate().
static vec uniform_quantizer_get_codebook_range | ( | it_scalar_quantizer_t * | it_this, | |
int | s, | |||
int | e | |||
) | [static] |
Definition at line 334 of file quantizer.c.
References _scalar_quantizer_::codebook, _scalar_quantizer_::imax, _scalar_quantizer_::imin, it_scalar_quantizer_get_codebook_range, it_scalar_quantizer_scalar_dequantize, and vec_new().
Referenced by it_instanciate().
static double uniform_quantizer_scalar_dequantize | ( | it_scalar_quantizer_t * | it_this, | |
int | q | |||
) | [static] |
Definition at line 317 of file quantizer.c.
References it_quantizer_get_center, it_quantizer_get_deadzone_step, and it_quantizer_get_step.
Referenced by it_instanciate().
static int uniform_quantizer_scalar_quantize | ( | it_scalar_quantizer_t * | it_this, | |
double | v | |||
) | [static] |
Definition at line 292 of file quantizer.c.
References _scalar_quantizer_::imax, _scalar_quantizer_::imin, it_quantizer_get_center, it_quantizer_get_deadzone_step, it_quantizer_get_step, IT_UNIFORM_QUANTIZER, and min().
Referenced by it_instanciate().
static void uniform_quantizer_set_codebook | ( | it_scalar_quantizer_t * | it_this, | |
vec | codebook, | |||
int | first | |||
) | [static] |
static void uniform_quantizer_set_index_range | ( | it_scalar_quantizer_t * | q, | |
int | _imin, | |||
int | _imax | |||
) | [static] |
Definition at line 357 of file quantizer.c.
References _scalar_quantizer_::imax, _scalar_quantizer_::imin, it_dequantize, and IT_UNIFORM_QUANTIZER.
Referenced by it_instanciate().
|
|