changeset 2738:53dbc3d8f94e libavcodec

ilog() -> av_log2()
author michael
date Sun, 29 May 2005 22:50:22 +0000
parents b37add61897a
children efba0e2f6461
files vorbis.c
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis.c	Sun May 29 22:11:05 2005 +0000
+++ b/vorbis.c	Sun May 29 22:50:22 2005 +0000
@@ -52,14 +52,7 @@
     }
 }
 
-static unsigned int ilog(unsigned int i) { // unfortunatelly av_log2 uses different rounding
-    unsigned int ret=0;
-    while (i!=0) {
-        ++ret;
-        i>>=1;
-    }
-    return ret;
-}
+#define ilog(i) av_log2(2*(i))
 
 static unsigned int nth_root(unsigned int x, unsigned int n) {   // x^(1/n)
     unsigned int ret=0, i, j;