Linux Media Controller development
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jacopo Mondi <jacopo@jmondi.org>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: Re: [PATCH 1/3] media: v4l: Add packed YUV 4:4:4 YUVA and YUVX pixel formats
Date: Tue, 8 Mar 2022 11:20:23 +0200	[thread overview]
Message-ID: <Yicf16ffXXDOW27N@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220308083722.qapoft64p3ghgibx@uno.localdomain>

On Tue, Mar 08, 2022 at 09:37:22AM +0100, Jacopo Mondi wrote:
> Hi Laurent
> 
> On Mon, Mar 07, 2022 at 08:03:40PM +0200, Laurent Pinchart wrote:
> > The new YUVA and YUVX are permutations of the existing AYUV and XYUV
> > formats. They are use by the NXP i.MX8 ISI hardware.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> All three patches looks good
> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
> 
> Slighlty unrelated: aren't the following format definitions identical ?
> Is this intentional ?

They are identical indeed. I think it's a historical mistake, AYUV32 has
likely been added without realizing YUV32 was already providing the same
format.

V4L2_PIX_FMT_YUV32 is used by ivtv, exynos-gsc, vivid and the staging
IMX drivers. I think it would make sense to deprecate it so that new
drivers will exaplicitly pick either the A or the X variant.

Hans, any opinion on this ?

>     * .. _V4L2-PIX-FMT-YUV32:
> 
>       - ``V4L2_PIX_FMT_YUV32``
>       - 'YUV4'
> 
>       - A\ :sub:`7-0`
>       - Y'\ :sub:`7-0`
>       - Cb\ :sub:`7-0`
>       - Cr\ :sub:`7-0`
> 
>     * .. _V4L2-PIX-FMT-AYUV32:
> 
>       - ``V4L2_PIX_FMT_AYUV32``
>       - 'AYUV'
> 
>       - A\ :sub:`7-0`
>       - Y'\ :sub:`7-0`
>       - Cb\ :sub:`7-0`
>       - Cr\ :sub:`7-0`
> 
> > ---
> >  .../media/v4l/pixfmt-packed-yuv.rst           | 20 +++++++++++++++++++
> >  drivers/media/v4l2-core/v4l2-ioctl.c          |  2 ++
> >  include/uapi/linux/videodev2.h                |  2 ++
> >  3 files changed, 24 insertions(+)
> >
> > diff --git a/Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst b/Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst
> > index 62bc2bb3f499..92394786251a 100644
> > --- a/Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst
> > +++ b/Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst
> > @@ -229,6 +229,26 @@ the second byte and Y'\ :sub:`7-0` in the third byte.
> >        - Y'\ :sub:`7-0`
> >        - X\ :sub:`7-0`
> >
> > +    * .. _V4L2-PIX-FMT-YUVA32:
> > +
> > +      - ``V4L2_PIX_FMT_YUVA32``
> > +      - 'YUVA'
> > +
> > +      - Y'\ :sub:`7-0`
> > +      - Cb\ :sub:`7-0`
> > +      - Cr\ :sub:`7-0`
> > +      - A\ :sub:`7-0`
> > +
> > +    * .. _V4L2-PIX-FMT-YUVX32:
> > +
> > +      - ``V4L2_PIX_FMT_YUVX32``
> > +      - 'YUVX'
> > +
> > +      - Y'\ :sub:`7-0`
> > +      - Cb\ :sub:`7-0`
> > +      - Cr\ :sub:`7-0`
> > +      - X\ :sub:`7-0`
> > +
> >      * .. _V4L2-PIX-FMT-YUV24:
> >
> >        - ``V4L2_PIX_FMT_YUV24``
> > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> > index aeecaca3edba..ca3c7bd19d7e 100644
> > --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> > +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> > @@ -1290,6 +1290,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
> >  	case V4L2_PIX_FMT_XYUV32:	descr = "32-bit XYUV 8-8-8-8"; break;
> >  	case V4L2_PIX_FMT_VUYA32:	descr = "32-bit VUYA 8-8-8-8"; break;
> >  	case V4L2_PIX_FMT_VUYX32:	descr = "32-bit VUYX 8-8-8-8"; break;
> > +	case V4L2_PIX_FMT_YUVA32:	descr = "32-bit YUVA 8-8-8-8"; break;
> > +	case V4L2_PIX_FMT_YUVX32:	descr = "32-bit YUVX 8-8-8-8"; break;
> >  	case V4L2_PIX_FMT_YUV410:	descr = "Planar YUV 4:1:0"; break;
> >  	case V4L2_PIX_FMT_YUV420:	descr = "Planar YUV 4:2:0"; break;
> >  	case V4L2_PIX_FMT_HI240:	descr = "8-bit Dithered RGB (BTTV)"; break;
> > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> > index df8b9c486ba1..16dcd9dd1a50 100644
> > --- a/include/uapi/linux/videodev2.h
> > +++ b/include/uapi/linux/videodev2.h
> > @@ -592,6 +592,8 @@ struct v4l2_pix_format {
> >  #define V4L2_PIX_FMT_XYUV32  v4l2_fourcc('X', 'Y', 'U', 'V') /* 32  XYUV-8-8-8-8  */
> >  #define V4L2_PIX_FMT_VUYA32  v4l2_fourcc('V', 'U', 'Y', 'A') /* 32  VUYA-8-8-8-8  */
> >  #define V4L2_PIX_FMT_VUYX32  v4l2_fourcc('V', 'U', 'Y', 'X') /* 32  VUYX-8-8-8-8  */
> > +#define V4L2_PIX_FMT_YUVA32  v4l2_fourcc('Y', 'U', 'V', 'A') /* 32  YUVA-8-8-8-8  */
> > +#define V4L2_PIX_FMT_YUVX32  v4l2_fourcc('Y', 'U', 'V', 'X') /* 32  YUVX-8-8-8-8  */
> >  #define V4L2_PIX_FMT_M420    v4l2_fourcc('M', '4', '2', '0') /* 12  YUV 4:2:0 2 lines y, 1 line uv interleaved */
> >
> >  /* two planes -- one Y, one Cr + Cb interleaved  */

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-03-08  9:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07 18:03 [PATCH 0/3] [RFC] v4l: Add packed YUV 4:4:4 YUVA and YUVX pixel formats Laurent Pinchart
2022-03-07 18:03 ` [PATCH 1/3] media: " Laurent Pinchart
2022-03-07 19:18   ` Nicolas Dufresne
2022-03-08  8:37   ` Jacopo Mondi
2022-03-08  9:20     ` Laurent Pinchart [this message]
2022-03-08 16:28       ` Nicolas Dufresne
2022-03-07 18:03 ` [PATCH 2/3] media: v4l2-tpg: Add support for the new YUVA and YUVX formats Laurent Pinchart
2022-04-21 23:07   ` Laurent Pinchart
2022-03-07 18:03 ` [PATCH 3/3] media: vivid: " Laurent Pinchart
2022-04-21 23:07   ` Laurent Pinchart
2022-06-16 16:31     ` Laurent Pinchart

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=Yicf16ffXXDOW27N@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=linux-media@vger.kernel.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