From db2268d5b11bfd290251b4aac7045535803f4d96 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 8 Jul 2015 14:13:27 +0200 Subject: vaapi: drop compatibility crap and vo_vaapi deinterlacer Drop libva versions below 0.34.0. These are ancient, so I don't care. Drop the vo_vaapi deinterlacer as well. With 0.34.0, VPP is always available, and deinterlacing is done with vf_vavpp. The vaCreateSurfaces() function changes its signature - actually it did in 0.34.0 or so, and the defined a macro to make it use the old signature. --- video/vaapi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'video/vaapi.c') diff --git a/video/vaapi.c b/video/vaapi.c index d00d187eba..f907824f3b 100644 --- a/video/vaapi.c +++ b/video/vaapi.c @@ -36,13 +36,11 @@ bool check_va_status(struct mp_log *log, VAStatus status, const char *msg) int va_get_colorspace_flag(enum mp_csp csp) { -#if USE_VAAPI_COLORSPACE switch (csp) { case MP_CSP_BT_601: return VA_SRC_BT601; case MP_CSP_BT_709: return VA_SRC_BT709; case MP_CSP_SMPTE_240M: return VA_SRC_SMPTE_240; } -#endif return 0; } @@ -231,7 +229,7 @@ static struct mp_image *alloc_surface(struct mp_vaapi_ctx *ctx, int rt_format, VASurfaceID id = VA_INVALID_ID; VAStatus status; va_lock(ctx); - status = vaCreateSurfaces(ctx->display, w, h, rt_format, 1, &id); + status = vaCreateSurfaces(ctx->display, rt_format, w, h, &id, 1, NULL, 0); va_unlock(ctx); if (!CHECK_VA_STATUS(ctx, "vaCreateSurfaces()")) return NULL; @@ -368,10 +366,10 @@ int va_surface_upload(struct mp_image *va_dst, struct mp_image *sw_src) va_image_unmap(p->ctx, &p->image); va_lock(p->ctx); - VAStatus status = vaPutImage2(p->display, p->id, - p->image.image_id, - 0, 0, sw_src->w, sw_src->h, - 0, 0, sw_src->w, sw_src->h); + VAStatus status = vaPutImage(p->display, p->id, + p->image.image_id, + 0, 0, sw_src->w, sw_src->h, + 0, 0, sw_src->w, sw_src->h); va_unlock(p->ctx); if (!CHECK_VA_STATUS(p->ctx, "vaPutImage()")) return -1; -- cgit v1.2.3