All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/fourcc: Add formats for packed YUV 4:4:4 AVUY and XVUY permutations
Date: Sat, 25 Jun 2022 00:37:23 +0300	[thread overview]
Message-ID: <YrYukw1Z/RjWk/Zv@pendragon.ideasonboard.com> (raw)
In-Reply-To: <YrYpvmInnq5Muahz@phenom.ffwll.local>

Hi Daniel,

On Fri, Jun 24, 2022 at 11:16:46PM +0200, Daniel Vetter wrote:
> On Thu, Jun 16, 2022 at 09:52:10PM +0300, Laurent Pinchart wrote:
> > Add FourCCs for two missing permutations of the packed YUV 4:4:4 color
> 
> For a second I thought this 4:4:4 is the bit packing, but it's the 444
> sampling rate thing.
> 
> Man formats are confusing.

:-)

> > components, namely AVUY and XVUY.
> > 
> > These formats are needed by the NXP i.MX8 ISI. While the ISI is
> > supported by a V4L2 device (corresponding formats have been submitted to
> > V4L2), it is handled in userspace by libcamera, which uses DRM FourCCs
> > for pixel formats.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >  include/uapi/drm/drm_fourcc.h | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
> > index f1972154a594..399d950c53e3 100644
> > --- a/include/uapi/drm/drm_fourcc.h
> > +++ b/include/uapi/drm/drm_fourcc.h
> > @@ -205,7 +205,9 @@ extern "C" {
> 
> I build script to make sure we don't accidentally assign duplicated codes
> would be nice, this is pain to check.

Do you mean something like

cat include/uapi/drm/drm_fourcc.h | \
	grep '#define DRM_FORMAT_.*fourcc_code' | \
	sed 's/.*fourcc_code(\([^)]*\)).*/\1/' | \
	sort | \
	uniq -c | \
	grep -qv '^ \+1 ' && echo "Duplicate 4CC !!"

?

Where could this live ?

> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> >  #define DRM_FORMAT_VYUY		fourcc_code('V', 'Y', 'U', 'Y') /* [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */
> >  
> >  #define DRM_FORMAT_AYUV		fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
> > +#define DRM_FORMAT_AVUY8888	fourcc_code('A', 'V', 'U', 'Y') /* [31:0] A:Cr:Cb:Y 8:8:8:8 little endian */
> >  #define DRM_FORMAT_XYUV8888	fourcc_code('X', 'Y', 'U', 'V') /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */
> > +#define DRM_FORMAT_XVUY8888	fourcc_code('X', 'V', 'U', 'Y') /* [31:0] X:Cr:Cb:Y 8:8:8:8 little endian */
> >  #define DRM_FORMAT_VUY888	fourcc_code('V', 'U', '2', '4') /* [23:0] Cr:Cb:Y 8:8:8 little endian */
> >  #define DRM_FORMAT_VUY101010	fourcc_code('V', 'U', '3', '0') /* Y followed by U then V, 10:10:10. Non-linear modifier only */

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-06-24 21:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 18:52 [PATCH] drm/fourcc: Add formats for packed YUV 4:4:4 AVUY and XVUY permutations Laurent Pinchart
2022-06-24 21:16 ` Daniel Vetter
2022-06-24 21:37   ` Laurent Pinchart [this message]
2022-06-24 21:50     ` Daniel Vetter
2022-06-24 22:41       ` Laurent Pinchart
2022-07-18  8:01 ` Maxime Ripard

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=YrYukw1Z/RjWk/Zv@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tzimmermann@suse.de \
    /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.