| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401 |
- #ifndef _REF_H
- #define _REF_H
- #include <math.h>
- #include <stdint.h>
- #include "arm_math.h"
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- #ifndef PI
- #define PI 3.14159265358979f
- #endif
- /**
- * @brief 8-bit fractional data type in 1.7 format.
- */
- // typedef int8_t q7_t;
- /**
- * @brief 16-bit fractional data type in 1.15 format.
- */
- // typedef int16_t q15_t;
- /**
- * @brief 32-bit fractional data type in 1.31 format.
- */
- // typedef int32_t q31_t;
- /**
- * @brief 64-bit fractional data type in 1.63 format.
- */
- // typedef int64_t q63_t;
- /**
- * @brief 32-bit floating-point type definition.
- */
- // typedef float float32_t;
- /**
- * @brief 64-bit floating-point type definition.
- */
- // typedef double float64_t;
- /**
- * @brief Error status returned by some functions in the library.
- */
- typedef enum
- {
- REF_Q7 = 0,
- REF_Q15,
- REF_Q31,
- REF_F32,
- } dataType;
- #ifndef FLT_MAX
- #define FLT_MAX 3.40282347e+38F
- #endif
- #define DBL_MAX 1.79769313486231571e+308
- #ifndef FLT_MIN
- #define FLT_MIN 1.175494351e-38F
- #endif
- #define DBL_MIN 2.22507385850720138e-308
- #define SCHAR_MIN (-128)
- /* mimimum value for an object of type signed char */
- #define SCHAR_MAX 127
- /* maximum value for an object of type signed char */
- #define UCHAR_MAX 255
- /* maximum value for an object of type unsigned char */
- #define SHRT_MIN (-0x8000)
- /* minimum value for an object of type short int */
- #define SHRT_MAX 0x7fff
- /* maximum value for an object of type short int */
- #define USHRT_MAX 65535
- /* maximum value for an object of type unsigned short int */
- #define INT_MIN (~0x7fffffff) /* -2147483648 and 0x80000000 are unsigned */
- /* minimum value for an object of type int */
- #define INT_MAX 0x7fffffff
- /* maximum value for an object of type int */
- #define UINT_MAX 0xffffffffU
- /* maximum value for an object of type unsigned int */
- #define LONG_MIN (~0x7fffffffL)
- /* minimum value for an object of type long int */
- #define LONG_MAX 0x7fffffffL
- /* maximum value for an object of type long int */
- #define ULONG_MAX 0xffffffffUL
- /* maximum value for an object of type unsigned long int */
- /*
- * Ref Lib Global Variables
- */
- extern float32_t scratchArray[];
- extern arm_cfft_instance_f32 ref_cfft_sR_f32_len8192;
- /*
- * Ref Lib Functions
- */
- /*
- * Helper Functions
- */
- q31_t ref_sat_n(q31_t num, uint32_t bits);
- q31_t ref_sat_q31(q63_t num);
- q15_t ref_sat_q15(q31_t num);
- q7_t ref_sat_q7(q15_t num);
- float32_t ref_pow(float32_t a, uint32_t b);
- extern float32_t tempMatrixArray[];
- float32_t ref_detrm(float32_t *pSrc, float32_t *temp, uint32_t size);
- void ref_cofact(float32_t *pSrc, float32_t *pDst, float32_t *temp, uint32_t size);
- float64_t ref_detrm64(float64_t *pSrc, float64_t *temp, uint32_t size);
- void ref_cofact64(float64_t *pSrc, float64_t *pDst, float64_t *temp, uint32_t size);
- /*
- * Basic Math Functions
- */
- void ref_abs_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_abs_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_abs_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_abs_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_add_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_add_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_add_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_add_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_dot_prod_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- uint32_t blockSize,
- float32_t * result);
- void ref_dot_prod_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- uint32_t blockSize,
- q63_t * result);
- void ref_dot_prod_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- uint32_t blockSize,
- q63_t * result);
- void ref_dot_prod_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- uint32_t blockSize,
- q31_t * result);
- void ref_mult_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_mult_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_mult_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_mult_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_negate_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_negate_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_negate_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_negate_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_offset_f32(
- float32_t * pSrc,
- float32_t offset,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_offset_q31(
- q31_t * pSrc,
- q31_t offset,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_offset_q15(
- q15_t * pSrc,
- q15_t offset,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_offset_q7(
- q7_t * pSrc,
- q7_t offset,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_scale_f32(
- float32_t * pSrc,
- float32_t scale,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_scale_q31(
- q31_t * pSrc,
- q31_t scaleFract,
- int8_t shift,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_scale_q15(
- q15_t * pSrc,
- q15_t scaleFract,
- int8_t shift,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_scale_q7(
- q7_t * pSrc,
- q7_t scaleFract,
- int8_t shift,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_shift_q31(
- q31_t * pSrc,
- int8_t shiftBits,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_shift_q15(
- q15_t * pSrc,
- int8_t shiftBits,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_shift_q7(
- q7_t * pSrc,
- int8_t shiftBits,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_sub_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_sub_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_sub_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_sub_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
- /*
- * Complex Math Functions
- */
- void ref_cmplx_conj_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_conj_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_conj_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_dot_prod_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- uint32_t numSamples,
- float32_t * realResult,
- float32_t * imagResult);
- void ref_cmplx_dot_prod_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- uint32_t numSamples,
- q63_t * realResult,
- q63_t * imagResult);
- void ref_cmplx_dot_prod_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- uint32_t numSamples,
- q31_t * realResult,
- q31_t * imagResult);
- void ref_cmplx_mag_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mag_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mag_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mag_squared_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mag_squared_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mag_squared_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mult_cmplx_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mult_cmplx_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mult_cmplx_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t numSamples);
- void ref_cmplx_mult_real_f32(
- float32_t * pSrcCmplx,
- float32_t * pSrcReal,
- float32_t * pCmplxDst,
- uint32_t numSamples);
- void ref_cmplx_mult_real_q31(
- q31_t * pSrcCmplx,
- q31_t * pSrcReal,
- q31_t * pCmplxDst,
- uint32_t numSamples);
- void ref_cmplx_mult_real_q15(
- q15_t * pSrcCmplx,
- q15_t * pSrcReal,
- q15_t * pCmplxDst,
- uint32_t numSamples);
- /*
- * Controller Functions
- */
- void ref_sin_cos_f32(
- float32_t theta,
- float32_t * pSinVal,
- float32_t * pCosVal);
- void ref_sin_cos_q31(
- q31_t theta,
- q31_t * pSinVal,
- q31_t * pCosVal);
- float32_t ref_pid_f32(
- arm_pid_instance_f32 * S,
- float32_t in);
- q31_t ref_pid_q31(
- arm_pid_instance_q31 * S,
- q31_t in);
- q15_t ref_pid_q15(
- arm_pid_instance_q15 * S,
- q15_t in);
- /*
- * Fast Math Functions
- */
- #define ref_sin_f32(a) sinf(a)
- q31_t ref_sin_q31(q31_t x);
- q15_t ref_sin_q15(q15_t x);
- #define ref_cos_f32(a) cosf(a)
- q31_t ref_cos_q31(q31_t x);
- q15_t ref_cos_q15(q15_t x);
- arm_status ref_sqrt_q31(q31_t in, q31_t * pOut);
- arm_status ref_sqrt_q15(q15_t in, q15_t * pOut);
- /*
- * Filtering Functions
- */
- void ref_biquad_cascade_df2T_f32(
- const arm_biquad_cascade_df2T_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
- void ref_biquad_cascade_stereo_df2T_f32(
- const arm_biquad_cascade_stereo_df2T_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
- void ref_biquad_cascade_df2T_f64(
- const arm_biquad_cascade_df2T_instance_f64 * S,
- float64_t * pSrc,
- float64_t * pDst,
- uint32_t blockSize);
- void ref_biquad_cascade_df1_f32(
- const arm_biquad_casd_df1_inst_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
-
- void ref_biquad_cas_df1_32x64_q31(
- const arm_biquad_cas_df1_32x64_ins_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_biquad_cascade_df1_q31(
- const arm_biquad_casd_df1_inst_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_biquad_cascade_df1_fast_q31(
- const arm_biquad_casd_df1_inst_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_biquad_cascade_df1_fast_q15(
- const arm_biquad_casd_df1_inst_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_biquad_cascade_df1_q15(
- const arm_biquad_casd_df1_inst_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_conv_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst);
- arm_status ref_conv_partial_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- void ref_conv_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
- void ref_conv_fast_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
- arm_status ref_conv_partial_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- arm_status ref_conv_partial_fast_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- void ref_conv_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
- #define ref_conv_opt_q15(pSrcA, srcALen, pSrcB, srcBLen, pDst, \
- pScratch1, pScratch2) \
- ref_conv_q15(pSrcA, srcALen, pSrcB, srcBLen, pDst)
- void ref_conv_fast_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
-
- void ref_conv_fast_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch1,
- q15_t * pScratch2);
- arm_status ref_conv_partial_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- #define ref_conv_partial_opt_q15(pSrcA, srcALen, pSrcB, srcBLen, pDst, \
- firstIndex, numPoints, \
- pScratch1, pScratch2) \
- ref_conv_partial_q15(pSrcA, srcALen, pSrcB, srcBLen, pDst, \
- firstIndex, numPoints)
- arm_status ref_conv_partial_fast_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
-
- arm_status ref_conv_partial_fast_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints,
- q15_t * pScratch1,
- q15_t * pScratch2);
- void ref_conv_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst);
- #define ref_conv_opt_q7(pSrcA, srcALen, pSrcB, srcBLen, pDst, \
- pScratch1, pScratch2) \
- ref_conv_q7(pSrcA, srcALen, pSrcB, srcBLen, pDst)
- arm_status ref_conv_partial_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- #define ref_conv_partial_opt_q7(pSrcA, srcALen, pSrcB, srcBLen, pDst, \
- firstIndex, numPoints, \
- pScratch1, pScratch2) \
- ref_conv_partial_q7(pSrcA, srcALen, pSrcB, srcBLen, pDst, \
- firstIndex, numPoints)
- void ref_correlate_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst);
- void ref_correlate_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
- void ref_correlate_fast_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
- void ref_correlate_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
- #define ref_correlate_opt_q15(pSrcA, srcALen, pSrcB, srcBLen, pDst, \
- pScratch1) \
- ref_correlate_q15(pSrcA, srcALen, pSrcB, srcBLen, pDst)
- void ref_correlate_fast_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
- void ref_correlate_fast_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch);
-
- void ref_correlate_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst);
- #define ref_correlate_opt_q7(pSrcA, srcALen, pSrcB, srcBLen, pDst, \
- pScratch1, pScratch2) \
- ref_correlate_q7(pSrcA, srcALen, pSrcB, srcBLen, pDst)
- void ref_fir_f32(
- const arm_fir_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_fir_q31(
- const arm_fir_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_fir_fast_q31(
- const arm_fir_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_fir_q15(
- const arm_fir_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_fir_fast_q15(
- const arm_fir_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_fir_q7(
- const arm_fir_instance_q7 * S,
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_fir_decimate_f32(
- const arm_fir_decimate_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_fir_decimate_q31(
- const arm_fir_decimate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_fir_decimate_fast_q31(
- const arm_fir_decimate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_fir_decimate_q15(
- const arm_fir_decimate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_fir_decimate_fast_q15(
- const arm_fir_decimate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_fir_lattice_f32(
- const arm_fir_lattice_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_fir_lattice_q31(
- const arm_fir_lattice_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_fir_lattice_q15(
- const arm_fir_lattice_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_fir_sparse_f32(
- arm_fir_sparse_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- float32_t * pScratchIn,
- uint32_t blockSize);
- void ref_fir_sparse_q31(
- arm_fir_sparse_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- q31_t * pScratchIn,
- uint32_t blockSize);
- void ref_fir_sparse_q15(
- arm_fir_sparse_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- q15_t * pScratchIn,
- q31_t * pScratchOut,
- uint32_t blockSize);
- void ref_fir_sparse_q7(
- arm_fir_sparse_instance_q7 * S,
- q7_t *pSrc,
- q7_t *pDst,
- q7_t *pScratchIn,
- q31_t * pScratchOut,
- uint32_t blockSize);
- void ref_iir_lattice_f32(
- const arm_iir_lattice_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_iir_lattice_q31(
- const arm_iir_lattice_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_iir_lattice_q15(
- const arm_iir_lattice_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_lms_f32(
- const arm_lms_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pRef,
- float32_t * pOut,
- float32_t * pErr,
- uint32_t blockSize);
- void ref_lms_norm_f32(
- arm_lms_norm_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pRef,
- float32_t * pOut,
- float32_t * pErr,
- uint32_t blockSize);
- void ref_lms_q31(
- const arm_lms_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pRef,
- q31_t * pOut,
- q31_t * pErr,
- uint32_t blockSize);
- void ref_lms_norm_q31(
- arm_lms_norm_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pRef,
- q31_t * pOut,
- q31_t * pErr,
- uint32_t blockSize);
- void ref_lms_q15(
- const arm_lms_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pRef,
- q15_t * pOut,
- q15_t * pErr,
- uint32_t blockSize);
- void ref_lms_norm_q15(
- arm_lms_norm_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pRef,
- q15_t * pOut,
- q15_t * pErr,
- uint32_t blockSize);
- void ref_fir_interpolate_f32(
- const arm_fir_interpolate_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_fir_interpolate_q31(
- const arm_fir_interpolate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_fir_interpolate_q15(
- const arm_fir_interpolate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- /*
- * Matrix Functions
- */
- arm_status ref_mat_cmplx_mult_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst);
- arm_status ref_mat_cmplx_mult_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
- arm_status ref_mat_cmplx_mult_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst);
- arm_status ref_mat_inverse_f32(
- const arm_matrix_instance_f32 * pSrc,
- arm_matrix_instance_f32 * pDst);
- arm_status ref_mat_inverse_f64(
- const arm_matrix_instance_f64 * pSrc,
- arm_matrix_instance_f64 * pDst);
- arm_status ref_mat_mult_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst);
- arm_status ref_mat_mult_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
- /* Alias for testing purposes*/
- #define ref_mat_mult_fast_q31 ref_mat_mult_q31
- arm_status ref_mat_mult_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst);
- /* Alias for testing purposes*/
- #define ref_mat_mult_fast_q15 ref_mat_mult_q15
- arm_status ref_mat_scale_f32(
- const arm_matrix_instance_f32 * pSrc,
- float32_t scale,
- arm_matrix_instance_f32 * pDst);
- arm_status ref_mat_scale_q31(
- const arm_matrix_instance_q31 * pSrc,
- q31_t scale,
- int32_t shift,
- arm_matrix_instance_q31 * pDst);
- arm_status ref_mat_scale_q15(
- const arm_matrix_instance_q15 * pSrc,
- q15_t scale,
- int32_t shift,
- arm_matrix_instance_q15 * pDst);
- arm_status ref_mat_sub_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst);
- arm_status ref_mat_sub_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
- arm_status ref_mat_sub_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst);
- arm_status ref_mat_trans_f64(
- const arm_matrix_instance_f64 * pSrc,
- arm_matrix_instance_f64 * pDst);
- arm_status ref_mat_trans_f32(
- const arm_matrix_instance_f32 * pSrc,
- arm_matrix_instance_f32 * pDst);
- arm_status ref_mat_trans_q31(
- const arm_matrix_instance_q31 * pSrc,
- arm_matrix_instance_q31 * pDst);
- arm_status ref_mat_trans_q15(
- const arm_matrix_instance_q15 * pSrc,
- arm_matrix_instance_q15 * pDst);
- arm_status ref_mat_add_f32(
- const arm_matrix_instance_f32 * pSrcA,
- const arm_matrix_instance_f32 * pSrcB,
- arm_matrix_instance_f32 * pDst);
- arm_status ref_mat_add_q31(
- const arm_matrix_instance_q31 * pSrcA,
- const arm_matrix_instance_q31 * pSrcB,
- arm_matrix_instance_q31 * pDst);
- arm_status ref_mat_add_q15(
- const arm_matrix_instance_q15 * pSrcA,
- const arm_matrix_instance_q15 * pSrcB,
- arm_matrix_instance_q15 * pDst);
- /*
- * Statistics Functions
- */
- void ref_max_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult,
- uint32_t * pIndex);
- void ref_max_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult,
- uint32_t * pIndex);
- void ref_max_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult,
- uint32_t * pIndex);
- void ref_max_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * pResult,
- uint32_t * pIndex);
- void ref_mean_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void ref_mean_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void ref_mean_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
- void ref_mean_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * pResult);
- void ref_min_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult,
- uint32_t * pIndex);
- void ref_min_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult,
- uint32_t * pIndex);
- void ref_min_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult,
- uint32_t * pIndex);
- void ref_min_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * pResult,
- uint32_t * pIndex);
- void ref_power_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void ref_power_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q63_t * pResult);
- void ref_power_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q63_t * pResult);
- void ref_power_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void ref_rms_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void ref_rms_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void ref_rms_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
- void ref_std_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void ref_std_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void ref_std_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
- void ref_var_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void ref_var_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void ref_var_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
- /*
- * Support Functions
- */
- void ref_copy_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_copy_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_copy_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_copy_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_fill_f32(
- float32_t value,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_fill_q31(
- q31_t value,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_fill_q15(
- q15_t value,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_fill_q7(
- q7_t value,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_q31_to_q15(
- q31_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_q31_to_q7(
- q31_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_q15_to_q31(
- q15_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_q15_to_q7(
- q15_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void ref_q7_to_q31(
- q7_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_q7_to_q15(
- q7_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_q63_to_float(
- q63_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_q31_to_float(
- q31_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_q15_to_float(
- q15_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_q7_to_float(
- q7_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void ref_float_to_q31(
- float32_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void ref_float_to_q15(
- float32_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void ref_float_to_q7(
- float32_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- /*
- * Transform Functions
- */
- void ref_cfft_f32(
- const arm_cfft_instance_f32 * S,
- float32_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
- void ref_cfft_q31(
- const arm_cfft_instance_q31 * S,
- q31_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
-
- void ref_cfft_q15(
- const arm_cfft_instance_q15 * S,
- q15_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
- void ref_cfft_radix2_f32(
- const arm_cfft_radix2_instance_f32 * S,
- float32_t * pSrc);
- void ref_cfft_radix2_q31(
- const arm_cfft_radix2_instance_q31 * S,
- q31_t * pSrc);
- void ref_cfft_radix2_q15(
- const arm_cfft_radix2_instance_q15 * S,
- q15_t * pSrc);
- void ref_cfft_radix4_f32(
- const arm_cfft_radix4_instance_f32 * S,
- float32_t * pSrc);
- void ref_cfft_radix4_q31(
- const arm_cfft_radix4_instance_q31 * S,
- q31_t * pSrc);
- void ref_cfft_radix4_q15(
- const arm_cfft_radix4_instance_q15 * S,
- q15_t * pSrc);
- void ref_rfft_f32(
- arm_rfft_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst);
- void ref_rfft_fast_f32(
- arm_rfft_fast_instance_f32 * S,
- float32_t * p, float32_t * pOut,
- uint8_t ifftFlag);
- void ref_rfft_q31(
- const arm_rfft_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst);
- void ref_rfft_q15(
- const arm_rfft_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst);
- void ref_dct4_f32(
- const arm_dct4_instance_f32 * S,
- float32_t * pState,
- float32_t * pInlineBuffer);
- void ref_dct4_q31(
- const arm_dct4_instance_q31 * S,
- q31_t * pState,
- q31_t * pInlineBuffer);
- void ref_dct4_q15(
- const arm_dct4_instance_q15 * S,
- q15_t * pState,
- q15_t * pInlineBuffer);
- /*
- * Intrinsics
- */
- q31_t ref__QADD8(q31_t x, q31_t y);
- q31_t ref__QSUB8(q31_t x, q31_t y);
- q31_t ref__QADD16(q31_t x, q31_t y);
- q31_t ref__SHADD16(q31_t x, q31_t y);
- q31_t ref__QSUB16(q31_t x, q31_t y);
- q31_t ref__SHSUB16(q31_t x, q31_t y);
- q31_t ref__QASX(q31_t x, q31_t y);
- q31_t ref__SHASX(q31_t x, q31_t y);
- q31_t ref__QSAX(q31_t x, q31_t y);
- q31_t ref__SHSAX(q31_t x, q31_t y);
- q31_t ref__SMUSDX(q31_t x, q31_t y);
- q31_t ref__SMUADX(q31_t x, q31_t y);
- q31_t ref__QADD(q31_t x, q31_t y);
- q31_t ref__QSUB(q31_t x, q31_t y);
- q31_t ref__SMLAD(q31_t x, q31_t y, q31_t sum);
- q31_t ref__SMLADX(q31_t x, q31_t y, q31_t sum);
- q31_t ref__SMLSDX(q31_t x, q31_t y, q31_t sum);
- q63_t ref__SMLALD(q31_t x, q31_t y, q63_t sum);
- q63_t ref__SMLALDX(q31_t x, q31_t y, q63_t sum);
- q31_t ref__SMUAD(q31_t x, q31_t y);
- q31_t ref__SMUSD(q31_t x, q31_t y);
- q31_t ref__SXTB16(q31_t x);
- #ifdef __cplusplus
- }
- #endif
- #endif
|