summaryrefslogtreecommitdiffstats
path: root/video/vaapi.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-07-08 14:13:27 +0200
committerwm4 <wm4@nowhere>2015-07-08 14:48:11 +0200
commitdb2268d5b11bfd290251b4aac7045535803f4d96 (patch)
treea199c62049139ff7d01acc0a2ea5db964f3d104e /video/vaapi.c
parent4781f9e69a074ded4404784138bccc231906b492 (diff)
downloadmpv-db2268d5b11bfd290251b4aac7045535803f4d96.tar.bz2
mpv-db2268d5b11bfd290251b4aac7045535803f4d96.tar.xz
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 <va/va_compat.h> defined a macro to make it use the old signature.
Diffstat (limited to 'video/vaapi.c')
-rw-r--r--video/vaapi.c12
1 files changed, 5 insertions, 7 deletions
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;