All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hyun Kwon <hyun.kwon@xilinx.com>
To: dri-devel@lists.freedesktop.org
Cc: Hyun Kwon <hyun.kwon@xilinx.com>
Subject: [PATCH LIBDRM 3/3] tests: util: Add support for YUV422 and YUV444
Date: Fri, 4 May 2018 16:40:54 -0700	[thread overview]
Message-ID: <1525477254-3338-4-git-send-email-hyun.kwon@xilinx.com> (raw)
In-Reply-To: <1525477254-3338-1-git-send-email-hyun.kwon@xilinx.com>

Enable YUV422 and YUV444 formats by adding to the format table
and pattern generation calls.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
---
 tests/util/format.c  | 4 ++++
 tests/util/pattern.c | 8 ++++++++
 2 files changed, 12 insertions(+)

diff --git a/tests/util/format.c b/tests/util/format.c
index 15ac5e1..b48594c 100644
--- a/tests/util/format.c
+++ b/tests/util/format.c
@@ -52,6 +52,10 @@ static const struct util_format_info format_info[] = {
 	/* YUV planar */
 	{ DRM_FORMAT_YUV420, "YU12", MAKE_YUV_INFO(YUV_YCbCr, 2, 2, 1) },
 	{ DRM_FORMAT_YVU420, "YV12", MAKE_YUV_INFO(YUV_YCrCb, 2, 2, 1) },
+	{ DRM_FORMAT_YUV422, "YU16", MAKE_YUV_INFO(YUV_YCbCr, 2, 1, 1) },
+	{ DRM_FORMAT_YVU422, "YV16", MAKE_YUV_INFO(YUV_YCrCb, 2, 1, 1) },
+	{ DRM_FORMAT_YUV444, "YU24", MAKE_YUV_INFO(YUV_YCbCr, 1, 1, 1) },
+	{ DRM_FORMAT_YVU444, "YV24", MAKE_YUV_INFO(YUV_YCrCb, 1, 1, 1) },
 	/* RGB16 */
 	{ DRM_FORMAT_ARGB4444, "AR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 4, 12) },
 	{ DRM_FORMAT_XRGB4444, "XR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 0, 0) },
diff --git a/tests/util/pattern.c b/tests/util/pattern.c
index aa067c9..2805724 100644
--- a/tests/util/pattern.c
+++ b/tests/util/pattern.c
@@ -487,10 +487,14 @@ static void fill_smpte(const struct util_format_info *info, void *planes[3],
 					     width, height, stride);
 
 	case DRM_FORMAT_YUV420:
+	case DRM_FORMAT_YUV422:
+	case DRM_FORMAT_YUV444:
 		return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[1],
 					     planes[2], width, height, stride);
 
 	case DRM_FORMAT_YVU420:
+	case DRM_FORMAT_YVU422:
+	case DRM_FORMAT_YVU444:
 		return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[2],
 					     planes[1], width, height, stride);
 
@@ -772,10 +776,14 @@ static void fill_tiles(const struct util_format_info *info, void *planes[3],
 					     width, height, stride);
 
 	case DRM_FORMAT_YUV420:
+	case DRM_FORMAT_YUV422:
+	case DRM_FORMAT_YUV444:
 		return fill_tiles_yuv_planar(info, planes[0], planes[1],
 					     planes[2], width, height, stride);
 
 	case DRM_FORMAT_YVU420:
+	case DRM_FORMAT_YVU422:
+	case DRM_FORMAT_YVU444:
 		return fill_tiles_yuv_planar(info, planes[0], planes[2],
 					     planes[1], width, height, stride);
 
-- 
2.7.4

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

  parent reply	other threads:[~2018-05-04 23:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-04 23:40 [PATCH LIBDRM 0/3] Enable more formats in modetest Hyun Kwon
2018-05-04 23:40 ` [PATCH LIBDRM 1/3] tests: util: pattern: Use 64bit RGB samples Hyun Kwon
2018-05-04 23:40 ` [PATCH LIBDRM 2/3] modetest: Add support for YUV422 and YUV444 Hyun Kwon
2018-05-04 23:40 ` Hyun Kwon [this message]
2018-07-08  2:35 [PATCH libdrm 0/3] Enable more formats in modetest Hyun Kwon
2018-07-08  2:35 ` [PATCH libdrm 3/3] tests: util: Add support for YUV422 and YUV444 Hyun Kwon

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=1525477254-3338-4-git-send-email-hyun.kwon@xilinx.com \
    --to=hyun.kwon@xilinx.com \
    --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.