Functions
DSPF_fltoq15
Collaboration diagram for DSPF_fltoq15:

Functions

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

Detailed Description

Function Documentation

◆ DSPF_fltoq15()

void DSPF_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.

  @param flt = Pointer to floating-point input vector of size nx. 
              x should contain the numbers normalized between [-1,1)
  @param q15 = Pointer to output data vector of size nx containing the Q.15
              equivalent of vector x.
  @param nx  = Length of input and output data vectors. Must be multiple of 2
Algorithm:
DSPF_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 2
Implementation notes:
Endian Support: The code supports both big and little endian modes.
Interruptibility: The code is interruptible.

Copyright 2022, Texas Instruments Incorporated