[FFmpeg-devel] [PATCH] Add ceil(log2(x)) to libavutil/common.h

Justin Ruggles justin.ruggles
Sat Aug 22 23:59:06 CEST 2009


Thilo Borgmann wrote:

> As in $subject, adds a new helper function to libavutil/common.h.
> 

> Index: libavutil/common.h
> ===================================================================
> --- libavutil/common.h	(revision 19681)
> +++ libavutil/common.h	(working copy)
> @@ -225,6 +225,14 @@
>      else               return a;
>  }
>  
> +/** Computes ceil(log2(x)) using av_log2.
> + * @param x value used to compute ceil(log2(x))
> + * @param computed ceiling of log2(x)


@return

> + */
> +static inline int ceil_log2(int x) {


I think this needs an av_ prefix


-Justin




More information about the ffmpeg-devel mailing list