diff --git a/libavcodec/integer.c b/libavcodec/integer.c index 025560f9e8..38a826f861 100644 --- a/libavcodec/integer.c +++ b/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 ab and -1 if a>63)|1; + else return 0; } +/** + * converts the given AVRational to a double. + */ static inline double av_q2d(AVRational a){ return a.num / (double) a.den; }