summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-01-28 18:27:30 +0100
committerwm4 <wm4@nowhere>2017-01-28 18:27:30 +0100
commit443d3a91d335188be15c3bd2616d2cc9c4728566 (patch)
tree0c3b8aaab56e84a1f807ff88cd6b6b1d4f0c5bbc /video/decode
parentd9ef1333c6ada98f4b71c20e0a6aa02ed55983c9 (diff)
downloadmpv-443d3a91d335188be15c3bd2616d2cc9c4728566.tar.bz2
mpv-443d3a91d335188be15c3bd2616d2cc9c4728566.tar.xz
vaapi: remove central lock around vaapi API calls
The lock was disabled recently. This commit gets rid of the dummied out calls. The main reason for removing it is that there is no apparent need for it anymore, and the new FFmpeg vaapi code does not use or provide such a lock (there are some places which we cannot control and which do vaapi API calls, like frame destructors).
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/hw_vaapi.c14
-rw-r--r--video/decode/hw_vaapi_old.c21
2 files changed, 0 insertions, 35 deletions
diff --git a/video/decode/hw_vaapi.c b/video/decode/hw_vaapi.c
index 45558cd6e7..2dba5a99bd 100644
--- a/video/decode/hw_vaapi.c
+++ b/video/decode/hw_vaapi.c
@@ -142,18 +142,6 @@ static int init_copy(struct lavc_ctx *ctx)
return init(ctx, false);
}
-static void intel_shit_lock(struct lavc_ctx *ctx)
-{
- struct priv *p = ctx->hwdec_priv;
- va_lock(p->ctx);
-}
-
-static void intel_crap_unlock(struct lavc_ctx *ctx)
-{
- struct priv *p = ctx->hwdec_priv;
- va_unlock(p->ctx);
-}
-
const struct vd_lavc_hwdec mp_vd_lavc_vaapi = {
.type = HWDEC_VAAPI,
.image_format = IMGFMT_VAAPI,
@@ -162,8 +150,6 @@ const struct vd_lavc_hwdec mp_vd_lavc_vaapi = {
.init = init_direct,
.uninit = uninit,
.init_decoder = init_decoder,
- .lock = intel_shit_lock,
- .unlock = intel_crap_unlock,
};
const struct vd_lavc_hwdec mp_vd_lavc_vaapi_copy = {
diff --git a/video/decode/hw_vaapi_old.c b/video/decode/hw_vaapi_old.c
index 9c0907d0d4..88379dfed8 100644
--- a/video/decode/hw_vaapi_old.c
+++ b/video/decode/hw_vaapi_old.c
@@ -170,8 +170,6 @@ static void destroy_decoder(struct lavc_ctx *ctx)
{
struct priv *p = ctx->hwdec_priv;
- va_lock(p->ctx);
-
if (p->va_context->context_id != VA_INVALID_ID) {
vaDestroyContext(p->display, p->va_context->context_id);
p->va_context->context_id = VA_INVALID_ID;
@@ -182,8 +180,6 @@ static void destroy_decoder(struct lavc_ctx *ctx)
p->va_context->config_id = VA_INVALID_ID;
}
- va_unlock(p->ctx);
-
mp_image_pool_clear(p->pool);
}
@@ -206,8 +202,6 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h)
destroy_decoder(ctx);
- va_lock(p->ctx);
-
const struct hwdec_profile_entry *pe = hwdec_find_profile(ctx, profiles);
if (!pe) {
MP_ERR(p, "Unsupported codec or profile.\n");
@@ -282,7 +276,6 @@ static int init_decoder(struct lavc_ctx *ctx, int w, int h)
res = 0;
error:
- va_unlock(p->ctx);
talloc_free(tmp);
return res;
}
@@ -404,18 +397,6 @@ static struct mp_image *copy_image(struct lavc_ctx *ctx, struct mp_image *img)
return img;
}
-static void intel_shit_lock(struct lavc_ctx *ctx)
-{
- struct priv *p = ctx->hwdec_priv;
- va_lock(p->ctx);
-}
-
-static void intel_crap_unlock(struct lavc_ctx *ctx)
-{
- struct priv *p = ctx->hwdec_priv;
- va_unlock(p->ctx);
-}
-
const struct vd_lavc_hwdec mp_vd_lavc_vaapi = {
.type = HWDEC_VAAPI,
.image_format = IMGFMT_VAAPI,
@@ -424,8 +405,6 @@ const struct vd_lavc_hwdec mp_vd_lavc_vaapi = {
.uninit = uninit,
.init_decoder = init_decoder,
.allocate_image = allocate_image,
- .lock = intel_shit_lock,
- .unlock = intel_crap_unlock,
.process_image = update_format,
};