summaryrefslogtreecommitdiff
path: root/libavcodec/g723_1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/g723_1.c')
-rw-r--r--libavcodec/g723_1.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 72151b43d9..70c00d5f66 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -230,17 +230,7 @@ static int16_t square_root(int val)
*/
static int normalize_bits(int num, int width)
{
- int i = 0;
-
- if (num) {
- if (num == -1)
- return width;
- if (num < 0)
- num = ~num;
- i= width - av_log2(num) - 1;
- i= FFMAX(i, 0);
- }
- return i;
+ return width - av_log2(num) - 1;
}
#define normalize_bits_int16(num) normalize_bits(num, 15)