mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 02:38:01 +02:00
pixel-formats: Add NV15/20/30 YUV 10bpc formats
NV15/20/30 are a family of 10bpc YUV formats which have 4 horizontally-adjacent samples packed into a 40-bit cluster. The difference between 15/20/30 is in the subsampling. No fallbacks are provided, as there is no format pairing which would allow us to sensibly unpack the clusters. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
16dc3b2b7f
commit
8fdc55c03f
2 changed files with 30 additions and 0 deletions
|
|
@ -495,6 +495,27 @@ static const struct pixel_format_info pixel_format_table[] = {
|
|||
.hsub = 2,
|
||||
.vsub = 2,
|
||||
},
|
||||
{
|
||||
DRM_FORMAT(NV15),
|
||||
SAMPLER_TYPE(EGL_TEXTURE_Y_UV_WL),
|
||||
.num_planes = 2,
|
||||
.hsub = 2,
|
||||
.vsub = 2,
|
||||
},
|
||||
{
|
||||
DRM_FORMAT(NV20),
|
||||
SAMPLER_TYPE(EGL_TEXTURE_Y_UV_WL),
|
||||
.num_planes = 2,
|
||||
.hsub = 2,
|
||||
.vsub = 1,
|
||||
},
|
||||
{
|
||||
DRM_FORMAT(NV30),
|
||||
SAMPLER_TYPE(EGL_TEXTURE_Y_UV_WL),
|
||||
.num_planes = 2,
|
||||
.hsub = 1,
|
||||
.vsub = 1,
|
||||
},
|
||||
{
|
||||
DRM_FORMAT(NV21),
|
||||
SAMPLER_TYPE(EGL_TEXTURE_Y_UV_WL),
|
||||
|
|
|
|||
|
|
@ -46,4 +46,13 @@
|
|||
#define DRM_FORMAT_ABGR16161616 fourcc_code('A', 'B', '4', '8') /* [63:0] A:B:G:R 16:16:16:16 little endian */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr
|
||||
* index 0 = Y plane, [39:0] Y3:Y2:Y1:Y0 little endian
|
||||
* index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian
|
||||
*/
|
||||
#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */
|
||||
#define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */
|
||||
#define DRM_FORMAT_NV30 fourcc_code('N', 'V', '3', '0') /* non-subsampled Cr:Cb plane */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue