From 97c50cb77949856573d7f5f5a3c28cb73e61e011 Mon Sep 17 00:00:00 2001 From: Mike Melanson Date: Tue, 19 Apr 2005 05:16:45 +0000 Subject: sync to FFmpeg build 4752 CVS patchset: 7463 CVS date: 2005/04/19 05:16:45 --- src/libffmpeg/libavcodec/integer.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/libffmpeg/libavcodec/integer.c') diff --git a/src/libffmpeg/libavcodec/integer.c b/src/libffmpeg/libavcodec/integer.c index 025560f9e..38a826f86 100644 --- a/src/libffmpeg/libavcodec/integer.c +++ b/src/libffmpeg/libavcodec/integer.c @@ -47,6 +47,10 @@ AVInteger av_sub_i(AVInteger a, AVInteger b){ return a; } +/** + * returns the rounded down value of the logarithm of base 2 of the given AVInteger. + * this is simply the index of the most significant bit which is 1. Or 0 of all bits are 0 + */ int av_log2_i(AVInteger a){ int i; @@ -78,6 +82,9 @@ AVInteger av_mul_i(AVInteger a, AVInteger b){ return out; } +/** + * returns 0 if a==b, 1 if a>b and -1 if a