Edge AI Add-on API 2.2.0
Loading...
Searching...
No Matches

◆ nrf_dsp_quantize_f32_to_i16()

void nrf_dsp_quantize_f32_to_i16 ( const flt32_t * p_input,
int16_t * p_out,
uint16_t num )

#include <include/nrf_edgeai/dsp/support/nrf_dsp_quantization.h>

Quantize the elements of the floating-point vector to INT16 vector.

Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable INT16 range [0x8000 0x7FFF] are saturated.
Note
In order to apply rounding, the library should be rebuilt with the NRF_DSP_USE_MATH_ROUNDING macro
Parameters
[in]p_inputPoints to the floating-point input vector
[out]p_outPoints to the INT16 output vector
[in]numNumber of samples in each vector