quantizerf

Variants: quantizercf, quantizerf

Amplitude quantization object

Public Functions

quantizerf quantizerf_create(liquid_compander_type _ctype, float _range, unsigned int _num_bits)
int quantizerf_destroy(quantizerf _q)
int quantizerf_print(quantizerf _q)
int quantizerf_execute_adc(quantizerf _q, float _x, unsigned int * _s)
int quantizerf_execute_dac(quantizerf _q, unsigned int _s, float * _x)

Interfaces

quantizerf quantizerf_create(liquid_compander_type _ctype, float _range, unsigned int _num_bits)

Create quantizer object given compander type, input range, and the number of bits to represent the output

  • _ctype : compander type (linear, mulaw, alaw)
  • _range : maximum abosolute input range (ignored for now)
  • _num_bits : number of bits per sample

int quantizerf_destroy(quantizerf _q)

Destroy object, freeing all internally-allocated memory.

int quantizerf_print(quantizerf _q)

Print object properties to stdout, including compander type and number of bits per sample

int quantizerf_execute_adc(quantizerf _q, float _x, unsigned int * _s)

Execute quantizer as analog-to-digital converter, accepting input sample and returning digitized output bits

  • _q : quantizer object
  • _x : input sample
  • _s : output bits

int quantizerf_execute_dac(quantizerf _q, unsigned int _s, float * _x)

Execute quantizer as digital-to-analog converter, accepting input bits and returning representation of original input sample

  • _q : quantizer object
  • _s : input bits
  • _x : output sample