summaryrefslogtreecommitdiffstats
path: root/video/decode/vd_lavc.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-22 22:47:50 +0200
committerwm4 <wm4@nowhere>2013-09-25 13:53:42 +0200
commit641e94cd27eb3b0b152ac5003d371793904609c8 (patch)
treeb1abe1207dc7a43a3b79cdadc0b56e8e73237cfc /video/decode/vd_lavc.c
parent7c3f1ffc44b532590e661315b42fea5b6d1ae40c (diff)
downloadmpv-641e94cd27eb3b0b152ac5003d371793904609c8.tar.bz2
mpv-641e94cd27eb3b0b152ac5003d371793904609c8.tar.xz
vaapi: allow GPU read-back with --hwdec=vaapi-copy
This code is actually quite inefficient: it reuses the (slow, simple) screenshot code. It uses an inefficient method to read the image (vaGetImage() instead of vaDeriveImage()), allocates new memory for each frame that is read, and it tries all image formats again each time. Also, in my tests it always picked NV12 as image format, which is not ideal if you actually want to filter the video, and vo_xv can't handle this format without conversion either. However, a user confirmed that it worked for him, so everything is fine.
Diffstat (limited to 'video/decode/vd_lavc.c')
-rw-r--r--video/decode/vd_lavc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c
index c658d92a35..7fbf9d8401 100644
--- a/video/decode/vd_lavc.c
+++ b/video/decode/vd_lavc.c
@@ -86,6 +86,7 @@ const struct vd_lavc_hwdec mp_vd_lavc_vdpau;
const struct vd_lavc_hwdec mp_vd_lavc_vdpau_old;
const struct vd_lavc_hwdec mp_vd_lavc_vda;
const struct vd_lavc_hwdec mp_vd_lavc_vaapi;
+const struct vd_lavc_hwdec mp_vd_lavc_vaapi_copy;
static const struct vd_lavc_hwdec mp_vd_lavc_crystalhd = {
.type = HWDEC_CRYSTALHD,
@@ -114,6 +115,7 @@ static const struct vd_lavc_hwdec *hwdec_list[] = {
&mp_vd_lavc_crystalhd,
#if CONFIG_VAAPI
&mp_vd_lavc_vaapi,
+ &mp_vd_lavc_vaapi_copy,
#endif
NULL
};