DSP_fltoq15
[Miscellaneous]

Collaboration diagram for DSP_fltoq15:


Detailed Description

void DSP_fltoq15 (const float *restrict flt, short *restrict q15, int nx)


Function Documentation

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.

Parameters:
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
Algorithm:
DSP_fltoq15_cn.c is the natural C equivalent of the optimized intrinsic C code without restrictions note that the intrinsic C code is optimized and restrictions may apply.
Assumptions:
nx must be a multiple of 4
Implementation notes:
Endian Support: The code supports both big and little endian modes.
Interruptibility: The code is interruptible.


Copyright 2014, Texas Instruments Incorporated