From 0b87bf9b72e495ae1b578ee2f268f3dc4e77bf81 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 25 Sep 2015 10:55:02 +0200 Subject: 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. --- video/out/opengl/hwdec_vaegl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'video/out/opengl/hwdec_vaegl.c') 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}; -- cgit v1.2.3