| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291 |
- /******************************************************************************
- * @file csky_vdsp2_math.h
- * @brief Public header file for CSI DSP Library.
- * @version V1.0
- * @date 20. Dec 2016
- ******************************************************************************/
- /* ---------------------------------------------------------------------------
- * Copyright (C) 2016 CSKY Limited. All rights reserved.
- *
- * Redistribution and use of this software in source and binary forms,
- * with or without modification, are permitted provided that the following
- * conditions are met:
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of CSKY Ltd. nor the names of CSKY's contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission of CSKY Ltd.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- * -------------------------------------------------------------------------- */
- #ifndef _CSKY_VDSP2_MATH_H
- #define _CSKY_VDSP2_MATH_H
- #include "csky_math.h"
- #ifdef __cplusplus
- extern "C"
- {
- #endif
- /**
- * @brief Error status returned by some functions in the library.
- */
- typedef enum
- {
- CSKY_VDSP2_MATH_SUCCESS = 0, /**< No error */
- CSKY_VDSP2_MATH_ARGUMENT_ERROR = -1, /**< One or more arguments are incorrect */
- CSKY_VDSP2_MATH_LENGTH_ERROR = -2, /**< Length of data buffer is incorrect */
- CSKY_VDSP2_MATH_SIZE_MISMATCH = -3, /**< Size of matrices is not compatible with the operation. */
- CSKY_VDSP2_MATH_NANINF = -4, /**< Not-a-number (NaN) or infinity is generated */
- CSKY_VDSP2_MATH_SINGULAR = -5, /**< Generated by matrix inversion if the input matrix is singular and cannot be inverted. */
- CSKY_VDSP2_MATH_TEST_FAILURE = -6 /**< Test Failed */
- } csky_vdsp2_status;
- /**
- * @brief Instance structure for the Q7 FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of filter coefficients in the filter. */
- q7_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- } csky_vdsp2_fir_instance_q7;
- /**
- * @brief Instance structure for the Q15 FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of filter coefficients in the filter. */
- q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- } csky_vdsp2_fir_instance_q15;
- /**
- * @brief Instance structure for the Q31 FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of filter coefficients in the filter. */
- q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- } csky_vdsp2_fir_instance_q31;
- /**
- * @brief Instance structure for the floating-point FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of filter coefficients in the filter. */
- float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- } csky_vdsp2_fir_instance_f32;
- void csky_vdsp2_fir_q7(
- const csky_vdsp2_fir_instance_q7 * S,
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_init_q7(
- csky_vdsp2_fir_instance_q7 * S,
- uint16_t numTaps,
- q7_t * pCoeffs,
- q7_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_fir_q15(
- const csky_vdsp2_fir_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_fast_q15(
- const csky_vdsp2_fir_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- csky_vdsp2_status csky_vdsp2_fir_init_q15(
- csky_vdsp2_fir_instance_q15 * S,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_fir_q31(
- const csky_vdsp2_fir_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_fast_q31(
- const csky_vdsp2_fir_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_init_q31(
- csky_vdsp2_fir_instance_q31 * S,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_fir_f32(
- const csky_vdsp2_fir_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_init_f32(
- csky_vdsp2_fir_instance_f32 * S,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the Q15 Biquad cascade filter.
- */
- typedef struct
- {
- int8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- q15_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
- q15_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
- int8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
- } csky_vdsp2_biquad_casd_df1_inst_q15;
- /**
- * @brief Instance structure for the Q31 Biquad cascade filter.
- */
- typedef struct
- {
- uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- q31_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
- q31_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
- uint8_t postShift; /**< Additional shift, in bits, applied to each output sample. */
- } csky_vdsp2_biquad_casd_df1_inst_q31;
- /**
- * @brief Instance structure for the Q31 Biquad cascade filter.
- */
- /**
- * @brief Instance structure for the floating-point Biquad cascade filter.
- */
- typedef struct
- {
- uint32_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- float32_t *pState; /**< Points to the array of state coefficients. The array is of length 4*numStages. */
- float32_t *pCoeffs; /**< Points to the array of coefficients. The array is of length 5*numStages. */
- } csky_vdsp2_biquad_casd_df1_inst_f32;
- void csky_vdsp2_biquad_cascade_df1_q15(
- const csky_vdsp2_biquad_casd_df1_inst_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cascade_df1_init_q15(
- csky_vdsp2_biquad_casd_df1_inst_q15 * S,
- uint8_t numStages,
- q15_t * pCoeffs,
- q15_t * pState,
- int8_t postShift);
- void csky_vdsp2_biquad_cascade_df1_fast_q15(
- const csky_vdsp2_biquad_casd_df1_inst_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cascade_df1_q31(
- const csky_vdsp2_biquad_casd_df1_inst_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cascade_df1_fast_q31(
- const csky_vdsp2_biquad_casd_df1_inst_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cascade_df1_init_q31(
- csky_vdsp2_biquad_casd_df1_inst_q31 * S,
- uint8_t numStages,
- q31_t * pCoeffs,
- q31_t * pState,
- int8_t postShift);
- void csky_vdsp2_biquad_cascade_df1_f32(
- const csky_vdsp2_biquad_casd_df1_inst_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cascade_df1_init_f32(
- csky_vdsp2_biquad_casd_df1_inst_f32 * S,
- uint8_t numStages,
- float32_t * pCoeffs,
- float32_t * pState);
- /**
- * @brief Instance structure for the floating-point matrix structure.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows of the matrix. */
- uint16_t numCols; /**< number of columns of the matrix. */
- float32_t *pData; /**< points to the data of the matrix. */
- } csky_vdsp2_matrix_instance_f32;
- /**
- * @brief Instance structure for the floating-point matrix structure.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows of the matrix. */
- uint16_t numCols; /**< number of columns of the matrix. */
- float64_t *pData; /**< points to the data of the matrix. */
- } csky_vdsp2_matrix_instance_f64;
- /**
- * @brief Instance structure for the Q15 matrix structure.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows of the matrix. */
- uint16_t numCols; /**< number of columns of the matrix. */
- q15_t *pData; /**< points to the data of the matrix. */
- } csky_vdsp2_matrix_instance_q15;
- /**
- * @brief Instance structure for the Q31 matrix structure.
- */
- typedef struct
- {
- uint16_t numRows; /**< number of rows of the matrix. */
- uint16_t numCols; /**< number of columns of the matrix. */
- q31_t *pData; /**< points to the data of the matrix. */
- } csky_vdsp2_matrix_instance_q31;
- csky_vdsp2_status csky_vdsp2_mat_add_f32(
- const csky_vdsp2_matrix_instance_f32 * pSrcA,
- const csky_vdsp2_matrix_instance_f32 * pSrcB,
- csky_vdsp2_matrix_instance_f32 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_add_q15(
- const csky_vdsp2_matrix_instance_q15 * pSrcA,
- const csky_vdsp2_matrix_instance_q15 * pSrcB,
- csky_vdsp2_matrix_instance_q15 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_add_q31(
- const csky_vdsp2_matrix_instance_q31 * pSrcA,
- const csky_vdsp2_matrix_instance_q31 * pSrcB,
- csky_vdsp2_matrix_instance_q31 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_cmplx_mult_f32(
- const csky_vdsp2_matrix_instance_f32 * pSrcA,
- const csky_vdsp2_matrix_instance_f32 * pSrcB,
- csky_vdsp2_matrix_instance_f32 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_cmplx_mult_q15(
- const csky_vdsp2_matrix_instance_q15 * pSrcA,
- const csky_vdsp2_matrix_instance_q15 * pSrcB,
- csky_vdsp2_matrix_instance_q15 * pDst,
- q15_t * pScratch);
- csky_vdsp2_status csky_vdsp2_mat_cmplx_mult_q31(
- const csky_vdsp2_matrix_instance_q31 * pSrcA,
- const csky_vdsp2_matrix_instance_q31 * pSrcB,
- csky_vdsp2_matrix_instance_q31 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_trans_f32(
- const csky_vdsp2_matrix_instance_f32 * pSrc,
- csky_vdsp2_matrix_instance_f32 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_trans_q15(
- const csky_vdsp2_matrix_instance_q15 * pSrc,
- csky_vdsp2_matrix_instance_q15 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_trans_q31(
- const csky_vdsp2_matrix_instance_q31 * pSrc,
- csky_vdsp2_matrix_instance_q31 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_mult_f32(
- const csky_vdsp2_matrix_instance_f32 * pSrcA,
- const csky_vdsp2_matrix_instance_f32 * pSrcB,
- csky_vdsp2_matrix_instance_f32 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_mult_q15(
- const csky_vdsp2_matrix_instance_q15 * pSrcA,
- const csky_vdsp2_matrix_instance_q15 * pSrcB,
- csky_vdsp2_matrix_instance_q15 * pDst,
- q15_t * pState);
- csky_vdsp2_status csky_vdsp2_mat_mult_trans_q15(
- const csky_vdsp2_matrix_instance_q15 * pSrcA,
- const csky_vdsp2_matrix_instance_q15 * pSrcB,
- csky_vdsp2_matrix_instance_q15 * pDst,
- q15_t * pState);
- csky_vdsp2_status csky_vdsp2_mat_mult_fast_q15(
- const csky_vdsp2_matrix_instance_q15 * pSrcA,
- const csky_vdsp2_matrix_instance_q15 * pSrcB,
- csky_vdsp2_matrix_instance_q15 * pDst,
- q15_t * pState);
- csky_vdsp2_status csky_vdsp2_mat_mult_q31(
- const csky_vdsp2_matrix_instance_q31 * pSrcA,
- const csky_vdsp2_matrix_instance_q31 * pSrcB,
- csky_vdsp2_matrix_instance_q31 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_mult_trans_q31(
- const csky_vdsp2_matrix_instance_q31 * pSrcA,
- const csky_vdsp2_matrix_instance_q31 * pSrcB,
- csky_vdsp2_matrix_instance_q31 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_mult_fast_q31(
- const csky_vdsp2_matrix_instance_q31 * pSrcA,
- const csky_vdsp2_matrix_instance_q31 * pSrcB,
- csky_vdsp2_matrix_instance_q31 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_sub_f32(
- const csky_vdsp2_matrix_instance_f32 * pSrcA,
- const csky_vdsp2_matrix_instance_f32 * pSrcB,
- csky_vdsp2_matrix_instance_f32 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_sub_q15(
- const csky_vdsp2_matrix_instance_q15 * pSrcA,
- const csky_vdsp2_matrix_instance_q15 * pSrcB,
- csky_vdsp2_matrix_instance_q15 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_sub_q31(
- const csky_vdsp2_matrix_instance_q31 * pSrcA,
- const csky_vdsp2_matrix_instance_q31 * pSrcB,
- csky_vdsp2_matrix_instance_q31 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_scale_f32(
- const csky_vdsp2_matrix_instance_f32 * pSrc,
- float32_t scale,
- csky_vdsp2_matrix_instance_f32 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_scale_q15(
- const csky_vdsp2_matrix_instance_q15 * pSrc,
- q15_t scaleFract,
- int32_t shift,
- csky_vdsp2_matrix_instance_q15 * pDst);
- csky_vdsp2_status csky_vdsp2_mat_scale_q31(
- const csky_vdsp2_matrix_instance_q31 * pSrc,
- q31_t scaleFract,
- int32_t shift,
- csky_vdsp2_matrix_instance_q31 * pDst);
- void csky_vdsp2_mat_init_q31(
- csky_vdsp2_matrix_instance_q31 * S,
- uint16_t nRows,
- uint16_t nColumns,
- q31_t * pData);
- void csky_vdsp2_mat_init_q15(
- csky_vdsp2_matrix_instance_q15 * S,
- uint16_t nRows,
- uint16_t nColumns,
- q15_t * pData);
- void csky_vdsp2_mat_init_f32(
- csky_vdsp2_matrix_instance_f32 * S,
- uint16_t nRows,
- uint16_t nColumns,
- float32_t * pData);
- void csky_vdsp2_mult_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_mult_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_mult_rnd_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_mult_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_mult_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the Q15 CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- q15_t *pTwiddle; /**< points to the Sin twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- } csky_vdsp2_cfft_radix2_instance_q15;
- /**
- * @brief Instance structure for the Q15 CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- q15_t *pTwiddle; /**< points to the twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- } csky_vdsp2_cfft_radix4_instance_q15;
- /**
- * @brief Instance structure for the Radix-2 Q31 CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- q31_t *pTwiddle; /**< points to the Twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- } csky_vdsp2_cfft_radix2_instance_q31;
- /**
- * @brief Instance structure for the Q31 CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- q31_t *pTwiddle; /**< points to the twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- } csky_vdsp2_cfft_radix4_instance_q31;
- /**
- * @brief Instance structure for the floating-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- float32_t *pTwiddle; /**< points to the Twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- float32_t onebyfftLen; /**< value of 1/fftLen. */
- } csky_vdsp2_cfft_radix2_instance_f32;
- /**
- * @brief Instance structure for the floating-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- uint8_t ifftFlag; /**< flag that selects forward (ifftFlag=0) or inverse (ifftFlag=1) transform. */
- uint8_t bitReverseFlag; /**< flag that enables (bitReverseFlag=1) or disables (bitReverseFlag=0) bit reversal of output. */
- float32_t *pTwiddle; /**< points to the Twiddle factor table. */
- uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t twidCoefModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- uint16_t bitRevFactor; /**< bit reversal modifier that supports different size FFTs with the same bit reversal table. */
- float32_t onebyfftLen; /**< value of 1/fftLen. */
- } csky_vdsp2_cfft_radix4_instance_f32;
- /**
- * @brief Instance structure for the fixed-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- const q15_t *pTwiddle; /**< points to the Twiddle factor table. */
- const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t bitRevLength; /**< bit reversal table length. */
- } csky_vdsp2_cfft_instance_q15;
- void csky_vdsp2_cfft_q15(
- const csky_vdsp2_cfft_instance_q15 * S,
- q15_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
- /**
- * @brief Instance structure for the fixed-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- const q31_t *pTwiddle; /**< points to the Twiddle factor table. */
- const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t bitRevLength; /**< bit reversal table length. */
- } csky_vdsp2_cfft_instance_q31;
- void csky_vdsp2_cfft_q31(
- const csky_vdsp2_cfft_instance_q31 * S,
- q31_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
- /**
- * @brief Instance structure for the floating-point CFFT/CIFFT function.
- */
- typedef struct
- {
- uint16_t fftLen; /**< length of the FFT. */
- const float32_t *pTwiddle; /**< points to the Twiddle factor table. */
- const uint16_t *pBitRevTable; /**< points to the bit reversal table. */
- uint16_t bitRevLength; /**< bit reversal table length. */
- } csky_vdsp2_cfft_instance_f32;
- void csky_vdsp2_cfft_f32(
- const csky_vdsp2_cfft_instance_f32 * S,
- float32_t * p1,
- uint8_t ifftFlag,
- uint8_t bitReverseFlag);
- /**
- * @brief Instance structure for the Q15 RFFT/RIFFT function.
- */
- typedef struct
- {
- uint32_t fftLenReal; /**< length of the real FFT. */
- uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
- uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
- uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- q15_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
- const csky_vdsp2_cfft_instance_q15 *pCfft; /**< points to the complex FFT instance. */
- } csky_vdsp2_rfft_instance_q15;
- csky_vdsp2_status csky_vdsp2_rfft_init_q15(
- csky_vdsp2_rfft_instance_q15 * S,
- uint32_t fftLenReal,
- uint32_t ifftFlagR,
- uint32_t bitReverseFlag);
- void csky_vdsp2_rfft_q15(
- const csky_vdsp2_rfft_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst);
- /**
- * @brief Instance structure for the Q31 RFFT/RIFFT function.
- */
- typedef struct
- {
- uint32_t fftLenReal; /**< length of the real FFT. */
- uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
- uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
- uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- q31_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
- const csky_vdsp2_cfft_instance_q31 *pCfft; /**< points to the complex FFT instance. */
- } csky_vdsp2_rfft_instance_q31;
- csky_vdsp2_status csky_vdsp2_rfft_init_q31(
- csky_vdsp2_rfft_instance_q31 * S,
- uint32_t fftLenReal,
- uint32_t ifftFlagR,
- uint32_t bitReverseFlag);
- void csky_vdsp2_rfft_q31(
- const csky_vdsp2_rfft_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst);
- /**
- * @brief Instance structure for the floating-point RFFT/RIFFT function.
- */
- typedef struct
- {
- uint32_t fftLenReal; /**< length of the real FFT. */
- uint16_t fftLenBy2; /**< length of the complex FFT. */
- uint8_t ifftFlagR; /**< flag that selects forward (ifftFlagR=0) or inverse (ifftFlagR=1) transform. */
- uint8_t bitReverseFlagR; /**< flag that enables (bitReverseFlagR=1) or disables (bitReverseFlagR=0) bit reversal of output. */
- uint32_t twidCoefRModifier; /**< twiddle coefficient modifier that supports different size FFTs with the same twiddle factor table. */
- float32_t *pTwiddleAReal; /**< points to the real twiddle factor table. */
- float32_t *pTwiddleBReal; /**< points to the imag twiddle factor table. */
- csky_vdsp2_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
- } csky_vdsp2_rfft_instance_f32;
- csky_vdsp2_status csky_vdsp2_rfft_init_f32(
- csky_vdsp2_rfft_instance_f32 * S,
- csky_vdsp2_cfft_radix4_instance_f32 * S_CFFT,
- uint32_t fftLenReal,
- uint32_t ifftFlagR,
- uint32_t bitReverseFlag);
- void csky_vdsp2_rfft_f32(
- const csky_vdsp2_rfft_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst);
- /**
- * @brief Instance structure for the floating-point RFFT/RIFFT function.
- */
- typedef struct
- {
- csky_vdsp2_cfft_instance_f32 Sint; /**< Internal CFFT structure. */
- uint16_t fftLenRFFT; /**< length of the real sequence */
- float32_t * pTwiddleRFFT; /**< Twiddle factors real stage */
- } csky_vdsp2_rfft_fast_instance_f32 ;
- csky_vdsp2_status csky_vdsp2_rfft_fast_init_f32 (
- csky_vdsp2_rfft_fast_instance_f32 * S,
- uint16_t fftLen);
- void csky_vdsp2_rfft_fast_f32(
- csky_vdsp2_rfft_fast_instance_f32 * S,
- float32_t * p, float32_t * pOut,
- uint8_t ifftFlag);
- /**
- * @brief Instance structure for the floating-point DCT4/IDCT4 function.
- */
- typedef struct
- {
- uint16_t N; /**< length of the DCT4. */
- uint16_t Nby2; /**< half of the length of the DCT4. */
- float32_t normalize; /**< normalizing factor. */
- float32_t *pTwiddle; /**< points to the twiddle factor table. */
- float32_t *pCosFactor; /**< points to the cosFactor table. */
- csky_vdsp2_rfft_fast_instance_f32 *pRfft; /**< points to the real FFT fast instance. */
- csky_vdsp2_cfft_radix4_instance_f32 *pCfft; /**< points to the complex FFT instance. */
- } csky_vdsp2_dct4_instance_f32;
- csky_vdsp2_status csky_vdsp2_dct4_init_f32(
- csky_vdsp2_dct4_instance_f32 * S,
- csky_vdsp2_rfft_fast_instance_f32 * S_RFFT,
- csky_vdsp2_cfft_radix4_instance_f32 * S_CFFT,
- uint16_t N,
- uint16_t Nby2,
- float32_t normalize);
- void csky_vdsp2_dct4_f32(
- const csky_vdsp2_dct4_instance_f32 * S,
- float32_t * pState,
- float32_t * pInlineBuffer);
- /**
- * @brief Instance structure for the Q31 DCT4/IDCT4 function.
- */
- typedef struct
- {
- uint16_t N; /**< length of the DCT4. */
- uint16_t Nby2; /**< half of the length of the DCT4. */
- q31_t normalize; /**< normalizing factor. */
- q31_t *pTwiddle; /**< points to the twiddle factor table. */
- q31_t *pCosFactor; /**< points to the cosFactor table. */
- csky_vdsp2_rfft_instance_q31 *pRfft; /**< points to the real FFT instance. */
- csky_vdsp2_cfft_radix4_instance_q31 *pCfft; /**< points to the complex FFT instance. */
- } csky_vdsp2_dct4_instance_q31;
- csky_vdsp2_status csky_vdsp2_dct4_init_q31(
- csky_vdsp2_dct4_instance_q31 * S,
- csky_vdsp2_rfft_instance_q31 * S_RFFT,
- csky_vdsp2_cfft_radix4_instance_q31 * S_CFFT,
- uint16_t N,
- uint16_t Nby2,
- q31_t normalize);
- void csky_vdsp2_dct4_q31(
- const csky_vdsp2_dct4_instance_q31 * S,
- q31_t * pState,
- q31_t * pInlineBuffer);
- /**
- * @brief Instance structure for the Q15 DCT4/IDCT4 function.
- */
- typedef struct
- {
- uint16_t N; /**< length of the DCT4. */
- uint16_t Nby2; /**< half of the length of the DCT4. */
- q15_t normalize; /**< normalizing factor. */
- q15_t *pTwiddle; /**< points to the twiddle factor table. */
- q15_t *pCosFactor; /**< points to the cosFactor table. */
- csky_vdsp2_rfft_instance_q15 *pRfft; /**< points to the real FFT instance. */
- csky_vdsp2_cfft_radix4_instance_q15 *pCfft; /**< points to the complex FFT instance. */
- } csky_vdsp2_dct4_instance_q15;
- csky_vdsp2_status csky_vdsp2_dct4_init_q15(
- csky_vdsp2_dct4_instance_q15 * S,
- csky_vdsp2_rfft_instance_q15 * S_RFFT,
- csky_vdsp2_cfft_radix4_instance_q15 * S_CFFT,
- uint16_t N,
- uint16_t Nby2,
- q15_t normalize);
- void csky_vdsp2_dct4_q15(
- const csky_vdsp2_dct4_instance_q15 * S,
- q15_t * pState,
- q15_t * pInlineBuffer);
- void csky_vdsp2_add_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_add_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_add_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_add_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_sub_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_sub_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_sub_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_sub_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_scale_f32(
- float32_t * pSrc,
- float32_t scale,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_scale_q7(
- q7_t * pSrc,
- q7_t scaleFract,
- int8_t shift,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_scale_q15(
- q15_t * pSrc,
- q15_t scaleFract,
- int8_t shift,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_scale_q31(
- q31_t * pSrc,
- q31_t scaleFract,
- int8_t shift,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_abs_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_abs_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_abs_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_abs_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_abs_max_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_abs_max_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_dot_prod_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- uint32_t blockSize,
- float32_t * result);
- void csky_vdsp2_dot_prod_q7(
- q7_t * pSrcA,
- q7_t * pSrcB,
- uint32_t blockSize,
- q31_t * result);
- void csky_vdsp2_dot_prod_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- uint32_t blockSize,
- q63_t * result);
- void csky_vdsp2_dot_prod_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- uint32_t blockSize,
- q63_t * result);
- void csky_vdsp2_shift_q7(
- q7_t * pSrc,
- int8_t shiftBits,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_shift_q15(
- q15_t * pSrc,
- int8_t shiftBits,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_shift_q31(
- q31_t * pSrc,
- int8_t shiftBits,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_offset_f32(
- float32_t * pSrc,
- float32_t offset,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_offset_q7(
- q7_t * pSrc,
- q7_t offset,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_offset_q15(
- q15_t * pSrc,
- q15_t offset,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_offset_q31(
- q31_t * pSrc,
- q31_t offset,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_negate_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_negate_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_negate_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_negate_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_copy_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_copy_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_copy_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_copy_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fill_f32(
- float32_t value,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fill_q7(
- q7_t value,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fill_q15(
- q15_t value,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fill_q31(
- q31_t value,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_conv_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst);
- void csky_vdsp2_conv_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch1,
- q15_t * pScratch2);
- void csky_vdsp2_conv_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
- void csky_vdsp2_conv_fast_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
- void csky_vdsp2_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);
- void csky_vdsp2_conv_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
- void csky_vdsp2_conv_fast_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
- void csky_vdsp2_conv_opt_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- q15_t * pScratch1,
- q15_t * pScratch2);
- void csky_vdsp2_conv_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst);
- csky_vdsp2_status csky_vdsp2_conv_partial_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- csky_vdsp2_status csky_vdsp2_conv_partial_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);
- csky_vdsp2_status csky_vdsp2_conv_partial_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- csky_vdsp2_status csky_vdsp2_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);
- csky_vdsp2_status csky_vdsp2_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);
- csky_vdsp2_status csky_vdsp2_conv_partial_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- csky_vdsp2_status csky_vdsp2_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);
- csky_vdsp2_status csky_vdsp2_conv_partial_opt_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints,
- q15_t * pScratch1,
- q15_t * pScratch2);
- csky_vdsp2_status csky_vdsp2_conv_partial_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- uint32_t firstIndex,
- uint32_t numPoints);
- /**
- * @brief Instance structure for the Q15 FIR decimator.
- */
- typedef struct
- {
- uint8_t M; /**< decimation factor. */
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- } csky_vdsp2_fir_decimate_instance_q15;
- /**
- * @brief Instance structure for the Q31 FIR decimator.
- */
- typedef struct
- {
- uint8_t M; /**< decimation factor. */
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- } csky_vdsp2_fir_decimate_instance_q31;
- /**
- * @brief Instance structure for the floating-point FIR decimator.
- */
- typedef struct
- {
- uint8_t M; /**< decimation factor. */
- uint16_t numTaps; /**< number of coefficients in the filter. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- } csky_vdsp2_fir_decimate_instance_f32;
- void csky_vdsp2_fir_decimate_f32(
- const csky_vdsp2_fir_decimate_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- csky_vdsp2_status csky_vdsp2_fir_decimate_init_f32(
- csky_vdsp2_fir_decimate_instance_f32 * S,
- uint16_t numTaps,
- uint8_t M,
- float32_t * pCoeffs,
- float32_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_fir_decimate_q15(
- const csky_vdsp2_fir_decimate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_decimate_fast_q15(
- const csky_vdsp2_fir_decimate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- csky_vdsp2_status csky_vdsp2_fir_decimate_init_q15(
- csky_vdsp2_fir_decimate_instance_q15 * S,
- uint16_t numTaps,
- uint8_t M,
- q15_t * pCoeffs,
- q15_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_fir_decimate_q31(
- const csky_vdsp2_fir_decimate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_decimate_fast_q31(
- csky_vdsp2_fir_decimate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- csky_vdsp2_status csky_vdsp2_fir_decimate_init_q31(
- csky_vdsp2_fir_decimate_instance_q31 * S,
- uint16_t numTaps,
- uint8_t M,
- q31_t * pCoeffs,
- q31_t * pState,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the Q15 FIR interpolator.
- */
- typedef struct
- {
- uint8_t L; /**< upsample factor. */
- uint16_t phaseLength; /**< length of each polyphase filter component. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
- q15_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
- } csky_vdsp2_fir_interpolate_instance_q15;
- /**
- * @brief Instance structure for the Q31 FIR interpolator.
- */
- typedef struct
- {
- uint8_t L; /**< upsample factor. */
- uint16_t phaseLength; /**< length of each polyphase filter component. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
- q31_t *pState; /**< points to the state variable array. The array is of length blockSize+phaseLength-1. */
- } csky_vdsp2_fir_interpolate_instance_q31;
- /**
- * @brief Instance structure for the floating-point FIR interpolator.
- */
- typedef struct
- {
- uint8_t L; /**< upsample factor. */
- uint16_t phaseLength; /**< length of each polyphase filter component. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length L*phaseLength. */
- float32_t *pState; /**< points to the state variable array. The array is of length phaseLength+numTaps-1. */
- } csky_vdsp2_fir_interpolate_instance_f32;
- void csky_vdsp2_fir_interpolate_q15(
- const csky_vdsp2_fir_interpolate_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- csky_vdsp2_status csky_vdsp2_fir_interpolate_init_q15(
- csky_vdsp2_fir_interpolate_instance_q15 * S,
- uint8_t L,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_fir_interpolate_q31(
- const csky_vdsp2_fir_interpolate_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- csky_vdsp2_status csky_vdsp2_fir_interpolate_init_q31(
- csky_vdsp2_fir_interpolate_instance_q31 * S,
- uint8_t L,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_fir_interpolate_f32(
- const csky_vdsp2_fir_interpolate_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- csky_vdsp2_status csky_vdsp2_fir_interpolate_init_f32(
- csky_vdsp2_fir_interpolate_instance_f32 * S,
- uint8_t L,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the high precision Q31 Biquad cascade filter.
- */
- typedef struct
- {
- uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- q63_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
- q31_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
- uint8_t postShift; /**< additional shift, in bits, applied to each output sample. */
- } csky_vdsp2_biquad_cas_df1_32x64_ins_q31;
- void csky_vdsp2_biquad_cas_df1_32x64_q31(
- const csky_vdsp2_biquad_cas_df1_32x64_ins_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cas_df1_32x64_init_q31(
- csky_vdsp2_biquad_cas_df1_32x64_ins_q31 * S,
- uint8_t numStages,
- q31_t * pCoeffs,
- q63_t * pState,
- uint8_t postShift);
- /**
- * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
- */
- typedef struct
- {
- uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- float32_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
- float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
- } csky_vdsp2_biquad_cascade_df2T_instance_f32;
- /**
- * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
- */
- typedef struct
- {
- uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- float32_t *pState; /**< points to the array of state coefficients. The array is of length 4*numStages. */
- float32_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
- } csky_vdsp2_biquad_cascade_stereo_df2T_instance_f32;
- /**
- * @brief Instance structure for the floating-point transposed direct form II Biquad cascade filter.
- */
- typedef struct
- {
- uint8_t numStages; /**< number of 2nd order stages in the filter. Overall order is 2*numStages. */
- float64_t *pState; /**< points to the array of state coefficients. The array is of length 2*numStages. */
- float64_t *pCoeffs; /**< points to the array of coefficients. The array is of length 5*numStages. */
- } csky_vdsp2_biquad_cascade_df2T_instance_f64;
- void csky_vdsp2_biquad_cascade_df2T_f32(
- const csky_vdsp2_biquad_cascade_df2T_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cascade_stereo_df2T_f32(
- const csky_vdsp2_biquad_cascade_stereo_df2T_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cascade_df2T_f64(
- const csky_vdsp2_biquad_cascade_df2T_instance_f64 * S,
- float64_t * pSrc,
- float64_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_biquad_cascade_df2T_init_f32(
- csky_vdsp2_biquad_cascade_df2T_instance_f32 * S,
- uint8_t numStages,
- float32_t * pCoeffs,
- float32_t * pState);
- void csky_vdsp2_biquad_cascade_stereo_df2T_init_f32(
- csky_vdsp2_biquad_cascade_stereo_df2T_instance_f32 * S,
- uint8_t numStages,
- float32_t * pCoeffs,
- float32_t * pState);
- void csky_vdsp2_biquad_cascade_df2T_init_f64(
- csky_vdsp2_biquad_cascade_df2T_instance_f64 * S,
- uint8_t numStages,
- float64_t * pCoeffs,
- float64_t * pState);
- /**
- * @brief Instance structure for the Q15 FIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of filter stages. */
- q15_t *pState; /**< points to the state variable array. The array is of length numStages. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
- } csky_vdsp2_fir_lattice_instance_q15;
- /**
- * @brief Instance structure for the Q31 FIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of filter stages. */
- q31_t *pState; /**< points to the state variable array. The array is of length numStages. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
- } csky_vdsp2_fir_lattice_instance_q31;
- /**
- * @brief Instance structure for the floating-point FIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of filter stages. */
- float32_t *pState; /**< points to the state variable array. The array is of length numStages. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numStages. */
- } csky_vdsp2_fir_lattice_instance_f32;
- void csky_vdsp2_fir_lattice_init_q15(
- csky_vdsp2_fir_lattice_instance_q15 * S,
- uint16_t numStages,
- q15_t * pCoeffs,
- q15_t * pState);
- void csky_vdsp2_fir_lattice_q15(
- const csky_vdsp2_fir_lattice_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_lattice_init_q31(
- csky_vdsp2_fir_lattice_instance_q31 * S,
- uint16_t numStages,
- q31_t * pCoeffs,
- q31_t * pState);
- void csky_vdsp2_fir_lattice_q31(
- const csky_vdsp2_fir_lattice_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_fir_lattice_init_f32(
- csky_vdsp2_fir_lattice_instance_f32 * S,
- uint16_t numStages,
- float32_t * pCoeffs,
- float32_t * pState);
- void csky_vdsp2_fir_lattice_f32(
- const csky_vdsp2_fir_lattice_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the Q15 IIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of stages in the filter. */
- q15_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
- q15_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
- q15_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
- } csky_vdsp2_iir_lattice_instance_q15;
- /**
- * @brief Instance structure for the Q31 IIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of stages in the filter. */
- q31_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
- q31_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
- q31_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
- } csky_vdsp2_iir_lattice_instance_q31;
- /**
- * @brief Instance structure for the floating-point IIR lattice filter.
- */
- typedef struct
- {
- uint16_t numStages; /**< number of stages in the filter. */
- float32_t *pState; /**< points to the state variable array. The array is of length numStages+blockSize. */
- float32_t *pkCoeffs; /**< points to the reflection coefficient array. The array is of length numStages. */
- float32_t *pvCoeffs; /**< points to the ladder coefficient array. The array is of length numStages+1. */
- } csky_vdsp2_iir_lattice_instance_f32;
- void csky_vdsp2_iir_lattice_f32(
- const csky_vdsp2_iir_lattice_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_iir_lattice_init_f32(
- csky_vdsp2_iir_lattice_instance_f32 * S,
- uint16_t numStages,
- float32_t * pkCoeffs,
- float32_t * pvCoeffs,
- float32_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_iir_lattice_q31(
- const csky_vdsp2_iir_lattice_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_iir_lattice_init_q31(
- csky_vdsp2_iir_lattice_instance_q31 * S,
- uint16_t numStages,
- q31_t * pkCoeffs,
- q31_t * pvCoeffs,
- q31_t * pState,
- uint32_t blockSize);
- void csky_vdsp2_iir_lattice_q15(
- const csky_vdsp2_iir_lattice_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_iir_lattice_init_q15(
- csky_vdsp2_iir_lattice_instance_q15 * S,
- uint16_t numStages,
- q15_t * pkCoeffs,
- q15_t * pvCoeffs,
- q15_t * pState,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the floating-point LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- float32_t mu; /**< step size that controls filter coefficient updates. */
- } csky_vdsp2_lms_instance_f32;
- void csky_vdsp2_lms_f32(
- const csky_vdsp2_lms_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pRef,
- float32_t * pOut,
- float32_t * pErr,
- uint32_t blockSize);
- void csky_vdsp2_lms_init_f32(
- csky_vdsp2_lms_instance_f32 * S,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- float32_t mu,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the Q15 LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- q15_t mu; /**< step size that controls filter coefficient updates. */
- uint32_t postShift; /**< bit shift applied to coefficients. */
- } csky_vdsp2_lms_instance_q15;
- void csky_vdsp2_lms_init_q15(
- csky_vdsp2_lms_instance_q15 * S,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- q15_t mu,
- uint32_t blockSize,
- uint32_t postShift);
- void csky_vdsp2_lms_q15(
- const csky_vdsp2_lms_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pRef,
- q15_t * pOut,
- q15_t * pErr,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the Q31 LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- q31_t mu; /**< step size that controls filter coefficient updates. */
- uint32_t postShift; /**< bit shift applied to coefficients. */
- } csky_vdsp2_lms_instance_q31;
- void csky_vdsp2_lms_q31(
- const csky_vdsp2_lms_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pRef,
- q31_t * pOut,
- q31_t * pErr,
- uint32_t blockSize);
- void csky_vdsp2_lms_init_q31(
- csky_vdsp2_lms_instance_q31 * S,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- q31_t mu,
- uint32_t blockSize,
- uint32_t postShift);
- /**
- * @brief Instance structure for the floating-point normalized LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- float32_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- float32_t mu; /**< step size that control filter coefficient updates. */
- float32_t energy; /**< saves previous frame energy. */
- float32_t x0; /**< saves previous input sample. */
- } csky_vdsp2_lms_norm_instance_f32;
- void csky_vdsp2_lms_norm_f32(
- csky_vdsp2_lms_norm_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pRef,
- float32_t * pOut,
- float32_t * pErr,
- uint32_t blockSize);
- void csky_vdsp2_lms_norm_init_f32(
- csky_vdsp2_lms_norm_instance_f32 * S,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- float32_t mu,
- uint32_t blockSize);
- /**
- * @brief Instance structure for the Q31 normalized LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- q31_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- q31_t mu; /**< step size that controls filter coefficient updates. */
- uint8_t postShift; /**< bit shift applied to coefficients. */
- q31_t *recipTable; /**< points to the reciprocal initial value table. */
- q31_t energy; /**< saves previous frame energy. */
- q31_t x0; /**< saves previous input sample. */
- } csky_vdsp2_lms_norm_instance_q31;
- void csky_vdsp2_lms_norm_q31(
- csky_vdsp2_lms_norm_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pRef,
- q31_t * pOut,
- q31_t * pErr,
- uint32_t blockSize);
- void csky_vdsp2_lms_norm_init_q31(
- csky_vdsp2_lms_norm_instance_q31 * S,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- q31_t mu,
- uint32_t blockSize,
- uint8_t postShift);
- /**
- * @brief Instance structure for the Q15 normalized LMS filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< Number of coefficients in the filter. */
- q15_t *pState; /**< points to the state variable array. The array is of length numTaps+blockSize-1. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps. */
- q15_t mu; /**< step size that controls filter coefficient updates. */
- uint8_t postShift; /**< bit shift applied to coefficients. */
- q15_t *recipTable; /**< Points to the reciprocal initial value table. */
- q15_t energy; /**< saves previous frame energy. */
- q15_t x0; /**< saves previous input sample. */
- } csky_vdsp2_lms_norm_instance_q15;
- void csky_vdsp2_lms_norm_q15(
- csky_vdsp2_lms_norm_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pRef,
- q15_t * pOut,
- q15_t * pErr,
- uint32_t blockSize);
- void csky_vdsp2_lms_norm_init_q15(
- csky_vdsp2_lms_norm_instance_q15 * S,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- q15_t mu,
- uint32_t blockSize,
- uint8_t postShift);
- void csky_vdsp2_correlate_f32(
- float32_t * pSrcA,
- uint32_t srcALen,
- float32_t * pSrcB,
- uint32_t srcBLen,
- float32_t * pDst);
- void csky_vdsp2_correlate_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch);
- void csky_vdsp2_correlate_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
- void csky_vdsp2_correlate_fast_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst);
- void csky_vdsp2_correlate_fast_opt_q15(
- q15_t * pSrcA,
- uint32_t srcALen,
- q15_t * pSrcB,
- uint32_t srcBLen,
- q15_t * pDst,
- q15_t * pScratch);
- void csky_vdsp2_correlate_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
- void csky_vdsp2_correlate_fast_q31(
- q31_t * pSrcA,
- uint32_t srcALen,
- q31_t * pSrcB,
- uint32_t srcBLen,
- q31_t * pDst);
- void csky_vdsp2_correlate_opt_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst,
- q15_t * pScratch1,
- q15_t * pScratch2);
- void csky_vdsp2_correlate_q7(
- q7_t * pSrcA,
- uint32_t srcALen,
- q7_t * pSrcB,
- uint32_t srcBLen,
- q7_t * pDst);
- /**
- * @brief Instance structure for the floating-point sparse FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
- float32_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
- float32_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
- int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
- } csky_vdsp2_fir_sparse_instance_f32;
- /**
- * @brief Instance structure for the Q31 sparse FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
- q31_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
- q31_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
- int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
- } csky_vdsp2_fir_sparse_instance_q31;
- /**
- * @brief Instance structure for the Q15 sparse FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
- q15_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
- q15_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
- int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
- } csky_vdsp2_fir_sparse_instance_q15;
- /**
- * @brief Instance structure for the Q7 sparse FIR filter.
- */
- typedef struct
- {
- uint16_t numTaps; /**< number of coefficients in the filter. */
- uint16_t stateIndex; /**< state buffer index. Points to the oldest sample in the state buffer. */
- q7_t *pState; /**< points to the state buffer array. The array is of length maxDelay+blockSize-1. */
- q7_t *pCoeffs; /**< points to the coefficient array. The array is of length numTaps.*/
- uint16_t maxDelay; /**< maximum offset specified by the pTapDelay array. */
- int32_t *pTapDelay; /**< points to the array of delay values. The array is of length numTaps. */
- } csky_vdsp2_fir_sparse_instance_q7;
- void csky_vdsp2_fir_sparse_f32(
- csky_vdsp2_fir_sparse_instance_f32 * S,
- float32_t * pSrc,
- float32_t * pDst,
- float32_t * pScratchIn,
- uint32_t blockSize);
- void csky_vdsp2_fir_sparse_init_f32(
- csky_vdsp2_fir_sparse_instance_f32 * S,
- uint16_t numTaps,
- float32_t * pCoeffs,
- float32_t * pState,
- int32_t * pTapDelay,
- uint16_t maxDelay,
- uint32_t blockSize);
- void csky_vdsp2_fir_sparse_q31(
- csky_vdsp2_fir_sparse_instance_q31 * S,
- q31_t * pSrc,
- q31_t * pDst,
- q31_t * pScratchIn,
- uint32_t blockSize);
- void csky_vdsp2_fir_sparse_init_q31(
- csky_vdsp2_fir_sparse_instance_q31 * S,
- uint16_t numTaps,
- q31_t * pCoeffs,
- q31_t * pState,
- int32_t * pTapDelay,
- uint16_t maxDelay,
- uint32_t blockSize);
- void csky_vdsp2_fir_sparse_q15(
- csky_vdsp2_fir_sparse_instance_q15 * S,
- q15_t * pSrc,
- q15_t * pDst,
- q15_t * pScratchIn,
- q31_t * pScratchOut,
- uint32_t blockSize);
- void csky_vdsp2_fir_sparse_init_q15(
- csky_vdsp2_fir_sparse_instance_q15 * S,
- uint16_t numTaps,
- q15_t * pCoeffs,
- q15_t * pState,
- int32_t * pTapDelay,
- uint16_t maxDelay,
- uint32_t blockSize);
- void csky_vdsp2_fir_sparse_q7(
- csky_vdsp2_fir_sparse_instance_q7 * S,
- q7_t * pSrc,
- q7_t * pDst,
- q7_t * pScratchIn,
- q31_t * pScratchOut,
- uint32_t blockSize);
- void csky_vdsp2_fir_sparse_init_q7(
- csky_vdsp2_fir_sparse_instance_q7 * S,
- uint16_t numTaps,
- q7_t * pCoeffs,
- q7_t * pState,
- int32_t * pTapDelay,
- uint16_t maxDelay,
- uint32_t blockSize);
- void csky_vdsp2_sin_cos_f32(
- float32_t theta,
- float32_t * pSinVal,
- float32_t * pCosVal);
- void csky_vdsp2_sin_cos_q31(
- q31_t theta,
- q31_t * pSinVal,
- q31_t * pCosVal);
- void csky_vdsp2_cmplx_conj_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_conj_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_conj_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mag_squared_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mag_squared_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mag_squared_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_vsqrt_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_vsqrt_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_vsqrt_q7(
- q7_t * pSrc,
- q7_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_q7_to_q31(
- q7_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_q7_to_q15(
- q7_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_q7_to_float(
- q7_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_q31_to_float(
- q31_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- csky_vdsp2_status csky_vdsp2_sqrt_f32(
- float32_t in,
- float32_t * pOut);
- csky_vdsp2_status csky_vdsp2_sqrt_q31(
- q31_t in,
- q31_t * pOut);
- csky_vdsp2_status csky_vdsp2_sqrt_q15(
- q15_t in,
- q15_t * pOut);
- void csky_vdsp2_power_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q63_t * pResult);
- void csky_vdsp2_power_int32(
- int32_t * pSrc,
- uint32_t blockSize,
- q63_t * pResult);
- void csky_vdsp2_power_int32(
- int32_t * pSrc,
- uint32_t blockSize,
- q63_t * pResult);
- void csky_vdsp2_power_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void csky_vdsp2_power_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q63_t * pResult);
- void csky_vdsp2_power_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void csky_vdsp2_mean_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * pResult);
- void csky_vdsp2_mean_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
- void csky_vdsp2_mean_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void csky_vdsp2_mean_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void csky_vdsp2_var_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void csky_vdsp2_var_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void csky_vdsp2_var_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
- void csky_vdsp2_rms_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void csky_vdsp2_rms_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void csky_vdsp2_rms_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
- void csky_vdsp2_std_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult);
- void csky_vdsp2_std_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult);
- void csky_vdsp2_std_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult);
- void csky_vdsp2_cmplx_mag_f32(
- float32_t * pSrc,
- float32_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mag_q31(
- q31_t * pSrc,
- q31_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mag_q15(
- q15_t * pSrc,
- q15_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_dot_prod_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- uint32_t numSamples,
- q31_t * realResult,
- q31_t * imagResult);
- void csky_vdsp2_cmplx_dot_prod_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- uint32_t numSamples,
- q63_t * realResult,
- q63_t * imagResult);
- void csky_vdsp2_cmplx_dot_prod_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- uint32_t numSamples,
- float32_t * realResult,
- float32_t * imagResult);
- void csky_vdsp2_cmplx_mult_real_q15(
- q15_t * pSrcCmplx,
- q15_t * pSrcReal,
- q15_t * pCmplxDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mult_real_q31(
- q31_t * pSrcCmplx,
- q31_t * pSrcReal,
- q31_t * pCmplxDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mult_real_f32(
- float32_t * pSrcCmplx,
- float32_t * pSrcReal,
- float32_t * pCmplxDst,
- uint32_t numSamples);
- void csky_vdsp2_min_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * result,
- uint32_t * index);
- void csky_vdsp2_min_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult,
- uint32_t * pIndex);
- void csky_vdsp2_min_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult,
- uint32_t * pIndex);
- void csky_vdsp2_min_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult,
- uint32_t * pIndex);
- void csky_vdsp2_max_q7(
- q7_t * pSrc,
- uint32_t blockSize,
- q7_t * pResult,
- uint32_t * pIndex);
- void csky_vdsp2_max_q15(
- q15_t * pSrc,
- uint32_t blockSize,
- q15_t * pResult,
- uint32_t * pIndex);
- void csky_vdsp2_max_q31(
- q31_t * pSrc,
- uint32_t blockSize,
- q31_t * pResult,
- uint32_t * pIndex);
- void csky_vdsp2_max_f32(
- float32_t * pSrc,
- uint32_t blockSize,
- float32_t * pResult,
- uint32_t * pIndex);
- void csky_vdsp2_cmplx_mult_cmplx_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mult_cmplx_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mult_cmplx_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mult_cmplx_re_q15(
- q15_t * pSrcA,
- q15_t * pSrcB,
- q15_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mult_cmplx_re_q31(
- q31_t * pSrcA,
- q31_t * pSrcB,
- q31_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_cmplx_mult_cmplx_re_f32(
- float32_t * pSrcA,
- float32_t * pSrcB,
- float32_t * pDst,
- uint32_t numSamples);
- void csky_vdsp2_float_to_q31(
- float32_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_float_to_q15(
- float32_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_float_to_q7(
- float32_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_q31_to_q15(
- q31_t * pSrc,
- q15_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_q31_to_q7(
- q31_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_q15_to_float(
- q15_t * pSrc,
- float32_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_q15_to_q31(
- q15_t * pSrc,
- q31_t * pDst,
- uint32_t blockSize);
- void csky_vdsp2_q15_to_q7(
- q15_t * pSrc,
- q7_t * pDst,
- uint32_t blockSize);
- #endif /* _CSKY_VDSP2_MATH_H */
- /**
- *
- * End of file.
- */
|