diff options
author | wm4 <wm4@nowhere> | 2014-05-22 20:55:17 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-22 20:59:31 +0200 |
commit | 7b7e15a460f2a24ba8c42f6caa71f1ca0ad25499 (patch) | |
tree | 3ed0a651606f334ec17a69b049689a0d2005659e /video/vdpau.h | |
parent | dbed21cde451aed60e7e06b3c700234dcffd8012 (diff) | |
download | mpv-7b7e15a460f2a24ba8c42f6caa71f1ca0ad25499.tar.bz2 mpv-7b7e15a460f2a24ba8c42f6caa71f1ca0ad25499.tar.xz |
vdpau: move RGB surface management out of the VO
Integrate it with the existing surface allocator in vdpau.c. The changes
are a bit violent, because the vdpau API is so non-orthogonal: compared
to video surfaces, output surfaces use a different ID type, different
format types, and different API functions.
Also, introduce IMGFMT_VDPAU_OUTPUT for VdpOutputSurfaces wrapped in
mp_image, rather than hacking it. This is a bit cleaner.
Diffstat (limited to 'video/vdpau.h')
-rw-r--r-- | video/vdpau.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/video/vdpau.h b/video/vdpau.h index acf4280266..3aea414700 100644 --- a/video/vdpau.h +++ b/video/vdpau.h @@ -58,8 +58,12 @@ struct mp_vdpau_ctx { pthread_mutex_t pool_lock; struct surface_entry { VdpVideoSurface surface; + VdpOutputSurface osurface; + bool allocated; int w, h; + VdpRGBAFormat rgb_format; VdpChromaType chroma; + bool rgb; bool in_use; } video_surfaces[MAX_VIDEO_SURFACES]; }; @@ -75,6 +79,7 @@ struct mp_image *mp_vdpau_get_video_surface(struct mp_vdpau_ctx *ctx, bool mp_vdpau_get_format(int imgfmt, VdpChromaType *out_chroma_type, VdpYCbCrFormat *out_pixel_format); +bool mp_vdpau_get_rgb_format(int imgfmt, VdpRGBAFormat *out_rgba_format); struct mp_image *mp_vdpau_upload_video_surface(struct mp_vdpau_ctx *ctx, struct mp_image *mpi); |