local var name maxval was shadowing the TI function used to compute it
This commit is contained in:
parent
03de605ec8
commit
c163fc6207
1 changed files with 7 additions and 7 deletions
|
@ -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)
|
static void normalise16(celt_word16_t *x, int len, celt_word16_t val)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
celt_word16_t maxval;
|
celt_word16_t maxabs;
|
||||||
maxval = celt_maxabs16(x,len);
|
maxabs = celt_maxabs16(x,len);
|
||||||
if (maxval > val)
|
if (maxabs > val)
|
||||||
{
|
{
|
||||||
int shift = 0;
|
int shift = 0;
|
||||||
while (maxval > val)
|
while (maxabs > val)
|
||||||
{
|
{
|
||||||
maxval >>= 1;
|
maxabs >>= 1;
|
||||||
shift++;
|
shift++;
|
||||||
}
|
}
|
||||||
if (shift==0)
|
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);
|
x[i] = SHR16(x[i], shift);
|
||||||
} else {
|
} else {
|
||||||
int shift=0;
|
int shift=0;
|
||||||
if (maxval == 0)
|
if (maxabs == 0)
|
||||||
return;
|
return;
|
||||||
val >>= 1;
|
val >>= 1;
|
||||||
while (maxval < val)
|
while (maxabs < val)
|
||||||
{
|
{
|
||||||
val >>= 1;
|
val >>= 1;
|
||||||
shift++;
|
shift++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue