LIBDSP Version 4.1.9
LIBDSP Software Library
Loading...
Searching...
No Matches
tpt_math_transform.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  tpt_mfcc_instance_q15
 Instance structure for the Q15 MFCC function. More...
struct  tpt_mfcc_instance_f32
 Instance structure for the Floating-point MFCC function. More...
struct  tpt_mfcc_instance_q31
 Instance structure for the Q31 MFCC function. More...

Macros

#define TPT_DSP_TABLE_ATTRIBUTE   = {64, null_f32, null_uint16, 0}

Enumerations

enum  tpt_math_target_arch { TPT_MATH_SCALAR_ARCH = 1 , TPT_MATH_DSP_EXTENSIONS_ARCH }
 Target architecture identification. More...
enum  tpt_math_datatype {
  TPT_MATH_F16 = 16 , TPT_MATH_F32 = 32 , TPT_MATH_F64 = 64 , TPT_MATH_Q7 = 7 ,
  TPT_MATH_Q15 = 15 , TPT_MATH_Q31 = 31
}
 Data type identification. More...

Functions

tpt_status tpt_cfft_forward_f16 (f16_t *aInPlace, f16_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
tpt_status tpt_cfft_inverse_f16 (f16_t *aInPlace, f16_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
static tpt_status tpt_cfft_f16 (f16_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_cfft_forward_f32 (f32_t *aInPlace, f32_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
tpt_status tpt_cfft_inverse_f32 (f32_t *aInPlace, f32_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
static tpt_status tpt_cfft_f32 (f32_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_cfft_forward_f64 (f64_t *aInPlace, f64_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
tpt_status tpt_cfft_inverse_f64 (f64_t *aInPlace, f64_t *aScratch, size_t aLogN)
 Processing function for the floating-point complex FFT.
static tpt_status tpt_cfft_f64 (f64_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_cfft_forward_q15 (q15_t *aInPlace, q15_t *aScratch, size_t aLogN)
 Processing function for the Q15 complex FFT.
tpt_status tpt_cfft_inverse_q15 (q15_t *aInPlace, q15_t *aScratch, size_t aLogN)
 Processing function for the Q15 complex FFT.
static tpt_status tpt_cfft_q15 (q15_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_cfft_forward_q31 (q31_t *aInPlace, q31_t *aScratch, size_t aLogN)
 Processing function for the Q31 complex FFT.
tpt_status tpt_cfft_inverse_q31 (q31_t *aInPlace, q31_t *aScratch, size_t aLogN)
 Processing function for the Q31 complex FFT.
static tpt_status tpt_cfft_q31 (q31_t *aInPlace, size_t aLogN, bool aIfftFlag)
tpt_status tpt_dct2_forward_f16 (f16_t *aOutData, f16_t *aInData, f16_t *aScratch, size_t aLogN)
 Processing function for the floating-point DCT2.
tpt_status tpt_dct2_inverse_f16 (f16_t *aOutData, f16_t *aInData, f16_t *aScratch, size_t aLogN)
static tpt_status tpt_dct2_f16 (f16_t *aOutData, f16_t *aInData, f16_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct2_forward_f32 (f32_t *aOutData, f32_t *aInData, f32_t *aScratch, size_t aLogN)
 Processing function for the floating-point DCT2.
tpt_status tpt_dct2_inverse_f32 (f32_t *aOutData, f32_t *aInData, f32_t *aScratch, size_t aLogN)
static tpt_status tpt_dct2_f32 (f32_t *aOutData, f32_t *aInData, f32_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct2_forward_f64 (f64_t *aOutData, f64_t *aInData, f64_t *aScratch, size_t aLogN)
 Processing function for the floating-point DCT2.
tpt_status tpt_dct2_inverse_f64 (f64_t *aOutData, f64_t *aInData, f64_t *aScratch, size_t aLogN)
static tpt_status tpt_dct2_f64 (f64_t *aOutData, f64_t *aInData, f64_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct2_forward_q15 (q15_t *aOutData, q15_t *aInData, q15_t *aScratch, size_t aLogN)
 Processing function for the Q15 DCT2.
tpt_status tpt_dct2_inverse_q15 (q15_t *aOutData, q15_t *aInData, q15_t *aScratch, size_t aLogN)
static tpt_status tpt_dct2_q15 (q15_t *aOutData, q15_t *aInData, q15_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct2_forward_q31 (q31_t *aOutData, q31_t *aInData, q31_t *aScratch, size_t aLogN)
 Processing function for the Q31 DCT2.
tpt_status tpt_dct2_inverse_q31 (q31_t *aOutData, q31_t *aInData, q31_t *aScratch, size_t aLogN)
static tpt_status tpt_dct2_q31 (q31_t *aOutData, q31_t *aInData, q31_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct3_forward_f16 (f16_t *aOutData, f16_t *aInData, f16_t *aScratch, size_t aLogN)
 Processing function for the floating-point DCT3.
tpt_status tpt_dct3_inverse_f16 (f16_t *aOutData, f16_t *aInData, f16_t *aScratch, size_t aLogN)
static tpt_status tpt_dct3_f16 (f16_t *aOutData, f16_t *aInData, f16_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct3_forward_f32 (f32_t *aOutData, f32_t *aInData, f32_t *aScratch, size_t aLogN)
 Processing function for the floating-point DCT3.
tpt_status tpt_dct3_inverse_f32 (f32_t *aOutData, f32_t *aInData, f32_t *aScratch, size_t aLogN)
static tpt_status tpt_dct3_f32 (f32_t *aOutData, f32_t *aInData, f32_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct3_forward_f64 (f64_t *aOutData, f64_t *aInData, f64_t *aScratch, size_t aLogN)
 Processing function for the floating-point DCT3.
tpt_status tpt_dct3_inverse_f64 (f64_t *aOutData, f64_t *aInData, f64_t *aScratch, size_t aLogN)
static tpt_status tpt_dct3_f64 (f64_t *aOutData, f64_t *aInData, f64_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct3_forward_q15 (q15_t *aOutData, q15_t *aInData, q15_t *aScratch, size_t aLogN)
 Processing function for the Q15 DCT3.
tpt_status tpt_dct3_inverse_q15 (q15_t *aOutData, q15_t *aInData, q15_t *aScratch, size_t aLogN)
static tpt_status tpt_dct3_q15 (q15_t *aOutData, q15_t *aInData, q15_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct3_forward_q31 (q31_t *aOutData, q31_t *aInData, q31_t *aScratch, size_t aLogN)
 Processing function for the Q31 DCT3.
tpt_status tpt_dct3_inverse_q31 (q31_t *aOutData, q31_t *aInData, q31_t *aScratch, size_t aLogN)
static tpt_status tpt_dct3_q31 (q31_t *aOutData, q31_t *aInData, q31_t *aScratch, size_t aLogN, bool aIdctFlag)
tpt_status tpt_dct4_f16 (f16_t *aInPlace, f16_t *aScratch, size_t aLogN, bool aIdctFlag)
 Processing function for the floating-point DCT4.
tpt_status tpt_dct4_f32 (f32_t *aInPlace, f32_t *aScratch, size_t aLogN, bool aIdctFlag)
 Processing function for the floating-point DCT4.
tpt_status tpt_dct4_f64 (f64_t *aInPlace, f64_t *aScratch, size_t aLogN, bool aIdctFlag)
 Processing function for the floating-point DCT4.
tpt_status tpt_dct4_q15 (q15_t *aInPlace, q15_t *aScratch, size_t aLogN, bool aIdctFlag)
 Processing function for the Q15 DCT4.
tpt_status tpt_dct4_q31 (q31_t *aInPlace, q31_t *aScratch, size_t aLogN, bool aIdctFlag)
 Processing function for the Q31 DCT4.
tpt_status tpt_mdct_f32 (f32_t *aOutData, f32_t *aInData, size_t aLogN, bool aImdctFlag)
 Processing function for the floating-point MDCT. Source buffer is modified by this function.
tpt_status tpt_mdct_q15 (q15_t *aOutData, q15_t *aInData, size_t aLogN, bool aImdctFlag)
 Processing function for the Q15 MDCT. Source buffer is modified by this function.
tpt_status tpt_mdct_q31 (q31_t *aOutData, q31_t *aInData, size_t aLogN, bool aImdctFlag)
 Processing function for the Q31 MDCT. Source buffer is modified by this function.
void tpt_mdct12_f32 (f32_t *aOutData, const f32_t *aInData)
 Processing function for the floating-point 12-point MDCT.
void tpt_mdct12_q15 (q4_11_t *aOutData, const q15_t *aInData)
 Processing function for the Q15 12-point MDCT.
void tpt_mdct12_q31 (q4_27_t *aOutData, const q31_t *aInData)
 Processing function for the Q31 12-point MDCT.
void tpt_imdct12_f32 (f32_t *aOutData, const f32_t *aInData)
 Processing function for the floating-point 12-point IMDCT.
void tpt_imdct12_q15 (q3_12_t *aOutData, const q15_t *aInData)
 Processing function for the Q15 12-point IMDCT.
void tpt_imdct12_q31 (q3_28_t *aOutData, const q31_t *aInData)
 Processing function for the Q31 12-point IMDCT.
void tpt_mdct36_f32 (f32_t *aOutData, const f32_t *aInData)
 Processing function for the floating-point 36-point MDCT.
void tpt_mdct36_q15 (q6_9_t *aOutData, const q15_t *aInData)
 Processing function for the Q15 36-point MDCT.
void tpt_mdct36_q31 (q6_25_t *aOutData, const q31_t *aInData)
 Processing function for the Q31 36-point MDCT.
void tpt_imdct36_f32 (f32_t *aOutData, const f32_t *aInData)
 Processing function for the floating-point 36-point IMDCT.
void tpt_imdct36_q15 (q5_10_t *aOutData, const q15_t *aInData)
 Processing function for the Q31 36-point IMDCT.
void tpt_imdct36_q31 (q5_26_t *aOutData, const q31_t *aInData)
 Processing function for the Q31 36-point IMDCT.
tpt_status tpt_rfft_forward_f16 (f16_t *aOutData, f16_t *aInData, size_t aLogN)
 Processing function for the floating-point RFFT/RIFFT.
tpt_status tpt_rfft_inverse_f16 (f16_t *aOutData, f16_t *aInData, size_t aLogN)
static tpt_status tpt_rfft_f16 (f16_t *aOutData, f16_t *aInData, size_t aLogN, bool aIfftFlag)
tpt_status tpt_rfft_forward_f32 (f32_t *aOutData, f32_t *aInData, size_t aLogN)
 Processing function for the floating-point RFFT/RIFFT.
tpt_status tpt_rfft_inverse_f32 (f32_t *aOutData, f32_t *aInData, size_t aLogN)
static tpt_status tpt_rfft_f32 (f32_t *aOutData, f32_t *aInData, size_t aLogN, bool aIfftFlag)
tpt_status tpt_rfft_forward_f64 (f64_t *aOutData, f64_t *aInData, size_t aLogN)
 Processing function for the floating-point RFFT/RIFFT.
tpt_status tpt_rfft_inverse_f64 (f64_t *aOutData, f64_t *aInData, size_t aLogN)
static tpt_status tpt_rfft_f64 (f64_t *aOutData, f64_t *aInData, size_t aLogN, bool aIfftFlag)
tpt_status tpt_rfft_forward_q15 (q15_t *aOutData, q15_t *aInData, size_t aLogN)
 Processing function for the Q15 RFFT/RIFFT.
tpt_status tpt_rfft_inverse_q15 (q15_t *aOutData, q15_t *aInData, size_t aLogN)
static tpt_status tpt_rfft_q15 (q15_t *aOutData, q15_t *aInData, size_t aLogN, bool aIfftFlag)
tpt_status tpt_rfft_forward_q31 (q31_t *aOutData, q31_t *aInData, size_t aLogN)
 Processing function for the Q31 RFFT/RIFFT.
tpt_status tpt_rfft_inverse_q31 (q31_t *aOutData, q31_t *aInData, size_t aLogN)
static tpt_status tpt_rfft_q31 (q31_t *aOutData, q31_t *aInData, size_t aLogN, bool aIfftFlag)
void tpt_mfcc_f32 (f32_t *aOutData, const tpt_mfcc_instance_f32 *aFliter, f32_t *aInData, f32_t *aTmp)
 Compute the MFCC features from an input frame.
tpt_status tpt_mfcc_q15 (q15_t *aOutData, const tpt_mfcc_instance_q15 *aFliter, q15_t *aInData, q31_t *aTmp)
 Compute the MFCC features from an input frame.
tpt_status tpt_mfcc_q31 (q31_t *aOutData, const tpt_mfcc_instance_q31 *aFliter, q31_t *aInData, q31_t *aTmp)
 Compute the MFCC features from an input frame.
tpt_status tpt_mfcc_init_q15 (tpt_mfcc_instance_q15 *S, uint32_t aLogN, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q15_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q15_t *filterCoefs, const q15_t *windowCoefs)
 Instance structure for the Q15 MFCC function.
tpt_status tpt_mfcc_init_q31 (tpt_mfcc_instance_q31 *S, uint32_t aLogN, uint32_t nbMelFilters, uint32_t nbDctOutputs, const q31_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const q31_t *filterCoefs, const q31_t *windowCoefs)
 Instance structure for the Q31 MFCC function.
tpt_status tpt_mfcc_init_f32 (tpt_mfcc_instance_f32 *S, uint32_t fftLen, uint32_t nbMelFilters, uint32_t nbDctOutputs, const f32_t *dctCoefs, const uint32_t *filterPos, const uint32_t *filterLengths, const f32_t *filterCoefs, const f32_t *windowCoefs)
 Instance structure for the F32 MFCC function.
int32_t tpt_cfft_tmp_buffer_size (tpt_math_target_arch arch, tpt_math_datatype dt, uint32_t nb_samples, uint32_t buf_id)
 Calculate required length for the temporary buffer.
int32_t tpt_cfft_output_buffer_size (tpt_math_target_arch arch, tpt_math_datatype dt, uint32_t nb_samples)
 Calculate required length for the output buffer.
int32_t tpt_cifft_output_buffer_size (tpt_math_target_arch arch, tpt_math_datatype dt, uint32_t nb_samples)
 Calculate required length for the output buffer.
int32_t tpt_rfft_tmp_buffer_size (tpt_math_target_arch arch, tpt_math_datatype dt, uint32_t nb_samples, uint32_t buf_id)
 Calculate required length for the temporary buffer for both RFFT and RIFFT.
int32_t tpt_rfft_output_buffer_size (tpt_math_target_arch arch, tpt_math_datatype dt, uint32_t nb_samples)
 Calculate required length for the output buffer.
int32_t tpt_rifft_input_buffer_size (tpt_math_target_arch arch, tpt_math_datatype dt, uint32_t nb_samples)
 Calculate required length for the input buffer.
int32_t tpt_mfcc_tmp_buffer_size (tpt_math_target_arch arch, tpt_math_datatype dt, uint32_t nb_samples, uint32_t buf_id, uint32_t use_cfft)
 Calculate required length for the temporary buffer.

Macro Definition Documentation

◆ TPT_DSP_TABLE_ATTRIBUTE

const riscv_cfft_instance_q31 riscv_cfft_sR_q31_len4096 TPT_DSP_TABLE_ATTRIBUTE   = {64, null_f32, null_uint16, 0}

Function Documentation

◆ tpt_mfcc_f32()

void tpt_mfcc_f32 ( f32_t * aOutData,
const tpt_mfcc_instance_f32 * aFliter,
f32_t * aInData,
f32_t * aTmp )

Compute the MFCC features from an input frame.

Parameters
[out]aOutDatapoints to the output vector
[in]aFliterpoints to the filter instance
[in]aInDatapoints to the input vector
[in]aTmppoints to the temporary buffer
Returns
none

◆ tpt_mfcc_q15()

tpt_status tpt_mfcc_q15 ( q15_t * aOutData,
const tpt_mfcc_instance_q15 * aFliter,
q15_t * aInData,
q31_t * aTmp )

Compute the MFCC features from an input frame.

Parameters
[out]aOutDatapoints to the output vector
[in]aFliterpoints to the filter instance
[in]aInDatapoints to the input vector
[in]aTmppoints to the temporary buffer
Returns
tpt_status

◆ tpt_mfcc_q31()

tpt_status tpt_mfcc_q31 ( q31_t * aOutData,
const tpt_mfcc_instance_q31 * aFliter,
q31_t * aInData,
q31_t * aTmp )

Compute the MFCC features from an input frame.

Parameters
[out]aOutDatapoints to the output vector
[in]aFliterpoints to the filter instance
[in]aInDatapoints to the input vector
[in]aTmppoints to the temporary buffer
Returns
tpt_status