Skip to content

Adapted from SPTK v3.11 #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions bin/acep/_acep.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* 1996-2016 Nagoya Institute of Technology */
/* 1996-2017 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* All rights reserved. */
Expand Down Expand Up @@ -44,7 +44,7 @@

/****************************************************************

$Id: _acep.c,v 1.18 2016/12/22 10:52:59 fjst15124 Exp $
$Id$

Adaptive Cepstral Analysis

Expand Down Expand Up @@ -75,27 +75,27 @@
double acep(double x, double *c, const int m, const double lambda,
const double step, const double tau, const int pd, const double eps)
{
int i;
int i, memory_size;
static double *cc = NULL, *e, *ep, *d, gg = 1.0;
static int size;
double mu, tx;

int expected_size = m + m + m + 3 + (m + 1) * pd * 2;
memory_size = m + m + m + 3 + (m + 1) * pd * 2;
if (cc == NULL) {
cc = dgetmem(expected_size);
cc = dgetmem(memory_size);
e = cc + m + 1;
ep = e + m + 1;
d = ep + m + 1;
size = expected_size;
size = memory_size;
}

if (expected_size > size) {
if (memory_size > size) {
free(cc);
cc = dgetmem(expected_size);
cc = dgetmem(memory_size);
e = cc + m + 1;
ep = e + m + 1;
d = ep + m + 1;
size = expected_size;
size = memory_size;
}

for (i = 1; i <= m; i++)
Expand Down
18 changes: 9 additions & 9 deletions bin/amcep/_amcep.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* 1996-2016 Nagoya Institute of Technology */
/* 1996-2017 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* All rights reserved. */
Expand Down Expand Up @@ -44,7 +44,7 @@

/****************************************************************

$Id: _amcep.c,v 1.20 2016/12/22 10:52:59 fjst15124 Exp $
$Id$

Adaptive Mel Cepstral Analysis

Expand Down Expand Up @@ -78,26 +78,26 @@ double amcep(double x, double *b, const int m, const double a,
const double lambda, const double step, const double tau,
const int pd, const double eps)
{
int i;
int i, memory_size;
static double *bb = NULL, *d, *ep, *e, xx, gg = 1.0;
static int size;
double mu, tx;

int expected_size = 3 * (m + 1) + 3 * (pd + 1) + pd * (m + 2);
memory_size = 3 * (m + 1) + 3 * (pd + 1) + pd * (m + 2);
if (bb == NULL) {
bb = dgetmem(expected_size);
bb = dgetmem(memory_size);
e = bb + m + 1;
ep = e + m + 1;
d = ep + m + 1;
size = expected_size;
size = memory_size;
}
if (expected_size > size) {
if (memory_size > size) {
free(bb);
bb = dgetmem(expected_size);
bb = dgetmem(memory_size);
e = bb + m + 1;
ep = e + m + 1;
d = ep + m + 1;
size = expected_size;
size = memory_size;
}

for (i = 1; i <= m; i++)
Expand Down
4 changes: 2 additions & 2 deletions bin/glsadf/_glsadf.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* 1996-2016 Nagoya Institute of Technology */
/* 1996-2017 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* All rights reserved. */
Expand Down Expand Up @@ -44,7 +44,7 @@

/****************************************************************

$Id: _glsadf.c,v 1.18 2016/12/22 10:53:04 fjst15124 Exp $
$Id$

GLSA Digital Filter

Expand Down
8 changes: 5 additions & 3 deletions bin/lmadf/_lmadf.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* 1996-2016 Nagoya Institute of Technology */
/* 1996-2017 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* All rights reserved. */
Expand Down Expand Up @@ -44,7 +44,7 @@

/****************************************************************

$Id: _lmadf.c,v 1.21 2016/12/22 10:53:06 fjst15124 Exp $
$Id$

LMA Digital Filter

Expand Down Expand Up @@ -74,7 +74,9 @@ static double pade[] = { 1.0,
1.0, 0.0, 0.0,
1.0, 0.0, 0.0, 0.0,
1.0, 0.4999273, 0.1067005, 0.01170221, 0.0005656279,
1.0, 0.4999391, 0.1107098, 0.01369984, 0.0009564853, 0.00003041721
1.0, 0.4999391, 0.1107098, 0.01369984, 0.0009564853, 0.00003041721,
1.0, 0.500000157834843, 0.113600112846183, 0.015133367945131, 0.001258740956606, 0.000062701416552, 0.000001481891776,
1.0, 0.499802889651314, 0.115274789205577, 0.015997611632083, 0.001452640362652, 0.000087007832645, 0.000003213962732, 0.000000057148619
};

static double *ppade;
Expand Down
4 changes: 2 additions & 2 deletions bin/mglsadf/_mglsadf.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* 1996-2016 Nagoya Institute of Technology */
/* 1996-2017 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* All rights reserved. */
Expand Down Expand Up @@ -44,7 +44,7 @@

/****************************************************************

$Id: _mglsadf.c,v 1.21 2016/12/22 10:53:08 fjst15124 Exp $
$Id$

MGLSA Digital Filter

Expand Down
8 changes: 5 additions & 3 deletions bin/mlsadf/_mlsadf.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/* Interdisciplinary Graduate School of */
/* Science and Engineering */
/* */
/* 1996-2016 Nagoya Institute of Technology */
/* 1996-2017 Nagoya Institute of Technology */
/* Department of Computer Science */
/* */
/* All rights reserved. */
Expand Down Expand Up @@ -44,7 +44,7 @@

/****************************************************************

$Id: _mlsadf.c,v 1.22 2016/12/22 10:53:09 fjst15124 Exp $
$Id$

MLSA Digital Filter

Expand Down Expand Up @@ -74,7 +74,9 @@ static double pade[] = { 1.0,
1.0, 0.0, 0.0,
1.0, 0.0, 0.0, 0.0,
1.0, 0.4999273, 0.1067005, 0.01170221, 0.0005656279,
1.0, 0.4999391, 0.1107098, 0.01369984, 0.0009564853, 0.00003041721
1.0, 0.4999391, 0.1107098, 0.01369984, 0.0009564853, 0.00003041721,
1.0, 0.500000157834843, 0.113600112846183, 0.015133367945131, 0.001258740956606, 0.000062701416552, 0.000001481891776,
1.0, 0.499802889651314, 0.115274789205577, 0.015997611632083, 0.001452640362652, 0.000087007832645, 0.000003213962732, 0.000000057148619
};

static double *ppade;
Expand Down