Asterisk - The Open Source Telephony Project  18.5.0
Functions | Variables
lpcenc.c File Reference
#include "f2c.h"
Include dependency graph for lpcenc.c:

Go to the source code of this file.

Functions

int initlpcenc_ (void)
 
int lpc10_encode (real *speech, integer *bits, struct lpc10_encoder_state *st)
 
int lpcenc_ (real *speech, integer *bits)
 

Variables

static integer c__10 = 10
 
static integer c__180 = 180
 

Function Documentation

◆ initlpcenc_()

int initlpcenc_ ( void  )

◆ lpc10_encode()

int lpc10_encode ( real speech,
integer bits,
struct lpc10_encoder_state st 
)

Definition at line 108 of file lpcenc.c.

References analys_(), c__10, c__180, chanwr_(), encode_(), and prepro_().

Referenced by lintolpc10_frameout().

110 {
111  integer irms, voice[2], pitch, ipitv;
112  real rc[10];
113  extern /* Subroutine */ int encode_(integer *, integer *, real *, real *,
114  integer *, integer *, integer *), chanwr_(integer *, integer *,
115  integer *, integer *, integer *, struct lpc10_encoder_state *),
116  analys_(real *, integer *,
117  integer *, real *, real *, struct lpc10_encoder_state *),
118  prepro_(real *, integer *, struct lpc10_encoder_state *);
119  integer irc[10];
120  real rms;
121 
122 /* Arguments */
123 /* $Log$
124  * Revision 1.15 2004/06/26 03:50:14 markster
125  * Merge source cleanups (bug #1911)
126  *
127  * Revision 1.14 2003/02/12 13:59:15 matteo
128  * mer feb 12 14:56:57 CET 2003
129  *
130  * Revision 1.1.1.1 2003/02/12 13:59:15 matteo
131  * mer feb 12 14:56:57 CET 2003
132  *
133  * Revision 1.2 2000/01/05 08:20:39 markster
134  * Some OSS fixes and a few lpc changes to make it actually work
135  *
136  * Revision 1.2 1996/08/20 20:31:21 jaf
137  * Removed all static local variables that were SAVE'd in the Fortran
138  * code, and put them in struct lpc10_encoder_state that is passed as an
139  * argument.
140  *
141  * Removed init function, since all initialization is now done in
142  * init_lpc10_encoder_state().
143  *
144  * Changed name of function from lpcenc_ to lpc10_encode, simply to make
145  * all lpc10 functions have more consistent naming with each other.
146  *
147  * Revision 1.1 1996/08/19 22:31:44 jaf
148  * Initial revision
149  * */
150 /* Revision 1.3 1996/03/29 22:03:47 jaf */
151 /* Removed definitions for any constants that were no longer used. */
152 
153 /* Revision 1.2 1996/03/26 19:34:33 jaf */
154 /* Added comments indicating which constants are not needed in an */
155 /* application that uses the LPC-10 coder. */
156 
157 /* Revision 1.1 1996/02/07 14:43:51 jaf */
158 /* Initial revision */
159 
160 /* LPC Configuration parameters: */
161 /* Frame size, Prediction order, Pitch period */
162 /* Local variables that need not be saved */
163 /* Uncoded speech parameters */
164 /* Coded speech parameters */
165 /* Local state */
166 /* None */
167  /* Parameter adjustments */
168  if (speech) {
169  --speech;
170  }
171  if (bits) {
172  --bits;
173  }
174 
175  /* Function Body */
176  prepro_(&speech[1], &c__180, st);
177  analys_(&speech[1], voice, &pitch, &rms, rc, st);
178  encode_(voice, &pitch, &rms, rc, &ipitv, &irms, irc);
179  chanwr_(&c__10, &ipitv, &irms, irc, &bits[1], st);
180  return 0;
181 } /* lpcenc_ */
static integer c__10
Definition: lpcenc.c:54
int chanwr_(integer *order, integer *ipitv, integer *irms, integer *irc, integer *ibits, struct lpc10_encoder_state *st)
Definition: chanwr.c:223
int encode_(integer *voice, integer *pitch, real *rms, real *rc, integer *ipitch, integer *irms, integer *irc)
Definition: encode.c:111
static integer c__180
Definition: lpcenc.c:53
int prepro_(real *speech, integer *length, struct lpc10_encoder_state *st)
Definition: prepro.c:101
float real
Definition: lpc10.h:79
real voice[6]
Definition: lpc10.h:121
int analys_(real *speech, integer *voice, integer *pitch, real *rms, real *rc, struct lpc10_encoder_state *st)
Definition: analys.c:206
INT32 integer
Definition: lpc10.h:80

◆ lpcenc_()

int lpcenc_ ( real speech,
integer bits 
)

Variable Documentation

◆ c__10

integer c__10 = 10
static

Definition at line 54 of file lpcenc.c.

Referenced by lpc10_encode().

◆ c__180

integer c__180 = 180
static

Definition at line 53 of file lpcenc.c.

Referenced by lpc10_encode().