All of lore.kernel.org
 help / color / mirror / Atom feed
From: clinton.a.taylor@intel.com
To: dri-devel@lists.freedesktop.org
Cc: Randy Li <ayaka@soulik.info>
Subject: [PATCH v3 1/2] drm_fourcc: Add new P010, P016 video format
Date: Thu, 23 Feb 2017 15:58:19 -0800	[thread overview]
Message-ID: <1487894299-7198-1-git-send-email-clinton.a.taylor@intel.com> (raw)
In-Reply-To: <1483547351-5792-2-git-send-email-ayaka@soulik.info>

From: Clint Taylor <clinton.a.taylor@intel.com>

P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits per
channel video format. Rockchip's vop support this video format(little
endian only) as the input video format.

P012 is a planar 4:2:0 YUV 12 bits per channel

P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits per
channel video format.

V3: Added P012 and fixed cpp for P010

Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
---
 drivers/gpu/drm/drm_fourcc.c  |    4 ++++
 include/uapi/drm/drm_fourcc.h |   14 ++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
index 90d2cc8..5494764 100644
--- a/drivers/gpu/drm/drm_fourcc.c
+++ b/drivers/gpu/drm/drm_fourcc.c
@@ -165,6 +165,10 @@ const struct drm_format_info *__drm_format_info(u32 format)
 		{ .format = DRM_FORMAT_UYVY,		.depth = 0,  .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 },
 		{ .format = DRM_FORMAT_VYUY,		.depth = 0,  .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 },
 		{ .format = DRM_FORMAT_AYUV,		.depth = 0,  .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 },
+		/* FIXME a pixel in Y for P010 is 10 bits */
+		{ .format = DRM_FORMAT_P010,		.depth = 0,  .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 },
+		{ .format = DRM_FORMAT_P012,		.depth = 0,  .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 },
+		{ .format = DRM_FORMAT_P016,		.depth = 0,  .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 },
 	};
 
 	unsigned int i;
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index ef20abb..788dc36 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -128,6 +128,20 @@
 #define DRM_FORMAT_NV42		fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */
 
 /*
+ * 2 plane YCbCr MSB aligned P0?? formats 
+ * index 0 = Y plane, word array [15:6] P010 
+ * index 0 = Y plane, word array [15:4] P012 
+ * index 0 = Y plane, word array [15:0] P016 
+ *  
+ * index 1 = U [31:22], V [15:6] P010
+ * index 1 = U [31:20], V [15:4] P012 
+ * index 1 = U [31:16], V [15:0] P016  
+ */
+#define DRM_FORMAT_P010		fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cr:Cb plane 10 bits per channel */
+#define DRM_FORMAT_P012		fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cr:Cb plane 12 bits per channel */
+#define DRM_FORMAT_P016		fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */
+
+/*
  * 3 plane YCbCr
  * index 0: Y plane, [7:0] Y
  * index 1: Cb plane, [7:0] Cb
-- 
1.7.9.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-02-24  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 16:29 [PATCH v2 0/2] Add pixel formats for 10/16 bits YUV video Randy Li
2017-01-04 16:29 ` [PATCH v2 1/2] drm_fourcc: Add new P010, P016 video format Randy Li
2017-01-04 17:02   ` Daniel Stone
2017-01-04 17:02     ` Daniel Stone
2017-01-05  2:00     ` Ayaka
2017-01-23 21:16       ` Clint Taylor
2017-02-23 23:58   ` clinton.a.taylor [this message]
2017-02-24 11:10     ` [PATCH v3 " Ville Syrjälä
2017-02-27 17:21   ` [PATCH v4 " clinton.a.taylor
2017-02-27 17:41     ` Ville Syrjälä
2017-02-27 18:28       ` Clint Taylor
2017-02-27 18:47         ` Ville Syrjälä
2017-02-27 22:57   ` [PATCH v5 " clinton.a.taylor
2017-02-28 10:58     ` ayaka
2017-02-28 16:37       ` Clint Taylor
2017-02-28 11:56     ` Ville Syrjälä
2017-02-28 16:08       ` Clint Taylor
2017-02-28 16:22         ` Ville Syrjälä
2017-02-28 23:21   ` [PATCH v6 " clinton.a.taylor
2017-10-12 11:56     ` Tapani Pälli
2017-10-17 11:43       ` ayaka
2017-10-24  6:30         ` Tapani Pälli
2017-01-04 16:29 ` [PATCH v2 2/2] [media] v4l: Add 10/16-bits per channel YUV pixel formats Randy Li
2017-01-05 10:30   ` Sakari Ailus
2017-01-05 10:30     ` Sakari Ailus
2017-01-05 15:22     ` ayaka
2017-01-05 18:27       ` Sakari Ailus
2017-01-05 18:27         ` Sakari Ailus
2017-02-03 14:04         ` Mauro Carvalho Chehab
2017-02-08  9:17           ` Ayaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487894299-7198-1-git-send-email-clinton.a.taylor@intel.com \
    --to=clinton.a.taylor@intel.com \
    --cc=ayaka@soulik.info \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.