LIBDSP Version 4.1.9
LIBDSP Software Library
Loading...
Searching...
No Matches
Convert 32-bit floating point value
Collaboration diagram for Convert 32-bit floating point value:

Functions

void tpt_f32_to_q15 (q15_t *aOutData, const f32_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q15 vector.
void tpt_f32_to_q7 (q7_t *aOutData, const f32_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q7 vector.
void tpt_f32_to_f64 (f64_t *pDst, const f32_t *pSrc, uint32_t blockSize)
 Converts the elements of the floating-point vector to f64 vector.
void tpt_f32_to_q31 (q31_t *aOutData, const f32_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q31 vector.
void tpt_f64_to_q15 (q15_t *aOutData, const f64_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q15 vector.
void tpt_f64_to_q31 (q31_t *aOutData, const f64_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q31 vector.
void tpt_f64_to_q7 (q7_t *aOutData, const f64_t *aInData, uint32_t aCount)
 Converts the elements of the floating-point vector to Q7 vector.

Detailed Description

Function Documentation

◆ tpt_f32_to_f64()

void tpt_f32_to_f64 ( f64_t * pDst,
const f32_t * pSrc,
uint32_t blockSize )

Converts the elements of the floating-point vector to f64 vector.

Converts the elements of the floating-point vector to 64 bit floating-point vector.

Parameters
[in]pSrcpoints to the f32 input vector
[out]pDstpoints to the f64 output vector
[in]blockSizenumber of samples in each vector

◆ tpt_f32_to_q15()

void tpt_f32_to_q15 ( q15_t * aOutData,
const f32_t * aInData,
uint32_t aCount )

Converts the elements of the floating-point vector to Q15 vector.

Parameters
[out]aOutDatapoints to the Q15 output vector
[in]aInDatapoints to the floating-point input vector
[in]aCountnumber of samples in each vector
Returns
none
Details
The equation used for the conversion process is:
   aOutData[n] = (q15_t)(aInData[n] * 32768);   0 <= n < aCount.
 
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] are saturated.

◆ tpt_f32_to_q31()

void tpt_f32_to_q31 ( q31_t * aOutData,
const f32_t * aInData,
uint32_t aCount )

Converts the elements of the floating-point vector to Q31 vector.

Parameters
[out]aOutDatapoints to the Q31 output vector
[in]aInDatapoints to the floating-point input vector
[in]aCountnumber of samples in each vector
Returns
none
Details
The equation used for the conversion process is:
    aOutData[n] = (q31_t)(aInData[n] * 2147483648);   0 <= n < aCount.
  
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q31 range[0x80000000 0x7FFFFFFF] are saturated.

◆ tpt_f32_to_q7()

void tpt_f32_to_q7 ( q7_t * aOutData,
const f32_t * aInData,
uint32_t aCount )

Converts the elements of the floating-point vector to Q7 vector.

Parameters
[out]aOutDatapoints to the Q7 output vector
[in]aInDatapoints to the floating-point input vector
[in]aCountlength of the input vector
Returns
none.
Description:
The equation used for the conversion process is:
    aOutData[n] = (q7_t)(aInData[n] * 128);   0 <= n < aCount.
  
Scaling and Overflow Behavior:
The function uses saturating arithmetic. Results outside of the allowable Q7 range [0x80 0x7F] will be saturated.

◆ tpt_f64_to_q15()

void tpt_f64_to_q15 ( q15_t * aOutData,
const f64_t * aInData,
uint32_t aCount )

Converts the elements of the floating-point vector to Q15 vector.

Parameters
[out]aOutDatapoints to the Q15 output vector
[in]aInDatapoints to the floating-point input vector
[in]aCountnumber of samples in each vector
Returns
none
Details
The equation used for the conversion process is:
   aOutData[n] = (q15_t)(aInData[n] * 32768);   0 <= n < aCount.
 
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q15 range [0x8000 0x7FFF] are saturated.

◆ tpt_f64_to_q31()

void tpt_f64_to_q31 ( q31_t * aOutData,
const f64_t * aInData,
uint32_t aCount )

Converts the elements of the floating-point vector to Q31 vector.

Converts the elements of the 64 bit floating-point vector to Q31 vector.

Parameters
[out]aOutDatapoints to the Q31 output vector
[in]aInDatapoints to the floating-point input vector
[in]aCountnumber of samples in each vector
Returns
none
Details
The equation used for the conversion process is:
    aOutData[n] = (q31_t)(aInData[n] * 2147483648);   0 <= n < aCount.
  
Scaling and Overflow Behavior
The function uses saturating arithmetic. Results outside of the allowable Q31 range[0x80000000 0x7FFFFFFF] are saturated.

◆ tpt_f64_to_q7()

void tpt_f64_to_q7 ( q7_t * aOutData,
const f64_t * aInData,
uint32_t aCount )

Converts the elements of the floating-point vector to Q7 vector.

Converts the elements of the 64 bit floating-point vector to Q7 vector.

Parameters
[out]aOutDatapoints to the Q7 output vector
[in]aInDatapoints to the floating-point input vector
[in]aCountlength of the input vector
Returns
none.
Description:
The equation used for the conversion process is:
    aOutData[n] = (q7_t)(aInData[n] * 128);   0 <= n < aCount.
  
Scaling and Overflow Behavior:
The function uses saturating arithmetic. Results outside of the allowable Q7 range [0x80 0x7F] will be saturated.