diff libgsmefr/c1035pf.c @ 57:e005e7b91f3c

libgsmefr: c1035pf.c compiles
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 25 Nov 2022 17:24:48 +0000
parents 49dd1ac8e75b
children 12d9d3649232
line wrap: on
line diff
--- a/libgsmefr/c1035pf.c	Fri Nov 25 17:15:08 2022 +0000
+++ b/libgsmefr/c1035pf.c	Fri Nov 25 17:24:48 2022 +0000
@@ -1,7 +1,10 @@
+#include "gsm_efr.h"
 #include "typedef.h"
+#include "namespace.h"
 #include "basic_op.h"
+#include "no_count.h"
 #include "sig_proc.h"
-#include "count.h"
+#include "codec.h"
 
 #define L_CODE    40
 #define NB_TRACK  5
@@ -10,13 +13,13 @@
 
 /* local functions */
 
-void cor_h_x (
+static void cor_h_x (
     Word16 h[],    /* (i)  : impulse response of weighted synthesis filter */
     Word16 x[],    /* (i)  : target                                        */
     Word16 dn[]    /* (o)  : correlation between target and h[]            */
 );
 
-void set_sign (
+static void set_sign (
     Word16 dn[],      /* (i/o)  : correlation between target and h[]       */
     Word16 cn[],      /* (i)  : residual after long term prediction        */
     Word16 sign[],    /* (o)  : sign of d[n]                               */
@@ -24,20 +27,20 @@
     Word16 ipos[]     /* (o)  : starting position for each pulse           */
 );
 
-void cor_h (
+static void cor_h (
     Word16 h[],         /* (i)  : impulse response of weighted synthesis
                                   filter */
     Word16 sign[],      /* (i)  : sign of d[n]                             */
     Word16 rr[][L_CODE] /* (o)  : matrix of autocorrelation                */
 );
-void search_10i40 (
+static void search_10i40 (
     Word16 dn[],         /* (i) : correlation between target and h[]       */
     Word16 rr[][L_CODE], /* (i) : matrix of autocorrelation                */
     Word16 ipos[],       /* (i) : starting position for each pulse         */
     Word16 pos_max[],    /* (i) : position of maximum of dn[]              */
     Word16 codvec[]      /* (o) : algebraic codebook vector                */
 );
-void build_code (
+static void build_code (
     Word16 codvec[], /* (i)  : algebraic codebook vector                   */
     Word16 sign[],   /* (i)  : sign of dn[]                                */
     Word16 cod[],    /* (o)  : algebraic (fixed) codebook excitation       */
@@ -46,7 +49,7 @@
     Word16 indx[]    /* (o)  : index of 10 pulses (position+sign+ampl)*10   */
 );
 
-void q_p (
+static void q_p (
     Word16 *ind,   /* Pulse position                                        */
     Word16 n       /* Pulse number                                          */
 );
@@ -119,7 +122,7 @@
  *    to each position track does not saturate.
  *
  *************************************************************************/
-void cor_h_x (
+static void cor_h_x (
     Word16 h[],     /* (i)   : impulse response of weighted synthesis filter */
     Word16 x[],     /* (i)   : target                                        */
     Word16 dn[]     /* (o)   : correlation between target and h[]            */
@@ -170,7 +173,7 @@
  *
  *************************************************************************/
 
-void set_sign (
+static void set_sign (
     Word16 dn[],      /* (i/o): correlation between target and h[]         */
     Word16 cn[],      /* (i)  : residual after long term prediction        */
     Word16 sign[],    /* (o)  : sign of d[n]                               */
@@ -269,7 +272,7 @@
     }
 }
 
-void q_p (
+static void q_p (
     Word16 *ind,        /* Pulse position */
     Word16 n            /* Pulse number   */
 )
@@ -308,7 +311,7 @@
  *
  *************************************************************************/
 
-void cor_h (
+static void cor_h (
     Word16 h[],         /* (i) : impulse response of weighted synthesis
                                  filter                                  */
     Word16 sign[],      /* (i) : sign of d[n]                            */
@@ -387,7 +390,7 @@
 #define _1_64   (Word16)(32768L/64)
 #define _1_128  (Word16)(32768L/128)
 
-void search_10i40 (
+static void search_10i40 (
     Word16 dn[],         /* (i) : correlation between target and h[]        */
     Word16 rr[][L_CODE], /* (i) : matrix of autocorrelation                 */
     Word16 ipos[],       /* (i) : starting position for each pulse          */
@@ -772,7 +775,7 @@
  *
  *************************************************************************/
 
-void build_code (
+static void build_code (
     Word16 codvec[], /* (i)  : position of pulses                           */
     Word16 sign[],   /* (i)  : sign of d[n]                                 */
     Word16 cod[],    /* (o)  : innovative code vector                       */