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

Convert number Q7/Q15/Q31 to Float or Double representation with shift. More...

Functions

static float32_t zdsp_q7_to_f32_shift (q7_t src, uint32_t m)
 Convert a Q7 fixed-point value to a floating-point (float32_t) value with a left shift.
static float32_t zdsp_q15_to_f32_shift (q15_t src, uint32_t m)
 Convert a Q15 fixed-point value to a floating-point (float32_t) value with a left shift.
static float32_t zdsp_q31_to_f32_shift (q31_t src, uint32_t m)
 Convert a Q31 fixed-point value to a floating-point (float32_t) value with a left shift.
static float64_t zdsp_q7_to_f64_shift (q7_t src, uint32_t m)
 Convert a Q7 fixed-point value to a floating-point (float64_t) value with a left shift.
static float64_t zdsp_q15_to_f64_shift (q15_t src, uint32_t m)
 Convert a Q15 fixed-point value to a floating-point (float64_t) value with a left shift.
static float64_t zdsp_q31_to_f64_shift (q31_t src, uint32_t m)
 Convert a Q31 fixed-point value to a floating-point (float64_t) value with a left shift.

Detailed Description

Convert number Q7/Q15/Q31 to Float or Double representation with shift.

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

Function Documentation

◆ zdsp_q15_to_f32_shift()

float32_t zdsp_q15_to_f32_shift ( q15_t src,
uint32_t m )
inlinestatic

#include <zephyr/dsp/utils.h>

Convert a Q15 fixed-point value to a floating-point (float32_t) value with a left shift.

Parameters
srcThe input Q15 fixed-point value.
mThe number of bits to left shift the input value (0 to 15).
Returns
The converted floating-point (float32_t) value.

◆ zdsp_q15_to_f64_shift()

float64_t zdsp_q15_to_f64_shift ( q15_t src,
uint32_t m )
inlinestatic

#include <zephyr/dsp/utils.h>

Convert a Q15 fixed-point value to a floating-point (float64_t) value with a left shift.

Parameters
srcThe input Q15 fixed-point value.
mThe number of bits to left shift the input value (0 to 15).
Returns
The converted floating-point (float64_t) value.

◆ zdsp_q31_to_f32_shift()

float32_t zdsp_q31_to_f32_shift ( q31_t src,
uint32_t m )
inlinestatic

#include <zephyr/dsp/utils.h>

Convert a Q31 fixed-point value to a floating-point (float32_t) value with a left shift.

Parameters
srcThe input Q31 fixed-point value.
mThe number of bits to left shift the input value (0 to 31).
Returns
The converted floating-point (float32_t) value.

◆ zdsp_q31_to_f64_shift()

float64_t zdsp_q31_to_f64_shift ( q31_t src,
uint32_t m )
inlinestatic

#include <zephyr/dsp/utils.h>

Convert a Q31 fixed-point value to a floating-point (float64_t) value with a left shift.

Parameters
srcThe input Q31 fixed-point value.
mThe number of bits to left shift the input value (0 to 31).
Returns
The converted floating-point (float64_t) value.

◆ zdsp_q7_to_f32_shift()

float32_t zdsp_q7_to_f32_shift ( q7_t src,
uint32_t m )
inlinestatic

#include <zephyr/dsp/utils.h>

Convert a Q7 fixed-point value to a floating-point (float32_t) value with a left shift.

Parameters
srcThe input Q7 fixed-point value.
mThe number of bits to left shift the input value (0 to 7).
Returns
The converted floating-point (float32_t) value.

◆ zdsp_q7_to_f64_shift()

float64_t zdsp_q7_to_f64_shift ( q7_t src,
uint32_t m )
inlinestatic

#include <zephyr/dsp/utils.h>

Convert a Q7 fixed-point value to a floating-point (float64_t) value with a left shift.

Parameters
srcThe input Q7 fixed-point value.
mThe number of bits to left shift the input value (0 to 7).
Returns
The converted floating-point (float64_t) value.