mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
vaapi: bump the minimum vaapi version requirement to 0.39.0
And reduce unnecessary API version and structures check as well. https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/108
This commit is contained in:
parent
e4ae7d9879
commit
920b1ec7a8
24 changed files with 42 additions and 778 deletions
370
configure.ac
370
configure.ac
|
@ -32,11 +32,7 @@ m4_define([gst_plugins_bad_version], [1.15.0.1])
|
||||||
m4_define([wayland_api_version], [1.0.2])
|
m4_define([wayland_api_version], [1.0.2])
|
||||||
|
|
||||||
# VA-API minimum version number
|
# VA-API minimum version number
|
||||||
m4_define([va_api_version], [0.30.4])
|
m4_define([va_api_version], [0.39.0])
|
||||||
m4_define([va_api_enc_version], [0.34.0])
|
|
||||||
m4_define([va_api_drm_version], [0.33.0])
|
|
||||||
m4_define([va_api_x11_version], [0.31.0])
|
|
||||||
m4_define([va_api_wld_version], [0.33.0])
|
|
||||||
|
|
||||||
# gtk-doc version number
|
# gtk-doc version number
|
||||||
# XXX: introspection annotations require gtk-doc >= 1.12
|
# XXX: introspection annotations require gtk-doc >= 1.12
|
||||||
|
@ -93,10 +89,6 @@ GTKDOC_REQ=gtkdoc_version
|
||||||
|
|
||||||
dnl *** required versions of VA-API stuff ***
|
dnl *** required versions of VA-API stuff ***
|
||||||
VAAPI_REQ=va_api_version
|
VAAPI_REQ=va_api_version
|
||||||
VAAPI_ENC_REQ=va_api_enc_version
|
|
||||||
VAAPI_DRM_REQ=va_api_drm_version
|
|
||||||
VAAPI_X11_REQ=va_api_x11_version
|
|
||||||
VAAPI_WLD_REQ=va_api_wld_version
|
|
||||||
|
|
||||||
dnl *** autotools stuff ****
|
dnl *** autotools stuff ****
|
||||||
|
|
||||||
|
@ -513,7 +505,7 @@ AC_DEFINE_UNQUOTED([VA_DRIVERS_PATH], ["$VA_DRIVERS_PATH"],
|
||||||
|
|
||||||
dnl VA/DRM API
|
dnl VA/DRM API
|
||||||
if test $USE_DRM -eq 1; then
|
if test $USE_DRM -eq 1; then
|
||||||
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= $VAAPI_DRM_REQ],
|
PKG_CHECK_MODULES([LIBVA_DRM], [libva-drm >= $VAAPI_REQ],
|
||||||
[
|
[
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $LIBVA_DRM_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $LIBVA_DRM_CFLAGS"
|
||||||
|
@ -524,240 +516,16 @@ fi
|
||||||
|
|
||||||
dnl VA/X11 API
|
dnl VA/X11 API
|
||||||
if test $USE_X11 -eq 1; then
|
if test $USE_X11 -eq 1; then
|
||||||
PKG_CHECK_MODULES(LIBVA_X11, [libva-x11 >= $VAAPI_X11_REQ],
|
PKG_CHECK_MODULES(LIBVA_X11, [libva-x11 >= $VAAPI_REQ],
|
||||||
[], [USE_X11=0])
|
[], [USE_X11=0])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check for va_dec_jpeg.h header
|
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
|
||||||
AC_CHECK_HEADERS([va/va_dec_jpeg.h], [], [],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
|
|
||||||
dnl Check for JPEG decoding API (0.32.1+)
|
|
||||||
USE_JPEG_DECODER=0
|
|
||||||
AC_CACHE_CHECK([for JPEG decoding API],
|
|
||||||
[ac_cv_have_jpeg_decoding_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_DEC_JPEG_H
|
|
||||||
# include <va/va_dec_jpeg.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
VAPictureParameterBufferJPEGBaseline pic_param;
|
|
||||||
VASliceParameterBufferJPEGBaseline slice_param;
|
|
||||||
VAHuffmanTableBufferJPEGBaseline huffman_table;
|
|
||||||
VAIQMatrixBufferJPEGBaseline iq_matrix;
|
|
||||||
]])
|
|
||||||
],
|
|
||||||
[ac_cv_have_jpeg_decoding_api="yes"],
|
|
||||||
[ac_cv_have_jpeg_decoding_api="no"])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
LIBS="$saved_LIBS"
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ac_cv_have_jpeg_decoding_api" = "xyes"], [USE_JPEG_DECODER=1])
|
|
||||||
|
|
||||||
dnl Check for va_dec_vp8.h header
|
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
|
||||||
AC_CHECK_HEADERS([va/va_dec_vp8.h], [], [],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
|
|
||||||
dnl Check for VP8 decoding API (0.34+)
|
|
||||||
USE_VP8_DECODER=0
|
|
||||||
AC_CACHE_CHECK([for VP8 decoding API],
|
|
||||||
[ac_cv_have_vp8_decoding_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_DEC_VP8_H
|
|
||||||
# include <va/va_dec_vp8.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
VAPictureParameterBufferVP8 pic_param;
|
|
||||||
VASliceParameterBufferVP8 slice_param;
|
|
||||||
VAProbabilityDataBufferVP8 prob_data;
|
|
||||||
VAIQMatrixBufferVP8 iq_matrix;
|
|
||||||
slice_param.slice_data_offset = 0;
|
|
||||||
slice_param.slice_data_flag = 0;
|
|
||||||
]])
|
|
||||||
],
|
|
||||||
[ac_cv_have_vp8_decoding_api="yes"],
|
|
||||||
[ac_cv_have_vp8_decoding_api="no"])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
LIBS="$saved_LIBS"
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ac_cv_have_vp8_decoding_api" = "xyes"], [USE_VP8_DECODER=1])
|
|
||||||
|
|
||||||
dnl Check for va_dec_vp9.h header
|
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
|
||||||
AC_CHECK_HEADERS([va/va_dec_vp9.h], [], [],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
|
|
||||||
dnl Check for VP9 decoding API (0.37+)
|
|
||||||
USE_VP9_DECODER=0
|
|
||||||
AC_CACHE_CHECK([for VP9 decoding API],
|
|
||||||
[ac_cv_have_vp9_decoding_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_DEC_VP9_H
|
|
||||||
# include <va/va_dec_vp9.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
VADecPictureParameterBufferVP9 pic_param;
|
|
||||||
VASliceParameterBufferVP9 slice_param;
|
|
||||||
VASegmentParameterVP9 seg_param;
|
|
||||||
slice_param.slice_data_offset = 0;
|
|
||||||
slice_param.slice_data_flag = 0;
|
|
||||||
]])
|
|
||||||
],
|
|
||||||
[ac_cv_have_vp9_decoding_api="yes"],
|
|
||||||
[ac_cv_have_vp9_decoding_api="no"])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
LIBS="$saved_LIBS"
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ac_cv_have_vp9_decoding_api" = "xyes"], [USE_VP9_DECODER=1])
|
|
||||||
|
|
||||||
dnl Check for va_dec_hevc.h header
|
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
|
||||||
AC_CHECK_HEADERS([va/va_dec_hevc.h], [], [],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
|
|
||||||
dnl Check for HEVC decoding API (0.38+)
|
|
||||||
USE_H265_DECODER=0
|
|
||||||
AC_CACHE_CHECK([for HEVC decoding API],
|
|
||||||
[ac_cv_have_h265_decoding_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_DEC_HEVC_H
|
|
||||||
# include <va/va_dec_hevc.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
VAPictureParameterBufferHEVC pic_param;
|
|
||||||
VASliceParameterBufferHEVC slice_param;
|
|
||||||
VAIQMatrixBufferHEVC iq_matrix;
|
|
||||||
slice_param.slice_data_offset = 0;
|
|
||||||
slice_param.slice_data_flag = 0;
|
|
||||||
]])
|
|
||||||
],
|
|
||||||
[ac_cv_have_h265_decoding_api="yes"],
|
|
||||||
[ac_cv_have_h265_decoding_api="no"])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
LIBS="$saved_LIBS"
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ac_cv_have_h265_decoding_api" = "xyes"], [USE_H265_DECODER=1])
|
|
||||||
|
|
||||||
dnl Check for va_vpp.h header
|
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
|
||||||
AC_CHECK_HEADERS([va/va_vpp.h], [], [],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
|
|
||||||
dnl Check for vpp (video post-processing) support
|
|
||||||
USE_VA_VPP=0
|
|
||||||
AC_CACHE_CHECK([for video post-postprocessing API],
|
|
||||||
[ac_cv_have_va_vpp_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_VPP_H
|
|
||||||
# include <va/va_vpp.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
VADisplay va_dpy;
|
|
||||||
VAContextID vpp_ctx;
|
|
||||||
VAProcFilterType filters[VAProcFilterCount];
|
|
||||||
unsigned int num_filters = VAProcFilterCount;
|
|
||||||
vaQueryVideoProcFilters(va_dpy, vpp_ctx, filters, &num_filters);
|
|
||||||
]])
|
|
||||||
],
|
|
||||||
[ac_cv_have_va_vpp_api="yes"],
|
|
||||||
[ac_cv_have_va_vpp_api="no"])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
LIBS="$saved_LIBS"
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ac_cv_have_va_vpp_api" = "xyes"], [USE_VA_VPP=1])
|
|
||||||
|
|
||||||
dnl Check for encoding support
|
dnl Check for encoding support
|
||||||
USE_ENCODERS=0
|
USE_ENCODERS=0
|
||||||
if test "x$enable_encoders" = "xyes"; then
|
if test "x$enable_encoders" = "xyes"; then
|
||||||
PKG_CHECK_MODULES([LIBVA], [libva >= $VAAPI_ENC_REQ],
|
USE_ENCODERS=1
|
||||||
[
|
|
||||||
USE_ENCODERS=1
|
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
|
||||||
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
|
||||||
AC_CHECK_HEADERS([va/va_enc_mpeg2.h va/va_enc_h264.h], [],
|
|
||||||
[USE_ENCODERS=0],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
CPPFLAGS="$saved_CPPFLAGS"
|
|
||||||
], [:])
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
USE_JPEG_ENCODER=0
|
|
||||||
USE_VP8_ENCODER=0
|
|
||||||
USE_H265_ENCODER=0
|
|
||||||
USE_VP9_ENCODER=0
|
USE_VP9_ENCODER=0
|
||||||
USE_H264_FEI_ENCODER=0
|
USE_H264_FEI_ENCODER=0
|
||||||
|
|
||||||
|
@ -765,101 +533,7 @@ if test $USE_ENCODERS -eq 1; then
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $LIBVA_CFLAGS"
|
||||||
|
|
||||||
dnl Check for JPEG Encoding API (0.37.0+)
|
dnl Check for VP9 Encoding API (0.39.1+)
|
||||||
AC_CHECK_HEADERS([va/va_enc_jpeg.h], [], [],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
AC_CACHE_CHECK([for JPEG encoding API],
|
|
||||||
[ac_cv_have_jpeg_encoding_api],
|
|
||||||
[
|
|
||||||
saved_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS $LIBVA_LIBS"
|
|
||||||
AC_COMPILE_IFELSE(
|
|
||||||
[
|
|
||||||
AC_LANG_PROGRAM(
|
|
||||||
[[
|
|
||||||
#include <va/va.h>
|
|
||||||
#ifdef HAVE_VA_VA_ENC_JPEG_H
|
|
||||||
# include <va/va_enc_jpeg.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
VAEncPictureParameterBufferJPEG pic_param;
|
|
||||||
VAEncSliceParameterBufferJPEG slice_param;
|
|
||||||
VAQMatrixBufferJPEG q_matrix;
|
|
||||||
]])
|
|
||||||
],
|
|
||||||
[ac_cv_have_jpeg_encoding_api="yes"],
|
|
||||||
[ac_cv_have_jpeg_encoding_api="no"])
|
|
||||||
LIBS="$saved_LIBS"
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ac_cv_have_jpeg_encoding_api" = "xyes"], [USE_JPEG_ENCODER=1])
|
|
||||||
|
|
||||||
dnl Check for VP8 Encoding API
|
|
||||||
AC_CHECK_HEADERS([va/va_enc_vp8.h], [], [],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
AC_CACHE_CHECK([for VP8 encoding API],
|
|
||||||
[ac_cv_have_vp8_encoding_api],
|
|
||||||
[
|
|
||||||
saved_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS $LIBVA_LIBS"
|
|
||||||
AC_COMPILE_IFELSE(
|
|
||||||
[
|
|
||||||
AC_LANG_PROGRAM(
|
|
||||||
[[
|
|
||||||
#include <va/va.h>
|
|
||||||
#ifdef HAVE_VA_VA_ENC_VP8_H
|
|
||||||
# include <va/va_enc_vp8.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
VAEncSequenceParameterBufferVP8 seq_param;
|
|
||||||
VAEncPictureParameterBufferVP8 pic_param;
|
|
||||||
VAQMatrixBufferVP8 q_matrix;
|
|
||||||
]])
|
|
||||||
],
|
|
||||||
[ac_cv_have_vp8_encoding_api="yes"],
|
|
||||||
[ac_cv_have_vp8_encoding_api="no"])
|
|
||||||
LIBS="$saved_LIBS"
|
|
||||||
])
|
|
||||||
AS_IF([test "x$ac_cv_have_vp8_encoding_api" = "xyes"], [USE_VP8_ENCODER=1])
|
|
||||||
|
|
||||||
dnl Check for H265/HEVC Encoding API
|
|
||||||
AC_CHECK_HEADERS([va/va_enc_hevc.h], [], [],
|
|
||||||
[
|
|
||||||
#include <va/va.h>
|
|
||||||
])
|
|
||||||
AC_CACHE_CHECK([for HEVC encoding API],
|
|
||||||
[ac_cv_have_hevc_encoding_api],
|
|
||||||
[
|
|
||||||
saved_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS $LIBVA_LIBS"
|
|
||||||
AC_COMPILE_IFELSE(
|
|
||||||
[
|
|
||||||
AC_LANG_PROGRAM(
|
|
||||||
[[
|
|
||||||
#include <va/va.h>
|
|
||||||
#ifdef HAVE_VA_VA_ENC_HEVC_H
|
|
||||||
# include <va/va_enc_hevc.h>
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[
|
|
||||||
VAEncSequenceParameterBufferHEVC seq_param;
|
|
||||||
VAEncPictureParameterBufferHEVC pic_param;
|
|
||||||
VAEncSliceParameterBufferHEVC buf_param;
|
|
||||||
VAQMatrixBufferHEVC q_matrix;
|
|
||||||
]])
|
|
||||||
],
|
|
||||||
[ac_cv_have_hevc_encoding_api="yes"],
|
|
||||||
[ac_cv_have_hevc_encoding_api="no"])
|
|
||||||
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], [], [],
|
AC_CHECK_HEADERS([va/va_enc_vp9.h], [], [],
|
||||||
[
|
[
|
||||||
#include <va/va.h>
|
#include <va/va.h>
|
||||||
|
@ -931,7 +605,7 @@ fi
|
||||||
|
|
||||||
dnl VA/Wayland API
|
dnl VA/Wayland API
|
||||||
if test $USE_WAYLAND -eq 1; then
|
if test $USE_WAYLAND -eq 1; then
|
||||||
PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland >= $VAAPI_WLD_REQ],
|
PKG_CHECK_MODULES([LIBVA_WAYLAND], [libva-wayland >= $VAAPI_REQ],
|
||||||
[], [USE_WAYLAND=0])
|
[], [USE_WAYLAND=0])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1019,18 +693,6 @@ AC_DEFINE_UNQUOTED([USE_ENCODERS], [$USE_ENCODERS],
|
||||||
[Defined to 1 if video encoders are used])
|
[Defined to 1 if video encoders are used])
|
||||||
AM_CONDITIONAL([USE_ENCODERS], [test $USE_ENCODERS -eq 1])
|
AM_CONDITIONAL([USE_ENCODERS], [test $USE_ENCODERS -eq 1])
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([USE_JPEG_ENCODER], [$USE_JPEG_ENCODER],
|
|
||||||
[Defined to 1 if JPEG encoder is used])
|
|
||||||
AM_CONDITIONAL([USE_JPEG_ENCODER], [test $USE_JPEG_ENCODER -eq 1])
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([USE_VP8_ENCODER], [$USE_VP8_ENCODER],
|
|
||||||
[Defined to 1 if VP8 encoder is used])
|
|
||||||
AM_CONDITIONAL([USE_VP8_ENCODER], [test $USE_VP8_ENCODER -eq 1])
|
|
||||||
|
|
||||||
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],
|
AC_DEFINE_UNQUOTED([USE_VP9_ENCODER], [$USE_VP9_ENCODER],
|
||||||
[Defined to 1 if VP9 encoder is used])
|
[Defined to 1 if VP9 encoder is used])
|
||||||
AM_CONDITIONAL([USE_VP9_ENCODER], [test $USE_VP9_ENCODER -eq 1])
|
AM_CONDITIONAL([USE_VP9_ENCODER], [test $USE_VP9_ENCODER -eq 1])
|
||||||
|
@ -1039,26 +701,6 @@ AC_DEFINE_UNQUOTED([USE_H264_FEI_ENCODER], [$USE_H264_FEI_ENCODER],
|
||||||
[Defined to 1 if H264_FEI encoder is used])
|
[Defined to 1 if H264_FEI encoder is used])
|
||||||
AM_CONDITIONAL([USE_H264_FEI_ENCODER], [test $USE_H264_FEI_ENCODER -eq 1])
|
AM_CONDITIONAL([USE_H264_FEI_ENCODER], [test $USE_H264_FEI_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])
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([USE_JPEG_DECODER], [$USE_JPEG_DECODER],
|
|
||||||
[Defined to 1 if JPEG decoder is used])
|
|
||||||
AM_CONDITIONAL([USE_JPEG_DECODER], [test $USE_JPEG_DECODER -eq 1])
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([USE_VP8_DECODER], [$USE_VP8_DECODER],
|
|
||||||
[Defined to 1 if VP8 decoder is used])
|
|
||||||
AM_CONDITIONAL([USE_VP8_DECODER], [test $USE_VP8_DECODER -eq 1])
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([USE_VP9_DECODER], [$USE_VP9_DECODER],
|
|
||||||
[Defined to 1 if VP9 decoder is used])
|
|
||||||
AM_CONDITIONAL([USE_VP9_DECODER], [test $USE_VP9_DECODER -eq 1])
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([USE_H265_DECODER], [$USE_H265_DECODER],
|
|
||||||
[Defined to 1 if HEVC decoder is used])
|
|
||||||
AM_CONDITIONAL([USE_H265_DECODER], [test $USE_H265_DECODER -eq 1])
|
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED([USE_DRM], [$USE_DRM],
|
AC_DEFINE_UNQUOTED([USE_DRM], [$USE_DRM],
|
||||||
[Defined to 1 if DRM is enabled])
|
[Defined to 1 if DRM is enabled])
|
||||||
AM_CONDITIONAL([USE_DRM], [test $USE_DRM -eq 1])
|
AM_CONDITIONAL([USE_DRM], [test $USE_DRM -eq 1])
|
||||||
|
|
|
@ -148,31 +148,23 @@ libgstvaapi_source_priv_h = \
|
||||||
|
|
||||||
libgstvaapi_jpegdec_source_c = gstvaapidecoder_jpeg.c
|
libgstvaapi_jpegdec_source_c = gstvaapidecoder_jpeg.c
|
||||||
libgstvaapi_jpegdec_source_h = gstvaapidecoder_jpeg.h
|
libgstvaapi_jpegdec_source_h = gstvaapidecoder_jpeg.h
|
||||||
if USE_JPEG_DECODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_jpegdec_source_c)
|
libgstvaapi_source_c += $(libgstvaapi_jpegdec_source_c)
|
||||||
libgstvaapi_source_h += $(libgstvaapi_jpegdec_source_h)
|
libgstvaapi_source_h += $(libgstvaapi_jpegdec_source_h)
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_vp8dec_source_c = gstvaapidecoder_vp8.c
|
libgstvaapi_vp8dec_source_c = gstvaapidecoder_vp8.c
|
||||||
libgstvaapi_vp8dec_source_h = gstvaapidecoder_vp8.h
|
libgstvaapi_vp8dec_source_h = gstvaapidecoder_vp8.h
|
||||||
if USE_VP8_DECODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_vp8dec_source_c)
|
libgstvaapi_source_c += $(libgstvaapi_vp8dec_source_c)
|
||||||
libgstvaapi_source_h += $(libgstvaapi_vp8dec_source_h)
|
libgstvaapi_source_h += $(libgstvaapi_vp8dec_source_h)
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_hevcdec_source_c = gstvaapidecoder_h265.c
|
libgstvaapi_hevcdec_source_c = gstvaapidecoder_h265.c
|
||||||
libgstvaapi_hevcdec_source_h = gstvaapidecoder_h265.h
|
libgstvaapi_hevcdec_source_h = gstvaapidecoder_h265.h
|
||||||
if USE_H265_DECODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_hevcdec_source_c)
|
libgstvaapi_source_c += $(libgstvaapi_hevcdec_source_c)
|
||||||
libgstvaapi_source_h += $(libgstvaapi_hevcdec_source_h)
|
libgstvaapi_source_h += $(libgstvaapi_hevcdec_source_h)
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_vp9dec_source_c = gstvaapidecoder_vp9.c
|
libgstvaapi_vp9dec_source_c = gstvaapidecoder_vp9.c
|
||||||
libgstvaapi_vp9dec_source_h = gstvaapidecoder_vp9.h
|
libgstvaapi_vp9dec_source_h = gstvaapidecoder_vp9.h
|
||||||
if USE_VP9_DECODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_vp9dec_source_c)
|
libgstvaapi_source_c += $(libgstvaapi_vp9dec_source_c)
|
||||||
libgstvaapi_source_h += $(libgstvaapi_vp9dec_source_h)
|
libgstvaapi_source_h += $(libgstvaapi_vp9dec_source_h)
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_enc_source_c = \
|
libgstvaapi_enc_source_c = \
|
||||||
gstvaapicodedbuffer.c \
|
gstvaapicodedbuffer.c \
|
||||||
|
@ -180,8 +172,11 @@ libgstvaapi_enc_source_c = \
|
||||||
gstvaapicodedbufferproxy.c \
|
gstvaapicodedbufferproxy.c \
|
||||||
gstvaapiencoder.c \
|
gstvaapiencoder.c \
|
||||||
gstvaapiencoder_h264.c \
|
gstvaapiencoder_h264.c \
|
||||||
|
gstvaapiencoder_h265.c \
|
||||||
|
gstvaapiencoder_jpeg.c \
|
||||||
gstvaapiencoder_mpeg2.c \
|
gstvaapiencoder_mpeg2.c \
|
||||||
gstvaapiencoder_objects.c \
|
gstvaapiencoder_objects.c \
|
||||||
|
gstvaapiencoder_vp8.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libgstvaapi_enc_source_h = \
|
libgstvaapi_enc_source_h = \
|
||||||
|
@ -190,7 +185,10 @@ libgstvaapi_enc_source_h = \
|
||||||
gstvaapicodedbufferproxy.h \
|
gstvaapicodedbufferproxy.h \
|
||||||
gstvaapiencoder.h \
|
gstvaapiencoder.h \
|
||||||
gstvaapiencoder_h264.h \
|
gstvaapiencoder_h264.h \
|
||||||
|
gstvaapiencoder_h265.h \
|
||||||
|
gstvaapiencoder_jpeg.h \
|
||||||
gstvaapiencoder_mpeg2.h \
|
gstvaapiencoder_mpeg2.h \
|
||||||
|
gstvaapiencoder_vp8.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libgstvaapi_enc_source_priv_h = \
|
libgstvaapi_enc_source_priv_h = \
|
||||||
|
@ -207,27 +205,6 @@ libgstvaapi_source_h += $(libgstvaapi_enc_source_h)
|
||||||
libgstvaapi_source_priv_h += $(libgstvaapi_enc_source_priv_h)
|
libgstvaapi_source_priv_h += $(libgstvaapi_enc_source_priv_h)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libgstvaapi_jpegenc_source_c = gstvaapiencoder_jpeg.c
|
|
||||||
libgstvaapi_jpegenc_source_h = gstvaapiencoder_jpeg.h
|
|
||||||
if USE_JPEG_ENCODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_jpegenc_source_c)
|
|
||||||
libgstvaapi_source_h += $(libgstvaapi_jpegenc_source_h)
|
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_vp8enc_source_c = gstvaapiencoder_vp8.c
|
|
||||||
libgstvaapi_vp8enc_source_h = gstvaapiencoder_vp8.h
|
|
||||||
if USE_VP8_ENCODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_vp8enc_source_c)
|
|
||||||
libgstvaapi_source_h += $(libgstvaapi_vp8enc_source_h)
|
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_h265enc_source_c = gstvaapiencoder_h265.c
|
|
||||||
libgstvaapi_h265enc_source_h = gstvaapiencoder_h265.h
|
|
||||||
if USE_H265_ENCODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_h265enc_source_c)
|
|
||||||
libgstvaapi_source_h += $(libgstvaapi_h265enc_source_h)
|
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_vp9enc_source_c = gstvaapiencoder_vp9.c
|
libgstvaapi_vp9enc_source_c = gstvaapiencoder_vp9.c
|
||||||
libgstvaapi_vp9enc_source_h = gstvaapiencoder_vp9.h
|
libgstvaapi_vp9enc_source_h = gstvaapiencoder_vp9.h
|
||||||
if USE_VP9_ENCODER
|
if USE_VP9_ENCODER
|
||||||
|
@ -535,12 +512,6 @@ EXTRA_DIST = \
|
||||||
$(libgstvaapi_hevcdec_source_priv_h) \
|
$(libgstvaapi_hevcdec_source_priv_h) \
|
||||||
$(libgstvaapi_vp9dec_source_c) \
|
$(libgstvaapi_vp9dec_source_c) \
|
||||||
$(libgstvaapi_vp9dec_source_h) \
|
$(libgstvaapi_vp9dec_source_h) \
|
||||||
$(libgstvaapi_jpegenc_source_h) \
|
|
||||||
$(libgstvaapi_jpegenc_source_c) \
|
|
||||||
$(libgstvaapi_vp8enc_source_h) \
|
|
||||||
$(libgstvaapi_vp8enc_source_c) \
|
|
||||||
$(libgstvaapi_h265enc_source_h) \
|
|
||||||
$(libgstvaapi_h265enc_source_c) \
|
|
||||||
$(libgstvaapi_vp9enc_source_h) \
|
$(libgstvaapi_vp9enc_source_h) \
|
||||||
$(libgstvaapi_vp9enc_source_c) \
|
$(libgstvaapi_vp9enc_source_c) \
|
||||||
$(libgstvaapi_egl_source_c) \
|
$(libgstvaapi_egl_source_c) \
|
||||||
|
|
|
@ -36,14 +36,12 @@ from_GstVaapiBufferMemoryType (guint type)
|
||||||
guint va_type;
|
guint va_type;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
#if VA_CHECK_VERSION(0,36,0)
|
|
||||||
case GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF:
|
case GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF:
|
||||||
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME;
|
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME;
|
||||||
break;
|
break;
|
||||||
case GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF:
|
case GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF:
|
||||||
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM;
|
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
va_type = 0;
|
va_type = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -57,14 +55,12 @@ to_GstVaapiBufferMemoryType (guint va_type)
|
||||||
guint type;
|
guint type;
|
||||||
|
|
||||||
switch (va_type) {
|
switch (va_type) {
|
||||||
#if VA_CHECK_VERSION(0,36,0)
|
|
||||||
case VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME:
|
case VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME:
|
||||||
type = GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF;
|
type = GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF;
|
||||||
break;
|
break;
|
||||||
case VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM:
|
case VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM:
|
||||||
type = GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF;
|
type = GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
type = 0;
|
type = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -72,7 +68,6 @@ to_GstVaapiBufferMemoryType (guint va_type)
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if VA_CHECK_VERSION (0,36,0)
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy)
|
gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy)
|
||||||
{
|
{
|
||||||
|
@ -96,7 +91,6 @@ gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VA_CHECK_VERSION (0,36,0) */
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy)
|
gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy)
|
||||||
{
|
{
|
||||||
|
@ -117,7 +111,6 @@ gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VA_CHECK_VERSION (0,36,0) */
|
|
||||||
static void
|
static void
|
||||||
gst_vaapi_buffer_proxy_finalize (GstVaapiBufferProxy * proxy)
|
gst_vaapi_buffer_proxy_finalize (GstVaapiBufferProxy * proxy)
|
||||||
{
|
{
|
||||||
|
@ -135,7 +128,6 @@ gst_vaapi_buffer_proxy_finalize (GstVaapiBufferProxy * proxy)
|
||||||
gst_vaapi_object_replace (&proxy->parent, NULL);
|
gst_vaapi_object_replace (&proxy->parent, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VA_CHECK_VERSION (0,36,0) */
|
|
||||||
static inline const GstVaapiMiniObjectClass *
|
static inline const GstVaapiMiniObjectClass *
|
||||||
gst_vaapi_buffer_proxy_class (void)
|
gst_vaapi_buffer_proxy_class (void)
|
||||||
{
|
{
|
||||||
|
@ -145,13 +137,11 @@ gst_vaapi_buffer_proxy_class (void)
|
||||||
};
|
};
|
||||||
return &GstVaapiBufferProxyClass;
|
return &GstVaapiBufferProxyClass;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
GstVaapiBufferProxy *
|
GstVaapiBufferProxy *
|
||||||
gst_vaapi_buffer_proxy_new (guintptr handle, guint type, gsize size,
|
gst_vaapi_buffer_proxy_new (guintptr handle, guint type, gsize size,
|
||||||
GDestroyNotify destroy_func, gpointer user_data)
|
GDestroyNotify destroy_func, gpointer user_data)
|
||||||
{
|
{
|
||||||
#if VA_CHECK_VERSION (0,36,0)
|
|
||||||
GstVaapiBufferProxy *proxy;
|
GstVaapiBufferProxy *proxy;
|
||||||
|
|
||||||
g_return_val_if_fail (handle != 0, NULL);
|
g_return_val_if_fail (handle != 0, NULL);
|
||||||
|
@ -183,16 +173,12 @@ error_unsupported_mem_type:
|
||||||
gst_vaapi_buffer_proxy_unref (proxy);
|
gst_vaapi_buffer_proxy_unref (proxy);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GstVaapiBufferProxy *
|
GstVaapiBufferProxy *
|
||||||
gst_vaapi_buffer_proxy_new_from_object (GstVaapiObject * object,
|
gst_vaapi_buffer_proxy_new_from_object (GstVaapiObject * object,
|
||||||
VABufferID buf_id, guint type, GDestroyNotify destroy_func, gpointer data)
|
VABufferID buf_id, guint type, GDestroyNotify destroy_func, gpointer data)
|
||||||
{
|
{
|
||||||
#if VA_CHECK_VERSION (0,36,0)
|
|
||||||
GstVaapiBufferProxy *proxy;
|
GstVaapiBufferProxy *proxy;
|
||||||
|
|
||||||
g_return_val_if_fail (object != NULL, NULL);
|
g_return_val_if_fail (object != NULL, NULL);
|
||||||
|
@ -229,9 +215,6 @@ error_acquire_handle:
|
||||||
gst_vaapi_buffer_proxy_unref (proxy);
|
gst_vaapi_buffer_proxy_unref (proxy);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -314,11 +297,7 @@ gst_vaapi_buffer_proxy_get_handle (GstVaapiBufferProxy * proxy)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (proxy != NULL, 0);
|
g_return_val_if_fail (proxy != NULL, 0);
|
||||||
|
|
||||||
#if VA_CHECK_VERSION (0,36,0)
|
|
||||||
return GST_VAAPI_BUFFER_PROXY_HANDLE (proxy);
|
return GST_VAAPI_BUFFER_PROXY_HANDLE (proxy);
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -334,11 +313,7 @@ gst_vaapi_buffer_proxy_get_size (GstVaapiBufferProxy * proxy)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (proxy != NULL, 0);
|
g_return_val_if_fail (proxy != NULL, 0);
|
||||||
|
|
||||||
#if VA_CHECK_VERSION (0,36,0)
|
|
||||||
return GST_VAAPI_BUFFER_PROXY_SIZE (proxy);
|
return GST_VAAPI_BUFFER_PROXY_SIZE (proxy);
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -68,9 +68,7 @@ struct _GstVaapiBufferProxy {
|
||||||
gpointer destroy_data;
|
gpointer destroy_data;
|
||||||
guint type;
|
guint type;
|
||||||
VABufferID va_buf;
|
VABufferID va_buf;
|
||||||
#if VA_CHECK_VERSION (0,36,0)
|
|
||||||
VABufferInfo va_info;
|
VABufferInfo va_info;
|
||||||
#endif
|
|
||||||
GstMemory *mem;
|
GstMemory *mem;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,6 @@ gst_vaapi_bitplane_new (GstVaapiDecoder * decoder, guint8 * data,
|
||||||
/* --- JPEG Huffman Tables --- */
|
/* --- JPEG Huffman Tables --- */
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if USE_JPEG_DECODER
|
|
||||||
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiHuffmanTable, gst_vaapi_huffman_table);
|
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiHuffmanTable, gst_vaapi_huffman_table);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -209,8 +208,7 @@ gst_vaapi_huffman_table_new (GstVaapiDecoder * decoder,
|
||||||
return NULL;
|
return NULL;
|
||||||
return GST_VAAPI_HUFFMAN_TABLE_CAST (object);
|
return GST_VAAPI_HUFFMAN_TABLE_CAST (object);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if USE_VP8_DECODER
|
|
||||||
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiProbabilityTable,
|
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiProbabilityTable,
|
||||||
gst_vaapi_probability_table);
|
gst_vaapi_probability_table);
|
||||||
|
|
||||||
|
@ -244,5 +242,3 @@ gst_vaapi_probability_table_new (GstVaapiDecoder * decoder,
|
||||||
return NULL;
|
return NULL;
|
||||||
return GST_VAAPI_PROBABILITY_TABLE_CAST (object);
|
return GST_VAAPI_PROBABILITY_TABLE_CAST (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -27,16 +27,6 @@
|
||||||
|
|
||||||
#include <va/va.h>
|
#include <va/va.h>
|
||||||
|
|
||||||
/* Compatibility glue with VA-API < 0.31 */
|
|
||||||
#if !VA_CHECK_VERSION(0,31,0)
|
|
||||||
#undef vaSyncSurface
|
|
||||||
#define vaSyncSurface(dpy, s) (vaSyncSurface)((dpy), VA_INVALID_ID, (s))
|
|
||||||
#undef vaPutImage
|
|
||||||
#define vaPutImage vaPutImage2
|
|
||||||
#undef vaAssociateSubpicture
|
|
||||||
#define vaAssociateSubpicture vaAssociateSubpicture2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if VA_CHECK_VERSION(1,0,0)
|
#if VA_CHECK_VERSION(1,0,0)
|
||||||
#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delta_support
|
#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delta_support
|
||||||
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderRawData
|
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderRawData
|
||||||
|
@ -45,50 +35,7 @@
|
||||||
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderH264_SEI
|
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderH264_SEI
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compatibility glue with VA-API 0.34 */
|
#include <va/va_compat.h>
|
||||||
#if VA_CHECK_VERSION(0,34,0)
|
|
||||||
# include <va/va_compat.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if VA_CHECK_VERSION(0,36,0)
|
|
||||||
#include <va/va_drmcommon.h>
|
#include <va/va_drmcommon.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/* VA-API < 0.37 doesn't include sub core APIs in va.h */
|
|
||||||
#if !VA_CHECK_VERSION(0,37,0)
|
|
||||||
#ifdef HAVE_VA_VA_DEC_HEVC_H
|
|
||||||
# include <va/va_dec_hevc.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_DEC_JPEG_H
|
|
||||||
# include <va/va_dec_jpeg.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_DEC_VP8_H
|
|
||||||
# include <va/va_dec_vp8.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_DEC_VP9_H
|
|
||||||
# include <va/va_dec_vp9.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_ENC_HEVC_H
|
|
||||||
# include <va/va_enc_hevc.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_ENC_H264_H
|
|
||||||
# include <va/va_enc_h264.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_ENC_JPEG_H
|
|
||||||
# include <va/va_enc_jpeg.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_ENC_MPEG2_H
|
|
||||||
# include <va/va_enc_mpeg2.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_ENC_VP8_H
|
|
||||||
# include <va/va_enc_vp8.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_ENC_VP9_H
|
|
||||||
# include <va/va_enc_vp9.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_VA_VA_VPP_H
|
|
||||||
# include <va/va_vpp.h>
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* GST_VAAPI_COMPAT_H */
|
#endif /* GST_VAAPI_COMPAT_H */
|
||||||
|
|
|
@ -302,7 +302,6 @@ config_create (GstVaapiContext * context)
|
||||||
attrib = &attribs[++attrib_index];
|
attrib = &attribs[++attrib_index];
|
||||||
g_assert (attrib_index < G_N_ELEMENTS (attribs));
|
g_assert (attrib_index < G_N_ELEMENTS (attribs));
|
||||||
}
|
}
|
||||||
#if VA_CHECK_VERSION(0,37,0)
|
|
||||||
if (cip->profile == GST_VAAPI_PROFILE_JPEG_BASELINE) {
|
if (cip->profile == GST_VAAPI_PROFILE_JPEG_BASELINE) {
|
||||||
attrib->type = VAConfigAttribEncJPEG;
|
attrib->type = VAConfigAttribEncJPEG;
|
||||||
if (!context_get_attribute (context, attrib->type, &value))
|
if (!context_get_attribute (context, attrib->type, &value))
|
||||||
|
@ -311,7 +310,6 @@ config_create (GstVaapiContext * context)
|
||||||
attrib = &attribs[++attrib_index];
|
attrib = &attribs[++attrib_index];
|
||||||
g_assert (attrib_index < G_N_ELEMENTS (attribs));
|
g_assert (attrib_index < G_N_ELEMENTS (attribs));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,39,1)
|
#if VA_CHECK_VERSION(0,39,1)
|
||||||
if (config->roi_capability) {
|
if (config->roi_capability) {
|
||||||
VAConfigAttribValEncROI *roi_config;
|
VAConfigAttribValEncROI *roi_config;
|
||||||
|
|
|
@ -532,7 +532,6 @@ ensure_profiles (GstVaapiDisplay * display)
|
||||||
g_array_sort (priv->encoders, compare_profiles);
|
g_array_sort (priv->encoders, compare_profiles);
|
||||||
|
|
||||||
/* Video processing API */
|
/* Video processing API */
|
||||||
#if USE_VA_VPP
|
|
||||||
status = vaQueryConfigEntrypoints (priv->display, VAProfileNone,
|
status = vaQueryConfigEntrypoints (priv->display, VAProfileNone,
|
||||||
entrypoints, &num_entrypoints);
|
entrypoints, &num_entrypoints);
|
||||||
if (vaapi_check_status (status, "vaQueryEntrypoints() [VAProfileNone]")) {
|
if (vaapi_check_status (status, "vaQueryEntrypoints() [VAProfileNone]")) {
|
||||||
|
@ -541,7 +540,6 @@ ensure_profiles (GstVaapiDisplay * display)
|
||||||
priv->has_vpp = TRUE;
|
priv->has_vpp = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
|
|
@ -289,7 +289,6 @@ gst_vaapi_enc_q_matrix_new (GstVaapiEncoder * encoder,
|
||||||
/* --- JPEG Huffman Tables --- */
|
/* --- JPEG Huffman Tables --- */
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if USE_JPEG_ENCODER
|
|
||||||
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiEncHuffmanTable,
|
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiEncHuffmanTable,
|
||||||
gst_vaapi_enc_huffman_table);
|
gst_vaapi_enc_huffman_table);
|
||||||
|
|
||||||
|
@ -322,7 +321,6 @@ gst_vaapi_enc_huffman_table_new (GstVaapiEncoder * encoder,
|
||||||
return NULL;
|
return NULL;
|
||||||
return GST_VAAPI_ENC_HUFFMAN_TABLE_CAST (object);
|
return GST_VAAPI_ENC_HUFFMAN_TABLE_CAST (object);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
/* --- Encoder Picture --- */
|
/* --- Encoder Picture --- */
|
||||||
|
|
|
@ -125,14 +125,12 @@ gst_vaapi_deinterlace_method_get_type (void)
|
||||||
"Disable deinterlacing", "none"},
|
"Disable deinterlacing", "none"},
|
||||||
{GST_VAAPI_DEINTERLACE_METHOD_BOB,
|
{GST_VAAPI_DEINTERLACE_METHOD_BOB,
|
||||||
"Bob deinterlacing", "bob"},
|
"Bob deinterlacing", "bob"},
|
||||||
#if USE_VA_VPP
|
|
||||||
{GST_VAAPI_DEINTERLACE_METHOD_WEAVE,
|
{GST_VAAPI_DEINTERLACE_METHOD_WEAVE,
|
||||||
"Weave deinterlacing", "weave"},
|
"Weave deinterlacing", "weave"},
|
||||||
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE,
|
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE,
|
||||||
"Motion adaptive deinterlacing", "motion-adaptive"},
|
"Motion adaptive deinterlacing", "motion-adaptive"},
|
||||||
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED,
|
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED,
|
||||||
"Motion compensated deinterlacing", "motion-compensated"},
|
"Motion compensated deinterlacing", "motion-compensated"},
|
||||||
#endif
|
|
||||||
{0, NULL, NULL},
|
{0, NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -171,7 +169,6 @@ gst_vaapi_deinterlace_flags_get_type (void)
|
||||||
/* --- VPP Helpers --- */
|
/* --- VPP Helpers --- */
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if USE_VA_VPP
|
|
||||||
static VAProcFilterType *
|
static VAProcFilterType *
|
||||||
vpp_get_filters_unlocked (GstVaapiFilter * filter, guint * num_filters_ptr)
|
vpp_get_filters_unlocked (GstVaapiFilter * filter, guint * num_filters_ptr)
|
||||||
{
|
{
|
||||||
|
@ -273,13 +270,11 @@ vpp_get_filter_caps (GstVaapiFilter * filter, VAProcFilterType type,
|
||||||
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
/* --- VPP Operations --- */
|
/* --- VPP Operations --- */
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if USE_VA_VPP
|
|
||||||
#define DEFAULT_FORMAT GST_VIDEO_FORMAT_UNKNOWN
|
#define DEFAULT_FORMAT GST_VIDEO_FORMAT_UNKNOWN
|
||||||
#define DEFAULT_SCALING GST_VAAPI_SCALE_METHOD_DEFAULT
|
#define DEFAULT_SCALING GST_VAAPI_SCALE_METHOD_DEFAULT
|
||||||
|
|
||||||
|
@ -425,7 +420,6 @@ init_properties (void)
|
||||||
GST_VAAPI_TYPE_SCALE_METHOD,
|
GST_VAAPI_TYPE_SCALE_METHOD,
|
||||||
DEFAULT_SCALING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
DEFAULT_SCALING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
#if VA_CHECK_VERSION(0,36,0)
|
|
||||||
/**
|
/**
|
||||||
* GstVaapiFilter:skin-tone-enhancement:
|
* GstVaapiFilter:skin-tone-enhancement:
|
||||||
*
|
*
|
||||||
|
@ -435,7 +429,6 @@ init_properties (void)
|
||||||
"Skin tone enhancement",
|
"Skin tone enhancement",
|
||||||
"Apply the skin tone enhancement algorithm",
|
"Apply the skin tone enhancement algorithm",
|
||||||
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -484,12 +477,10 @@ op_data_new (GstVaapiFilterOp op, GParamSpec * pspec)
|
||||||
op_data->va_cap_size = sizeof (VAProcFilterCap);
|
op_data->va_cap_size = sizeof (VAProcFilterCap);
|
||||||
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
|
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
|
||||||
break;
|
break;
|
||||||
#if VA_CHECK_VERSION(0,36,0)
|
|
||||||
case GST_VAAPI_FILTER_OP_SKINTONE:
|
case GST_VAAPI_FILTER_OP_SKINTONE:
|
||||||
op_data->va_type = VAProcFilterSkinToneEnhancement;
|
op_data->va_type = VAProcFilterSkinToneEnhancement;
|
||||||
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
|
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case GST_VAAPI_FILTER_OP_HUE:
|
case GST_VAAPI_FILTER_OP_HUE:
|
||||||
op_data->va_subtype = VAProcColorBalanceHue;
|
op_data->va_subtype = VAProcColorBalanceHue;
|
||||||
goto op_colorbalance;
|
goto op_colorbalance;
|
||||||
|
@ -715,14 +706,12 @@ error:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Determine the set of supported VPP operations by the specific
|
/* Determine the set of supported VPP operations by the specific
|
||||||
filter, or known to this library if filter is NULL */
|
filter, or known to this library if filter is NULL */
|
||||||
static GPtrArray *
|
static GPtrArray *
|
||||||
get_operations (GstVaapiFilter * filter)
|
get_operations (GstVaapiFilter * filter)
|
||||||
{
|
{
|
||||||
#if USE_VA_VPP
|
|
||||||
GPtrArray *ops;
|
GPtrArray *ops;
|
||||||
|
|
||||||
if (filter && filter->operations)
|
if (filter && filter->operations)
|
||||||
|
@ -732,8 +721,6 @@ get_operations (GstVaapiFilter * filter)
|
||||||
if (!ops)
|
if (!ops)
|
||||||
return NULL;
|
return NULL;
|
||||||
return filter ? get_operations_ordered (filter, ops) : ops;
|
return filter ? get_operations_ordered (filter, ops) : ops;
|
||||||
#endif
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure the set of supported VPP operations is cached into the
|
/* Ensure the set of supported VPP operations is cached into the
|
||||||
|
@ -776,7 +763,6 @@ find_operation (GstVaapiFilter * filter, GstVaapiFilterOp op)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ensure the operation's VA buffer is allocated */
|
/* Ensure the operation's VA buffer is allocated */
|
||||||
#if USE_VA_VPP
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
op_ensure_buffer (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data)
|
op_ensure_buffer (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data)
|
||||||
{
|
{
|
||||||
|
@ -786,10 +772,8 @@ op_ensure_buffer (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data)
|
||||||
VAProcFilterParameterBufferType, op_data->va_buffer_size, NULL,
|
VAProcFilterParameterBufferType, op_data->va_buffer_size, NULL,
|
||||||
&op_data->va_buffer, NULL);
|
&op_data->va_buffer, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Update a generic filter (float value) */
|
/* Update a generic filter (float value) */
|
||||||
#if USE_VA_VPP
|
|
||||||
static gboolean
|
static gboolean
|
||||||
op_set_generic_unlocked (GstVaapiFilter * filter,
|
op_set_generic_unlocked (GstVaapiFilter * filter,
|
||||||
GstVaapiFilterOpData * op_data, gfloat value)
|
GstVaapiFilterOpData * op_data, gfloat value)
|
||||||
|
@ -819,7 +803,6 @@ op_set_generic_unlocked (GstVaapiFilter * filter,
|
||||||
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
|
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
op_set_generic (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
op_set_generic (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
||||||
|
@ -827,16 +810,13 @@ op_set_generic (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
||||||
{
|
{
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
|
|
||||||
#if USE_VA_VPP
|
|
||||||
GST_VAAPI_DISPLAY_LOCK (filter->display);
|
GST_VAAPI_DISPLAY_LOCK (filter->display);
|
||||||
success = op_set_generic_unlocked (filter, op_data, value);
|
success = op_set_generic_unlocked (filter, op_data, value);
|
||||||
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
||||||
#endif
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the color balance filter */
|
/* Update the color balance filter */
|
||||||
#if USE_VA_VPP
|
|
||||||
static gboolean
|
static gboolean
|
||||||
op_set_color_balance_unlocked (GstVaapiFilter * filter,
|
op_set_color_balance_unlocked (GstVaapiFilter * filter,
|
||||||
GstVaapiFilterOpData * op_data, gfloat value)
|
GstVaapiFilterOpData * op_data, gfloat value)
|
||||||
|
@ -867,7 +847,6 @@ op_set_color_balance_unlocked (GstVaapiFilter * filter,
|
||||||
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
|
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
op_set_color_balance (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
op_set_color_balance (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
||||||
|
@ -875,16 +854,13 @@ op_set_color_balance (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
||||||
{
|
{
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
|
|
||||||
#if USE_VA_VPP
|
|
||||||
GST_VAAPI_DISPLAY_LOCK (filter->display);
|
GST_VAAPI_DISPLAY_LOCK (filter->display);
|
||||||
success = op_set_color_balance_unlocked (filter, op_data, value);
|
success = op_set_color_balance_unlocked (filter, op_data, value);
|
||||||
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
||||||
#endif
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update deinterlace filter */
|
/* Update deinterlace filter */
|
||||||
#if USE_VA_VPP
|
|
||||||
static gboolean
|
static gboolean
|
||||||
op_set_deinterlace_unlocked (GstVaapiFilter * filter,
|
op_set_deinterlace_unlocked (GstVaapiFilter * filter,
|
||||||
GstVaapiFilterOpData * op_data, GstVaapiDeinterlaceMethod method,
|
GstVaapiFilterOpData * op_data, GstVaapiDeinterlaceMethod method,
|
||||||
|
@ -920,7 +896,6 @@ op_set_deinterlace_unlocked (GstVaapiFilter * filter,
|
||||||
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
|
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
op_set_deinterlace (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
op_set_deinterlace (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
||||||
|
@ -928,16 +903,13 @@ op_set_deinterlace (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
||||||
{
|
{
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
|
|
||||||
#if USE_VA_VPP
|
|
||||||
GST_VAAPI_DISPLAY_LOCK (filter->display);
|
GST_VAAPI_DISPLAY_LOCK (filter->display);
|
||||||
success = op_set_deinterlace_unlocked (filter, op_data, method, flags);
|
success = op_set_deinterlace_unlocked (filter, op_data, method, flags);
|
||||||
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
||||||
#endif
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update skin tone enhancement */
|
/* Update skin tone enhancement */
|
||||||
#if USE_VA_VPP
|
|
||||||
static gboolean
|
static gboolean
|
||||||
op_set_skintone_unlocked (GstVaapiFilter * filter,
|
op_set_skintone_unlocked (GstVaapiFilter * filter,
|
||||||
GstVaapiFilterOpData * op_data, gboolean value)
|
GstVaapiFilterOpData * op_data, gboolean value)
|
||||||
|
@ -959,7 +931,6 @@ op_set_skintone_unlocked (GstVaapiFilter * filter,
|
||||||
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
|
vaapi_unmap_buffer (filter->va_display, op_data->va_buffer, NULL);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static inline gboolean
|
static inline gboolean
|
||||||
op_set_skintone (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
op_set_skintone (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
||||||
|
@ -967,11 +938,9 @@ op_set_skintone (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
|
||||||
{
|
{
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
|
|
||||||
#if USE_VA_VPP
|
|
||||||
GST_VAAPI_DISPLAY_LOCK (filter->display);
|
GST_VAAPI_DISPLAY_LOCK (filter->display);
|
||||||
success = op_set_skintone_unlocked (filter, op_data, enhance);
|
success = op_set_skintone_unlocked (filter, op_data, enhance);
|
||||||
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
|
||||||
#endif
|
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1044,7 +1013,6 @@ find_format (GstVaapiFilter * filter, GstVideoFormat format)
|
||||||
/* --- Interface --- */
|
/* --- Interface --- */
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if USE_VA_VPP
|
|
||||||
static void
|
static void
|
||||||
gst_vaapi_filter_init (GstVaapiFilter * filter)
|
gst_vaapi_filter_init (GstVaapiFilter * filter)
|
||||||
{
|
{
|
||||||
|
@ -1185,7 +1153,6 @@ gst_vaapi_filter_class_init (GstVaapiFilterClass * klass)
|
||||||
"The VA-API display object to use", GST_TYPE_VAAPI_DISPLAY,
|
"The VA-API display object to use", GST_TYPE_VAAPI_DISPLAY,
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_vaapi_filter_new:
|
* gst_vaapi_filter_new:
|
||||||
|
@ -1199,7 +1166,6 @@ gst_vaapi_filter_class_init (GstVaapiFilterClass * klass)
|
||||||
GstVaapiFilter *
|
GstVaapiFilter *
|
||||||
gst_vaapi_filter_new (GstVaapiDisplay * display)
|
gst_vaapi_filter_new (GstVaapiDisplay * display)
|
||||||
{
|
{
|
||||||
#if USE_VA_VPP
|
|
||||||
GstVaapiFilter *filter;
|
GstVaapiFilter *filter;
|
||||||
|
|
||||||
filter = g_object_new (GST_TYPE_VAAPI_FILTER, "display", display, NULL);
|
filter = g_object_new (GST_TYPE_VAAPI_FILTER, "display", display, NULL);
|
||||||
|
@ -1213,11 +1179,6 @@ error:
|
||||||
gst_object_unref (filter);
|
gst_object_unref (filter);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
GST_WARNING ("video processing is not supported, "
|
|
||||||
"please consider an upgrade to VA-API >= 0.34");
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1327,7 +1288,6 @@ gboolean
|
||||||
gst_vaapi_filter_set_operation (GstVaapiFilter * filter, GstVaapiFilterOp op,
|
gst_vaapi_filter_set_operation (GstVaapiFilter * filter, GstVaapiFilterOp op,
|
||||||
const GValue * value)
|
const GValue * value)
|
||||||
{
|
{
|
||||||
#if USE_VA_VPP
|
|
||||||
GstVaapiFilterOpData *op_data;
|
GstVaapiFilterOpData *op_data;
|
||||||
|
|
||||||
g_return_val_if_fail (filter != NULL, FALSE);
|
g_return_val_if_fail (filter != NULL, FALSE);
|
||||||
|
@ -1373,7 +1333,6 @@ gst_vaapi_filter_set_operation (GstVaapiFilter * filter, GstVaapiFilterOp op,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1396,7 +1355,6 @@ static GstVaapiFilterStatus
|
||||||
gst_vaapi_filter_process_unlocked (GstVaapiFilter * filter,
|
gst_vaapi_filter_process_unlocked (GstVaapiFilter * filter,
|
||||||
GstVaapiSurface * src_surface, GstVaapiSurface * dst_surface, guint flags)
|
GstVaapiSurface * src_surface, GstVaapiSurface * dst_surface, guint flags)
|
||||||
{
|
{
|
||||||
#if USE_VA_VPP
|
|
||||||
VAProcPipelineParameterBuffer *pipeline_param = NULL;
|
VAProcPipelineParameterBuffer *pipeline_param = NULL;
|
||||||
VABufferID pipeline_param_buf_id = VA_INVALID_ID;
|
VABufferID pipeline_param_buf_id = VA_INVALID_ID;
|
||||||
VABufferID filters[N_PROPERTIES];
|
VABufferID filters[N_PROPERTIES];
|
||||||
|
@ -1536,8 +1494,6 @@ error:
|
||||||
vaapi_destroy_buffer (filter->va_display, &pipeline_param_buf_id);
|
vaapi_destroy_buffer (filter->va_display, &pipeline_param_buf_id);
|
||||||
return GST_VAAPI_FILTER_STATUS_ERROR_OPERATION_FAILED;
|
return GST_VAAPI_FILTER_STATUS_ERROR_OPERATION_FAILED;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return GST_VAAPI_FILTER_STATUS_ERROR_UNSUPPORTED_OPERATION;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GstVaapiFilterStatus
|
GstVaapiFilterStatus
|
||||||
|
@ -1886,11 +1842,8 @@ static inline gfloat
|
||||||
op_get_float_default_value (GstVaapiFilter * filter,
|
op_get_float_default_value (GstVaapiFilter * filter,
|
||||||
GstVaapiFilterOpData * op_data)
|
GstVaapiFilterOpData * op_data)
|
||||||
{
|
{
|
||||||
#if USE_VA_VPP
|
|
||||||
GParamSpecFloat *const pspec = G_PARAM_SPEC_FLOAT (op_data->pspec);
|
GParamSpecFloat *const pspec = G_PARAM_SPEC_FLOAT (op_data->pspec);
|
||||||
return pspec->default_value;
|
return pspec->default_value;
|
||||||
#endif
|
|
||||||
return 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gfloat
|
gfloat
|
||||||
|
|
|
@ -89,49 +89,37 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
|
||||||
"video/x-divx, divxversion=5", "advanced-simple"},
|
"video/x-divx, divxversion=5", "advanced-simple"},
|
||||||
{GST_VAAPI_PROFILE_MPEG4_ADVANCED_SIMPLE, VAProfileMPEG4AdvancedSimple,
|
{GST_VAAPI_PROFILE_MPEG4_ADVANCED_SIMPLE, VAProfileMPEG4AdvancedSimple,
|
||||||
"video/x-xvid", "advanced-simple"},
|
"video/x-xvid", "advanced-simple"},
|
||||||
#if VA_CHECK_VERSION(0,30,0)
|
|
||||||
{GST_VAAPI_PROFILE_H263_BASELINE, VAProfileH263Baseline,
|
{GST_VAAPI_PROFILE_H263_BASELINE, VAProfileH263Baseline,
|
||||||
"video/x-h263, variant=itu, h263version=h263", "baseline"},
|
"video/x-h263, variant=itu, h263version=h263", "baseline"},
|
||||||
#endif
|
|
||||||
#if !VA_CHECK_VERSION(1,0,0)
|
#if !VA_CHECK_VERSION(1,0,0)
|
||||||
{GST_VAAPI_PROFILE_H264_BASELINE, VAProfileH264Baseline,
|
{GST_VAAPI_PROFILE_H264_BASELINE, VAProfileH264Baseline,
|
||||||
"video/x-h264", "baseline"},
|
"video/x-h264", "baseline"},
|
||||||
#endif
|
#endif
|
||||||
#if VA_CHECK_VERSION(0,31,1)
|
|
||||||
{GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE,
|
{GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE,
|
||||||
VAProfileH264ConstrainedBaseline,
|
VAProfileH264ConstrainedBaseline,
|
||||||
"video/x-h264", "constrained-baseline"},
|
"video/x-h264", "constrained-baseline"},
|
||||||
#endif
|
|
||||||
{GST_VAAPI_PROFILE_H264_MAIN, VAProfileH264Main,
|
{GST_VAAPI_PROFILE_H264_MAIN, VAProfileH264Main,
|
||||||
"video/x-h264", "main"},
|
"video/x-h264", "main"},
|
||||||
{GST_VAAPI_PROFILE_H264_HIGH, VAProfileH264High,
|
{GST_VAAPI_PROFILE_H264_HIGH, VAProfileH264High,
|
||||||
"video/x-h264", "high"},
|
"video/x-h264", "high"},
|
||||||
#if VA_CHECK_VERSION(0,35,2)
|
|
||||||
{GST_VAAPI_PROFILE_H264_MULTIVIEW_HIGH, VAProfileH264MultiviewHigh,
|
{GST_VAAPI_PROFILE_H264_MULTIVIEW_HIGH, VAProfileH264MultiviewHigh,
|
||||||
"video/x-h264", "multiview-high"},
|
"video/x-h264", "multiview-high"},
|
||||||
{GST_VAAPI_PROFILE_H264_STEREO_HIGH, VAProfileH264StereoHigh,
|
{GST_VAAPI_PROFILE_H264_STEREO_HIGH, VAProfileH264StereoHigh,
|
||||||
"video/x-h264", "stereo-high"},
|
"video/x-h264", "stereo-high"},
|
||||||
#endif
|
|
||||||
{GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple,
|
{GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple,
|
||||||
"video/x-wmv, wmvversion=3", "simple"},
|
"video/x-wmv, wmvversion=3", "simple"},
|
||||||
{GST_VAAPI_PROFILE_VC1_MAIN, VAProfileVC1Main,
|
{GST_VAAPI_PROFILE_VC1_MAIN, VAProfileVC1Main,
|
||||||
"video/x-wmv, wmvversion=3", "main"},
|
"video/x-wmv, wmvversion=3", "main"},
|
||||||
{GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced,
|
{GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced,
|
||||||
"video/x-wmv, wmvversion=3, format=(string)WVC1", "advanced"},
|
"video/x-wmv, wmvversion=3, format=(string)WVC1", "advanced"},
|
||||||
#if VA_CHECK_VERSION(0,32,0)
|
|
||||||
{GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline,
|
{GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline,
|
||||||
"image/jpeg", NULL},
|
"image/jpeg", NULL},
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,35,0)
|
|
||||||
{GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3,
|
{GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3,
|
||||||
"video/x-vp8", NULL},
|
"video/x-vp8", NULL},
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,37,0)
|
|
||||||
{GST_VAAPI_PROFILE_H265_MAIN, VAProfileHEVCMain,
|
{GST_VAAPI_PROFILE_H265_MAIN, VAProfileHEVCMain,
|
||||||
"video/x-h265", "main"},
|
"video/x-h265", "main"},
|
||||||
{GST_VAAPI_PROFILE_H265_MAIN10, VAProfileHEVCMain10,
|
{GST_VAAPI_PROFILE_H265_MAIN10, VAProfileHEVCMain10,
|
||||||
"video/x-h265", "main-10"},
|
"video/x-h265", "main-10"},
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(1,2,0)
|
#if VA_CHECK_VERSION(1,2,0)
|
||||||
{GST_VAAPI_PROFILE_H265_MAIN_422_10, VAProfileHEVCMain422_10,
|
{GST_VAAPI_PROFILE_H265_MAIN_422_10, VAProfileHEVCMain422_10,
|
||||||
"video/x-h265", "main-422-10"},
|
"video/x-h265", "main-422-10"},
|
||||||
|
@ -140,18 +128,14 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
|
||||||
{GST_VAAPI_PROFILE_H265_MAIN_444_10, VAProfileHEVCMain444_10,
|
{GST_VAAPI_PROFILE_H265_MAIN_444_10, VAProfileHEVCMain444_10,
|
||||||
"video/x-h265", "main-444-10"},
|
"video/x-h265", "main-444-10"},
|
||||||
#endif
|
#endif
|
||||||
#if VA_CHECK_VERSION(0,38,0)
|
|
||||||
{GST_VAAPI_PROFILE_VP9_0, VAProfileVP9Profile0,
|
{GST_VAAPI_PROFILE_VP9_0, VAProfileVP9Profile0,
|
||||||
"video/x-vp9", "profile0"},
|
"video/x-vp9", "profile0"},
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,39,0)
|
|
||||||
{GST_VAAPI_PROFILE_VP9_1, VAProfileVP9Profile1,
|
{GST_VAAPI_PROFILE_VP9_1, VAProfileVP9Profile1,
|
||||||
"video/x-vp9", "profile1"},
|
"video/x-vp9", "profile1"},
|
||||||
{GST_VAAPI_PROFILE_VP9_2, VAProfileVP9Profile2,
|
{GST_VAAPI_PROFILE_VP9_2, VAProfileVP9Profile2,
|
||||||
"video/x-vp9", "profile2"},
|
"video/x-vp9", "profile2"},
|
||||||
{GST_VAAPI_PROFILE_VP9_3, VAProfileVP9Profile3,
|
{GST_VAAPI_PROFILE_VP9_3, VAProfileVP9Profile3,
|
||||||
"video/x-vp9", "profile3"},
|
"video/x-vp9", "profile3"},
|
||||||
#endif
|
|
||||||
{0,}
|
{0,}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -160,10 +144,8 @@ static const GstVaapiEntrypointMap gst_vaapi_entrypoints[] = {
|
||||||
{GST_VAAPI_ENTRYPOINT_VLD, VAEntrypointVLD},
|
{GST_VAAPI_ENTRYPOINT_VLD, VAEntrypointVLD},
|
||||||
{GST_VAAPI_ENTRYPOINT_IDCT, VAEntrypointIDCT},
|
{GST_VAAPI_ENTRYPOINT_IDCT, VAEntrypointIDCT},
|
||||||
{GST_VAAPI_ENTRYPOINT_MOCO, VAEntrypointMoComp},
|
{GST_VAAPI_ENTRYPOINT_MOCO, VAEntrypointMoComp},
|
||||||
#if VA_CHECK_VERSION(0,30,0)
|
|
||||||
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE, VAEntrypointEncSlice},
|
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE, VAEntrypointEncSlice},
|
||||||
{GST_VAAPI_ENTRYPOINT_PICTURE_ENCODE, VAEntrypointEncPicture},
|
{GST_VAAPI_ENTRYPOINT_PICTURE_ENCODE, VAEntrypointEncPicture},
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,39,1)
|
#if VA_CHECK_VERSION(0,39,1)
|
||||||
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_LP, VAEntrypointEncSliceLP},
|
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_LP, VAEntrypointEncSliceLP},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -132,7 +132,6 @@ static gboolean
|
||||||
gst_vaapi_surface_create_full (GstVaapiSurface * surface,
|
gst_vaapi_surface_create_full (GstVaapiSurface * surface,
|
||||||
const GstVideoInfo * vip, guint flags)
|
const GstVideoInfo * vip, guint flags)
|
||||||
{
|
{
|
||||||
#if VA_CHECK_VERSION(0,34,0)
|
|
||||||
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
|
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
|
||||||
const GstVideoFormat format = GST_VIDEO_INFO_FORMAT (vip);
|
const GstVideoFormat format = GST_VIDEO_INFO_FORMAT (vip);
|
||||||
VASurfaceID surface_id;
|
VASurfaceID surface_id;
|
||||||
|
@ -219,16 +218,12 @@ error_unsupported_format:
|
||||||
GST_ERROR ("unsupported format %s",
|
GST_ERROR ("unsupported format %s",
|
||||||
gst_vaapi_video_format_to_string (format));
|
gst_vaapi_video_format_to_string (format));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#else
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_vaapi_surface_create_from_buffer_proxy (GstVaapiSurface * surface,
|
gst_vaapi_surface_create_from_buffer_proxy (GstVaapiSurface * surface,
|
||||||
GstVaapiBufferProxy * proxy, const GstVideoInfo * vip)
|
GstVaapiBufferProxy * proxy, const GstVideoInfo * vip)
|
||||||
{
|
{
|
||||||
#if VA_CHECK_VERSION (0,36,0)
|
|
||||||
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
|
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
|
||||||
GstVideoFormat format;
|
GstVideoFormat format;
|
||||||
VASurfaceID surface_id;
|
VASurfaceID surface_id;
|
||||||
|
@ -308,9 +303,6 @@ error_unsupported_format:
|
||||||
GST_ERROR ("unsupported format %s",
|
GST_ERROR ("unsupported format %s",
|
||||||
gst_vaapi_video_format_to_string (format));
|
gst_vaapi_video_format_to_string (format));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#else
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define gst_vaapi_surface_finalize gst_vaapi_surface_destroy
|
#define gst_vaapi_surface_finalize gst_vaapi_surface_destroy
|
||||||
|
@ -387,7 +379,6 @@ gst_vaapi_surface_new (GstVaapiDisplay * display,
|
||||||
|
|
||||||
/* first try a recent version of vaCreateSurface, and later use as
|
/* first try a recent version of vaCreateSurface, and later use as
|
||||||
* fallback its old version */
|
* fallback its old version */
|
||||||
#if VA_CHECK_VERSION(0,34,0)
|
|
||||||
{
|
{
|
||||||
GstVideoInfo vi;
|
GstVideoInfo vi;
|
||||||
GstVideoFormat surface_format;
|
GstVideoFormat surface_format;
|
||||||
|
@ -398,7 +389,6 @@ gst_vaapi_surface_new (GstVaapiDisplay * display,
|
||||||
if (gst_vaapi_surface_create_full (surface, &vi, 0))
|
if (gst_vaapi_surface_create_full (surface, &vi, 0))
|
||||||
return surface;
|
return surface;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (!gst_vaapi_surface_create (surface, chroma_type, width, height))
|
if (!gst_vaapi_surface_create (surface, chroma_type, width, height))
|
||||||
goto error;
|
goto error;
|
||||||
return surface;
|
return surface;
|
||||||
|
|
|
@ -214,42 +214,30 @@ string_of_VAProfile (VAProfile profile)
|
||||||
MAP (MPEG4Simple);
|
MAP (MPEG4Simple);
|
||||||
MAP (MPEG4AdvancedSimple);
|
MAP (MPEG4AdvancedSimple);
|
||||||
MAP (MPEG4Main);
|
MAP (MPEG4Main);
|
||||||
#if VA_CHECK_VERSION(0,32,0)
|
|
||||||
MAP (JPEGBaseline);
|
MAP (JPEGBaseline);
|
||||||
MAP (H263Baseline);
|
MAP (H263Baseline);
|
||||||
MAP (H264ConstrainedBaseline);
|
MAP (H264ConstrainedBaseline);
|
||||||
#endif
|
|
||||||
#if !VA_CHECK_VERSION(1,0,0)
|
#if !VA_CHECK_VERSION(1,0,0)
|
||||||
MAP (H264Baseline);
|
MAP (H264Baseline);
|
||||||
#endif
|
#endif
|
||||||
MAP (H264Main);
|
MAP (H264Main);
|
||||||
MAP (H264High);
|
MAP (H264High);
|
||||||
#if VA_CHECK_VERSION(0,35,2)
|
|
||||||
MAP (H264MultiviewHigh);
|
MAP (H264MultiviewHigh);
|
||||||
MAP (H264StereoHigh);
|
MAP (H264StereoHigh);
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(1,2,0)
|
#if VA_CHECK_VERSION(1,2,0)
|
||||||
MAP (HEVCMain422_10);
|
MAP (HEVCMain422_10);
|
||||||
MAP (HEVCMain444);
|
MAP (HEVCMain444);
|
||||||
#endif
|
#endif
|
||||||
#if VA_CHECK_VERSION(0,37,1)
|
|
||||||
MAP (HEVCMain);
|
MAP (HEVCMain);
|
||||||
MAP (HEVCMain10);
|
MAP (HEVCMain10);
|
||||||
#endif
|
|
||||||
MAP (VC1Simple);
|
MAP (VC1Simple);
|
||||||
MAP (VC1Main);
|
MAP (VC1Main);
|
||||||
MAP (VC1Advanced);
|
MAP (VC1Advanced);
|
||||||
#if VA_CHECK_VERSION(0,35,0)
|
|
||||||
MAP (VP8Version0_3);
|
MAP (VP8Version0_3);
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,37,0)
|
|
||||||
MAP (VP9Profile0);
|
MAP (VP9Profile0);
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,39,0)
|
|
||||||
MAP (VP9Profile1);
|
MAP (VP9Profile1);
|
||||||
MAP (VP9Profile2);
|
MAP (VP9Profile2);
|
||||||
MAP (VP9Profile3);
|
MAP (VP9Profile3);
|
||||||
#endif
|
|
||||||
#undef MAP
|
#undef MAP
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -288,17 +276,8 @@ string_of_VADisplayAttributeType (VADisplayAttribType attribute_type)
|
||||||
MAP (Hue);
|
MAP (Hue);
|
||||||
MAP (Saturation);
|
MAP (Saturation);
|
||||||
MAP (BackgroundColor);
|
MAP (BackgroundColor);
|
||||||
#if !VA_CHECK_VERSION(0,34,0)
|
|
||||||
MAP (DirectSurface);
|
|
||||||
#endif
|
|
||||||
MAP (Rotation);
|
MAP (Rotation);
|
||||||
MAP (OutofLoopDeblock);
|
MAP (OutofLoopDeblock);
|
||||||
#if VA_CHECK_VERSION(0,31,1) && !VA_CHECK_VERSION(0,34,0)
|
|
||||||
MAP (BLEBlackMode);
|
|
||||||
MAP (BLEWhiteMode);
|
|
||||||
MAP (BlueStretch);
|
|
||||||
MAP (SkinColorCorrection);
|
|
||||||
#endif
|
|
||||||
MAP (CSCMatrix);
|
MAP (CSCMatrix);
|
||||||
MAP (BlendColor);
|
MAP (BlendColor);
|
||||||
MAP (OverlayAutoPaintColorKey);
|
MAP (OverlayAutoPaintColorKey);
|
||||||
|
@ -323,15 +302,11 @@ string_of_va_chroma_format (guint chroma_format)
|
||||||
MAP (YUV420);
|
MAP (YUV420);
|
||||||
MAP (YUV422);
|
MAP (YUV422);
|
||||||
MAP (YUV444);
|
MAP (YUV444);
|
||||||
#if VA_CHECK_VERSION(0,34,0)
|
|
||||||
MAP (YUV400);
|
MAP (YUV400);
|
||||||
MAP (RGB16);
|
MAP (RGB16);
|
||||||
MAP (RGB32);
|
MAP (RGB32);
|
||||||
MAP (RGBP);
|
MAP (RGBP);
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,38,1)
|
|
||||||
MAP (YUV420_10BPP);
|
MAP (YUV420_10BPP);
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(1,2,0)
|
#if VA_CHECK_VERSION(1,2,0)
|
||||||
MAP (YUV422_10);
|
MAP (YUV422_10);
|
||||||
MAP (YUV444_10);
|
MAP (YUV444_10);
|
||||||
|
@ -397,7 +372,6 @@ to_GstVaapiChromaType (guint va_rt_format)
|
||||||
case VA_RT_FORMAT_YUV444:
|
case VA_RT_FORMAT_YUV444:
|
||||||
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
|
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV444;
|
||||||
break;
|
break;
|
||||||
#if VA_CHECK_VERSION(0,34,0)
|
|
||||||
case VA_RT_FORMAT_YUV411:
|
case VA_RT_FORMAT_YUV411:
|
||||||
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV411;
|
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV411;
|
||||||
break;
|
break;
|
||||||
|
@ -413,12 +387,9 @@ to_GstVaapiChromaType (guint va_rt_format)
|
||||||
case VA_RT_FORMAT_RGBP:
|
case VA_RT_FORMAT_RGBP:
|
||||||
chroma_type = GST_VAAPI_CHROMA_TYPE_RGBP;
|
chroma_type = GST_VAAPI_CHROMA_TYPE_RGBP;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,38,1)
|
|
||||||
case VA_RT_FORMAT_YUV420_10BPP:
|
case VA_RT_FORMAT_YUV420_10BPP:
|
||||||
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
|
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(1,2,0)
|
#if VA_CHECK_VERSION(1,2,0)
|
||||||
case VA_RT_FORMAT_YUV422_10:
|
case VA_RT_FORMAT_YUV422_10:
|
||||||
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422_10BPP;
|
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV422_10BPP;
|
||||||
|
@ -468,7 +439,6 @@ from_GstVaapiChromaType (guint chroma_type)
|
||||||
case GST_VAAPI_CHROMA_TYPE_YUV444:
|
case GST_VAAPI_CHROMA_TYPE_YUV444:
|
||||||
format = VA_RT_FORMAT_YUV444;
|
format = VA_RT_FORMAT_YUV444;
|
||||||
break;
|
break;
|
||||||
#if VA_CHECK_VERSION(0,34,0)
|
|
||||||
case GST_VAAPI_CHROMA_TYPE_YUV411:
|
case GST_VAAPI_CHROMA_TYPE_YUV411:
|
||||||
format = VA_RT_FORMAT_YUV411;
|
format = VA_RT_FORMAT_YUV411;
|
||||||
break;
|
break;
|
||||||
|
@ -484,12 +454,9 @@ from_GstVaapiChromaType (guint chroma_type)
|
||||||
case GST_VAAPI_CHROMA_TYPE_RGBP:
|
case GST_VAAPI_CHROMA_TYPE_RGBP:
|
||||||
format = VA_RT_FORMAT_RGBP;
|
format = VA_RT_FORMAT_RGBP;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(0,38,1)
|
|
||||||
case GST_VAAPI_CHROMA_TYPE_YUV420_10BPP:
|
case GST_VAAPI_CHROMA_TYPE_YUV420_10BPP:
|
||||||
format = VA_RT_FORMAT_YUV420_10BPP;
|
format = VA_RT_FORMAT_YUV420_10BPP;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#if VA_CHECK_VERSION(1,2,0)
|
#if VA_CHECK_VERSION(1,2,0)
|
||||||
case GST_VAAPI_CHROMA_TYPE_YUV422_10BPP:
|
case GST_VAAPI_CHROMA_TYPE_YUV422_10BPP:
|
||||||
format = VA_RT_FORMAT_YUV422_10;
|
format = VA_RT_FORMAT_YUV422_10;
|
||||||
|
@ -683,10 +650,8 @@ to_GstVaapiSurfaceStatus (guint va_flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for encoder status */
|
/* Check for encoder status */
|
||||||
#if VA_CHECK_VERSION(0,30,0)
|
|
||||||
if (va_flags & VASurfaceSkipped)
|
if (va_flags & VASurfaceSkipped)
|
||||||
flags |= GST_VAAPI_SURFACE_STATUS_SKIPPED;
|
flags |= GST_VAAPI_SURFACE_STATUS_SKIPPED;
|
||||||
#endif
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,6 @@ gst_vaapi_get_config_attribute (GstVaapiDisplay * display, VAProfile profile,
|
||||||
GArray *
|
GArray *
|
||||||
gst_vaapi_get_surface_formats (GstVaapiDisplay * display, VAConfigID config)
|
gst_vaapi_get_surface_formats (GstVaapiDisplay * display, VAConfigID config)
|
||||||
{
|
{
|
||||||
#if VA_CHECK_VERSION(0,34,0)
|
|
||||||
VASurfaceAttrib *surface_attribs = NULL;
|
VASurfaceAttrib *surface_attribs = NULL;
|
||||||
guint i, num_surface_attribs = 0;
|
guint i, num_surface_attribs = 0;
|
||||||
VAStatus va_status;
|
VAStatus va_status;
|
||||||
|
@ -152,6 +151,5 @@ error:
|
||||||
{
|
{
|
||||||
g_free (surface_attribs);
|
g_free (surface_attribs);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,15 @@ gstlibvaapi_sources = [
|
||||||
'gstvaapidecoder.c',
|
'gstvaapidecoder.c',
|
||||||
'gstvaapidecoder_dpb.c',
|
'gstvaapidecoder_dpb.c',
|
||||||
'gstvaapidecoder_h264.c',
|
'gstvaapidecoder_h264.c',
|
||||||
|
'gstvaapidecoder_h265.c',
|
||||||
|
'gstvaapidecoder_jpeg.c',
|
||||||
'gstvaapidecoder_mpeg2.c',
|
'gstvaapidecoder_mpeg2.c',
|
||||||
'gstvaapidecoder_mpeg4.c',
|
'gstvaapidecoder_mpeg4.c',
|
||||||
'gstvaapidecoder_objects.c',
|
'gstvaapidecoder_objects.c',
|
||||||
'gstvaapidecoder_unit.c',
|
'gstvaapidecoder_unit.c',
|
||||||
'gstvaapidecoder_vc1.c',
|
'gstvaapidecoder_vc1.c',
|
||||||
|
'gstvaapidecoder_vp8.c',
|
||||||
|
'gstvaapidecoder_vp9.c',
|
||||||
'gstvaapidisplay.c',
|
'gstvaapidisplay.c',
|
||||||
'gstvaapifilter.c',
|
'gstvaapifilter.c',
|
||||||
'gstvaapiimage.c',
|
'gstvaapiimage.c',
|
||||||
|
@ -44,9 +48,12 @@ gstlibvaapi_headers = [
|
||||||
'gstvaapidecoder.h',
|
'gstvaapidecoder.h',
|
||||||
'gstvaapidecoder_h264.h',
|
'gstvaapidecoder_h264.h',
|
||||||
'gstvaapidecoder_h265.h',
|
'gstvaapidecoder_h265.h',
|
||||||
|
'gstvaapidecoder_jpeg.h',
|
||||||
'gstvaapidecoder_mpeg2.h',
|
'gstvaapidecoder_mpeg2.h',
|
||||||
'gstvaapidecoder_mpeg4.h',
|
'gstvaapidecoder_mpeg4.h',
|
||||||
'gstvaapidecoder_vc1.h',
|
'gstvaapidecoder_vc1.h',
|
||||||
|
'gstvaapidecoder_vp8.h',
|
||||||
|
'gstvaapidecoder_vp9.h',
|
||||||
'gstvaapidisplay.h',
|
'gstvaapidisplay.h',
|
||||||
'gstvaapifilter.h',
|
'gstvaapifilter.h',
|
||||||
'gstvaapiimage.h',
|
'gstvaapiimage.h',
|
||||||
|
@ -71,26 +78,6 @@ gstlibvaapi_headers = [
|
||||||
'video-format.h',
|
'video-format.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
if USE_JPEG_DECODER
|
|
||||||
gstlibvaapi_sources += 'gstvaapidecoder_jpeg.c'
|
|
||||||
gstlibvaapi_headers += 'gstvaapidecoder_jpeg.h'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_VP8_DECODER
|
|
||||||
gstlibvaapi_sources += 'gstvaapidecoder_vp8.c'
|
|
||||||
gstlibvaapi_headers += 'gstvaapidecoder_vp8.h'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_H265_DECODER
|
|
||||||
gstlibvaapi_sources += 'gstvaapidecoder_h265.c'
|
|
||||||
gstlibvaapi_headers += 'gstvaapidecoder_h265.h'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_VP9_DECODER
|
|
||||||
gstlibvaapi_sources += 'gstvaapidecoder_vp9.c'
|
|
||||||
gstlibvaapi_headers += 'gstvaapidecoder_vp9.h'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_ENCODERS
|
if USE_ENCODERS
|
||||||
gstlibvaapi_sources += [
|
gstlibvaapi_sources += [
|
||||||
'gstvaapicodedbuffer.c',
|
'gstvaapicodedbuffer.c',
|
||||||
|
@ -98,8 +85,11 @@ if USE_ENCODERS
|
||||||
'gstvaapicodedbufferproxy.c',
|
'gstvaapicodedbufferproxy.c',
|
||||||
'gstvaapiencoder.c',
|
'gstvaapiencoder.c',
|
||||||
'gstvaapiencoder_h264.c',
|
'gstvaapiencoder_h264.c',
|
||||||
|
'gstvaapiencoder_h265.c',
|
||||||
|
'gstvaapiencoder_jpeg.c',
|
||||||
'gstvaapiencoder_mpeg2.c',
|
'gstvaapiencoder_mpeg2.c',
|
||||||
'gstvaapiencoder_objects.c',
|
'gstvaapiencoder_objects.c',
|
||||||
|
'gstvaapiencoder_vp8.c',
|
||||||
]
|
]
|
||||||
gstlibvaapi_headers += [
|
gstlibvaapi_headers += [
|
||||||
'gstvaapicodedbuffer.h',
|
'gstvaapicodedbuffer.h',
|
||||||
|
@ -107,25 +97,13 @@ if USE_ENCODERS
|
||||||
'gstvaapicodedbufferproxy.h',
|
'gstvaapicodedbufferproxy.h',
|
||||||
'gstvaapiencoder.h',
|
'gstvaapiencoder.h',
|
||||||
'gstvaapiencoder_h264.h',
|
'gstvaapiencoder_h264.h',
|
||||||
|
'gstvaapiencoder_h265.h',
|
||||||
|
'gstvaapiencoder_jpeg.h',
|
||||||
'gstvaapiencoder_mpeg2.h',
|
'gstvaapiencoder_mpeg2.h',
|
||||||
|
'gstvaapiencoder_vp8.h',
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if USE_JPEG_ENCODER
|
|
||||||
gstlibvaapi_sources += 'gstvaapiencoder_jpeg.c'
|
|
||||||
gstlibvaapi_headers += 'gstvaapiencoder_jpeg.h'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_VP8_ENCODER
|
|
||||||
gstlibvaapi_sources += 'gstvaapiencoder_vp8.c'
|
|
||||||
gstlibvaapi_headers += 'gstvaapiencoder_vp8.h'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_H265_ENCODER
|
|
||||||
gstlibvaapi_sources += 'gstvaapiencoder_h265.c'
|
|
||||||
gstlibvaapi_headers += 'gstvaapiencoder_h265.h'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_VP9_ENCODER
|
if USE_VP9_ENCODER
|
||||||
gstlibvaapi_sources += 'gstvaapiencoder_vp9.c'
|
gstlibvaapi_sources += 'gstvaapiencoder_vp9.c'
|
||||||
gstlibvaapi_headers += 'gstvaapiencoder_vp9.h'
|
gstlibvaapi_headers += 'gstvaapiencoder_vp9.h'
|
||||||
|
|
|
@ -81,13 +81,19 @@ libgstvaapi_source_h = \
|
||||||
libgstvaapi_enc_source_c = \
|
libgstvaapi_enc_source_c = \
|
||||||
gstvaapiencode.c \
|
gstvaapiencode.c \
|
||||||
gstvaapiencode_h264.c \
|
gstvaapiencode_h264.c \
|
||||||
|
gstvaapiencode_h265.c \
|
||||||
|
gstvaapiencode_jpeg.c \
|
||||||
gstvaapiencode_mpeg2.c \
|
gstvaapiencode_mpeg2.c \
|
||||||
|
gstvaapiencode_vp8.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
libgstvaapi_enc_source_h = \
|
libgstvaapi_enc_source_h = \
|
||||||
gstvaapiencode.h \
|
gstvaapiencode.h \
|
||||||
gstvaapiencode_h264.h \
|
gstvaapiencode_h264.h \
|
||||||
|
gstvaapiencode_h265.h \
|
||||||
|
gstvaapiencode_jpeg.h \
|
||||||
gstvaapiencode_mpeg2.h \
|
gstvaapiencode_mpeg2.h \
|
||||||
|
gstvaapiencode_vp8.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
if USE_ENCODERS
|
if USE_ENCODERS
|
||||||
|
@ -95,27 +101,6 @@ libgstvaapi_source_c += $(libgstvaapi_enc_source_c)
|
||||||
libgstvaapi_source_h += $(libgstvaapi_enc_source_h)
|
libgstvaapi_source_h += $(libgstvaapi_enc_source_h)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libgstvaapi_jpegenc_source_c = gstvaapiencode_jpeg.c
|
|
||||||
libgstvaapi_jpegenc_source_h = gstvaapiencode_jpeg.h
|
|
||||||
if USE_JPEG_ENCODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_jpegenc_source_c)
|
|
||||||
libgstvaapi_source_h += $(libgstvaapi_jpegenc_source_h)
|
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_vp8enc_source_c = gstvaapiencode_vp8.c
|
|
||||||
libgstvaapi_vp8enc_source_h = gstvaapiencode_vp8.h
|
|
||||||
if USE_VP8_ENCODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_vp8enc_source_c)
|
|
||||||
libgstvaapi_source_h += $(libgstvaapi_vp8enc_source_h)
|
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_h265enc_source_c = gstvaapiencode_h265.c
|
|
||||||
libgstvaapi_h265enc_source_h = gstvaapiencode_h265.h
|
|
||||||
if USE_H265_ENCODER
|
|
||||||
libgstvaapi_source_c += $(libgstvaapi_h265enc_source_c)
|
|
||||||
libgstvaapi_source_h += $(libgstvaapi_h265enc_source_h)
|
|
||||||
endif
|
|
||||||
|
|
||||||
libgstvaapi_vp9enc_source_c = gstvaapiencode_vp9.c
|
libgstvaapi_vp9enc_source_c = gstvaapiencode_vp9.c
|
||||||
libgstvaapi_vp9enc_source_h = gstvaapiencode_vp9.h
|
libgstvaapi_vp9enc_source_h = gstvaapiencode_vp9.h
|
||||||
if USE_VP9_ENCODER
|
if USE_VP9_ENCODER
|
||||||
|
@ -168,12 +153,6 @@ libgstvaapi_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
$(libgstvaapi_enc_source_c) \
|
$(libgstvaapi_enc_source_c) \
|
||||||
$(libgstvaapi_enc_source_h) \
|
$(libgstvaapi_enc_source_h) \
|
||||||
$(libgstvaapi_jpegenc_source_c) \
|
|
||||||
$(libgstvaapi_jpegenc_source_h) \
|
|
||||||
$(libgstvaapi_vp8enc_source_c) \
|
|
||||||
$(libgstvaapi_vp8enc_source_h) \
|
|
||||||
$(libgstvaapi_h265enc_source_c) \
|
|
||||||
$(libgstvaapi_h265enc_source_h) \
|
|
||||||
$(libgstvaapi_vp9enc_source_c) \
|
$(libgstvaapi_vp9enc_source_c) \
|
||||||
$(libgstvaapi_vp9enc_source_h) \
|
$(libgstvaapi_vp9enc_source_h) \
|
||||||
$(libgstvaapi_h264feienc_source_c) \
|
$(libgstvaapi_h264feienc_source_c) \
|
||||||
|
|
|
@ -31,18 +31,9 @@
|
||||||
#if USE_ENCODERS
|
#if USE_ENCODERS
|
||||||
#include "gstvaapiencode_h264.h"
|
#include "gstvaapiencode_h264.h"
|
||||||
#include "gstvaapiencode_mpeg2.h"
|
#include "gstvaapiencode_mpeg2.h"
|
||||||
|
|
||||||
#if USE_JPEG_ENCODER
|
|
||||||
#include "gstvaapiencode_jpeg.h"
|
#include "gstvaapiencode_jpeg.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#if USE_VP8_ENCODER
|
|
||||||
#include "gstvaapiencode_vp8.h"
|
#include "gstvaapiencode_vp8.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#if USE_H265_ENCODER
|
|
||||||
#include "gstvaapiencode_h265.h"
|
#include "gstvaapiencode_h265.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#if USE_VP9_ENCODER
|
#if USE_VP9_ENCODER
|
||||||
#include "gstvaapiencode_vp9.h"
|
#include "gstvaapiencode_vp9.h"
|
||||||
|
@ -155,18 +146,12 @@ struct _GstVaapiEncoderMap
|
||||||
static const GstVaapiEncoderMap vaapi_encode_map[] = {
|
static const GstVaapiEncoderMap vaapi_encode_map[] = {
|
||||||
DEF_ENC (H264, h264),
|
DEF_ENC (H264, h264),
|
||||||
DEF_ENC (MPEG2, mpeg2),
|
DEF_ENC (MPEG2, mpeg2),
|
||||||
#if USE_JPEG_ENCODER
|
|
||||||
DEF_ENC (JPEG, jpeg),
|
DEF_ENC (JPEG, jpeg),
|
||||||
#endif
|
|
||||||
#if USE_VP8_ENCODER
|
|
||||||
DEF_ENC (VP8, vp8),
|
DEF_ENC (VP8, vp8),
|
||||||
#endif
|
|
||||||
#if USE_VP9_ENCODER
|
#if USE_VP9_ENCODER
|
||||||
DEF_ENC (VP9, vp9),
|
DEF_ENC (VP9, vp9),
|
||||||
#endif
|
#endif
|
||||||
#if USE_H265_ENCODER
|
|
||||||
DEF_ENC (H265, h265),
|
DEF_ENC (H265, h265),
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef DEF_ENC
|
#undef DEF_ENC
|
||||||
|
|
|
@ -70,16 +70,10 @@ static const char gst_vaapidecode_sink_caps_str[] =
|
||||||
GST_CAPS_CODEC("video/x-xvid")
|
GST_CAPS_CODEC("video/x-xvid")
|
||||||
GST_CAPS_CODEC("video/x-h263")
|
GST_CAPS_CODEC("video/x-h263")
|
||||||
GST_CAPS_CODEC("video/x-h264")
|
GST_CAPS_CODEC("video/x-h264")
|
||||||
#if USE_H265_DECODER
|
|
||||||
GST_CAPS_CODEC("video/x-h265")
|
GST_CAPS_CODEC("video/x-h265")
|
||||||
#endif
|
|
||||||
GST_CAPS_CODEC("video/x-wmv")
|
GST_CAPS_CODEC("video/x-wmv")
|
||||||
#if USE_VP8_DECODER
|
|
||||||
GST_CAPS_CODEC("video/x-vp8")
|
GST_CAPS_CODEC("video/x-vp8")
|
||||||
#endif
|
|
||||||
#if USE_VP9_DECODER
|
|
||||||
GST_CAPS_CODEC("video/x-vp9")
|
GST_CAPS_CODEC("video/x-vp9")
|
||||||
#endif
|
|
||||||
;
|
;
|
||||||
|
|
||||||
static const char gst_vaapidecode_src_caps_str[] =
|
static const char gst_vaapidecode_src_caps_str[] =
|
||||||
|
@ -110,9 +104,7 @@ struct _GstVaapiDecoderMap
|
||||||
};
|
};
|
||||||
|
|
||||||
static const GstVaapiDecoderMap vaapi_decode_map[] = {
|
static const GstVaapiDecoderMap vaapi_decode_map[] = {
|
||||||
#if USE_JPEG_DECODER
|
|
||||||
{GST_VAAPI_CODEC_JPEG, GST_RANK_MARGINAL, "jpeg", "image/jpeg", NULL},
|
{GST_VAAPI_CODEC_JPEG, GST_RANK_MARGINAL, "jpeg", "image/jpeg", NULL},
|
||||||
#endif
|
|
||||||
{GST_VAAPI_CODEC_MPEG2, GST_RANK_PRIMARY, "mpeg2",
|
{GST_VAAPI_CODEC_MPEG2, GST_RANK_PRIMARY, "mpeg2",
|
||||||
"video/mpeg, mpegversion=2, systemstream=(boolean)false", NULL},
|
"video/mpeg, mpegversion=2, systemstream=(boolean)false", NULL},
|
||||||
{GST_VAAPI_CODEC_MPEG4, GST_RANK_PRIMARY, "mpeg4",
|
{GST_VAAPI_CODEC_MPEG4, GST_RANK_PRIMARY, "mpeg4",
|
||||||
|
@ -122,15 +114,9 @@ static const GstVaapiDecoderMap vaapi_decode_map[] = {
|
||||||
gst_vaapi_decode_h264_install_properties},
|
gst_vaapi_decode_h264_install_properties},
|
||||||
{GST_VAAPI_CODEC_VC1, GST_RANK_PRIMARY, "vc1",
|
{GST_VAAPI_CODEC_VC1, GST_RANK_PRIMARY, "vc1",
|
||||||
"video/x-wmv, wmvversion=3, format={WMV3,WVC1}", NULL},
|
"video/x-wmv, wmvversion=3, format={WMV3,WVC1}", NULL},
|
||||||
#if USE_VP8_DECODER
|
|
||||||
{GST_VAAPI_CODEC_VP8, GST_RANK_PRIMARY, "vp8", "video/x-vp8", NULL},
|
{GST_VAAPI_CODEC_VP8, GST_RANK_PRIMARY, "vp8", "video/x-vp8", NULL},
|
||||||
#endif
|
|
||||||
#if USE_VP9_DECODER
|
|
||||||
{GST_VAAPI_CODEC_VP9, GST_RANK_PRIMARY, "vp9", "video/x-vp9", NULL},
|
{GST_VAAPI_CODEC_VP9, GST_RANK_PRIMARY, "vp9", "video/x-vp9", NULL},
|
||||||
#endif
|
|
||||||
#if USE_H265_DECODER
|
|
||||||
{GST_VAAPI_CODEC_H265, GST_RANK_PRIMARY, "h265", "video/x-h265", NULL},
|
{GST_VAAPI_CODEC_H265, GST_RANK_PRIMARY, "h265", "video/x-h265", NULL},
|
||||||
#endif
|
|
||||||
{0 /* the rest */ , GST_RANK_PRIMARY + 1, NULL,
|
{0 /* the rest */ , GST_RANK_PRIMARY + 1, NULL,
|
||||||
gst_vaapidecode_sink_caps_str, NULL},
|
gst_vaapidecode_sink_caps_str, NULL},
|
||||||
};
|
};
|
||||||
|
@ -923,7 +909,6 @@ gst_vaapidecode_create (GstVaapiDecode * decode, GstCaps * caps)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#if USE_H265_DECODER
|
|
||||||
case GST_VAAPI_CODEC_H265:
|
case GST_VAAPI_CODEC_H265:
|
||||||
decode->decoder = gst_vaapi_decoder_h265_new (dpy, caps);
|
decode->decoder = gst_vaapi_decoder_h265_new (dpy, caps);
|
||||||
|
|
||||||
|
@ -945,26 +930,19 @@ gst_vaapidecode_create (GstVaapiDecode * decode, GstCaps * caps)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case GST_VAAPI_CODEC_WMV3:
|
case GST_VAAPI_CODEC_WMV3:
|
||||||
case GST_VAAPI_CODEC_VC1:
|
case GST_VAAPI_CODEC_VC1:
|
||||||
decode->decoder = gst_vaapi_decoder_vc1_new (dpy, caps);
|
decode->decoder = gst_vaapi_decoder_vc1_new (dpy, caps);
|
||||||
break;
|
break;
|
||||||
#if USE_JPEG_DECODER
|
|
||||||
case GST_VAAPI_CODEC_JPEG:
|
case GST_VAAPI_CODEC_JPEG:
|
||||||
decode->decoder = gst_vaapi_decoder_jpeg_new (dpy, caps);
|
decode->decoder = gst_vaapi_decoder_jpeg_new (dpy, caps);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#if USE_VP8_DECODER
|
|
||||||
case GST_VAAPI_CODEC_VP8:
|
case GST_VAAPI_CODEC_VP8:
|
||||||
decode->decoder = gst_vaapi_decoder_vp8_new (dpy, caps);
|
decode->decoder = gst_vaapi_decoder_vp8_new (dpy, caps);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#if USE_VP9_DECODER
|
|
||||||
case GST_VAAPI_CODEC_VP9:
|
case GST_VAAPI_CODEC_VP9:
|
||||||
decode->decoder = gst_vaapi_decoder_vp9_new (dpy, caps);
|
decode->decoder = gst_vaapi_decoder_vp9_new (dpy, caps);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
decode->decoder = NULL;
|
decode->decoder = NULL;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -86,16 +86,10 @@ static const char gst_vaapi_decode_bin_sink_caps_str[] =
|
||||||
GST_CAPS_CODEC("video/x-xvid")
|
GST_CAPS_CODEC("video/x-xvid")
|
||||||
GST_CAPS_CODEC("video/x-h263")
|
GST_CAPS_CODEC("video/x-h263")
|
||||||
GST_CAPS_CODEC("video/x-h264")
|
GST_CAPS_CODEC("video/x-h264")
|
||||||
#if USE_H265_DECODER
|
|
||||||
GST_CAPS_CODEC("video/x-h265")
|
GST_CAPS_CODEC("video/x-h265")
|
||||||
#endif
|
|
||||||
GST_CAPS_CODEC("video/x-wmv")
|
GST_CAPS_CODEC("video/x-wmv")
|
||||||
#if USE_VP8_DECODER
|
|
||||||
GST_CAPS_CODEC("video/x-vp8")
|
GST_CAPS_CODEC("video/x-vp8")
|
||||||
#endif
|
|
||||||
#if USE_VP9_DECODER
|
|
||||||
GST_CAPS_CODEC("video/x-vp9")
|
GST_CAPS_CODEC("video/x-vp9")
|
||||||
#endif
|
|
||||||
;
|
;
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
|
|
|
@ -1412,7 +1412,7 @@ void
|
||||||
gst_vaapi_plugin_base_set_srcpad_can_dmabuf (GstVaapiPluginBase * plugin,
|
gst_vaapi_plugin_base_set_srcpad_can_dmabuf (GstVaapiPluginBase * plugin,
|
||||||
GstObject * object)
|
GstObject * object)
|
||||||
{
|
{
|
||||||
#if VA_CHECK_VERSION (0,36,0) && USE_EGL && USE_GST_GL_HELPERS
|
#if USE_EGL && USE_GST_GL_HELPERS
|
||||||
GstGLContext *const gl_context = GST_GL_CONTEXT (object);
|
GstGLContext *const gl_context = GST_GL_CONTEXT (object);
|
||||||
|
|
||||||
plugin->srcpad_can_dmabuf =
|
plugin->srcpad_can_dmabuf =
|
||||||
|
|
|
@ -21,22 +21,13 @@ if USE_ENCODERS
|
||||||
vaapi_sources += [
|
vaapi_sources += [
|
||||||
'gstvaapiencode.c',
|
'gstvaapiencode.c',
|
||||||
'gstvaapiencode_h264.c',
|
'gstvaapiencode_h264.c',
|
||||||
|
'gstvaapiencode_h265.c',
|
||||||
|
'gstvaapiencode_jpeg.c',
|
||||||
'gstvaapiencode_mpeg2.c',
|
'gstvaapiencode_mpeg2.c',
|
||||||
|
'gstvaapiencode_vp8.c',
|
||||||
]
|
]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if USE_JPEG_ENCODER
|
|
||||||
vaapi_sources += 'gstvaapiencode_jpeg.c'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_VP8_ENCODER
|
|
||||||
vaapi_sources += 'gstvaapiencode_vp8.c'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_H265_ENCODER
|
|
||||||
vaapi_sources += 'gstvaapiencode_h265.c'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_VP9_ENCODER
|
if USE_VP9_ENCODER
|
||||||
vaapi_sources += 'gstvaapiencode_vp9.c'
|
vaapi_sources += 'gstvaapiencode_vp9.c'
|
||||||
endif
|
endif
|
||||||
|
|
58
meson.build
58
meson.build
|
@ -15,7 +15,7 @@ else
|
||||||
gst_version_nano = 0
|
gst_version_nano = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libva_req = ['>= 0.30.4', '!= 0.99.0']
|
libva_req = ['>= 0.39.0', '!= 0.99.0']
|
||||||
glib_req = '>= 2.40.0'
|
glib_req = '>= 2.40.0'
|
||||||
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
|
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
|
||||||
|
|
||||||
|
@ -54,9 +54,9 @@ gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
|
||||||
gmodule_dep = dependency('gmodule-2.0', required: false)
|
gmodule_dep = dependency('gmodule-2.0', required: false)
|
||||||
libva_dep = dependency('libva', version: libva_req)
|
libva_dep = dependency('libva', version: libva_req)
|
||||||
|
|
||||||
libva_drm_dep = dependency('libva-drm', version: '>= 0.33.0', required: false)
|
libva_drm_dep = dependency('libva-drm', version: libva_req, required: false)
|
||||||
libva_wayland_dep = dependency('libva-wayland', version: '>= 0.33.0', required: false)
|
libva_wayland_dep = dependency('libva-wayland', version: libva_req, required: false)
|
||||||
libva_x11_dep = dependency('libva-x11', version: '>= 0.31.0', required: false)
|
libva_x11_dep = dependency('libva-x11', version: libva_req, required: false)
|
||||||
libdrm_dep = dependency('libdrm', required: false)
|
libdrm_dep = dependency('libdrm', required: false)
|
||||||
libudev_dep = dependency('libudev', required: false)
|
libudev_dep = dependency('libudev', required: false)
|
||||||
egl_dep = dependency('egl', required: false)
|
egl_dep = dependency('egl', required: false)
|
||||||
|
@ -84,18 +84,9 @@ if glesv2_dep.found()
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
USE_ENCODERS = libva_dep.version().version_compare('>= 0.34.0') and get_option('with_encoders') != 'no'
|
USE_ENCODERS = get_option('with_encoders') != 'no'
|
||||||
USE_H265_DECODER = cc.has_header('va/va_dec_hevc.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
|
||||||
USE_H265_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_hevc.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
|
||||||
USE_JPEG_DECODER = cc.has_header('va/va_dec_jpeg.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
|
||||||
USE_JPEG_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_jpeg.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
|
||||||
USE_VP8_DECODER = cc.has_header('va/va_dec_vp8.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
|
||||||
USE_VP8_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp8.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
|
||||||
USE_VP9_DECODER = cc.has_header('va/va_dec_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
|
||||||
USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
USE_VP9_ENCODER = USE_ENCODERS and cc.has_header('va/va_enc_vp9.h', dependencies: libva_dep, prefix: '#include <va/va.h>')
|
||||||
|
|
||||||
USE_VPP = cc.has_header('va/va_vpp.h', dependencies: libva_dep, prefix: '#include <va/va_vpp.h>')
|
|
||||||
|
|
||||||
USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no'
|
USE_DRM = libva_drm_dep.found() and libdrm_dep.found() and libudev_dep.found() and get_option('with_drm') != 'no'
|
||||||
USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no'
|
USE_EGL = gmodule_dep.found() and egl_dep.found() and GLES_VERSION_MASK != 0 and get_option('with_egl') != 'no'
|
||||||
USE_GLX = libva_x11_dep.found() and x11_dep.found() and gl_dep.found() and libdl_dep.found() and get_option('with_glx') != 'no'
|
USE_GLX = libva_x11_dep.found() and x11_dep.found() and gl_dep.found() and libdl_dep.found() and get_option('with_glx') != 'no'
|
||||||
|
@ -120,54 +111,15 @@ cdata.set10('USE_DRM', USE_DRM)
|
||||||
cdata.set10('USE_EGL', USE_EGL)
|
cdata.set10('USE_EGL', USE_EGL)
|
||||||
cdata.set10('USE_ENCODERS', USE_ENCODERS)
|
cdata.set10('USE_ENCODERS', USE_ENCODERS)
|
||||||
cdata.set10('USE_GLX', USE_GLX)
|
cdata.set10('USE_GLX', USE_GLX)
|
||||||
cdata.set10('USE_H265_DECODER', USE_H265_DECODER)
|
|
||||||
cdata.set10('USE_H265_ENCODER', USE_H265_ENCODER)
|
|
||||||
cdata.set10('USE_JPEG_DECODER', USE_JPEG_DECODER)
|
|
||||||
cdata.set10('USE_JPEG_ENCODER', USE_JPEG_ENCODER)
|
|
||||||
cdata.set10('USE_VP8_DECODER', USE_VP8_DECODER)
|
|
||||||
cdata.set10('USE_VP8_ENCODER', USE_VP8_ENCODER)
|
|
||||||
cdata.set10('USE_VP9_DECODER', USE_VP9_DECODER)
|
|
||||||
cdata.set10('USE_VP9_ENCODER', USE_VP9_ENCODER)
|
cdata.set10('USE_VP9_ENCODER', USE_VP9_ENCODER)
|
||||||
cdata.set10('USE_WAYLAND', USE_WAYLAND)
|
cdata.set10('USE_WAYLAND', USE_WAYLAND)
|
||||||
cdata.set10('USE_X11', USE_X11)
|
cdata.set10('USE_X11', USE_X11)
|
||||||
cdata.set10('HAVE_XKBLIB', cc.has_header('X11/XKBlib.h', dependencies: x11_dep))
|
cdata.set10('HAVE_XKBLIB', cc.has_header('X11/XKBlib.h', dependencies: x11_dep))
|
||||||
cdata.set10('HAVE_XRANDR', xrandr_dep.found())
|
cdata.set10('HAVE_XRANDR', xrandr_dep.found())
|
||||||
cdata.set10('HAVE_XRENDER', xrender_dep.found())
|
cdata.set10('HAVE_XRENDER', xrender_dep.found())
|
||||||
cdata.set10('USE_VA_VPP', USE_VPP)
|
|
||||||
cdata.set10('USE_GST_GL_HELPERS', gstgl_dep.found())
|
cdata.set10('USE_GST_GL_HELPERS', gstgl_dep.found())
|
||||||
cdata.set('USE_GLES_VERSION_MASK', GLES_VERSION_MASK)
|
cdata.set('USE_GLES_VERSION_MASK', GLES_VERSION_MASK)
|
||||||
|
|
||||||
if libva_dep.version().version_compare('< 0.38.0')
|
|
||||||
check_headers = [
|
|
||||||
[USE_H265_DECODER, 'HAVE_VA_VA_DEC_HEVC_H'],
|
|
||||||
[USE_H265_ENCODER, 'HAVE_VA_VA_ENC_HEVC_H'],
|
|
||||||
[USE_JPEG_DECODER, 'HAVE_VA_VA_DEC_JPEG_H'],
|
|
||||||
[USE_JPEG_ENCODER, 'HAVE_VA_VA_ENC_JPEG_H'],
|
|
||||||
[USE_VP8_DECODER, 'HAVE_VA_VA_DEC_VP8_H'],
|
|
||||||
[USE_VP8_ENCODER, 'HAVE_VA_VA_ENC_VP8_H'],
|
|
||||||
[USE_VP9_DECODER, 'HAVE_VA_VA_DEC_VP9_H'],
|
|
||||||
[USE_VP9_ENCODER, 'HAVE_VA_VA_DEC_VP9_H'],
|
|
||||||
[USE_VPP, 'HAVE_VA_VA_VPP_H'],
|
|
||||||
]
|
|
||||||
foreach h : check_headers
|
|
||||||
if h.get(0)
|
|
||||||
cdata.set(h.get(1), 1)
|
|
||||||
endif
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
if USE_ENCODERS
|
|
||||||
check_headers = [
|
|
||||||
['HAVE_VA_VA_ENC_MPEG2_H', 'va/va_enc_mpeg2.h'],
|
|
||||||
['HAVE_VA_VA_ENC_H264_H', 'va/va_enc_h264.h'],
|
|
||||||
]
|
|
||||||
foreach h : check_headers
|
|
||||||
if cc.has_header(h.get(1), dependencies: libva_dep, prefix: '#include <va/va.h>')
|
|
||||||
cdata.set(h.get(0), 1)
|
|
||||||
endif
|
|
||||||
endforeach
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
api_version = '1.0'
|
api_version = '1.0'
|
||||||
soversion = 0
|
soversion = 0
|
||||||
# maintaining compatibility with the previous libtool versioning
|
# maintaining compatibility with the previous libtool versioning
|
||||||
|
|
|
@ -108,11 +108,9 @@ decoder_new (GstVaapiDisplay * display, const gchar * codec_name)
|
||||||
case GST_VAAPI_CODEC_H264:
|
case GST_VAAPI_CODEC_H264:
|
||||||
decoder = gst_vaapi_decoder_h264_new (display, caps);
|
decoder = gst_vaapi_decoder_h264_new (display, caps);
|
||||||
break;
|
break;
|
||||||
#if USE_JPEG_DECODER
|
|
||||||
case GST_VAAPI_CODEC_JPEG:
|
case GST_VAAPI_CODEC_JPEG:
|
||||||
decoder = gst_vaapi_decoder_jpeg_new (display, caps);
|
decoder = gst_vaapi_decoder_jpeg_new (display, caps);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case GST_VAAPI_CODEC_MPEG2:
|
case GST_VAAPI_CODEC_MPEG2:
|
||||||
decoder = gst_vaapi_decoder_mpeg2_new (display, caps);
|
decoder = gst_vaapi_decoder_mpeg2_new (display, caps);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -373,11 +373,9 @@ start_decoder (App * app)
|
||||||
case GST_VAAPI_CODEC_H264:
|
case GST_VAAPI_CODEC_H264:
|
||||||
app->decoder = gst_vaapi_decoder_h264_new (app->display, caps);
|
app->decoder = gst_vaapi_decoder_h264_new (app->display, caps);
|
||||||
break;
|
break;
|
||||||
#if USE_JPEG_DECODER
|
|
||||||
case GST_VAAPI_CODEC_JPEG:
|
case GST_VAAPI_CODEC_JPEG:
|
||||||
app->decoder = gst_vaapi_decoder_jpeg_new (app->display, caps);
|
app->decoder = gst_vaapi_decoder_jpeg_new (app->display, caps);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case GST_VAAPI_CODEC_MPEG2:
|
case GST_VAAPI_CODEC_MPEG2:
|
||||||
app->decoder = gst_vaapi_decoder_mpeg2_new (app->display, caps);
|
app->decoder = gst_vaapi_decoder_mpeg2_new (app->display, caps);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue