summaryrefslogtreecommitdiffstats
path: root/video/vdpau.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-06-21 21:31:58 +0200
committerwm4 <wm4@nowhere>2016-06-21 21:31:58 +0200
commitb40d8fdfa3aedb538f60dcb605ef5ca486dcca36 (patch)
tree64877ed8efc6b8c233b4b5b709f2db71f16cb015 /video/vdpau.h
parent22291a25871a0268430231615be00edbcaf78790 (diff)
downloadmpv-b40d8fdfa3aedb538f60dcb605ef5ca486dcca36.tar.bz2
mpv-b40d8fdfa3aedb538f60dcb605ef5ca486dcca36.tar.xz
vdpau: get surface data as nv12 if possible
For now, this affects taking screenshots only. If the video mixer is actually needed, we want to go through the video mixer for screenshots too - which is why this function simply always used the video mixer, and then copied the surface to RAM as RGBA. Add reading the surface as nv12 if possible. If the format is correct, and no special video processing (like deinterlacing) is used, then it's read directly without going through the video mixer. There's no particular reason for doing this, other than avoiding the video mixer (like vo_opengl can do it now). Also, the next commit will make use of this in vf_vdpaurb.c.
Diffstat (limited to 'video/vdpau.h')
-rw-r--r--video/vdpau.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/video/vdpau.h b/video/vdpau.h
index db73a87dd7..389e1c7e9a 100644
--- a/video/vdpau.h
+++ b/video/vdpau.h
@@ -23,6 +23,9 @@
#define CHECK_VDP_ERROR(ctx, message) \
CHECK_VDP_ERROR_ST(ctx, message, return -1;)
+#define CHECK_VDP_ERROR_NORETURN(ctx, message) \
+ CHECK_VDP_ERROR_ST(ctx, message, ;)
+
#define CHECK_VDP_WARNING(ctx, message) \
do { \
if (vdp_st != VDP_STATUS_OK) \