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

Go to the source code of this file.

Functions

int mload_ (integer *order, integer *awins, integer *awinf, real *speech, real *phi, real *psi)
 

Function Documentation

◆ mload_()

int mload_ ( integer order,
integer awins,
integer awinf,
real speech,
real phi,
real psi 
)

Definition at line 99 of file mload.c.

References order.

Referenced by analys_().

101 {
102  /* System generated locals */
103  integer phi_dim1, phi_offset, i__1, i__2;
104 
105  /* Local variables */
106  integer c__, i__, r__, start;
107 
108 /* Arguments */
109 /* Local variables that need not be saved */
110 /* Load first column of triangular covariance matrix PHI */
111  /* Parameter adjustments */
112  --psi;
113  phi_dim1 = *order;
114  phi_offset = phi_dim1 + 1;
115  phi -= phi_offset;
116  --speech;
117 
118  /* Function Body */
119  start = *awins + *order;
120  i__1 = *order;
121  for (r__ = 1; r__ <= i__1; ++r__) {
122  phi[r__ + phi_dim1] = 0.f;
123  i__2 = *awinf;
124  for (i__ = start; i__ <= i__2; ++i__) {
125  phi[r__ + phi_dim1] += speech[i__ - 1] * speech[i__ - r__];
126  }
127  }
128 /* Load last element of vector PSI */
129  psi[*order] = 0.f;
130  i__1 = *awinf;
131  for (i__ = start; i__ <= i__1; ++i__) {
132  psi[*order] += speech[i__] * speech[i__ - *order];
133  }
134 /* End correct to get additional columns of PHI */
135  i__1 = *order;
136  for (r__ = 2; r__ <= i__1; ++r__) {
137  i__2 = r__;
138  for (c__ = 2; c__ <= i__2; ++c__) {
139  phi[r__ + c__ * phi_dim1] = phi[r__ - 1 + (c__ - 1) * phi_dim1] -
140  speech[*awinf + 1 - r__] * speech[*awinf + 1 - c__] +
141  speech[start - r__] * speech[start - c__];
142  }
143  }
144 /* End correct to get additional elements of PSI */
145  i__1 = *order - 1;
146  for (c__ = 1; c__ <= i__1; ++c__) {
147  psi[c__] = phi[c__ + 1 + phi_dim1] - speech[start - 1] * speech[start
148  - 1 - c__] + speech[*awinf] * speech[*awinf - c__];
149  }
150 /* Copy lower triangular section into upper (why bother?) */
151 /* I'm commenting this out, since the upper triangular half of PHI
152 */
153 /* is never used by later code, unless a sufficiently high level of
154 */
155 /* tracing is turned on. */
156 /* DO R = 1,ORDER */
157 /* DO C = 1,R-1 */
158 /* PHI(C,R) = PHI(R,C) */
159 /* END DO */
160 /* END DO */
161  return 0;
162 } /* mload_ */
integer order
Definition: analys.c:66
INT32 integer
Definition: lpc10.h:80