FreeCalypso > hg > gsm-codec-lib
changeset 624:fd35fd05bc8b
libgsmhr1/sp_frm.[ch]: constify some function arguments
Speech encoder main function calls filt4_2nd(), which in turn calls
iir_d(). A pointer comes from a "ROM" table, hence const.
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Thu, 12 Mar 2026 03:53:21 +0000 |
| parents | 6366902640fd |
| children | d46c2e4c4392 |
| files | libgsmhr1/sp_frm.c libgsmhr1/sp_frm.h |
| diffstat | 2 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libgsmhr1/sp_frm.c Thu Mar 12 02:52:36 2026 +0000 +++ b/libgsmhr1/sp_frm.c Thu Mar 12 03:53:21 2026 +0000 @@ -2104,7 +2104,7 @@ * *************************************************************************/ -void filt4_2nd(Shortword pswCoeff[], Shortword pswIn[], +void filt4_2nd(const Shortword pswCoeff[], Shortword pswIn[], Shortword pswXstate[], Shortword pswYstate[], int npts, int shifts) { @@ -3899,9 +3899,9 @@ * *************************************************************************/ -void iir_d(Shortword pswCoeff[], Shortword pswIn[], Shortword pswXstate[], - Shortword pswYstate[], int npts, int shifts, - Shortword swPreFirDownSh, Shortword swFinalUpShift) +void iir_d(const Shortword pswCoeff[], Shortword pswIn[], Shortword pswXstate[], + Shortword pswYstate[], int npts, int shifts, + Shortword swPreFirDownSh, Shortword swFinalUpShift) { /*_________________________________________________________________________
--- a/libgsmhr1/sp_frm.h Thu Mar 12 02:52:36 2026 +0000 +++ b/libgsmhr1/sp_frm.h Thu Mar 12 03:53:21 2026 +0000 @@ -59,7 +59,7 @@ Shortword pswWNumSpace[], Shortword pswWDenomSpace[], Shortword pswWSpeechBuffBase[]); -void iir_d(Shortword pswCoeff[], Shortword pswIn[], +void iir_d(const Shortword pswCoeff[], Shortword pswIn[], Shortword pswXstate[], Shortword pswYstate[], int npts, int shifts, @@ -67,7 +67,7 @@ Shortword swFinalUpShift); - void filt4_2nd(Shortword pswCoeff[], + void filt4_2nd(const Shortword pswCoeff[], Shortword pswIn[], Shortword pswXstate[], Shortword pswYstate[],
