Edge AI Add-on API 2.3.0
Loading...
Searching...
No Matches
nrf_dsp_scale_minmax.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
15#ifndef _NRF_DSP_SUPPORT_SCALE_MINMAX_H_
16#define _NRF_DSP_SUPPORT_SCALE_MINMAX_H_
17
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
34 uint16_t num,
35 const flt32_t min,
36 const flt32_t max,
37 flt32_t *p_output);
38
50void nrf_dsp_scale_minmax_i8(const int8_t *p_input,
51 uint16_t num,
52 const int8_t min,
53 const int8_t max,
54 int8_t *p_output);
55
67void nrf_dsp_scale_minmax_i16(const int16_t *p_input,
68 uint16_t num,
69 const int16_t min,
70 const int16_t max,
71 int16_t *p_output);
72
82#define nrf_dsp_scale_minmax_int_q(var, qfactor, min, max) \
83 (((int32_t)(var - min) * qfactor) / (max - min))
84
93#define nrf_dsp_scale_minmax_float(var, min, max) ((flt32_t)(var - min) / (max - min))
94
104#define nrf_dsp_scale_minmax_float_q(var, qfactor, min, max) (((var - min) * qfactor) / (max - min))
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif /* _NRF_DSP_SUPPORT_SCALE_MINMAX_H_ */
111
void nrf_dsp_scale_minmax_i16(const int16_t *p_input, uint16_t num, const int16_t min, const int16_t max, int16_t *p_output)
Min-Max scaling of the INT16 vector ( y = (x - min) / (max - min) )
void nrf_dsp_scale_minmax_i8(const int8_t *p_input, uint16_t num, const int8_t min, const int8_t max, int8_t *p_output)
Min-Max scaling of the INT8 vector ( y = (x - min) / (max - min) )
void nrf_dsp_scale_minmax_f32(const flt32_t *p_input, uint16_t num, const flt32_t min, const flt32_t max, flt32_t *p_output)
Min-Max scaling of the floating-point vector ( y = (x - min) / (max - min) )
float flt32_t
32-bit floating-point type definition.
Definition nrf_edgeai_ctypes.h:21