[Libva] [PATCH] add replacement for log2f when not available
Xiang, Haihao
haihao.xiang at intel.com
Tue Feb 19 17:40:13 PST 2013
Applied, Thx
> From: Adrian Marius Negreanu <adrian.m.negreanu at intel.com>
>
> Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu at intel.com>
> ---
> configure.ac | 1 +
> src/gen6_mfc_common.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 176519d..a9ed8d5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -65,6 +65,7 @@ AC_C_BIGENDIAN
> AC_HEADER_STDC
> AC_SYS_LARGEFILE
> AC_CHECK_LIB([m], [sin])
> +AC_CHECK_FUNCS([log2f])
>
> LIBVA_PACKAGE_VERSION=libva_package_version
> AC_SUBST(LIBVA_PACKAGE_VERSION)
> diff --git a/src/gen6_mfc_common.c b/src/gen6_mfc_common.c
> index bb5d360..1d57075 100644
> --- a/src/gen6_mfc_common.c
> +++ b/src/gen6_mfc_common.c
> @@ -62,6 +62,10 @@
>
> #define BRC_PI_0_5 1.5707963267948966192313216916398
>
> +#ifndef HAVE_LOG2F
> +#define log2f(x) (logf(x)/(float)M_LN2)
> +#endif
> +
> static void
> intel_mfc_bit_rate_control_context_init(struct encode_state *encode_state,
> struct gen6_mfc_context *mfc_context)
More information about the Libva
mailing list