mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
drm: drm_fourcc: add NV20 and NV30 format
DRM_FORMAT_NV20 and DRM_FORMAT_NV30 is a 2 plane format suitable for linear layouts, this two format is similar to NV15 has no padding between component, but NV15 is 4:2:0 sub-sampling, NV20 is 4:2:2 sub-sampling and NV30 is no-sampling. The '20' and '30' suffix refers to the optimum effective bits per pixel which is achieved. Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: I84da7e03125e675f274c6307128b4b7b307767cc
This commit is contained in:
@@ -278,6 +278,16 @@ const struct drm_format_info *__drm_format_info(u32 format)
|
||||
.num_planes = 2, .char_per_block = { 5, 5, 0 },
|
||||
.block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,
|
||||
.vsub = 2, .is_yuv = true },
|
||||
#ifdef CONFIG_NO_GKI
|
||||
{ .format = DRM_FORMAT_NV20, .depth = 0,
|
||||
.num_planes = 2, .char_per_block = { 5, 5, 0 },
|
||||
.block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2,
|
||||
.vsub = 1, .is_yuv = true },
|
||||
{ .format = DRM_FORMAT_NV30, .depth = 0,
|
||||
.num_planes = 2, .char_per_block = { 5, 5, 0 },
|
||||
.block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 1,
|
||||
.vsub = 1, .is_yuv = true },
|
||||
#endif
|
||||
{ .format = DRM_FORMAT_Q410, .depth = 0,
|
||||
.num_planes = 3, .char_per_block = { 2, 2, 2 },
|
||||
.block_w = { 1, 1, 1 }, .block_h = { 1, 1, 1 }, .hsub = 0,
|
||||
|
||||
@@ -242,6 +242,8 @@ extern "C" {
|
||||
* 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 */
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr MSB aligned
|
||||
|
||||
Reference in New Issue
Block a user