From c163fc62075d5455f3d233af8c291bada6a2c2cd Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Fri, 21 Mar 2008 12:53:37 +1100 Subject: [PATCH] local var name maxval was shadowing the TI function used to compute it --- libcelt/pitch.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libcelt/pitch.c b/libcelt/pitch.c index 98306a46..c8ff5887 100644 --- a/libcelt/pitch.c +++ b/libcelt/pitch.c @@ -63,14 +63,14 @@ void pitch_state_free(kiss_fftr_cfg st) static void normalise16(celt_word16_t *x, int len, celt_word16_t val) { int i; - celt_word16_t maxval; - maxval = celt_maxabs16(x,len); - if (maxval > val) + celt_word16_t maxabs; + maxabs = celt_maxabs16(x,len); + if (maxabs > val) { int shift = 0; - while (maxval > val) + while (maxabs > val) { - maxval >>= 1; + maxabs >>= 1; shift++; } if (shift==0) @@ -79,10 +79,10 @@ static void normalise16(celt_word16_t *x, int len, celt_word16_t val) x[i] = SHR16(x[i], shift); } else { int shift=0; - if (maxval == 0) + if (maxabs == 0) return; val >>= 1; - while (maxval < val) + while (maxabs < val) { val >>= 1; shift++;