diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-08-31 02:31:05 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-08-31 02:31:05 +0000 |
commit | 5d2dd908484d062bdb7ebe31c4fcf4584cac8168 (patch) | |
tree | f62bd9abdca50ce47732a4a3e8f3ecec1804e5d1 /libavcodec/lpc.c | |
parent | 8dfc56ec3249ea452a1ba02a9ffd68d607f4ee78 (diff) | |
download | ffmpeg-5d2dd908484d062bdb7ebe31c4fcf4584cac8168.tar.gz |
Merge declaration and initialization of a few vars in compute_lpc_coefs()
Originally committed as revision 15088 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/lpc.c')
-rw-r--r-- | libavcodec/lpc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libavcodec/lpc.c b/libavcodec/lpc.c index 00a64acf75..044a9ab678 100644 --- a/libavcodec/lpc.c +++ b/libavcodec/lpc.c @@ -32,13 +32,11 @@ static void compute_lpc_coefs(const double *autoc, int max_order, double lpc[][MAX_LPC_ORDER], double *ref) { int i, j, i2; - double r, err, tmp; + double err = autoc[0]; double lpc_tmp[MAX_LPC_ORDER]; - err = autoc[0]; - for(i=0; i<max_order; i++) { - r = -autoc[i+1]; + double r = -autoc[i+1]; for(j=0; j<i; j++) { r -= lpc_tmp[j] * autoc[i-j]; } @@ -50,7 +48,7 @@ static void compute_lpc_coefs(const double *autoc, int max_order, i2 = (i >> 1); lpc_tmp[i] = r; for(j=0; j<i2; j++) { - tmp = lpc_tmp[j]; + double tmp = lpc_tmp[j]; lpc_tmp[j] += r * lpc_tmp[i-1-j]; lpc_tmp[i-1-j] += r * tmp; } |