pixel-formats: Add Sx1x software decoder formats

Expected to land in Linux 6.17 and already pulled into a
libdrm release (2.4.125).

Signed-off-by: Robert Mader <robert.mader@collabora.com>
This commit is contained in:
Robert Mader 2025-05-09 02:33:55 +02:00
parent 275155812c
commit 3dce9e8c24
2 changed files with 86 additions and 0 deletions

View file

@ -861,6 +861,63 @@ static const struct pixel_format_info pixel_format_table[] = {
COLOR_MODEL(YUV), COLOR_MODEL(YUV),
.bpp = 32, .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 * WL_EXPORT const struct pixel_format_info *

View file

@ -28,6 +28,35 @@
#include <stdbool.h> #include <stdbool.h>
#include <pixman.h> #include <pixman.h>
/* 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. * GL format information to create and manage texture and renderbuffer objects.
*/ */