diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c index 3b2759a45..54ac9ad05 100644 --- a/libweston/pixel-formats.c +++ b/libweston/pixel-formats.c @@ -861,6 +861,63 @@ static const struct pixel_format_info pixel_format_table[] = { COLOR_MODEL(YUV), .bpp = 32, }, + { + DRM_FORMAT(S010), + COLOR_MODEL(YUV), + .num_planes = 3, + .hsub = 2, + .vsub = 2, + }, + { + DRM_FORMAT(S210), + COLOR_MODEL(YUV), + .num_planes = 3, + .hsub = 2, + .vsub = 1, + }, + { + DRM_FORMAT(S410), + COLOR_MODEL(YUV), + .num_planes = 3, + }, + { + DRM_FORMAT(S012), + COLOR_MODEL(YUV), + .num_planes = 3, + .hsub = 2, + .vsub = 2, + }, + { + DRM_FORMAT(S212), + COLOR_MODEL(YUV), + .num_planes = 3, + .hsub = 2, + .vsub = 1, + }, + { + DRM_FORMAT(S412), + COLOR_MODEL(YUV), + .num_planes = 3, + }, + { + DRM_FORMAT(S016), + COLOR_MODEL(YUV), + .num_planes = 3, + .hsub = 2, + .vsub = 2, + }, + { + DRM_FORMAT(S216), + COLOR_MODEL(YUV), + .num_planes = 3, + .hsub = 2, + .vsub = 1, + }, + { + DRM_FORMAT(S416), + COLOR_MODEL(YUV), + .num_planes = 3, + }, }; WL_EXPORT const struct pixel_format_info * diff --git a/libweston/pixel-formats.h b/libweston/pixel-formats.h index 8ea2c5eb4..b94e26d30 100644 --- a/libweston/pixel-formats.h +++ b/libweston/pixel-formats.h @@ -28,6 +28,35 @@ #include #include +/* Included in libdrm 2.4.125 */ +#ifndef DRM_FORMAT_S010 +#define DRM_FORMAT_S010 fourcc_code ('S', '0', '1', '0') +#endif +#ifndef DRM_FORMAT_S210 +#define DRM_FORMAT_S210 fourcc_code ('S', '2', '1', '0') +#endif +#ifndef DRM_FORMAT_S410 +#define DRM_FORMAT_S410 fourcc_code ('S', '4', '1', '0') +#endif +#ifndef DRM_FORMAT_S012 +#define DRM_FORMAT_S012 fourcc_code ('S', '0', '1', '2') +#endif +#ifndef DRM_FORMAT_S212 +#define DRM_FORMAT_S212 fourcc_code ('S', '2', '1', '2') +#endif +#ifndef DRM_FORMAT_S412 +#define DRM_FORMAT_S412 fourcc_code ('S', '4', '1', '2') +#endif +#ifndef DRM_FORMAT_S016 +#define DRM_FORMAT_S016 fourcc_code ('S', '0', '1', '6') +#endif +#ifndef DRM_FORMAT_S216 +#define DRM_FORMAT_S216 fourcc_code ('S', '2', '1', '6') +#endif +#ifndef DRM_FORMAT_S416 +#define DRM_FORMAT_S416 fourcc_code ('S', '4', '1', '6') +#endif + /** * GL format information to create and manage texture and renderbuffer objects. */