quantizercf

Amplitude quantization object

Variants: quantizercf, quantizerf

Public Functions

quantizercf quantizercf_create(liquid_compander_type _ctype, float _range, unsigned int _num_bits)
int quantizercf_destroy(quantizercf _q)
int quantizercf_print(quantizercf _q)
int quantizercf_execute_adc(quantizercf _q, float complex _x, unsigned int * _s)
int quantizercf_execute_dac(quantizercf _q, unsigned int _s, float complex * _x)

Interfaces

quantizercf quantizercf_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 quantizercf_destroy(quantizercf _q)

Destroy object, freeing all internally-allocated memory.

int quantizercf_print(quantizercf _q)

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

int quantizercf_execute_adc(quantizercf _q, float complex _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 quantizercf_execute_dac(quantizercf _q, unsigned int _s, float complex * _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