diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-29 21:39:08 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-29 21:44:03 +0200 |
commit | 431f8af8242c41ef922f9daf791b0be26dc0bba4 (patch) | |
tree | 5bbcf2863c566e4630409be3dea2c79680eb056c /libavcodec/g723_1.c | |
parent | 6e505547f148235b5e2733bf42a4615ae67d4cb4 (diff) | |
download | ffmpeg-431f8af8242c41ef922f9daf791b0be26dc0bba4.tar.gz |
g723.1: replace loop of normalize_bits( by av_log2()
idea by vitor
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/g723_1.c')
-rw-r--r-- | libavcodec/g723_1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index a48eca3ab0..9c019a99fd 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -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; } |