linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Vivek Kasireddy <vivek.kasireddy@intel.com>, linux-media@vger.kernel.org
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Subject: Re: [PATCH 4/4] media: imx-pxp: Start using the format VUYA32 instead of YUV32
Date: Fri, 8 Feb 2019 10:15:44 +0100	[thread overview]
Message-ID: <5119be5b-4480-68f5-bb50-900eca9eb10f@xs4all.nl> (raw)
In-Reply-To: <20190208031846.14453-5-vivek.kasireddy@intel.com>

On 2/8/19 4:18 AM, Vivek Kasireddy wrote:
> Buffers generated with YUV32 format seems to be incorrect, hence use
> VUYA32 instead.
> 
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>

Philipp, I wonder whether VUYA32 or VUYX32 should be used? I think the alpha
channel is completely ignored on the source side and on the destination side
it is probably set by some fixed value?

Note that there exists a control V4L2_CID_ALPHA_COMPONENT that can be used
to let userspace specify the generated alpha value.

What if both source and destination formats have an alpha channel? Can the
hardware preserved the alpha values?

Regards,

	Hans

> ---
>  drivers/media/platform/imx-pxp.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/imx-pxp.c b/drivers/media/platform/imx-pxp.c
> index f087dc4fc729..70adbe38f802 100644
> --- a/drivers/media/platform/imx-pxp.c
> +++ b/drivers/media/platform/imx-pxp.c
> @@ -90,7 +90,7 @@ static struct pxp_fmt formats[] = {
>  		.depth	= 16,
>  		.types	= MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
>  	}, {
> -		.fourcc = V4L2_PIX_FMT_YUV32,
> +		.fourcc = V4L2_PIX_FMT_VUYA32,
>  		.depth	= 32,
>  		.types	= MEM2MEM_CAPTURE | MEM2MEM_OUTPUT,
>  	}, {
> @@ -236,7 +236,7 @@ static u32 pxp_v4l2_pix_fmt_to_ps_format(u32 v4l2_pix_fmt)
>  	case V4L2_PIX_FMT_RGB555:  return BV_PXP_PS_CTRL_FORMAT__RGB555;
>  	case V4L2_PIX_FMT_RGB444:  return BV_PXP_PS_CTRL_FORMAT__RGB444;
>  	case V4L2_PIX_FMT_RGB565:  return BV_PXP_PS_CTRL_FORMAT__RGB565;
> -	case V4L2_PIX_FMT_YUV32:   return BV_PXP_PS_CTRL_FORMAT__YUV1P444;
> +	case V4L2_PIX_FMT_VUYA32:  return BV_PXP_PS_CTRL_FORMAT__YUV1P444;
>  	case V4L2_PIX_FMT_UYVY:    return BV_PXP_PS_CTRL_FORMAT__UYVY1P422;
>  	case V4L2_PIX_FMT_YUYV:    return BM_PXP_PS_CTRL_WB_SWAP |
>  					  BV_PXP_PS_CTRL_FORMAT__UYVY1P422;
> @@ -265,7 +265,7 @@ static u32 pxp_v4l2_pix_fmt_to_out_format(u32 v4l2_pix_fmt)
>  	case V4L2_PIX_FMT_RGB555:   return BV_PXP_OUT_CTRL_FORMAT__RGB555;
>  	case V4L2_PIX_FMT_RGB444:   return BV_PXP_OUT_CTRL_FORMAT__RGB444;
>  	case V4L2_PIX_FMT_RGB565:   return BV_PXP_OUT_CTRL_FORMAT__RGB565;
> -	case V4L2_PIX_FMT_YUV32:    return BV_PXP_OUT_CTRL_FORMAT__YUV1P444;
> +	case V4L2_PIX_FMT_VUYA32:   return BV_PXP_OUT_CTRL_FORMAT__YUV1P444;
>  	case V4L2_PIX_FMT_UYVY:     return BV_PXP_OUT_CTRL_FORMAT__UYVY1P422;
>  	case V4L2_PIX_FMT_VYUY:     return BV_PXP_OUT_CTRL_FORMAT__VYUY1P422;
>  	case V4L2_PIX_FMT_GREY:     return BV_PXP_OUT_CTRL_FORMAT__Y8;
> @@ -281,7 +281,7 @@ static u32 pxp_v4l2_pix_fmt_to_out_format(u32 v4l2_pix_fmt)
>  static bool pxp_v4l2_pix_fmt_is_yuv(u32 v4l2_pix_fmt)
>  {
>  	switch (v4l2_pix_fmt) {
> -	case V4L2_PIX_FMT_YUV32:
> +	case V4L2_PIX_FMT_VUYA32:
>  	case V4L2_PIX_FMT_UYVY:
>  	case V4L2_PIX_FMT_YUYV:
>  	case V4L2_PIX_FMT_VYUY:
> 


  parent reply	other threads:[~2019-02-08  9:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  3:18 [PATCH 0/4] Add support for 32-bit packed YUV formats Vivek Kasireddy
2019-02-08  3:18 ` [PATCH 1/4] media: v4l: Add " Vivek Kasireddy
2019-02-08  3:18 ` [PATCH 2/4] media: v4l2-tpg-core: Add support for " Vivek Kasireddy
2019-02-08 10:21   ` kbuild test robot
2019-02-08 10:49   ` kbuild test robot
2019-02-09  1:29     ` [PATCH v2 2/4] media: v4l2-tpg-core: Add support for 32-bit packed YUV formats (v2) Vivek Kasireddy
2019-02-08  3:18 ` [PATCH 3/4] media: vivid: Add definitions for the 32-bit packed YUV formats Vivek Kasireddy
2019-02-08  3:18 ` [PATCH 4/4] media: imx-pxp: Start using the format VUYA32 instead of YUV32 Vivek Kasireddy
2019-02-08  9:14   ` Philipp Zabel
2019-02-08  9:15   ` Hans Verkuil [this message]
2019-02-08  9:47     ` Philipp Zabel
2019-02-08 10:31   ` Philipp Zabel
2019-02-09  1:38     ` [PATCH v2 4/4] media: imx-pxp: Start using the format VUYA32 instead of YUV32 (v2) Vivek Kasireddy
2019-02-11 10:29       ` Philipp Zabel

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=5119be5b-4480-68f5-bb50-900eca9eb10f@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=vivek.kasireddy@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).