FreeCalypso > hg > gsm-codec-lib
comparison libgsmhr1/dec_func.h @ 595:1e75556ab6c0
libgsmhr1: integrate helper functions from sp_dec.c
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Thu, 04 Dec 2025 04:05:16 +0000 |
| parents | libgsmhr1/sp_dec.h@83d46a16db1b |
| children | 5809165fb140 |
comparison
equal
deleted
inserted
replaced
| 594:83d46a16db1b | 595:1e75556ab6c0 |
|---|---|
| 1 /* | |
| 2 * This library-internal header file is derived from sp_dec.h in the | |
| 3 * original GSM 06.06 code drop. It contains function prototype | |
| 4 * declarations for functions that were originally in sp_dec.c, but | |
| 5 * have been moved to dec_func.c in our library. These functions | |
| 6 * relate to speech decoding, but are used by both decoder and encoder | |
| 7 * engines, following the principle of an analysis-by-synthesis codec. | |
| 8 */ | |
| 9 | |
| 10 #ifndef dec_func_h | |
| 11 #define dec_func_h | |
| 12 | |
| 13 #include "typedefs.h" | |
| 14 | |
| 15 /*_________________________________________________________________________ | |
| 16 | | | |
| 17 | Function Prototypes | | |
| 18 |_________________________________________________________________________| | |
| 19 */ | |
| 20 | |
| 21 void aFlatRcDp(Longword *pL_R, Shortword *pswRc); | |
| 22 | |
| 23 void b_con(Shortword swCodeWord, short siNumBits, | |
| 24 Shortword pswVectOut[]); | |
| 25 | |
| 26 void fp_ex(Shortword swOrigLagIn, Shortword pswLTPState[]); | |
| 27 | |
| 28 Shortword g_corr1(Shortword *pswIn, Longword *pL_out); | |
| 29 | |
| 30 Shortword g_corr1s(Shortword pswIn[], Shortword swEngyRShft, | |
| 31 Longword *pL_out); | |
| 32 | |
| 33 void getSfrmLpc(short int siSoftInterpolation, | |
| 34 Shortword swPrevR0, Shortword swNewR0, | |
| 35 Shortword pswPrevFrmKs[], | |
| 36 Shortword pswPrevFrmAs[], | |
| 37 Shortword pswPrevFrmPFNum[], | |
| 38 Shortword pswPrevFrmPFDenom[], | |
| 39 Shortword pswNewFrmKs[], | |
| 40 Shortword pswNewFrmAs[], | |
| 41 Shortword pswNewFrmPFNum[], | |
| 42 Shortword pswNewFrmPFDenom[], | |
| 43 struct NormSw *psnsSqrtRs, | |
| 44 Shortword *ppswSynthAs[], | |
| 45 Shortword *ppswPFNumAs[], | |
| 46 Shortword *ppswPFDenomAs[]); | |
| 47 | |
| 48 void get_ipjj(Shortword swLagIn, | |
| 49 Shortword *pswIp, Shortword *pswJj); | |
| 50 | |
| 51 short int interpolateCheck(Shortword pswRefKs[], | |
| 52 Shortword pswRefCoefsA[], | |
| 53 Shortword pswOldCoefsA[], | |
| 54 Shortword pswNewCoefsA[], | |
| 55 Shortword swOldPer, | |
| 56 Shortword swNewPer, | |
| 57 Shortword swRq, | |
| 58 struct NormSw *psnsSqrtRsOut, | |
| 59 Shortword pswCoefOutA[]); | |
| 60 | |
| 61 void lpcFir(Shortword pswInput[], Shortword pswCoef[], | |
| 62 Shortword pswState[], Shortword pswFiltOut[]); | |
| 63 | |
| 64 void lpcIir(Shortword pswInput[], Shortword pswCoef[], | |
| 65 Shortword pswState[], Shortword pswFiltOut[]); | |
| 66 | |
| 67 void lpcIrZsIir(Shortword pswCoef[], Shortword pswFiltOut[]); | |
| 68 | |
| 69 void lpcZiIir(Shortword pswCoef[], Shortword pswState[], | |
| 70 Shortword pswFiltOut[]); | |
| 71 | |
| 72 void lpcZsFir(Shortword pswInput[], Shortword pswCoef[], | |
| 73 Shortword pswFiltOut[]); | |
| 74 | |
| 75 void lpcZsIir(Shortword pswInput[], Shortword pswCoef[], | |
| 76 Shortword pswFiltOut[]); | |
| 77 | |
| 78 void lpcZsIirP(Shortword pswCommonIO[], Shortword pswCoef[]); | |
| 79 | |
| 80 Shortword r0BasedEnergyShft(Shortword swR0Index); | |
| 81 | |
| 82 short rcToADp(Shortword swAscale, Shortword pswRc[], | |
| 83 Shortword pswA[]); | |
| 84 | |
| 85 void rcToCorrDpL(Shortword swAshift, Shortword swAscale, | |
| 86 Shortword pswRc[], Longword pL_R[]); | |
| 87 | |
| 88 void res_eng(Shortword pswReflecCoefIn[], Shortword swRq, | |
| 89 struct NormSw *psnsSqrtRsOut); | |
| 90 | |
| 91 void rs_rr(Shortword pswExcitation[], struct NormSw snsSqrtRs, | |
| 92 struct NormSw *snsSqrtRsRr); | |
| 93 | |
| 94 void rs_rrNs(Shortword pswExcitation[], struct NormSw snsSqrtRs, | |
| 95 struct NormSw *snsSqrtRsRr); | |
| 96 | |
| 97 Shortword scaleExcite(Shortword pswVect[], | |
| 98 Shortword swErrTerm, struct NormSw snsRS, | |
| 99 Shortword pswScldVect[]); | |
| 100 | |
| 101 Shortword sqroot(Longword L_SqrtIn); | |
| 102 | |
| 103 void v_con(Shortword pswBVects[], Shortword pswOutVect[], | |
| 104 Shortword pswBitArray[], short int siNumBVctrs); | |
| 105 | |
| 106 #endif |
