g723.1: replace loop of normalize_bits( by av_log2()
idea by vitor Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
6e505547f1
commit
431f8af824
@ -216,8 +216,8 @@ static int normalize_bits(int num, int width)
|
||||
return bits;
|
||||
if (num < 0)
|
||||
num = ~num;
|
||||
for (i = 0; num < limit; i++)
|
||||
num <<= 1;
|
||||
i= bits - av_log2(num) - 1;
|
||||
i= FFMAX(i, 0);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user