build: Add check for VP9 encode API support in libva

https://bugzilla.gnome.org/show_bug.cgi?id=766048
This commit is contained in:
Sreerenj Balachandran 2016-05-30 11:22:35 +03:00
parent 765a53d4c2
commit 266650054a

View file

@ -725,6 +725,8 @@ fi
USE_JPEG_ENCODER=0
USE_VP8_ENCODER=0
USE_H265_ENCODER=0
USE_VP9_ENCODER=0
if test $USE_ENCODERS -eq 1; then
dnl Check for JPEG Encoding API (0.37.0+)
AC_CHECK_HEADERS([va/va_enc_jpeg.h], [], [],
@ -828,6 +830,41 @@ VAQMatrixBufferHEVC q_matrix;
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_hevc_encoding_api" = "xyes"], [USE_H265_ENCODER=1])
dnl Check for VP9 Encoding API
AC_CHECK_HEADERS([va/va_enc_vp9.h], [], [],
[
#include <va/va.h>
])
AC_CACHE_CHECK([for VP9 encoding API],
[ac_cv_have_vp9_encoding_api],
[
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
saved_LIBS="$LIBS"
LIBS="$LIBS $LIBVA_LIBS"
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
[[
#include <va/va.h>
#ifdef HAVE_VA_VA_ENC_VP9_H
# include <va/va_enc_vp9.h>
#endif
]],
[[
VAEncSequenceParameterBufferVP9 seq_param;
VAEncPictureParameterBufferVP9 pic_param;
VAEncSegParamVP9 seg_param;
VAEncMiscParameterTypeVP9PerSegmantParam misc_param;
]])
],
[ac_cv_have_vp9_encoding_api="yes"],
[ac_cv_have_vp9_encoding_api="no"])
CPPFLAGS="$saved_CPPFLAGS"
LIBS="$saved_LIBS"
])
AS_IF([test "x$ac_cv_have_vp9_encoding_api" = "xyes"], [USE_VP9_ENCODER=1])
fi
dnl VA/Wayland API
@ -928,6 +965,10 @@ AC_DEFINE_UNQUOTED([USE_H265_ENCODER], [$USE_H265_ENCODER],
[Defined to 1 if H265 encoder is used])
AM_CONDITIONAL([USE_H265_ENCODER], [test $USE_H265_ENCODER -eq 1])
AC_DEFINE_UNQUOTED([USE_VP9_ENCODER], [$USE_VP9_ENCODER],
[Defined to 1 if VP9 encoder is used])
AM_CONDITIONAL([USE_VP9_ENCODER], [test $USE_VP9_ENCODER -eq 1])
AC_DEFINE_UNQUOTED([USE_VA_VPP], [$USE_VA_VPP],
[Defined to 1 if video post-processing is used])
AM_CONDITIONAL([USE_VA_VPP], [test $USE_VA_VPP -eq 1])