diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-11-13 21:52:34 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-12-02 09:03:30 +0100 |
commit | 36eebc231e0ad94f31ed27f43e52b439a77a2560 (patch) | |
tree | 30839c97536c4e6811ad66d698a39fa20b37c4ef /video/out/gl_common.c | |
parent | cb45ea371fb8ff9fd62026dcf060587864c56586 (diff) | |
download | mpv-36eebc231e0ad94f31ed27f43e52b439a77a2560.tar.bz2 mpv-36eebc231e0ad94f31ed27f43e52b439a77a2560.tar.xz |
gl_video: support packed YUV formats with Apple extensions
This adds support for packed YUV formats (YUVY and UYVY) using the extension
GL_APPLE_rgb_422. While supporting this formats on their own is not that
important (considering most video is planar YUV) they are used for
interoperability with IOSurfaces.
Next commit will use this formats to render VDA hardware decoded frames through
IOSurface and OpenGL interoperability.
Diffstat (limited to 'video/out/gl_common.c')
-rw-r--r-- | video/out/gl_common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/video/out/gl_common.c b/video/out/gl_common.c index 8ab2c8ec10..e868b07559 100644 --- a/video/out/gl_common.c +++ b/video/out/gl_common.c @@ -462,6 +462,16 @@ struct gl_functions gl_functions[] = { {0} }, }, + // Apple Packed YUV Formats + // For gl_hwdec_vda.c + // http://www.opengl.org/registry/specs/APPLE/rgb_422.txt + { + .extension = "GL_APPLE_rgb_422", + .provides = MPGL_CAP_APPLE_RGB_422, + .functions = (struct gl_function[]) { + {0} + }, + }, }; #undef FN_OFFS @@ -659,6 +669,7 @@ int glFmt2bpp(GLenum format, GLenum type) case GL_ALPHA: return component_size; case GL_YCBCR_MESA: + case GL_RGB_422_APPLE: return 2; case GL_RGB: case GL_BGR: |