Skip to content
Snippets Groups Projects
Commit 8fdc55c0 authored by Daniel Stone's avatar Daniel Stone
Browse files

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: default avatarDaniel Stone <daniels@collabora.com>
parent 16dc3b2b
No related branches found
No related tags found
1 merge request!1636pixel-formats: Add NV15/20/30 YUV 10bpc formats
Pipeline #1302444 passed
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment