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/img_format.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/img_format.h')
-rw-r--r-- | video/img_format.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/video/img_format.h b/video/img_format.h index 31c72f41be..9277b0698c 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -252,7 +252,8 @@ enum mp_imgfmt { // Hardware accelerated formats. Plane data points to special data // structures, instead of pixel data. - IMGFMT_VDPAU, + IMGFMT_VDPAU, // VdpVideoSurface + IMGFMT_VDPAU_OUTPUT, // VdpOutputSurface IMGFMT_VDA, IMGFMT_VAAPI, @@ -330,7 +331,8 @@ static inline bool IMGFMT_IS_RGB(int fmt) #define IMGFMT_RGB_DEPTH(fmt) (mp_imgfmt_get_desc(fmt).plane_bits) #define IMGFMT_IS_HWACCEL(fmt) \ - ((fmt) == IMGFMT_VDPAU || (fmt) == IMGFMT_VAAPI || (fmt) == IMGFMT_VDA) + ((fmt) == IMGFMT_VDPAU || (fmt) == IMGFMT_VDPAU_OUTPUT || \ + (fmt) == IMGFMT_VAAPI || (fmt) == IMGFMT_VDA) int mp_imgfmt_from_name(bstr name, bool allow_hwaccel); const char *mp_imgfmt_to_name(int fmt); |