diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-13 23:03:37 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-14 12:08:29 +0100 |
commit | a4b8fc3a8a4ec8e704885d3097b6bfbdc7827b6e (patch) | |
tree | 80d02bfbb28e3c47688ac2ff7df940874802797f /libavcodec | |
parent | 063910f54d04c08b85b7b07ad7368e15b943a722 (diff) | |
download | ffmpeg-a4b8fc3a8a4ec8e704885d3097b6bfbdc7827b6e.tar.gz |
g723.1: simplify normalize_bits()
This function is always called with a non-negative argument, so
those special cases are not needed. In the places the argument
might be zero, the return value for a zero argument does not matter
since it would then be used to scale an array full of zeros.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/g723_1.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index 37b7ff5f09..fd03ed97d4 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -265,13 +265,6 @@ static int16_t square_root(int val) */ static int normalize_bits(int num, int width) { - if (!num) - return 0; - if (num == -1) - return width; - if (num < 0) - num = ~num; - return width - av_log2(num) - 1; } |