From 18a90f918093ab3432af7c721cc643e53f71a7bf Mon Sep 17 00:00:00 2001 From: Benjamin Gaignard Date: Wed, 6 Nov 2024 18:08:30 +0100 Subject: [PATCH] video: dma-drm: Add NV15, NV20 and NV30 DRM formats definitions Cherry pick DRM NV15, NV20 and NV30 formats definitions from drm_fourcc.h Part-of: --- .../gst-plugins-base/gst-libs/gst/video/video-info-dma.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c index 6a62496327..771e079bfb 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video-info-dma.c @@ -68,6 +68,15 @@ #define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */ #define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */ +/* + * 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 */ + /* * 3 plane YCbCr * index 0: Y plane, [7:0] Y