linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: v4l2-tpg: Fix the memory layout of AYUV buffers
@ 2019-01-29  2:32 Vivek Kasireddy
  2019-01-31 13:36 ` Hans Verkuil
  0 siblings, 1 reply; 12+ messages in thread
From: Vivek Kasireddy @ 2019-01-29  2:32 UTC (permalink / raw)
  To: linux-media; +Cc: Kasireddy, Vivek

From: "Kasireddy, Vivek" <vivek.kasireddy@intel.com>

The memory layout of AYUV buffers (V4L2_PIX_FMT_YUV32) should be similar
to V4L2_PIX_FMT_ABGR32 instead of V4L2_PIX_FMT_ARGB32.

While displaying the packed AYUV buffers generated by the Vivid driver
using v4l2-tpg on Weston, it was observed that these AYUV images were not
getting displayed correctly. Changing the memory layout makes them display
as expected.

Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
index d9a590ae7545..825667f67c92 100644
--- a/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
+++ b/drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
@@ -1269,7 +1269,6 @@ static void gen_twopix(struct tpg_data *tpg,
 	case V4L2_PIX_FMT_HSV32:
 		alpha = 0;
 		/* fall through */
-	case V4L2_PIX_FMT_YUV32:
 	case V4L2_PIX_FMT_ARGB32:
 		buf[0][offset] = alpha;
 		buf[0][offset + 1] = r_y_h;
@@ -1280,6 +1279,7 @@ static void gen_twopix(struct tpg_data *tpg,
 	case V4L2_PIX_FMT_XBGR32:
 		alpha = 0;
 		/* fall through */
+	case V4L2_PIX_FMT_YUV32:
 	case V4L2_PIX_FMT_ABGR32:
 		buf[0][offset] = b_v;
 		buf[0][offset + 1] = g_u_s;
-- 
2.14.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-02-07  2:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29  2:32 [PATCH] media: v4l2-tpg: Fix the memory layout of AYUV buffers Vivek Kasireddy
2019-01-31 13:36 ` Hans Verkuil
2019-02-01  2:29   ` Vivek Kasireddy
2019-02-01  9:08     ` Hans Verkuil
2019-02-02  0:48       ` Vivek Kasireddy
2019-02-02  8:03         ` Hans Verkuil
2019-02-05  2:04           ` Vivek Kasireddy
2019-02-05  8:47             ` Hans Verkuil
2019-02-05 14:38   ` Philipp Zabel
2019-02-06 10:46     ` Hans Verkuil
2019-02-07  1:57       ` Vivek Kasireddy
2019-02-07  1:09     ` Nicolas Dufresne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).