Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Element-by-element clipping of a value. More...

Functions

DSP_FUNC_SCOPE void zdsp_clip_f32 (const DSP_DATA float32_t *src, DSP_DATA float32_t *dst, float32_t low, float32_t high, uint32_t num_samples)
 Elementwise floating-point clipping.
 
DSP_FUNC_SCOPE void zdsp_clip_q31 (const DSP_DATA q31_t *src, DSP_DATA q31_t *dst, q31_t low, q31_t high, uint32_t num_samples)
 Elementwise fixed-point clipping.
 
DSP_FUNC_SCOPE void zdsp_clip_q15 (const DSP_DATA q15_t *src, DSP_DATA q15_t *dst, q15_t low, q15_t high, uint32_t num_samples)
 Elementwise fixed-point clipping.
 
DSP_FUNC_SCOPE void zdsp_clip_q7 (const DSP_DATA q7_t *src, DSP_DATA q7_t *dst, q7_t low, q7_t high, uint32_t num_samples)
 Elementwise fixed-point clipping.
 
DSP_FUNC_SCOPE void zdsp_clip_f16 (const float16_t *src, float16_t *dst, float16_t low, float16_t high, uint32_t num_samples)
 Elementwise floating-point clipping.
 

Detailed Description

Element-by-element clipping of a value.

The value is constrained between 2 bounds.

There are separate functions for floating-point, Q7, Q15, and Q31 data types.

Function Documentation

◆ zdsp_clip_f16()

DSP_FUNC_SCOPE void zdsp_clip_f16 ( const float16_t src,
float16_t dst,
float16_t  low,
float16_t  high,
uint32_t  num_samples 
)

#include <zephyr/dsp/basicmath_f16.h>

Elementwise floating-point clipping.

Parameters
[in]srcpoints to input values
[out]dstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]num_samplesnumber of samples to clip

◆ zdsp_clip_f32()

DSP_FUNC_SCOPE void zdsp_clip_f32 ( const DSP_DATA float32_t src,
DSP_DATA float32_t dst,
float32_t  low,
float32_t  high,
uint32_t  num_samples 
)

#include <zephyr/dsp/basicmath.h>

Elementwise floating-point clipping.

Parameters
[in]srcpoints to input values
[out]dstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]num_samplesnumber of samples to clip

◆ zdsp_clip_q15()

DSP_FUNC_SCOPE void zdsp_clip_q15 ( const DSP_DATA q15_t src,
DSP_DATA q15_t dst,
q15_t  low,
q15_t  high,
uint32_t  num_samples 
)

#include <zephyr/dsp/basicmath.h>

Elementwise fixed-point clipping.

Parameters
[in]srcpoints to input values
[out]dstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]num_samplesnumber of samples to clip

◆ zdsp_clip_q31()

DSP_FUNC_SCOPE void zdsp_clip_q31 ( const DSP_DATA q31_t src,
DSP_DATA q31_t dst,
q31_t  low,
q31_t  high,
uint32_t  num_samples 
)

#include <zephyr/dsp/basicmath.h>

Elementwise fixed-point clipping.

Parameters
[in]srcpoints to input values
[out]dstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]num_samplesnumber of samples to clip

◆ zdsp_clip_q7()

DSP_FUNC_SCOPE void zdsp_clip_q7 ( const DSP_DATA q7_t src,
DSP_DATA q7_t dst,
q7_t  low,
q7_t  high,
uint32_t  num_samples 
)

#include <zephyr/dsp/basicmath.h>

Elementwise fixed-point clipping.

Parameters
[in]srcpoints to input values
[out]dstpoints to output clipped values
[in]lowlower bound
[in]highhigher bound
[in]num_samplesnumber of samples to clip