mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
video DMA: Add several video formats support
Add Y410, Y412, Y210, Y212, BGR10A2, P010 and P012 format support. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5159>
This commit is contained in:
parent
5976f4b8d8
commit
a9e9001778
1 changed files with 37 additions and 0 deletions
|
@ -99,6 +99,36 @@
|
|||
#define DRM_FORMAT_RGBX8888 fourcc_code('R', 'X', '2', '4') /* [31:0] R:G:B:x 8:8:8:8 little endian */
|
||||
#define DRM_FORMAT_BGRX8888 fourcc_code('B', 'X', '2', '4') /* [31:0] B:G:R:x 8:8:8:8 little endian */
|
||||
|
||||
#define DRM_FORMAT_ARGB2101010 fourcc_code('A', 'R', '3', '0') /* [31:0] A:R:G:B 2:10:10:10 little endian */
|
||||
|
||||
/*
|
||||
* packed Y4xx indicate for each component, xx valid data occupy msb
|
||||
* 16-xx padding occupy lsb except Y410
|
||||
*/
|
||||
#define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0') /* [31:0] A:Cr:Y:Cb 2:10:10:10 little endian */
|
||||
#define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2') /* [63:0] A:0:Cr:0:Y:0:Cb:0 12:4:12:4:12:4:12:4 little endian */
|
||||
|
||||
/*
|
||||
* packed Y2xx indicate for each component, xx valid data occupy msb
|
||||
* 16-xx padding occupy lsb
|
||||
*/
|
||||
#define DRM_FORMAT_Y210 fourcc_code('Y', '2', '1', '0') /* [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 10:6:10:6:10:6:10:6 little endian per 2 Y pixels */
|
||||
#define DRM_FORMAT_Y212 fourcc_code('Y', '2', '1', '2') /* [63:0] Cr0:0:Y1:0:Cb0:0:Y0:0 12:4:12:4:12:4:12:4 little endian per 2 Y pixels */
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr MSB aligned
|
||||
* index 0 = Y plane, [15:0] Y:x [10:6] little endian
|
||||
* index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [10:6:10:6] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel */
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr MSB aligned
|
||||
* index 0 = Y plane, [15:0] Y:x [12:4] little endian
|
||||
* index 1 = Cr:Cb plane, [31:0] Cr:x:Cb:x [12:4:12:4] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cr:Cb plane 12 bits per channel */
|
||||
|
||||
/*
|
||||
* Linear Layout
|
||||
*
|
||||
|
@ -625,6 +655,13 @@ static const struct FormatMap
|
|||
{GST_VIDEO_FORMAT_xRGB, DRM_FORMAT_BGRX8888},
|
||||
{GST_VIDEO_FORMAT_ABGR, DRM_FORMAT_RGBA8888},
|
||||
{GST_VIDEO_FORMAT_xBGR, DRM_FORMAT_RGBX8888},
|
||||
{GST_VIDEO_FORMAT_Y410, DRM_FORMAT_Y410},
|
||||
{GST_VIDEO_FORMAT_Y412_LE, DRM_FORMAT_Y412},
|
||||
{GST_VIDEO_FORMAT_Y210, DRM_FORMAT_Y210},
|
||||
{GST_VIDEO_FORMAT_Y212_LE, DRM_FORMAT_Y212},
|
||||
{GST_VIDEO_FORMAT_P010_10LE, DRM_FORMAT_P010},
|
||||
{GST_VIDEO_FORMAT_P012_LE, DRM_FORMAT_P012},
|
||||
{GST_VIDEO_FORMAT_BGR10A2_LE, DRM_FORMAT_ARGB2101010},
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
||||
|
|
Loading…
Reference in a new issue