Browse Source

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>
tags/n1.0
Mans Rullgard 13 years ago
parent
commit
a4b8fc3a8a
1 changed files with 0 additions and 7 deletions
  1. +0
    -7
      libavcodec/g723_1.c

+ 0
- 7
libavcodec/g723_1.c View File

@@ -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;
}



Loading…
Cancel
Save