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

Go to the source code of this file.

Functions

int irc2pc_ (real *rc, real *pc, integer *order, real *gprime, real *g2pass)
 

Function Documentation

◆ irc2pc_()

int irc2pc_ ( real rc,
real pc,
integer order,
real gprime,
real g2pass 
)

Definition at line 82 of file irc2pc.c.

References order.

Referenced by synths_().

84 {
85  /* System generated locals */
86  integer i__1, i__2;
87 
88  /* Builtin functions */
89  double sqrt(doublereal);
90 
91  /* Local variables */
92  real temp[10];
93  integer i__, j;
94 
95 /* Arguments */
96 /* $Log$
97  * Revision 1.15 2004/06/26 03:50:14 markster
98  * Merge source cleanups (bug #1911)
99  *
100  * Revision 1.14 2003/02/12 13:59:15 matteo
101  * mer feb 12 14:56:57 CET 2003
102  *
103  * Revision 1.1.1.1 2003/02/12 13:59:15 matteo
104  * mer feb 12 14:56:57 CET 2003
105  *
106  * Revision 1.2 2000/01/05 08:20:39 markster
107  * Some OSS fixes and a few lpc changes to make it actually work
108  *
109  * Revision 1.1 1996/08/19 22:31:56 jaf
110  * Initial revision
111  * */
112 /* Revision 1.3 1996/03/29 22:03:47 jaf */
113 /* Removed definitions for any constants that were no longer used. */
114 
115 /* Revision 1.2 1996/03/26 19:34:33 jaf */
116 /* Added comments indicating which constants are not needed in an */
117 /* application that uses the LPC-10 coder. */
118 
119 /* Revision 1.1 1996/02/07 14:43:51 jaf */
120 /* Initial revision */
121 
122 /* LPC Configuration parameters: */
123 /* Frame size, Prediction order, Pitch period */
124 /* Local variables that need not be saved */
125  /* Parameter adjustments */
126  --pc;
127  --rc;
128 
129  /* Function Body */
130  *g2pass = 1.f;
131  i__1 = *order;
132  for (i__ = 1; i__ <= i__1; ++i__) {
133  *g2pass *= 1.f - rc[i__] * rc[i__];
134  }
135  *g2pass = *gprime * (real)sqrt(*g2pass);
136  pc[1] = rc[1];
137  i__1 = *order;
138  for (i__ = 2; i__ <= i__1; ++i__) {
139  i__2 = i__ - 1;
140  for (j = 1; j <= i__2; ++j) {
141  temp[j - 1] = pc[j] - rc[i__] * pc[i__ - j];
142  }
143  i__2 = i__ - 1;
144  for (j = 1; j <= i__2; ++j) {
145  pc[j] = temp[j - 1];
146  }
147  pc[i__] = rc[i__];
148  }
149  return 0;
150 } /* irc2pc_ */
integer order
Definition: analys.c:66
double doublereal
Definition: f2c.h:50
float real
Definition: lpc10.h:79
INT32 integer
Definition: lpc10.h:80