From ff9f2c4b6eed6cd85488290200d2345015c5bf06 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 17 Jan 2017 11:00:31 +0100 Subject: 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. --- video/vdpau.h | 1 + 1 file changed, 1 insertion(+) (limited to 'video/vdpau.h') 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 -- cgit v1.2.3