From 935442b522dc198da6d73b58fc1236ef97278ca9 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Wed, 15 Aug 2001 13:11:31 +0000 Subject: [PATCH] log2 to av_log2 Originally committed as revision 101 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/h263.c | 2 +- libavcodec/mpegaudio.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/h263.c b/libavcodec/h263.c index 0cf5962..12f14db 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -1178,7 +1178,7 @@ int mpeg4_decode_picture_header(MpegEncContext * s) skip_bits1(&s->gb); /* marker */ time_increment_resolution = get_bits(&s->gb, 16); - s->time_increment_bits = log2(time_increment_resolution - 1) + 1; + s->time_increment_bits = av_log2(time_increment_resolution - 1) + 1; if (s->time_increment_bits < 1) s->time_increment_bits = 1; skip_bits1(&s->gb); /* marker */ diff --git a/libavcodec/mpegaudio.c b/libavcodec/mpegaudio.c index 7785257..ec8c82d 100644 --- a/libavcodec/mpegaudio.c +++ b/libavcodec/mpegaudio.c @@ -317,7 +317,7 @@ static void filter(MpegAudioContext *s, int ch, short *samples, int incr) for(i=0;i<32;i++) { norm |= abs(tmp1[i]); } - n = log2(norm) - 12; + n = av_log2(norm) - 12; if (n > 0) { for(i=0;i<32;i++) tmp1[i] >>= n; @@ -364,7 +364,7 @@ static void compute_scale_factors(unsigned char scale_code[SBLIMIT], } /* compute the scale factor index using log 2 computations */ if (vmax > 0) { - n = log2(vmax); + n = av_log2(vmax); /* n is the position of the MSB of vmax. now use at most 2 compares to find the index */ index = (21 - n) * 3 - 3; -- 2.7.4