diff options
author | wm4 <wm4@nowhere> | 2017-01-17 11:00:31 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-17 15:48:56 +0100 |
commit | ff9f2c4b6eed6cd85488290200d2345015c5bf06 (patch) | |
tree | 567b004153c51928fb78c59f66bea8acb06ad903 /video/vdpau.h | |
parent | cda31b71debdd52cfe9a36e8eea318899acdd0d2 (diff) | |
download | mpv-ff9f2c4b6eed6cd85488290200d2345015c5bf06.tar.bz2 mpv-ff9f2c4b6eed6cd85488290200d2345015c5bf06.tar.xz |
vdpau: use libavutil for surface allocation during decoding
Use the libavutil vdpau frame allocation code instead of our own "old"
code. This also uses its code for copying a video surface to normal
memory (used by vdpau-copy).
Since vdpau doesn't really have an internal pixel format, 4:2:0 can be
accessed as both nv12 and yuv420p - and libavutil prefers to report
yuv420p. The OpenGL interop has to be adjusted accordingly.
Preemption is a potential problem, but it doesn't break it more than it
already is.
This requires a bug fix to FFmpeg's vdpau code, or vdpau-copy (as well
as taking screenshots) will fail. Libav has fixed this bug ages ago.
Diffstat (limited to 'video/vdpau.h')
-rw-r--r-- | video/vdpau.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/vdpau.h b/video/vdpau.h index 389e1c7e9a..bffe901373 100644 --- a/video/vdpau.h +++ b/video/vdpau.h @@ -48,6 +48,7 @@ struct mp_vdpau_ctx { Display *x11; struct mp_hwdec_ctx hwctx; + struct AVBufferRef *av_device_ref; // These are mostly immutable, except on preemption. We don't really care // to synchronize the preemption case fully correctly, because it's an |