Commit 920b1ec7 authored by Haihao Xiang's avatar Haihao Xiang Committed by Víctor Manuel Jáquez Leal

vaapi: bump the minimum vaapi version requirement to 0.39.0

And reduce unnecessary API version and structures check as well.

#108
parent e4ae7d98
This diff is collapsed.
......@@ -148,31 +148,23 @@ libgstvaapi_source_priv_h = \
libgstvaapi_jpegdec_source_c = gstvaapidecoder_jpeg.c
libgstvaapi_jpegdec_source_h = gstvaapidecoder_jpeg.h
if USE_JPEG_DECODER
libgstvaapi_source_c += $(libgstvaapi_jpegdec_source_c)
libgstvaapi_source_h += $(libgstvaapi_jpegdec_source_h)
endif
libgstvaapi_vp8dec_source_c = gstvaapidecoder_vp8.c
libgstvaapi_vp8dec_source_h = gstvaapidecoder_vp8.h
if USE_VP8_DECODER
libgstvaapi_source_c += $(libgstvaapi_vp8dec_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp8dec_source_h)
endif
libgstvaapi_hevcdec_source_c = gstvaapidecoder_h265.c
libgstvaapi_hevcdec_source_h = gstvaapidecoder_h265.h
if USE_H265_DECODER
libgstvaapi_source_c += $(libgstvaapi_hevcdec_source_c)
libgstvaapi_source_h += $(libgstvaapi_hevcdec_source_h)
endif
libgstvaapi_vp9dec_source_c = gstvaapidecoder_vp9.c
libgstvaapi_vp9dec_source_h = gstvaapidecoder_vp9.h
if USE_VP9_DECODER
libgstvaapi_source_c += $(libgstvaapi_vp9dec_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp9dec_source_h)
endif
libgstvaapi_enc_source_c = \
gstvaapicodedbuffer.c \
......@@ -180,8 +172,11 @@ libgstvaapi_enc_source_c = \
gstvaapicodedbufferproxy.c \
gstvaapiencoder.c \
gstvaapiencoder_h264.c \
gstvaapiencoder_h265.c \
gstvaapiencoder_jpeg.c \
gstvaapiencoder_mpeg2.c \
gstvaapiencoder_objects.c \
gstvaapiencoder_vp8.c \
$(NULL)
libgstvaapi_enc_source_h = \
......@@ -190,7 +185,10 @@ libgstvaapi_enc_source_h = \
gstvaapicodedbufferproxy.h \
gstvaapiencoder.h \
gstvaapiencoder_h264.h \
gstvaapiencoder_h265.h \
gstvaapiencoder_jpeg.h \
gstvaapiencoder_mpeg2.h \
gstvaapiencoder_vp8.h \
$(NULL)
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)
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_h = gstvaapiencoder_vp9.h
if USE_VP9_ENCODER
......@@ -535,12 +512,6 @@ EXTRA_DIST = \
$(libgstvaapi_hevcdec_source_priv_h) \
$(libgstvaapi_vp9dec_source_c) \
$(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_c) \
$(libgstvaapi_egl_source_c) \
......
......@@ -36,14 +36,12 @@ from_GstVaapiBufferMemoryType (guint type)
guint va_type;
switch (type) {
#if VA_CHECK_VERSION(0,36,0)
case GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF:
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME;
break;
case GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF:
va_type = VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM;
break;
#endif
default:
va_type = 0;
break;
......@@ -57,14 +55,12 @@ to_GstVaapiBufferMemoryType (guint va_type)
guint type;
switch (va_type) {
#if VA_CHECK_VERSION(0,36,0)
case VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME:
type = GST_VAAPI_BUFFER_MEMORY_TYPE_DMA_BUF;
break;
case VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM:
type = GST_VAAPI_BUFFER_MEMORY_TYPE_GEM_BUF;
break;
#endif
default:
type = 0;
break;
......@@ -72,7 +68,6 @@ to_GstVaapiBufferMemoryType (guint va_type)
return type;
}
#if VA_CHECK_VERSION (0,36,0)
static gboolean
gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy)
{
......@@ -96,7 +91,6 @@ gst_vaapi_buffer_proxy_acquire_handle (GstVaapiBufferProxy * proxy)
return TRUE;
}
/* VA_CHECK_VERSION (0,36,0) */
static gboolean
gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy)
{
......@@ -117,7 +111,6 @@ gst_vaapi_buffer_proxy_release_handle (GstVaapiBufferProxy * proxy)
return TRUE;
}
/* VA_CHECK_VERSION (0,36,0) */
static void
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);
}
/* VA_CHECK_VERSION (0,36,0) */
static inline const GstVaapiMiniObjectClass *
gst_vaapi_buffer_proxy_class (void)
{
......@@ -145,13 +137,11 @@ gst_vaapi_buffer_proxy_class (void)
};
return &GstVaapiBufferProxyClass;
}
#endif
GstVaapiBufferProxy *
gst_vaapi_buffer_proxy_new (guintptr handle, guint type, gsize size,
GDestroyNotify destroy_func, gpointer user_data)
{
#if VA_CHECK_VERSION (0,36,0)
GstVaapiBufferProxy *proxy;
g_return_val_if_fail (handle != 0, NULL);
......@@ -183,16 +173,12 @@ error_unsupported_mem_type:
gst_vaapi_buffer_proxy_unref (proxy);
return NULL;
}
#else
return NULL;
#endif
}
GstVaapiBufferProxy *
gst_vaapi_buffer_proxy_new_from_object (GstVaapiObject * object,
VABufferID buf_id, guint type, GDestroyNotify destroy_func, gpointer data)
{
#if VA_CHECK_VERSION (0,36,0)
GstVaapiBufferProxy *proxy;
g_return_val_if_fail (object != NULL, NULL);
......@@ -229,9 +215,6 @@ error_acquire_handle:
gst_vaapi_buffer_proxy_unref (proxy);
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);
#if VA_CHECK_VERSION (0,36,0)
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);
#if VA_CHECK_VERSION (0,36,0)
return GST_VAAPI_BUFFER_PROXY_SIZE (proxy);
#else
return 0;
#endif
}
/**
......
......@@ -68,9 +68,7 @@ struct _GstVaapiBufferProxy {
gpointer destroy_data;
guint type;
VABufferID va_buf;
#if VA_CHECK_VERSION (0,36,0)
VABufferInfo va_info;
#endif
GstMemory *mem;
};
......
......@@ -177,7 +177,6 @@ gst_vaapi_bitplane_new (GstVaapiDecoder * decoder, guint8 * data,
/* --- JPEG Huffman Tables --- */
/* ------------------------------------------------------------------------- */
#if USE_JPEG_DECODER
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiHuffmanTable, gst_vaapi_huffman_table);
void
......@@ -209,8 +208,7 @@ gst_vaapi_huffman_table_new (GstVaapiDecoder * decoder,
return NULL;
return GST_VAAPI_HUFFMAN_TABLE_CAST (object);
}
#endif
#if USE_VP8_DECODER
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiProbabilityTable,
gst_vaapi_probability_table);
......@@ -244,5 +242,3 @@ gst_vaapi_probability_table_new (GstVaapiDecoder * decoder,
return NULL;
return GST_VAAPI_PROBABILITY_TABLE_CAST (object);
}
#endif
......@@ -27,16 +27,6 @@
#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)
#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delta_support
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderRawData
......@@ -45,50 +35,7 @@
#define VA_ENC_PACKED_HEADER_H264_SEI VAEncPackedHeaderH264_SEI
#endif
/* Compatibility glue with VA-API 0.34 */
#if VA_CHECK_VERSION(0,34,0)
# include <va/va_compat.h>
#endif
#if VA_CHECK_VERSION(0,36,0)
#include <va/va_compat.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 */
......@@ -302,7 +302,6 @@ config_create (GstVaapiContext * context)
attrib = &attribs[++attrib_index];
g_assert (attrib_index < G_N_ELEMENTS (attribs));
}
#if VA_CHECK_VERSION(0,37,0)
if (cip->profile == GST_VAAPI_PROFILE_JPEG_BASELINE) {
attrib->type = VAConfigAttribEncJPEG;
if (!context_get_attribute (context, attrib->type, &value))
......@@ -311,7 +310,6 @@ config_create (GstVaapiContext * context)
attrib = &attribs[++attrib_index];
g_assert (attrib_index < G_N_ELEMENTS (attribs));
}
#endif
#if VA_CHECK_VERSION(0,39,1)
if (config->roi_capability) {
VAConfigAttribValEncROI *roi_config;
......
......@@ -532,7 +532,6 @@ ensure_profiles (GstVaapiDisplay * display)
g_array_sort (priv->encoders, compare_profiles);
/* Video processing API */
#if USE_VA_VPP
status = vaQueryConfigEntrypoints (priv->display, VAProfileNone,
entrypoints, &num_entrypoints);
if (vaapi_check_status (status, "vaQueryEntrypoints() [VAProfileNone]")) {
......@@ -541,7 +540,6 @@ ensure_profiles (GstVaapiDisplay * display)
priv->has_vpp = TRUE;
}
}
#endif
success = TRUE;
cleanup:
......
......@@ -289,7 +289,6 @@ gst_vaapi_enc_q_matrix_new (GstVaapiEncoder * encoder,
/* --- JPEG Huffman Tables --- */
/* ------------------------------------------------------------------------- */
#if USE_JPEG_ENCODER
GST_VAAPI_CODEC_DEFINE_TYPE (GstVaapiEncHuffmanTable,
gst_vaapi_enc_huffman_table);
......@@ -322,7 +321,6 @@ gst_vaapi_enc_huffman_table_new (GstVaapiEncoder * encoder,
return NULL;
return GST_VAAPI_ENC_HUFFMAN_TABLE_CAST (object);
}
#endif
/* ------------------------------------------------------------------------- */
/* --- Encoder Picture --- */
......
......@@ -125,14 +125,12 @@ gst_vaapi_deinterlace_method_get_type (void)
"Disable deinterlacing", "none"},
{GST_VAAPI_DEINTERLACE_METHOD_BOB,
"Bob deinterlacing", "bob"},
#if USE_VA_VPP
{GST_VAAPI_DEINTERLACE_METHOD_WEAVE,
"Weave deinterlacing", "weave"},
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_ADAPTIVE,
"Motion adaptive deinterlacing", "motion-adaptive"},
{GST_VAAPI_DEINTERLACE_METHOD_MOTION_COMPENSATED,
"Motion compensated deinterlacing", "motion-compensated"},
#endif
{0, NULL, NULL},
};
......@@ -171,7 +169,6 @@ gst_vaapi_deinterlace_flags_get_type (void)
/* --- VPP Helpers --- */
/* ------------------------------------------------------------------------- */
#if USE_VA_VPP
static VAProcFilterType *
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);
return caps;
}
#endif
/* ------------------------------------------------------------------------- */
/* --- VPP Operations --- */
/* ------------------------------------------------------------------------- */
#if USE_VA_VPP
#define DEFAULT_FORMAT GST_VIDEO_FORMAT_UNKNOWN
#define DEFAULT_SCALING GST_VAAPI_SCALE_METHOD_DEFAULT
......@@ -425,7 +420,6 @@ init_properties (void)
GST_VAAPI_TYPE_SCALE_METHOD,
DEFAULT_SCALING, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
#if VA_CHECK_VERSION(0,36,0)
/**
* GstVaapiFilter:skin-tone-enhancement:
*
......@@ -435,7 +429,6 @@ init_properties (void)
"Skin tone enhancement",
"Apply the skin tone enhancement algorithm",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
#endif
}
static void
......@@ -484,12 +477,10 @@ op_data_new (GstVaapiFilterOp op, GParamSpec * pspec)
op_data->va_cap_size = sizeof (VAProcFilterCap);
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
break;
#if VA_CHECK_VERSION(0,36,0)
case GST_VAAPI_FILTER_OP_SKINTONE:
op_data->va_type = VAProcFilterSkinToneEnhancement;
op_data->va_buffer_size = sizeof (VAProcFilterParameterBuffer);
break;
#endif
case GST_VAAPI_FILTER_OP_HUE:
op_data->va_subtype = VAProcColorBalanceHue;
goto op_colorbalance;
......@@ -715,14 +706,12 @@ error:
return NULL;
}
}
#endif
/* Determine the set of supported VPP operations by the specific
filter, or known to this library if filter is NULL */
static GPtrArray *
get_operations (GstVaapiFilter * filter)
{
#if USE_VA_VPP
GPtrArray *ops;
if (filter && filter->operations)
......@@ -732,8 +721,6 @@ get_operations (GstVaapiFilter * filter)
if (!ops)
return NULL;
return filter ? get_operations_ordered (filter, ops) : ops;
#endif
return NULL;
}
/* 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 */
#if USE_VA_VPP
static inline gboolean
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,
&op_data->va_buffer, NULL);
}
#endif
/* Update a generic filter (float value) */
#if USE_VA_VPP
static gboolean
op_set_generic_unlocked (GstVaapiFilter * filter,
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);
return TRUE;
}
#endif
static inline gboolean
op_set_generic (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
......@@ -827,16 +810,13 @@ op_set_generic (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
{
gboolean success = FALSE;
#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_generic_unlocked (filter, op_data, value);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
#endif
return success;
}
/* Update the color balance filter */
#if USE_VA_VPP
static gboolean
op_set_color_balance_unlocked (GstVaapiFilter * filter,
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);
return TRUE;
}
#endif
static inline gboolean
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;
#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_color_balance_unlocked (filter, op_data, value);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
#endif
return success;
}
/* Update deinterlace filter */
#if USE_VA_VPP
static gboolean
op_set_deinterlace_unlocked (GstVaapiFilter * filter,
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);
return TRUE;
}
#endif
static inline gboolean
op_set_deinterlace (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
......@@ -928,16 +903,13 @@ op_set_deinterlace (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
{
gboolean success = FALSE;
#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_deinterlace_unlocked (filter, op_data, method, flags);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
#endif
return success;
}
/* Update skin tone enhancement */
#if USE_VA_VPP
static gboolean
op_set_skintone_unlocked (GstVaapiFilter * filter,
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);
return TRUE;
}
#endif
static inline gboolean
op_set_skintone (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
......@@ -967,11 +938,9 @@ op_set_skintone (GstVaapiFilter * filter, GstVaapiFilterOpData * op_data,
{
gboolean success = FALSE;
#if USE_VA_VPP
GST_VAAPI_DISPLAY_LOCK (filter->display);
success = op_set_skintone_unlocked (filter, op_data, enhance);
GST_VAAPI_DISPLAY_UNLOCK (filter->display);
#endif
return success;
}
......@@ -1044,7 +1013,6 @@ find_format (GstVaapiFilter * filter, GstVideoFormat format)
/* --- Interface --- */
/* ------------------------------------------------------------------------- */
#if USE_VA_VPP
static void
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,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME));
}
#endif
/**
* gst_vaapi_filter_new:
......@@ -1199,7 +1166,6 @@ gst_vaapi_filter_class_init (GstVaapiFilterClass * klass)
GstVaapiFilter *
gst_vaapi_filter_new (GstVaapiDisplay * display)
{
#if USE_VA_VPP
GstVaapiFilter *filter;
filter = g_object_new (GST_TYPE_VAAPI_FILTER, "display", display, NULL);
......@@ -1213,11 +1179,6 @@ error:
gst_object_unref (filter);
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,
const GValue * value)
{
#if USE_VA_VPP
GstVaapiFilterOpData *op_data;
g_return_val_if_fail (filter != NULL, FALSE);
......@@ -1373,7 +1333,6 @@ gst_vaapi_filter_set_operation (GstVaapiFilter * filter, GstVaapiFilterOp op,
default:
break;
}
#endif
return FALSE;
}
......@@ -1396,7 +1355,6 @@ static GstVaapiFilterStatus
gst_vaapi_filter_process_unlocked (GstVaapiFilter * filter,
GstVaapiSurface * src_surface, GstVaapiSurface * dst_surface, guint flags)
{
#if USE_VA_VPP
VAProcPipelineParameterBuffer *pipeline_param = NULL;
VABufferID pipeline_param_buf_id = VA_INVALID_ID;
VABufferID filters[N_PROPERTIES];
......@@ -1536,8 +1494,6 @@ error:
vaapi_destroy_buffer (filter->va_display, &pipeline_param_buf_id);
return GST_VAAPI_FILTER_STATUS_ERROR_OPERATION_FAILED;
}
#endif
return GST_VAAPI_FILTER_STATUS_ERROR_UNSUPPORTED_OPERATION;
}
GstVaapiFilterStatus
......@@ -1886,11 +1842,8 @@ static inline gfloat
op_get_float_default_value (GstVaapiFilter * filter,
GstVaapiFilterOpData * op_data)
{
#if USE_VA_VPP
GParamSpecFloat *const pspec = G_PARAM_SPEC_FLOAT (op_data->pspec);
return pspec->default_value;
#endif
return 0.0;
}
gfloat
......
......@@ -89,49 +89,37 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
"video/x-divx, divxversion=5", "advanced-simple"},
{GST_VAAPI_PROFILE_MPEG4_ADVANCED_SIMPLE, VAProfileMPEG4AdvancedSimple,
"video/x-xvid", "advanced-simple"},
#if VA_CHECK_VERSION(0,30,0)
{GST_VAAPI_PROFILE_H263_BASELINE, VAProfileH263Baseline,
"video/x-h263, variant=itu, h263version=h263", "baseline"},
#endif
#if !VA_CHECK_VERSION(1,0,0)
{GST_VAAPI_PROFILE_H264_BASELINE, VAProfileH264Baseline,
"video/x-h264", "baseline"},
#endif
#if VA_CHECK_VERSION(0,31,1)
{GST_VAAPI_PROFILE_H264_CONSTRAINED_BASELINE,
VAProfileH264ConstrainedBaseline,
"video/x-h264", "constrained-baseline"},
#endif
{GST_VAAPI_PROFILE_H264_MAIN, VAProfileH264Main,
"video/x-h264", "main"},
{GST_VAAPI_PROFILE_H264_HIGH, VAProfileH264High,
"video/x-h264", "high"},
#if VA_CHECK_VERSION(0,35,2)
{GST_VAAPI_PROFILE_H264_MULTIVIEW_HIGH, VAProfileH264MultiviewHigh,
"video/x-h264", "multiview-high"},
{GST_VAAPI_PROFILE_H264_STEREO_HIGH, VAProfileH264StereoHigh,
"video/x-h264", "stereo-high"},
#endif
{GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple,
"video/x-wmv, wmvversion=3", "simple"},
{GST_VAAPI_PROFILE_VC1_MAIN, VAProfileVC1Main,
"video/x-wmv, wmvversion=3", "main"},
{GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced,
"video/x-wmv, wmvversion=3, format=(string)WVC1", "advanced"},
#if VA_CHECK_VERSION(0,32,0)
{GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline,
"image/jpeg", NULL},
#endif
#if VA_CHECK_VERSION(0,35,0)
{GST_VAAPI_PROFILE_VP8, VAProfileVP8Version0_3,
"video/x-vp8", NULL},
#endif
#if VA_CHECK_VERSION(0,37,0)
{GST_VAAPI_PROFILE_H265_MAIN, VAProfileHEVCMain,
"video/x-h265", "main"},
{GST_VAAPI_PROFILE_H265_MAIN10, VAProfileHEVCMain10,
"video/x-h265", "main-10"},
#endif
#if VA_CHECK_VERSION(1,2,0)
{GST_VAAPI_PROFILE_H265_MAIN_422_10, VAProfileHEVCMain422_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,
"video/x-h265", "main-444-10"},
#endif
#if VA_CHECK_VERSION(0,38,0)
{GST_VAAPI_PROFILE_VP9_0, VAProfileVP9Profile0,
"video/x-vp9", "profile0"},
#endif
#if VA_CHECK_VERSION(0,39,0)
{GST_VAAPI_PROFILE_VP9_1, VAProfileVP9Profile1,
"video/x-vp9", "profile1"},
{GST_VAAPI_PROFILE_VP9_2, VAProfileVP9Profile2,
"video/x-vp9", "profile2"},
{GST_VAAPI_PROFILE_VP9_3, VAProfileVP9Profile3,
"video/x-vp9", "profile3"},
#endif
{0,}
};
......@@ -160,10 +144,8 @@ static const GstVaapiEntrypointMap gst_vaapi_entrypoints[] = {
{GST_VAAPI_ENTRYPOINT_VLD, VAEntrypointVLD},
{GST_VAAPI_ENTRYPOINT_IDCT, VAEntrypointIDCT},
{GST_VAAPI_ENTRYPOINT_MOCO, VAEntrypointMoComp},
#if VA_CHECK_VERSION(0,30,0)
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE, VAEntrypointEncSlice},
{GST_VAAPI_ENTRYPOINT_PICTURE_ENCODE, VAEntrypointEncPicture},
#endif
#if VA_CHECK_VERSION(0,39,1)
{GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_LP, VAEntrypointEncSliceLP},
#endif
......
......@@ -132,7 +132,6 @@ static gboolean
gst_vaapi_surface_create_full (GstVaapiSurface * surface,
const GstVideoInfo * vip, guint flags)
{
#if VA_CHECK_VERSION(0,34,0)
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
const GstVideoFormat format = GST_VIDEO_INFO_FORMAT (vip);
VASurfaceID surface_id;
......@@ -219,16 +218,12 @@ error_unsupported_format:
GST_ERROR ("unsupported format %s",
gst_vaapi_video_format_to_string (format));
return FALSE;
#else
return FALSE;
#endif
}
static gboolean
gst_vaapi_surface_create_from_buffer_proxy (GstVaapiSurface * surface,
GstVaapiBufferProxy * proxy, const GstVideoInfo * vip)
{
#if VA_CHECK_VERSION (0,36,0)
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (surface);
GstVideoFormat format;
VASurfaceID surface_id;
......@@ -308,9 +303,6 @@ error_unsupported_format:
GST_ERROR ("unsupported format %s",
gst_vaapi_video_format_to_string (format));
return FALSE;
#else
return FALSE;
#endif
}