public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Bob Paauwe <bob.j.paauwe@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH-i-g-t] lib/color_encoding: Fix up support for XYUV format.
Date: Tue,  7 Apr 2020 14:51:46 -0700	[thread overview]
Message-ID: <20200407215146.5331-1-bob.j.paauwe@intel.com> (raw)

Add XYUV8888 to the list of DRM Formats to test.

Also fix the byte order for the format.

Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
---
 lib/igt_color_encoding.c | 1 +
 lib/igt_fb.c             | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/igt_color_encoding.c b/lib/igt_color_encoding.c
index 7de6d5ab..a7bd2b22 100644
--- a/lib/igt_color_encoding.c
+++ b/lib/igt_color_encoding.c
@@ -160,6 +160,7 @@ static const struct color_encoding_format {
 	{ DRM_FORMAT_XVYU2101010, 1023.f, 64.f, 940.f, 64.f, 512.f, 960.f },
 	{ DRM_FORMAT_XVYU12_16161616, 65520.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
 	{ DRM_FORMAT_XVYU16161616, 65535.f, 4096.f, 60160.f, 4096.f, 32768.f, 61440.f },
+	{ DRM_FORMAT_XYUV8888, 255.f, 16.f, 235.f, 16.f, 128.f, 240.f },
 };
 
 static const struct color_encoding_format *lookup_fourcc(uint32_t fourcc)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 0fb8db12..5ed586e7 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -2721,9 +2721,9 @@ static void get_yuv_parameters(struct igt_fb *fb, struct yuv_parameters *params)
 		break;
 
 	case DRM_FORMAT_XYUV8888:
-		params->y_offset = fb->offsets[0] + 1;
-		params->u_offset = fb->offsets[0] + 2;
-		params->v_offset = fb->offsets[0] + 3;
+		params->y_offset = fb->offsets[0] + 2;
+		params->u_offset = fb->offsets[0] + 1;
+		params->v_offset = fb->offsets[0] + 0;
 		break;
 	}
 }
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2020-04-07 21:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07 21:51 Bob Paauwe [this message]
2020-04-07 22:23 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/color_encoding: Fix up support for XYUV format. (rev3) Patchwork
2020-04-08  7:54 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-04-08 16:09   ` Paauwe, Bob J
2020-04-17  6:30 ` [igt-dev] [PATCH-i-g-t] lib/color_encoding: Fix up support for XYUV format Jani Nikula

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=20200407215146.5331-1-bob.j.paauwe@intel.com \
    --to=bob.j.paauwe@intel.com \
    --cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox