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 <[email protected]> --- libavcodec/g723_1.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index 37b7ff5..fd03ed9 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; } -- 1.7.11.1 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
