summaryrefslogtreecommitdiff
path: root/codecs/lpc10
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
committerSean Bright <sean.bright@gmail.com>2017-12-22 09:23:22 -0500
commitfd0ca1c3f9b972a52d48a82b492fd6bac772dc78 (patch)
tree42d2a87726d196f4db1c68489007520a4c597062 /codecs/lpc10
parent9ef97b5a9191e51f1edc66bb17728fd9fe552c35 (diff)
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'codecs/lpc10')
-rw-r--r--codecs/lpc10/Makefile12
-rw-r--r--codecs/lpc10/analys.c68
-rw-r--r--codecs/lpc10/bsynz.c28
-rw-r--r--codecs/lpc10/chanwr.c8
-rw-r--r--codecs/lpc10/dcbias.c1
-rw-r--r--codecs/lpc10/decode.c34
-rw-r--r--codecs/lpc10/difmag.c3
-rw-r--r--codecs/lpc10/dyptrk.c38
-rw-r--r--codecs/lpc10/encode.c23
-rw-r--r--codecs/lpc10/energy.c1
-rw-r--r--codecs/lpc10/f2c.h6
-rw-r--r--codecs/lpc10/ham84.c1
-rw-r--r--codecs/lpc10/invert.c1
-rw-r--r--codecs/lpc10/irc2pc.c1
-rw-r--r--codecs/lpc10/ivfilt.c1
-rw-r--r--codecs/lpc10/lpc10.h4
-rw-r--r--codecs/lpc10/lpcdec.c26
-rw-r--r--codecs/lpc10/lpcenc.c8
-rw-r--r--codecs/lpc10/lpcini.c22
-rw-r--r--codecs/lpc10/lpfilt.c1
-rw-r--r--codecs/lpc10/median.c1
-rw-r--r--codecs/lpc10/mload.c13
-rw-r--r--codecs/lpc10/onset.c24
-rw-r--r--codecs/lpc10/pitsyn.c38
-rw-r--r--codecs/lpc10/placea.c9
-rw-r--r--codecs/lpc10/placev.c19
-rw-r--r--codecs/lpc10/preemp.c5
-rw-r--r--codecs/lpc10/random.c1
-rw-r--r--codecs/lpc10/rcchk.c3
-rw-r--r--codecs/lpc10/synths.c34
-rw-r--r--codecs/lpc10/tbdm.c7
-rw-r--r--codecs/lpc10/voicin.c60
-rw-r--r--codecs/lpc10/vparms.c5
33 files changed, 244 insertions, 262 deletions
diff --git a/codecs/lpc10/Makefile b/codecs/lpc10/Makefile
index b414fd77d..04b106b66 100644
--- a/codecs/lpc10/Makefile
+++ b/codecs/lpc10/Makefile
@@ -1,25 +1,25 @@
-#
+#
# Makefile for LPC-10 speech coder library (unix)
-#
+#
# default C compiler
CC?= gcc
-#
+#
# These definitions for CFLAGS and LIB_TARGET_DIR are used when one
# runs make in the lpc10 directory, without environment variables that
# override them. When make is run in this directory from a makefile
# for an application that uses the LPC10 coder, there are environment
# variables set for CFLAGS and LIB_TARGET_DIR that override these
# definitions.
-#
+#
LIB_TARGET_DIR = .
-#
+#
# -I$(LIB_TARGET_DIR) option needed so that #include "machine.h"
# directives can find the machine.h file.
-#
+#
CFLAGS+= -fPIC -Wno-comment
diff --git a/codecs/lpc10/analys.c b/codecs/lpc10/analys.c
index 50e95703d..5ea0a2d39 100644
--- a/codecs/lpc10/analys.c
+++ b/codecs/lpc10/analys.c
@@ -203,7 +203,7 @@ static integer c__1 = 1;
/* This entry has no local state. It accesses a "constant" array */
/* declared in ANALYS. */
-/* Subroutine */ int analys_(real *speech, integer *voice, integer
+/* Subroutine */ int analys_(real *speech, integer *voice, integer
*pitch, real *rms, real *rc, struct lpc10_encoder_state *st)
{
/* Initialized data */
@@ -243,8 +243,8 @@ static integer c__1 = 1;
extern int dcbias_(integer *, real *, real *);
integer ipitch;
integer *obound;
- extern /* Subroutine */ int preemp_(real *, real *, integer *, real *,
- real *), voicin_(integer *, real *, real *, integer *, integer *,
+ extern /* Subroutine */ int preemp_(real *, real *, integer *, real *,
+ real *), voicin_(integer *, real *, real *, integer *, integer *,
real *, real *, integer *, real *, integer *, integer *, integer *,
struct lpc10_encoder_state *);
integer *voibuf;
@@ -252,10 +252,10 @@ static integer c__1 = 1;
real *rmsbuf;
extern /* Subroutine */ int lpfilt_(real *, real *, integer *, integer *),
ivfilt_(real *, real *, integer *, integer *, real *), energy_(
- integer *, real *, real *), invert_(integer *, real *, real *,
+ integer *, real *, real *), invert_(integer *, real *, real *,
real *);
integer minptr, maxptr;
- extern /* Subroutine */ int dyptrk_(real *, integer *, integer *, integer
+ extern /* Subroutine */ int dyptrk_(real *, integer *, integer *, integer
*, integer *, integer *, struct lpc10_encoder_state *);
real phi[100] /* was [10][10] */, psi[10];
@@ -355,13 +355,13 @@ static integer c__1 = 1;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -371,35 +371,35 @@ static integer c__1 = 1;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -426,7 +426,7 @@ static integer c__1 = 1;
/* The tables TAU and BUFLIM, and the variable PRECOEF, are not */
/* Fortran PARAMETER's, but they are initialized with DATA */
/* statements, and never modified. Thus, they need not have SAVE */
-/* statements for them to keep their values from one invocation to
+/* statements for them to keep their values from one invocation to
*/
/* the next. */
/* Local variables that need not be saved */
@@ -512,13 +512,13 @@ static integer c__1 = 1;
vwin[(i__ << 1) - 1] = vwin[((i__ + 1) << 1) - 1] - contrl_1.lframe;
awin[(i__ << 1) - 2] = awin[((i__ + 1) << 1) - 2] - contrl_1.lframe;
awin[(i__ << 1) - 1] = awin[((i__ + 1) << 1) - 1] - contrl_1.lframe;
-/* EWIN(*,J) is unused for J .NE. AF, so the following shift is
+/* EWIN(*,J) is unused for J .NE. AF, so the following shift is
*/
/* unnecessary. It also causes error messages when the C versio
n */
-/* of the code created from this by f2c is run with Purify. It
+/* of the code created from this by f2c is run with Purify. It
*/
-/* correctly complains that uninitialized memory is being read.
+/* correctly complains that uninitialized memory is being read.
*/
/* EWIN(1,I) = EWIN(1,I+1) - LFRAME */
/* EWIN(2,I) = EWIN(2,I+1) - LFRAME */
@@ -533,17 +533,17 @@ n */
}
/* Copy input speech, scale to sign+12 bit integers */
/* Remove long term DC bias. */
-/* If the average value in the frame was over 1/4096 (after current
+/* If the average value in the frame was over 1/4096 (after current
*/
/* BIAS correction), then subtract that much more from samples in */
/* next frame. If the average value in the frame was under */
-/* -1/4096, add 1/4096 more to samples in next frame. In all other
+/* -1/4096, add 1/4096 more to samples in next frame. In all other
*/
/* cases, keep BIAS the same. */
temp = 0.f;
i__1 = contrl_1.lframe;
for (i__ = 1; i__ <= i__1; ++i__) {
- inbuf[720 - contrl_1.lframe + i__ - 181] = speech[i__] * 4096.f -
+ inbuf[720 - contrl_1.lframe + i__ - 181] = speech[i__] * 4096.f -
(*bias);
temp += inbuf[720 - contrl_1.lframe + i__ - 181];
}
@@ -555,7 +555,7 @@ n */
}
/* Place Voicing Window */
i__ = 721 - contrl_1.lframe;
- preemp_(&inbuf[i__ - 181], &pebuf[i__ - 181], &contrl_1.lframe, &precoef,
+ preemp_(&inbuf[i__ - 181], &pebuf[i__ - 181], &contrl_1.lframe, &precoef,
zpre);
onset_(pebuf, osbuf, osptr, &c__10, &c__181, &c__720, &contrl_1.lframe, st);
@@ -563,39 +563,39 @@ n */
/* MAXOSP = MAX( MAXOSP, OSPTR ) */
- placev_(osbuf, osptr, &c__10, &obound[2], vwin, &c__3, &contrl_1.lframe,
+ placev_(osbuf, osptr, &c__10, &obound[2], vwin, &c__3, &contrl_1.lframe,
&c__90, &c__156, &c__307, &c__462);
-/* The Pitch Extraction algorithm estimates the pitch for a frame
+/* The Pitch Extraction algorithm estimates the pitch for a frame
*/
/* of speech by locating the minimum of the average magnitude difference
*/
/* function (AMDF). The AMDF operates on low-pass, inverse filtered */
-/* speech. (The low-pass filter is an 800 Hz, 19 tap, equiripple, FIR
+/* speech. (The low-pass filter is an 800 Hz, 19 tap, equiripple, FIR
*/
-/* filter and the inverse filter is a 2nd-order LPC filter.) The pitch
+/* filter and the inverse filter is a 2nd-order LPC filter.) The pitch
*/
-/* estimate is later refined by dynamic programming (DYPTRK). However,
+/* estimate is later refined by dynamic programming (DYPTRK). However,
*/
/* since some of DYPTRK's parameters are a function of the voicing */
/* decisions, a voicing decision must precede the final pitch estimation.
*/
/* See subroutines LPFILT, IVFILT, and TBDM. */
/* LPFILT reads indices LBUFH-LFRAME-29 = 511 through LBUFH = 720 */
-/* of INBUF, and writes indices LBUFH+1-LFRAME = 541 through LBUFH
+/* of INBUF, and writes indices LBUFH+1-LFRAME = 541 through LBUFH
*/
/* = 720 of LPBUF. */
lpfilt_(&inbuf[228], &lpbuf[384], &c__312, &contrl_1.lframe);
-/* IVFILT reads indices (PWINH-LFRAME-7) = 353 through PWINH = 540
+/* IVFILT reads indices (PWINH-LFRAME-7) = 353 through PWINH = 540
*/
/* of LPBUF, and writes indices (PWINH-LFRAME+1) = 361 through */
/* PWINH = 540 of IVBUF. */
ivfilt_(&lpbuf[204], ivbuf, &c__312, &contrl_1.lframe, ivrc);
/* TBDM reads indices PWINL = 229 through */
-/* (PWINL-1)+MAXWIN+(TAU(LTAU)-TAU(1))/2 = 452 of IVBUF, and writes
+/* (PWINL-1)+MAXWIN+(TAU(LTAU)-TAU(1))/2 = 452 of IVBUF, and writes
*/
/* indices 1 through LTAU = 60 of AMDF. */
tbdm_(ivbuf, &c__156, tau, &c__60, amdf, &minptr, &maxptr, &mintau);
-/* Voicing decisions are made for each half frame of input speech.
+/* Voicing decisions are made for each half frame of input speech.
*/
/* An initial voicing classification is made for each half of the */
/* analysis frame, and the voicing decisions for the present frame */
@@ -605,9 +605,9 @@ n */
/* maximum-to-minimum ratio, the zero crossing rate, energy measures, */
/* reflection coefficients, and prediction gains. */
/* The pitch and voicing rules apply smoothing and isolated */
-/* corrections to the pitch and voicing estimates and, in the process,
+/* corrections to the pitch and voicing estimates and, in the process,
*/
-/* introduce two frames of delay into the corrected pitch estimates and
+/* introduce two frames of delay into the corrected pitch estimates and
*/
/* voicing decisions. */
for (half = 1; half <= 2; ++half) {
diff --git a/codecs/lpc10/bsynz.c b/codecs/lpc10/bsynz.c
index daf9105d6..de43b43d6 100644
--- a/codecs/lpc10/bsynz.c
+++ b/codecs/lpc10/bsynz.c
@@ -119,7 +119,7 @@ extern struct {
/* reinitialize its state for any other reason, call the ENTRY */
/* INITBSYNZ. */
-/* Subroutine */ int bsynz_(real *coef, integer *ip, integer *iv,
+/* Subroutine */ int bsynz_(real *coef, integer *ip, integer *iv,
real *sout, real *rms, real *ratio, real *g2pass,
struct lpc10_decoder_state *st)
{
@@ -245,13 +245,13 @@ extern struct {
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -261,35 +261,35 @@ extern struct {
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -301,11 +301,11 @@ extern struct {
/* common /contrl/ nframe, nunsfm, iclip, maxosp, listl, lincnt */
/* Function return value definitions */
/* Parameters/constants */
-/* KEXC is not a Fortran PARAMETER, but it is an array initialized
+/* KEXC is not a Fortran PARAMETER, but it is an array initialized
*/
/* with a DATA statement that is never modified. */
/* Local variables that need not be saved */
-/* NOISE is declared with range (1:MAXPIT+MAXORD), but only indices
+/* NOISE is declared with range (1:MAXPIT+MAXORD), but only indices
*/
/* ORDER+1 through ORDER+IP are ever used, and I think that IP */
/* .LE. MAXPIT. Why not declare it to be in the range (1:MAXPIT) */
@@ -357,7 +357,7 @@ extern struct {
/* Impulse doublet excitation for plosives */
/* (RANDOM()+32768) is in the range 0 to 2**16-1. Therefore the
*/
-/* following expression should be evaluated using integers with
+/* following expression should be evaluated using integers with
at */
/* least 32 bits (16 isn't enough), and PX should be in the rang
e */
diff --git a/codecs/lpc10/chanwr.c b/codecs/lpc10/chanwr.c
index b7a9c722e..280cd6893 100644
--- a/codecs/lpc10/chanwr.c
+++ b/codecs/lpc10/chanwr.c
@@ -129,7 +129,7 @@ Some OSS fixes and a few lpc changes to make it actually work
/* R5-1, R6-1, R7-2, R9-0, P-5, */
/* R5-2, R6-2,R10-1, R8-2, P-6, R9-1, */
/* R5-3, R6-3, R7-3, R9-2, R8-3, SYNC */
-/* Subroutine */ int chanwr_0_(int n__, integer *order, integer *ipitv,
+/* Subroutine */ int chanwr_0_(int n__, integer *order, integer *ipitv,
integer *irms, integer *irc, integer *ibits,
struct lpc10_encoder_state *st)
{
@@ -150,7 +150,7 @@ Some OSS fixes and a few lpc changes to make it actually work
/* Arguments */
/* Parameters/constants */
/* These arrays are not Fortran PARAMETER's, but they are defined */
-/* by DATA statements below, and their contents are never altered.
+/* by DATA statements below, and their contents are never altered.
*/
/* Local variables that need not be saved */
/* Local state */
@@ -220,13 +220,13 @@ L_chanrd:
return 0;
} /* chanwr_ */
-/* Subroutine */ int chanwr_(integer *order, integer *ipitv, integer *irms,
+/* Subroutine */ int chanwr_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits, struct lpc10_encoder_state *st)
{
return chanwr_0_(0, order, ipitv, irms, irc, ibits, st);
}
-/* Subroutine */ int chanrd_(integer *order, integer *ipitv, integer *irms,
+/* Subroutine */ int chanrd_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits)
{
return chanwr_0_(1, order, ipitv, irms, irc, ibits, NULL);
diff --git a/codecs/lpc10/dcbias.c b/codecs/lpc10/dcbias.c
index d5a7d644f..2fb07cf2b 100644
--- a/codecs/lpc10/dcbias.c
+++ b/codecs/lpc10/dcbias.c
@@ -104,4 +104,3 @@ extern int dcbias_(integer *len, real *speech, real *sigout);
}
return 0;
} /* dcbias_ */
-
diff --git a/codecs/lpc10/decode.c b/codecs/lpc10/decode.c
index 08b8b9192..d58cd0874 100644
--- a/codecs/lpc10/decode.c
+++ b/codecs/lpc10/decode.c
@@ -67,7 +67,7 @@ static integer c__2 = 2;
*
* Revision 1.15 2003/09/19 01:20:22 markster
* Code cleanups (bug #66)
- *
+ *
* Revision 1.2 2003/09/19 01:20:22 markster
* Code cleanups (bug #66)
*
@@ -144,7 +144,7 @@ static integer c__2 = 2;
/* reinitialize its state for any other reason, call the ENTRY */
/* INITDECODE. */
-/* Subroutine */ int decode_(integer *ipitv, integer *irms,
+/* Subroutine */ int decode_(integer *ipitv, integer *irms,
integer *irc, integer *voice, integer *pitch, real *rms, real *rc,
struct lpc10_decoder_state *st)
{
@@ -301,13 +301,13 @@ static integer c__2 = 2;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -317,35 +317,35 @@ static integer c__2 = 2;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -379,9 +379,9 @@ static integer c__2 = 2;
/* The following are used regardless of CORRP's value */
/* The following are used only if CORRP is .TRUE. */
/* I am guessing the initial values for IVP2H, IOVOIC, DRC, DPIT, */
-/* and DRMS. They should be checked to see if they are reasonable.
+/* and DRMS. They should be checked to see if they are reasonable.
*/
-/* I'm also guessing for ERATE, but I think 0 is the right initial
+/* I'm also guessing for ERATE, but I think 0 is the right initial
*/
/* value. */
/* Parameter adjustments */
@@ -474,7 +474,7 @@ static integer c__2 = 2;
if (*first) {
*first = FALSE_;
/* Assign PITCH a "default" value on the first call, since */
-/* otherwise it would be left uninitialized. The two lines
+/* otherwise it would be left uninitialized. The two lines
*/
/* below were copied from above, since it seemed like a */
/* reasonable thing to do for the first call. */
@@ -535,7 +535,7 @@ static integer c__2 = 2;
*pitch = dpit[1];
/* If bit 2 of ICORF is set then smooth RMS and RC's, */
if ((icorf & bit[1]) != 0) {
- if ((i__1 = drms[1] - drms[0], (real) abs(i__1)) >= corth[ixcor + 3]
+ if ((i__1 = drms[1] - drms[0], (real) abs(i__1)) >= corth[ixcor + 3]
&& (i__2 = drms[1] - drms[2], (real) abs(i__2)) >= corth[
ixcor + 3]) {
*irms = median_(&drms[2], &drms[1], drms);
@@ -552,7 +552,7 @@ static integer c__2 = 2;
}
/* If bit 3 of ICORF is set then smooth pitch */
if ((icorf & bit[2]) != 0) {
- if ((i__1 = dpit[1] - dpit[0], (real) abs(i__1)) >= corth[ixcor - 1]
+ if ((i__1 = dpit[1] - dpit[0], (real) abs(i__1)) >= corth[ixcor - 1]
&& (i__2 = dpit[1] - dpit[2], (real) abs(i__2)) >= corth[
ixcor - 1]) {
*pitch = median_(&dpit[2], &dpit[1], dpit);
diff --git a/codecs/lpc10/difmag.c b/codecs/lpc10/difmag.c
index ab59e8c9a..5132f96e9 100644
--- a/codecs/lpc10/difmag.c
+++ b/codecs/lpc10/difmag.c
@@ -87,7 +87,7 @@ extern int difmag_(real *speech, integer *lpita, integer *tau, integer *ltau, in
/* This subroutine has no local state. */
-/* Subroutine */ int difmag_(real *speech, integer *lpita, integer *tau,
+/* Subroutine */ int difmag_(real *speech, integer *lpita, integer *tau,
integer *ltau, integer *maxlag, real *amdf, integer *minptr, integer *
maxptr)
{
@@ -130,4 +130,3 @@ extern int difmag_(real *speech, integer *lpita, integer *tau, integer *ltau, in
}
return 0;
} /* difmag_ */
-
diff --git a/codecs/lpc10/dyptrk.c b/codecs/lpc10/dyptrk.c
index 45fb5eb08..ca195b601 100644
--- a/codecs/lpc10/dyptrk.c
+++ b/codecs/lpc10/dyptrk.c
@@ -200,13 +200,13 @@ extern struct {
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -216,35 +216,35 @@ extern struct {
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -260,7 +260,7 @@ extern struct {
/* removed. */
/* Local state */
/* It would be a bit more "general" to define S(LTAU), if Fortran */
-/* allows the argument of a function to be used as the dimension of
+/* allows the argument of a function to be used as the dimension of
*/
/* a local array variable. */
/* IPOINT is always in the range 0 to DEPTH-1. */
@@ -272,16 +272,16 @@ extern struct {
/* initial values (all indices of P with second index equal to */
/* IPTR are all written before being read in this subroutine). */
-/* From examining the code carefully, it appears that all of these
+/* From examining the code carefully, it appears that all of these
*/
/* should be saved from one invocation to the next. */
/* I've run lpcsim with the "-l 6" option to see all of the */
/* debugging information that is printed out by this subroutine */
/* below, and it appears that S, P, IPOINT, and ALPHAX are all */
-/* initialized to 0 (these initial values would likely be different
+/* initialized to 0 (these initial values would likely be different
*/
-/* on different platforms, compilers, etc.). Given that the output
+/* on different platforms, compilers, etc.). Given that the output
*/
/* of the coder sounds reasonable, I'm going to initialize these */
/* variables to 0 explicitly. */
@@ -299,9 +299,9 @@ extern struct {
/* Function Body */
-/* Calculate the confidence factor ALPHA, used as a threshold slope in
+/* Calculate the confidence factor ALPHA, used as a threshold slope in
*/
-/* SEESAW. If unvoiced, set high slope so that every point in P array
+/* SEESAW. If unvoiced, set high slope so that every point in P array
*/
/* is marked as a potential pitch frequency. A scaled up version (ALPHAX
)*/
@@ -391,11 +391,11 @@ n*/
*pitch = p[*pitch + j * 60 - 61];
}
-/* The following statement subtracts one from IPOINT, mod DEPTH. I
+/* The following statement subtracts one from IPOINT, mod DEPTH. I
*/
-/* think the author chose to add DEPTH-1, instead of subtracting 1,
+/* think the author chose to add DEPTH-1, instead of subtracting 1,
*/
-/* because then it will work even if MOD doesn't work as desired on
+/* because then it will work even if MOD doesn't work as desired on
*/
/* negative arguments. */
diff --git a/codecs/lpc10/encode.c b/codecs/lpc10/encode.c
index b81799f6b..f7b47762d 100644
--- a/codecs/lpc10/encode.c
+++ b/codecs/lpc10/encode.c
@@ -213,13 +213,13 @@ static integer c__2 = 2;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -229,35 +229,35 @@ static integer c__2 = 2;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -269,7 +269,7 @@ static integer c__2 = 2;
/* common /contrl/ nframe, nunsfm, iclip, maxosp, listl, lincnt */
/* Parameters/constants */
/* These arrays are not Fortran PARAMETER's, but they are defined */
-/* by DATA statements below, and their contents are never altered.
+/* by DATA statements below, and their contents are never altered.
*/
/* Local variables that need not be saved */
/* Parameter adjustments */
@@ -370,4 +370,3 @@ static integer c__2 = 2;
/* 801 FORMAT(1X,'<<ENCODE OUT>>',T32,2I3,I6,I5,T50,10I8) */
return 0;
} /* encode_ */
-
diff --git a/codecs/lpc10/energy.c b/codecs/lpc10/energy.c
index eada04bef..eba35d89f 100644
--- a/codecs/lpc10/energy.c
+++ b/codecs/lpc10/energy.c
@@ -100,4 +100,3 @@ extern int energy_(integer *len, real *speech, real *rms);
*rms = (real)sqrt(*rms / *len);
return 0;
} /* energy_ */
-
diff --git a/codecs/lpc10/f2c.h b/codecs/lpc10/f2c.h
index e50d642e0..09bc75727 100644
--- a/codecs/lpc10/f2c.h
+++ b/codecs/lpc10/f2c.h
@@ -267,18 +267,18 @@ extern integer i_nint(real *x);
#endif
#ifdef P_R_O_T_O_T_Y_P_E_S
-extern int bsynz_(real *coef, integer *ip, integer *iv,
+extern int bsynz_(real *coef, integer *ip, integer *iv,
real *sout, real *rms, real *ratio, real *g2pass,
struct lpc10_decoder_state *st);
extern int chanwr_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits, struct lpc10_encoder_state *st);
extern int chanrd_(integer *order, integer *ipitv, integer *irms,
integer *irc, integer *ibits);
-extern int chanwr_0_(int n__, integer *order, integer *ipitv,
+extern int chanwr_0_(int n__, integer *order, integer *ipitv,
integer *irms, integer *irc, integer *ibits,
struct lpc10_encoder_state *st);
extern int dcbias_(integer *len, real *speech, real *sigout);
-extern int decode_(integer *ipitv, integer *irms, integer *irc,
+extern int decode_(integer *ipitv, integer *irms, integer *irc,
integer *voice, integer *pitch, real *rms,
real *rc, struct lpc10_decoder_state *st);
extern int deemp_(real *x, integer *n, struct lpc10_decoder_state *st);
diff --git a/codecs/lpc10/ham84.c b/codecs/lpc10/ham84.c
index fddd8f3c0..6fb1301cb 100644
--- a/codecs/lpc10/ham84.c
+++ b/codecs/lpc10/ham84.c
@@ -123,4 +123,3 @@ extern int ham84_(integer *input, integer *output, integer *errcnt);
}
return 0;
} /* ham84_ */
-
diff --git a/codecs/lpc10/invert.c b/codecs/lpc10/invert.c
index 03c27e20d..786e4bf97 100644
--- a/codecs/lpc10/invert.c
+++ b/codecs/lpc10/invert.c
@@ -191,4 +191,3 @@ L100:
/* END DO */
return 0;
} /* invert_ */
-
diff --git a/codecs/lpc10/irc2pc.c b/codecs/lpc10/irc2pc.c
index b96ff0d66..dc3358b42 100644
--- a/codecs/lpc10/irc2pc.c
+++ b/codecs/lpc10/irc2pc.c
@@ -148,4 +148,3 @@ extern int irc2pc_(real *rc, real *pc, integer *order, real *gprime, real *g2pas
}
return 0;
} /* irc2pc_ */
-
diff --git a/codecs/lpc10/ivfilt.c b/codecs/lpc10/ivfilt.c
index 784de2571..7a0bf6036 100644
--- a/codecs/lpc10/ivfilt.c
+++ b/codecs/lpc10/ivfilt.c
@@ -133,4 +133,3 @@ extern int ivfilt_(real *lpbuf, real *ivbuf, integer *len, integer *nsamp, real
}
return 0;
} /* ivfilt_ */
-
diff --git a/codecs/lpc10/lpc10.h b/codecs/lpc10/lpc10.h
index a57f84f3f..82e7b2cba 100644
--- a/codecs/lpc10/lpc10.h
+++ b/codecs/lpc10/lpc10.h
@@ -87,7 +87,7 @@ struct lpc10_encoder_state {
real z21;
real z12;
real z22;
-
+
/* State used by function analys */
real inbuf[540], pebuf[540];
real lpbuf[696], ivbuf[312];
@@ -242,7 +242,7 @@ struct lpc10_decoder_state {
(indices 0 through (LPC10_BITS_IN_COMPRESSED_FRAME-1)), and the
array speech[] is written (indices 0 through
(LPC10_SAMPLES_PER_FRAME-1)).
-
+
*/
struct lpc10_encoder_state * create_lpc10_encoder_state (void);
diff --git a/codecs/lpc10/lpcdec.c b/codecs/lpc10/lpcdec.c
index dd859ffce..55f8892b6 100644
--- a/codecs/lpc10/lpcdec.c
+++ b/codecs/lpc10/lpcdec.c
@@ -114,11 +114,11 @@ static integer c__10 = 10;
struct lpc10_decoder_state *st)
{
integer irms, voice[2], pitch, ipitv;
- extern /* Subroutine */ int decode_(integer *, integer *, integer *,
+ extern /* Subroutine */ int decode_(integer *, integer *, integer *,
integer *, integer *, real *, real *, struct lpc10_decoder_state *);
real rc[10];
- extern /* Subroutine */ int chanrd_(integer *, integer *, integer *,
- integer *, integer *), synths_(integer *,
+ extern /* Subroutine */ int chanrd_(integer *, integer *, integer *,
+ integer *, integer *), synths_(integer *,
integer *, real *, real *, real *, integer *,
struct lpc10_decoder_state *);
integer irc[10], len;
@@ -220,13 +220,13 @@ static integer c__10 = 10;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -236,35 +236,35 @@ static integer c__10 = 10;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
diff --git a/codecs/lpc10/lpcenc.c b/codecs/lpc10/lpcenc.c
index 989a2defd..990e73178 100644
--- a/codecs/lpc10/lpcenc.c
+++ b/codecs/lpc10/lpcenc.c
@@ -110,10 +110,10 @@ static integer c__10 = 10;
{
integer irms, voice[2], pitch, ipitv;
real rc[10];
- extern /* Subroutine */ int encode_(integer *, integer *, real *, real *,
- integer *, integer *, integer *), chanwr_(integer *, integer *,
+ extern /* Subroutine */ int encode_(integer *, integer *, real *, real *,
+ integer *, integer *, integer *), chanwr_(integer *, integer *,
integer *, integer *, integer *, struct lpc10_encoder_state *),
- analys_(real *, integer *,
+ analys_(real *, integer *,
integer *, real *, real *, struct lpc10_encoder_state *),
prepro_(real *, integer *, struct lpc10_encoder_state *);
integer irc[10];
@@ -126,7 +126,7 @@ static integer c__10 = 10;
*
* Revision 1.14 2003/02/12 13:59:15 matteo
* mer feb 12 14:56:57 CET 2003
- *
+ *
* Revision 1.1.1.1 2003/02/12 13:59:15 matteo
* mer feb 12 14:56:57 CET 2003
*
diff --git a/codecs/lpc10/lpcini.c b/codecs/lpc10/lpcini.c
index ea68176e3..ced34980f 100644
--- a/codecs/lpc10/lpcini.c
+++ b/codecs/lpc10/lpcini.c
@@ -187,13 +187,13 @@ struct {
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -203,35 +203,35 @@ struct {
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -280,7 +280,7 @@ void init_lpc10_encoder_state(struct lpc10_encoder_state *st)
st->z21 = 0.0f;
st->z12 = 0.0f;
st->z22 = 0.0f;
-
+
/* State used by function analys */
for (i = 0; i < 540; i++) {
st->inbuf[i] = 0.0f;
diff --git a/codecs/lpc10/lpfilt.c b/codecs/lpc10/lpfilt.c
index 375528921..159b2d7d9 100644
--- a/codecs/lpc10/lpfilt.c
+++ b/codecs/lpc10/lpfilt.c
@@ -122,4 +122,3 @@ extern int lpfilt_(real *inbuf, real *lpbuf, integer *len, integer *nsamp);
}
return 0;
} /* lpfilt_ */
-
diff --git a/codecs/lpc10/median.c b/codecs/lpc10/median.c
index 383c46e89..52c4a78d0 100644
--- a/codecs/lpc10/median.c
+++ b/codecs/lpc10/median.c
@@ -86,4 +86,3 @@ integer median_(integer *d1, integer *d2, integer *d3)
}
return ret_val;
} /* median_ */
-
diff --git a/codecs/lpc10/mload.c b/codecs/lpc10/mload.c
index 1cdb0647c..e384f0d77 100644
--- a/codecs/lpc10/mload.c
+++ b/codecs/lpc10/mload.c
@@ -96,7 +96,7 @@ extern int mload_(integer *order, integer *awins, integer *awinf, real *speech,
/* This subroutine has no local state. */
-/* Subroutine */ int mload_(integer *order, integer *awins, integer *awinf,
+/* Subroutine */ int mload_(integer *order, integer *awins, integer *awinf,
real *speech, real *phi, real *psi)
{
/* System generated locals */
@@ -136,21 +136,21 @@ extern int mload_(integer *order, integer *awins, integer *awinf, real *speech,
for (r__ = 2; r__ <= i__1; ++r__) {
i__2 = r__;
for (c__ = 2; c__ <= i__2; ++c__) {
- phi[r__ + c__ * phi_dim1] = phi[r__ - 1 + (c__ - 1) * phi_dim1] -
- speech[*awinf + 1 - r__] * speech[*awinf + 1 - c__] +
+ phi[r__ + c__ * phi_dim1] = phi[r__ - 1 + (c__ - 1) * phi_dim1] -
+ speech[*awinf + 1 - r__] * speech[*awinf + 1 - c__] +
speech[start - r__] * speech[start - c__];
}
}
/* End correct to get additional elements of PSI */
i__1 = *order - 1;
for (c__ = 1; c__ <= i__1; ++c__) {
- psi[c__] = phi[c__ + 1 + phi_dim1] - speech[start - 1] * speech[start
+ psi[c__] = phi[c__ + 1 + phi_dim1] - speech[start - 1] * speech[start
- 1 - c__] + speech[*awinf] * speech[*awinf - c__];
}
/* Copy lower triangular section into upper (why bother?) */
-/* I'm commenting this out, since the upper triangular half of PHI
+/* I'm commenting this out, since the upper triangular half of PHI
*/
-/* is never used by later code, unless a sufficiently high level of
+/* is never used by later code, unless a sufficiently high level of
*/
/* tracing is turned on. */
/* DO R = 1,ORDER */
@@ -160,4 +160,3 @@ extern int mload_(integer *order, integer *awins, integer *awinf, real *speech,
/* END DO */
return 0;
} /* mload_ */
-
diff --git a/codecs/lpc10/onset.c b/codecs/lpc10/onset.c
index ddca3b477..b4469c16a 100644
--- a/codecs/lpc10/onset.c
+++ b/codecs/lpc10/onset.c
@@ -203,35 +203,35 @@ static real c_b2 = 1.f;
/* N, D Numerator and denominator of prediction filters */
/* FPC Current prediction coefs */
/* L2BUF, L2SUM1, L2SUM2 State of slope filter */
-/* The only "significant" change I've made is to change L2SUM2 out
+/* The only "significant" change I've made is to change L2SUM2 out
*/
/* of the list of local variables that need to be saved, since it */
/* didn't need to be. */
-/* L2SUM1 need not be, but avoiding saving it would require a small
+/* L2SUM1 need not be, but avoiding saving it would require a small
*/
/* change to the body of the code. See comments below for an */
-/* example of how the code could be changed to avoid saving L2SUM1.
+/* example of how the code could be changed to avoid saving L2SUM1.
*/
/* FPC and LASTI are saved from one invocation to the next, but */
-/* they are not given initial values. This is acceptable, because
+/* they are not given initial values. This is acceptable, because
*/
/* FPC will be assigned a value the first time that this function */
/* is called after D is initialized to 1, since the formula to */
/* change D will not change it to 0 in one step, and the IF (D */
-/* .NE. 0) statement will execute its THEN part, initializing FPC.
+/* .NE. 0) statement will execute its THEN part, initializing FPC.
*/
/* LASTI's value will not be used until HYST is .TRUE., and */
/* whenever HYST is changed from its initial value of .FALSE., */
/* LASTI is assigned a value. */
/* In a C version of this coder, it would be nice if all of these */
-/* saved things, in this and all other subroutines, could be stored
+/* saved things, in this and all other subroutines, could be stored
*/
-/* in a single struct lpc10_coder_state_t, initialized with a call
+/* in a single struct lpc10_coder_state_t, initialized with a call
*/
-/* to a function like lpc10_init(&lpc10_coder_state). In this way,
+/* to a function like lpc10_init(&lpc10_coder_state). In this way,
*/
-/* a program that used these functions could conveniently alternate
+/* a program that used these functions could conveniently alternate
*/
/* coding more than one distinct audio stream. */
@@ -264,7 +264,7 @@ static real c_b2 = 1.f;
}
i__1 = *sbufh;
for (i__ = *sbufh - *lframe + 1; i__ <= i__1; ++i__) {
-/* Compute FPC; Use old FPC on divide by zero; Clamp FPC to +/- 1.
+/* Compute FPC; Use old FPC on divide by zero; Clamp FPC to +/- 1.
*/
*n = (pebuf[i__] * pebuf[i__ - 1] + (*n) * 63.f) / 64.f;
/* Computing 2nd power */
@@ -278,11 +278,11 @@ static real c_b2 = 1.f;
}
}
/* Filter FPC */
-/* In order to allow L2SUM1 not to be saved from one invocation
+/* In order to allow L2SUM1 not to be saved from one invocation
of */
/* this subroutine to the next, one could change the sequence of
*/
-/* assignments below, up to the IF statement, to the following.
+/* assignments below, up to the IF statement, to the following.
In */
/* addition, the initial value of L2PTR2 should be changed to */
/* L2WID/2 instead of L2WID/2+1. */
diff --git a/codecs/lpc10/pitsyn.c b/codecs/lpc10/pitsyn.c
index 36f6f2a7a..e345fba10 100644
--- a/codecs/lpc10/pitsyn.c
+++ b/codecs/lpc10/pitsyn.c
@@ -129,8 +129,8 @@ extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, re
/* RATIO - Previous to present energy ratio */
/* Always assigned a value. */
-/* Subroutine */ int pitsyn_(integer *order, integer *voice,
- integer *pitch, real *rms, real *rc, integer *lframe, integer *ivuv,
+/* Subroutine */ int pitsyn_(integer *order, integer *voice,
+ integer *pitch, real *rms, real *rc, integer *lframe, integer *ivuv,
integer *ipiti, real *rmsi, real *rci, integer *nout, real *ratio,
struct lpc10_decoder_state *st)
{
@@ -201,7 +201,7 @@ extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, re
/* Frame size, Prediction order, Pitch period */
/* Local variables that need not be saved */
/* LSAMP is initialized in the IF (FIRST) THEN clause, but it is */
-/* not used the first time through, and it is given a value before
+/* not used the first time through, and it is given a value before
*/
/* use whenever FIRST is .FALSE., so it appears unnecessary to */
/* assign it a value when FIRST is .TRUE. */
@@ -214,12 +214,12 @@ extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, re
/* JSAMP - If this routine is called N times with identical values of */
/* LFRAME, then the total length of all pitch periods returned */
-/* is always N*LFRAME-JSAMP, and JSAMP is always in the range 0
+/* is always N*LFRAME-JSAMP, and JSAMP is always in the range 0
*/
/* to MAXPIT-1 (see below for why this is so). Thus JSAMP is */
/* the number of samples "left over" from the previous call to */
/* PITSYN, that haven't been "used" in a pitch period returned */
-/* from this subroutine. Every time this subroutine is called,
+/* from this subroutine. Every time this subroutine is called,
*/
/* it returns pitch periods with a total length of at most */
/* LFRAME+JSAMP. */
@@ -277,7 +277,7 @@ extern int pitsyn_(integer *order, integer *voice, integer *pitch, real *rms, re
*nout = *lframe / *pitch;
*jsamp = *lframe - *nout * *pitch;
-/* SYNTHS only calls this subroutine with PITCH in the range
+/* SYNTHS only calls this subroutine with PITCH in the range
20 */
/* to 156. LFRAME = MAXFRM = 180, so NOUT is somewhere in th
e */
@@ -361,7 +361,7 @@ e */
vflag = 1;
}
}
-/* Here is the value of most variables that are used below, depending
+/* Here is the value of most variables that are used below, depending
on */
/* the values of IVOICO, VOICE(1), and VOICE(2). VOICE(1) and VOICE(2
) */
@@ -369,11 +369,11 @@ on */
/* previous call (see notes for the IF (NOUT .NE. 0) statement near th
e */
/* end). Each of these three values is either 0 or 1. These three */
-/* values below are given as 3-bit long strings, in the order IVOICO,
+/* values below are given as 3-bit long strings, in the order IVOICO,
*/
/* VOICE(1), and VOICE(2). It appears that the code above assumes tha
t */
-/* the bit sequences 010 and 101 never occur, but I wonder whether a
+/* the bit sequences 010 and 101 never occur, but I wonder whether a
*/
/* large enough number of bit errors in the channel could cause such a
*/
@@ -390,7 +390,7 @@ t */
4, */
/* and the 45 for NL-JSAMP is actually LFRAME-3*LFRAME/4. */
-/* Note that LSAMP-JSAMP is given as the variable. This was just for
+/* Note that LSAMP-JSAMP is given as the variable. This was just for
*/
/* brevity, to avoid adding "+JSAMP" to all of the column entries. */
/* Similarly for NL-JSAMP. */
@@ -429,13 +429,13 @@ t */
/* The only possible non-0 value of SLOPE (in column 111) is */
/* (PITCH-IPITO)/FLOAT(LSAMP) */
-/* Column 101 is identical to 100. Any good properties we can prove
+/* Column 101 is identical to 100. Any good properties we can prove
*/
/* for 100 will also hold for 101. Similarly for 010 and 011. */
-/* SYNTHS calls this subroutine with PITCH restricted to the range 20
+/* SYNTHS calls this subroutine with PITCH restricted to the range 20
to */
-/* 156. IPITO is similarly restricted to this range, after the first
+/* 156. IPITO is similarly restricted to this range, after the first
*/
/* call. IP below is also restricted to this range, given the */
/* definitions of IPITO, SLOPE, UVPIT, and that I is in the range ISTA
@@ -456,7 +456,7 @@ ugh */
/* (I - MAXPIT) .LE. JUSED .LE. (I-1) */
-/* Note that the final value of I is LSAMP+1, so that
+/* Note that the final value of I is LSAMP+1, so that
after */
/* the DO loop is complete, we know: */
@@ -474,10 +474,10 @@ after */
/* The following check is no longer nece
ssary, now that */
-/* we can prove that NOUT will never go
+/* we can prove that NOUT will never go
over 16. */
-/* IF (NOUT .GT. 16) STOP 'PITSYN: too many epochs'
+/* IF (NOUT .GT. 16) STOP 'PITSYN: too many epochs'
*/
ipiti[*nout] = ip;
@@ -501,7 +501,7 @@ over 16. */
goto L100;
}
-/* I want to prove what range UVPIT must lie in after
+/* I want to prove what range UVPIT must lie in after
the */
/* assignments to it below. To do this, I must determ
ine */
@@ -521,7 +521,7 @@ at: */
/* ISTART is one more than this. */
-/* Let newLSAMP be the value assigned to LSAMP below.
+/* Let newLSAMP be the value assigned to LSAMP below.
This */
/* is 180+JSAMP. Thus (newLSAMP-oldLSAMP) is either 4
5 or */
@@ -566,7 +566,7 @@ ge. */
L100:
*jsamp = lsamp - jused;
}
-/* Given that the maximum pitch period MAXPIT .LT. LFRAME (this is
+/* Given that the maximum pitch period MAXPIT .LT. LFRAME (this is
*/
/* currently true on every call, since SYNTHS always sets */
/* LFRAME=180), NOUT will always be .GE. 1 at this point. */
diff --git a/codecs/lpc10/placea.c b/codecs/lpc10/placea.c
index dacb50e7a..7a485c418 100644
--- a/codecs/lpc10/placea.c
+++ b/codecs/lpc10/placea.c
@@ -114,7 +114,7 @@ extern int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *a
/* This subroutine has no local state. */
/* Subroutine */ int placea_(integer *ipitch, integer *voibuf, integer *
- obound, integer *af, integer *vwin, integer *awin, integer *ewin,
+ obound, integer *af, integer *vwin, integer *awin, integer *ewin,
integer *lframe, integer *maxwin)
{
/* System generated locals */
@@ -146,13 +146,13 @@ extern int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *a
/* Case 1: Sustained Voiced Speech */
/* If the five most recent voicing decisions are */
/* voiced, then the window is placed phase-synchronously with the */
-/* previous window, as close to the present voicing window if possible.
+/* previous window, as close to the present voicing window if possible.
*/
/* If onsets bound the voicing window, then preference is given to */
/* a phase-synchronous placement which does not overlap these onsets. */
/* Case 2: Voiced Transition */
-/* If at least one voicing decision in AF is voicied, and there are no
+/* If at least one voicing decision in AF is voicied, and there are no
*/
/* onsets, then the window is placed as in case 1. */
@@ -207,7 +207,7 @@ rd */
awin[(*af << 1) + 1] -= *ipitch;
awin[(*af << 1) + 2] -= *ipitch;
}
-/* Similarly if the placement puts the analysis window below LRANGE.
+/* Similarly if the placement puts the analysis window below LRANGE.
*/
while(awin[(*af << 1) + 1] < lrange) {
awin[(*af << 1) + 1] += *ipitch;
@@ -239,4 +239,3 @@ e*/
}
return 0;
} /* placea_ */
-
diff --git a/codecs/lpc10/placev.c b/codecs/lpc10/placev.c
index 56e72c4b8..9d1548c46 100644
--- a/codecs/lpc10/placev.c
+++ b/codecs/lpc10/placev.c
@@ -109,8 +109,8 @@ extern int placev_(integer *osbuf, integer *osptr, integer *oslen, integer *obou
/* This subroutine has no local state. */
-/* Subroutine */ int placev_(integer *osbuf, integer *osptr, integer *oslen,
- integer *obound, integer *vwin, integer *af, integer *lframe, integer
+/* Subroutine */ int placev_(integer *osbuf, integer *osptr, integer *oslen,
+ integer *obound, integer *vwin, integer *af, integer *lframe, integer
*minwin, integer *maxwin, integer *dvwinl, integer *dvwinh)
{
/* System generated locals */
@@ -146,15 +146,15 @@ extern int placev_(integer *osbuf, integer *osptr, integer *oslen, integer *obou
/* given in the LPC-10e phase 1 report. */
/* 1. If there are no onsets in this range, then the voicing window */
-/* is centered in the pitch window. If such a placement is not within
+/* is centered in the pitch window. If such a placement is not within
*/
-/* the window's placement range, then the window is placed in the left-
+/* the window's placement range, then the window is placed in the left-
*/
/* most portion of the placement range. Its length is always MAXWIN. */
/* 2. If the first onset is in 2F and there is sufficient room to place
*/
-/* the window immediately before this onset, then the window is placed
+/* the window immediately before this onset, then the window is placed
*/
/* there, and its length is set to the maximum possible under these */
/* constraints. */
@@ -177,7 +177,7 @@ ing*/
/* Note that the values of MINWIN and LFRAME must be chosen such */
/* that case 2 = false implies case 3 = true. This means that */
/* MINWIN <= LFRAME/2. If this were not the case, then a fourth case */
-/* would have to be added for when the window cannot fit either before
+/* would have to be added for when the window cannot fit either before
*/
/* or after the onset. */
@@ -185,11 +185,11 @@ ing*/
*/
/* time, due to the filter delays in computing onsets. The result is tha
t*/
-/* occasionally a voicing window will overlap that onset. The only way
+/* occasionally a voicing window will overlap that onset. The only way
*/
-/* to circumvent this problem is to add more delay in processing input
+/* to circumvent this problem is to add more delay in processing input
*/
-/* speech. In the trade-off between delay and window-placement, window
+/* speech. In the trade-off between delay and window-placement, window
*/
/* placement lost. */
/* Compute the placement range */
@@ -272,4 +272,3 @@ L120:
}
return 0;
} /* placev_ */
-
diff --git a/codecs/lpc10/preemp.c b/codecs/lpc10/preemp.c
index 645428c3c..61316dd5b 100644
--- a/codecs/lpc10/preemp.c
+++ b/codecs/lpc10/preemp.c
@@ -110,12 +110,12 @@ extern int preemp_(real *inbuf, real *pebuf, integer *nsamp, real *coef, real *z
/* Could it be more efficient to apply multiple filters */
/* simultaneously, by combining them into one equivalent filter? */
-/* Are there ever cases when "factoring" one high-order filter into
+/* Are there ever cases when "factoring" one high-order filter into
*/
/* multiple smaller-order filter actually reduces the number of */
/* arithmetic operations needed to perform them? */
/* When I first read this subroutine, I didn't understand why the */
-/* variable temp was used. It seemed that the statements in the do
+/* variable temp was used. It seemed that the statements in the do
*/
/* loop could be replaced with the following: */
@@ -141,4 +141,3 @@ extern int preemp_(real *inbuf, real *pebuf, integer *nsamp, real *coef, real *z
}
return 0;
} /* preemp_ */
-
diff --git a/codecs/lpc10/random.c b/codecs/lpc10/random.c
index 0f8e9b209..dc4da2a91 100644
--- a/codecs/lpc10/random.c
+++ b/codecs/lpc10/random.c
@@ -122,4 +122,3 @@ integer random_(struct lpc10_decoder_state *st)
}
return ret_val;
} /* random_ */
-
diff --git a/codecs/lpc10/rcchk.c b/codecs/lpc10/rcchk.c
index 6cb76ef7d..4cc84f381 100644
--- a/codecs/lpc10/rcchk.c
+++ b/codecs/lpc10/rcchk.c
@@ -102,7 +102,7 @@ extern int rcchk_(integer *order, real *rc1f, real *rc2f);
}
}
return 0;
-/* Note: In version embedded in other software, all calls to ERROR
+/* Note: In version embedded in other software, all calls to ERROR
*/
/* should probably be removed. */
L10:
@@ -116,4 +116,3 @@ L10:
}
return 0;
} /* rcchk_ */
-
diff --git a/codecs/lpc10/synths.c b/codecs/lpc10/synths.c
index 4c5a70fac..2a3179b91 100644
--- a/codecs/lpc10/synths.c
+++ b/codecs/lpc10/synths.c
@@ -187,8 +187,8 @@ static real c_b2 = .7f;
integer ipiti[16];
real g2pass;
real pc[10];
- extern /* Subroutine */ int pitsyn_(integer *, integer *, integer *, real
- *, real *, integer *, integer *, integer *, real *, real *,
+ extern /* Subroutine */ int pitsyn_(integer *, integer *, integer *, real
+ *, real *, integer *, integer *, integer *, real *, real *,
integer *, real *, struct lpc10_decoder_state *);
real rci[160] /* was [10][16] */;
@@ -288,13 +288,13 @@ static real c_b2 = .7f;
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -304,35 +304,35 @@ static real c_b2 = .7f;
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -345,21 +345,21 @@ static real c_b2 = .7f;
/* Parameters/constants */
/* Local variables that need not be saved */
/* Local state */
-/* BUF is a buffer of speech samples that would have been returned
+/* BUF is a buffer of speech samples that would have been returned
*/
/* by the older version of SYNTHS, but the newer version doesn't, */
/* so that the newer version can always return MAXFRM samples on */
/* every call. This has the effect of delaying the return of */
/* samples for one additional frame time. */
-/* Indices 1 through BUFLEN contain samples that are left over from
+/* Indices 1 through BUFLEN contain samples that are left over from
*/
/* the last call to SYNTHS. Given the way that PITSYN works, */
/* BUFLEN should always be in the range MAXFRM-MAXPIT+1 through */
/* MAXFRM, inclusive, after a call to SYNTHS is complete. */
/* On the first call to SYNTHS (or the first call after */
-/* reinitializing with the entry INITSYNTHS), BUFLEN is MAXFRM, and
+/* reinitializing with the entry INITSYNTHS), BUFLEN is MAXFRM, and
*/
/* a frame of silence is always returned. */
/* Parameter adjustments */
@@ -388,7 +388,7 @@ static real c_b2 = .7f;
r__1 = min(r__2,.99f);
rc[i__] = max(r__1,-.99f);
}
- pitsyn_(&contrl_1.order, &voice[1], pitch, rms, &rc[1], &contrl_1.lframe,
+ pitsyn_(&contrl_1.order, &voice[1], pitch, rms, &rc[1], &contrl_1.lframe,
ivuv, ipiti, rmsi, rci, &nout, &ratio, st);
if (nout > 0) {
i__1 = nout;
@@ -405,7 +405,7 @@ d of */
*buflen += ipiti[j - 1];
}
-/* Copy first MAXFRM samples from BUF to output array SPEECH
+/* Copy first MAXFRM samples from BUF to output array SPEECH
*/
/* (scaling them), and then remove them from the beginning of
*/
diff --git a/codecs/lpc10/tbdm.c b/codecs/lpc10/tbdm.c
index 2f6f3d692..4ca4d73a3 100644
--- a/codecs/lpc10/tbdm.c
+++ b/codecs/lpc10/tbdm.c
@@ -91,7 +91,7 @@ extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real
/* This subroutine has no local state. */
-/* Subroutine */ int tbdm_(real *speech, integer *lpita, integer *tau,
+/* Subroutine */ int tbdm_(real *speech, integer *lpita, integer *tau,
integer *ltau, real *amdf, integer *minptr, integer *maxptr, integer *
mintau)
{
@@ -101,7 +101,7 @@ extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real
/* Local variables */
real amdf2[6];
integer minp2, ltau2, maxp2, i__;
- extern /* Subroutine */ int difmag_(real *, integer *, integer *, integer
+ extern /* Subroutine */ int difmag_(real *, integer *, integer *, integer
*, integer *, real *, integer *, integer *);
integer minamd, ptr, tau2[6];
@@ -118,7 +118,7 @@ extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real
--tau;
/* Function Body */
- difmag_(&speech[1], lpita, &tau[1], ltau, &tau[*ltau], &amdf[1], minptr,
+ difmag_(&speech[1], lpita, &tau[1], ltau, &tau[*ltau], &amdf[1], minptr,
maxptr);
*mintau = tau[*minptr];
minamd = (integer)amdf[*minptr];
@@ -185,4 +185,3 @@ extern int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real
}
return 0;
} /* tbdm_ */
-
diff --git a/codecs/lpc10/voicin.c b/codecs/lpc10/voicin.c
index 3605d2f2e..2d36e2c99 100644
--- a/codecs/lpc10/voicin.c
+++ b/codecs/lpc10/voicin.c
@@ -256,8 +256,8 @@ s*/
/* INITVOICIN. */
/* Subroutine */ int voicin_(integer *vwin, real *inbuf, real *
- lpbuf, integer *buflim, integer *half, real *minamd, real *maxamd,
- integer *mintau, real *ivrc, integer *obound, integer *voibuf,
+ lpbuf, integer *buflim, integer *half, real *minamd, real *maxamd,
+ integer *mintau, real *ivrc, integer *obound, integer *voibuf,
integer *af, struct lpc10_encoder_state *st)
{
/* Initialized data */
@@ -298,8 +298,8 @@ s*/
real *maxmin;
integer vstate;
real rc1;
- extern /* Subroutine */ int vparms_(integer *, real *, real *, integer *,
- integer *, real *, integer *, integer *, integer *, integer *,
+ extern /* Subroutine */ int vparms_(integer *, real *, real *, integer *,
+ integer *, real *, integer *, integer *, integer *, integer *,
real *, real *, real *, real *);
integer fbe, lbe;
real *snr;
@@ -363,13 +363,13 @@ s*/
/* Error correction */
/* Subroutine SETUP is the only place where order is assigned a value, */
/* and that value is 10. It could increase efficiency 1% or so to */
-/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
+/* declare order as a constant (i.e., a Fortran PARAMETER) instead of as
*/
/* a variable in a COMMON block, since it is used in many places in the */
-/* core of the coding and decoding routines. Actually, I take that back.
+/* core of the coding and decoding routines. Actually, I take that back.
*/
/* At least when compiling with f2c, the upper bound of DO loops is */
-/* stored in a local variable before the DO loop begins, and then that is
+/* stored in a local variable before the DO loop begins, and then that is
*/
/* compared against on each iteration. */
/* Similarly for lframe, which is given a value of MAXFRM in SETUP. */
@@ -379,35 +379,35 @@ s*/
/* nbits is similar to quant, and is given a value of 54 in SETUP. */
/* corrp is given a value of .TRUE. in SETUP, and is only used in the */
/* subroutines ENCODE and DECODE. It doesn't affect the speed of the */
-/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
+/* coder significantly whether it is .TRUE. or .FALSE., or whether it is
*/
/* a constant or a variable, since it is only examined once per frame. */
/* Leaving it as a variable that is set to .TRUE. seems like a good */
/* idea, since it does enable some error-correction capability for */
-/* unvoiced frames, with no change in the coding rate, and no noticeable
+/* unvoiced frames, with no change in the coding rate, and no noticeable
*/
/* quality difference in the decoded speech. */
/* integer quant, nbits */
-/* *** Read/write: variables for debugging, not needed for LPC algorithm
+/* *** Read/write: variables for debugging, not needed for LPC algorithm
*/
-/* Current frame, Unstable frames, Output clip count, Max onset buffer,
+/* Current frame, Unstable frames, Output clip count, Max onset buffer,
*/
/* Debug listing detail level, Line count on listing page */
/* nframe is not needed for an embedded LPC10 at all. */
/* nunsfm is initialized to 0 in SETUP, and incremented in subroutine */
/* ERROR, which is only called from RCCHK. When LPC10 is embedded into */
-/* an application, I would recommend removing the call to ERROR in RCCHK,
+/* an application, I would recommend removing the call to ERROR in RCCHK,
*/
/* and remove ERROR and nunsfm completely. */
-/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
+/* iclip is initialized to 0 in SETUP, and incremented in entry SWRITE in
*/
/* sread.f. When LPC10 is embedded into an application, one might want */
/* to cause it to be incremented in a routine that takes the output of */
/* SYNTHS and sends it to an audio device. It could be optionally */
/* displayed, for those that might want to know what it is. */
-/* maxosp is never initialized to 0 in SETUP, although it probably should
+/* maxosp is never initialized to 0 in SETUP, although it probably should
*/
/* be, and it is updated in subroutine ANALYS. I doubt that its value */
/* would be of much interest to an application in which LPC10 is */
@@ -418,7 +418,7 @@ s*/
/* common /contrl/ quant, nbits */
/* common /contrl/ nframe, nunsfm, iclip, maxosp, listl, lincnt */
/* Parameters/constants */
-/* Voicing coefficient and Linear Discriminant Analysis variables:
+/* Voicing coefficient and Linear Discriminant Analysis variables:
*/
/* Max number of VDC's and VDC levels */
/* The following are not Fortran PARAMETER's, but they are */
@@ -428,15 +428,15 @@ s*/
/* Note: */
/* VALUE(1) through VALUE(8) are assigned values, but VALUE(9) */
-/* never is. Yet VALUE(9) is read in the loop that begins "DO I =
+/* never is. Yet VALUE(9) is read in the loop that begins "DO I =
*/
-/* 1, 9" below. I believe that this doesn't cause any problems in
+/* 1, 9" below. I believe that this doesn't cause any problems in
*/
-/* this subroutine, because all VDC(9,*) array elements are 0, and
+/* this subroutine, because all VDC(9,*) array elements are 0, and
*/
-/* this is what is multiplied by VALUE(9) in all cases. Still, it
+/* this is what is multiplied by VALUE(9) in all cases. Still, it
*/
-/* would save a multiplication to change the loop to "DO I = 1, 8".
+/* would save a multiplication to change the loop to "DO I = 1, 8".
*/
/* Local state */
/* WARNING! */
@@ -450,16 +450,16 @@ s*/
/* For VOICE, note that it is "shifted" in the statement that */
/* begins "IF (HALF .EQ. 1) THEN" below. Also, uninitialized */
-/* values in the VOICE array can only affect entries in the VOIBUF
+/* values in the VOICE array can only affect entries in the VOIBUF
*/
-/* array that are for the same frame, or for an older frame. Thus
+/* array that are for the same frame, or for an older frame. Thus
*/
/* the effects of uninitialized values in VOICE cannot linger on */
/* for more than 2 or 3 frame times. */
/* For SFBUE and SLBUE, the effects of uninitialized values can */
/* linger on for many frame times, because their previous values */
-/* are exponentially decayed. Thus it is more important to choose
+/* are exponentially decayed. Thus it is more important to choose
*/
/* initial values for these variables. I would guess that a */
/* reasonable initial value for SFBUE is REF/16, the same as used */
@@ -521,7 +521,7 @@ s*/
/* LBVE, LBUE, FBVE, FBUE, OFBUE, OLBUE */
/* MAXMIN is initialized on the first call, assuming that HALF */
-/* .EQ. 1 on first call. This is how ANALYS calls this subroutine.
+/* .EQ. 1 on first call. This is how ANALYS calls this subroutine.
*/
/* Voicing Decision Parameter vector (* denotes zero coefficient): */
@@ -544,7 +544,7 @@ fic*/
/* The VOICE array contains the result of the linear discriminant functio
n*/
-/* (analog values). The VOIBUF array contains the hard-limited binary
+/* (analog values). The VOIBUF array contains the hard-limited binary
*/
/* voicing decisions. The VOICE and VOIBUF arrays, according to FORTRAN
*/
@@ -564,10 +564,10 @@ n*/
*maxmin = *maxamd / max(*minamd,1.f);
}
/* Calculate voicing parameters twice per frame: */
- vparms_(&vwin[1], &inbuf[inbuf_offset], &lpbuf[lpbuf_offset], &buflim[1],
+ vparms_(&vwin[1], &inbuf[inbuf_offset], &lpbuf[lpbuf_offset], &buflim[1],
half, dither, mintau, &zc, &lbe, &fbe, &qs, &rc1, &ar_b__, &
ar_f__);
-/* Estimate signal-to-noise ratio to select the appropriate VDC vector.
+/* Estimate signal-to-noise ratio to select the appropriate VDC vector.
*/
/* The SNR is estimated as the running average of the ratio of the */
/* running average full-band voiced energy to the running average */
@@ -607,10 +607,10 @@ L69:
voibuf[*half + 6] = 0;
}
/* Skip voicing decision smoothing in first half-frame: */
-/* Give a value to VSTATE, so that trace statements below will print
+/* Give a value to VSTATE, so that trace statements below will print
*/
/* a consistent value from one call to the next when HALF .EQ. 1. */
-/* The value of VSTATE is not used for any other purpose when this is
+/* The value of VSTATE is not used for any other purpose when this is
*/
/* true. */
vstate = -1;
@@ -631,7 +631,7 @@ L69:
.*/
/* Voicing override of transitions at onsets: */
-/* If a V/UV or UV/V voicing decision transition occurs within one-half
+/* If a V/UV or UV/V voicing decision transition occurs within one-half
*/
/* frame of an onset bounding a voicing window, then the transition is */
/* moved to occur at the onset. */
diff --git a/codecs/lpc10/vparms.c b/codecs/lpc10/vparms.c
index c75b1b17d..f802e6ffd 100644
--- a/codecs/lpc10/vparms.c
+++ b/codecs/lpc10/vparms.c
@@ -131,8 +131,8 @@ static real c_b2 = 1.f;
/* This subroutine has no local state. */
-/* Subroutine */ int vparms_(integer *vwin, real *inbuf, real *lpbuf, integer
- *buflim, integer *half, real *dither, integer *mintau, integer *zc,
+/* Subroutine */ int vparms_(integer *vwin, real *inbuf, real *lpbuf, integer
+ *buflim, integer *half, real *dither, integer *mintau, integer *zc,
integer *lbe, integer *fbe, real *qs, real *rc1, real *ar_b__, real *
ar_f__)
{
@@ -252,4 +252,3 @@ is)*/
*fbe = min(i__1,32767);
return 0;
} /* vparms_ */
-