diff options
author | wm4 <wm4@nowhere> | 2015-09-25 10:55:02 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-25 12:03:36 +0200 |
commit | 0b87bf9b72e495ae1b578ee2f268f3dc4e77bf81 (patch) | |
tree | 66bd65ad7c9519ce56e3078ccd0cda2780ffe7a5 | |
parent | 456366b63b3f29c736593817ef055701250a7eb1 (diff) | |
download | mpv-0b87bf9b72e495ae1b578ee2f268f3dc4e77bf81.tar.bz2 mpv-0b87bf9b72e495ae1b578ee2f268f3dc4e77bf81.tar.xz |
vo_opengl: vaapi: document DRM fourcc upstream defines
Add the upstream symbolic names as comments. Normally, these should be
defined in libdrm's drm_fourcc.h header. But DRM_FORMAT_R8 and
DRM_FORMAT_GR88 are not defined anywhere, except in the kernel userland
headers of Linux 4.3 (!). We don't want mpv to depend on bleeding-edge
Linux kernel headers, so this will have to do.
Also, just for completeness, add fourccs for the 3 and 4 channel
formats. I didn't manage to test them, though.
-rw-r--r-- | video/out/opengl/hwdec_vaegl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/opengl/hwdec_vaegl.c b/video/out/opengl/hwdec_vaegl.c index 23992a1e0a..1e470668f9 100644 --- a/video/out/opengl/hwdec_vaegl.c +++ b/video/out/opengl/hwdec_vaegl.c @@ -200,9 +200,10 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image, mp_image_setfmt(&layout, mpfmt); // (it would be nice if we could use EGL_IMAGE_INTERNAL_FORMAT_EXT) - int drm_fmts[4] = {MP_FOURCC('R', '8', ' ', ' '), - MP_FOURCC('G', 'R', '8', '8'), - 0, 0}; + int drm_fmts[4] = {MP_FOURCC('R', '8', ' ', ' '), // DRM_FORMAT_R8 + MP_FOURCC('G', 'R', '8', '8'), // DRM_FORMAT_GR88 + MP_FOURCC('R', 'G', '2', '4'), // DRM_FORMAT_RGB888 + MP_FOURCC('R', 'A', '2', '4')}; // DRM_FORMAT_RGBA8888 for (int n = 0; n < layout.num_planes; n++) { int attribs[20] = {EGL_NONE}; |