Collaboration diagram for DSP_fltoq15:
void | DSP_fltoq15 (const float *restrict flt, short *restrict q15, int nx) |
void DSP_fltoq15 | ( | const float *restrict | flt, | |
short *restrict | q15, | |||
int | nx | |||
) |
Convert the IEEE floating point numbers stored in vector x[ ] into Q.15 format numbers stored in vector r[ ]. Results are truncated toward zero. Values that exceed the size limit will be saturated to 0x7fff if value is positive and 0x8000 if value is negative. All values too small to be correctly represented will be truncated to 0.
flt | = Pointer to floating-point input vector of size nx. x should contain the numbers normalized between [-1,1) | |
q15 | = Pointer to output data vector of size nx containing the Q.15 equivalent of vector x. | |
nx | = Length of input and output data vectors. Must be multiple of 2 |