[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250425131817.01b7f7d9@eldfell>
Date: Fri, 25 Apr 2025 13:18:17 +0300
From: Pekka Paalanen <pekka.paalanen@...labora.com>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>, Geert Uytterhoeven
<geert@...ux-m68k.org>, Vishal Sagar <vishal.sagar@....com>, Anatoliy
Klymenko <anatoliy.klymenko@....com>, Maarten Lankhorst
<maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>, Michal Simek <michal.simek@....com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, Dmitry Baryshkov
<dmitry.baryshkov@....qualcomm.com>
Subject: Re: [PATCH v4 03/11] drm/fourcc: Add DRM_FORMAT_Y8
On Fri, 25 Apr 2025 11:38:28 +0300
Tomi Valkeinen <tomi.valkeinen@...asonboard.com> wrote:
> Hi Pekka,
>
> On 17/04/2025 11:13, Pekka Paalanen wrote:
> >> My understanding is that the Y-only pixel formats behave in a well
> >> defined way (or, as well defined as the YUV formats), and there's
> >> nothing more to add here. Is that right?
> >
> > There are two things:
> >
> > - Y8 follows COLOR_RANGE property, just like all other YUV formats.
> > - Y8 implies that Cb and Cr are both neutral (0.0 in nominal values).
> >
> > I'd like these explicitly written down, so that they become obvious to
> > everyone. I suspect either one might be easy to forget when writing
> > code and taking shortcuts without thinking.
>
> I didn't find a suitable place in the docs for this, but would this, in
> the drm_fourcc.h, be enough:
>
> /*
> * Y-only (greyscale) formats
> *
> * The Y-only formats are handled similarly to the YCbCr formats in the
> display
> * pipeline, with the Cb and Cr implicitly neutral (0.0 in nominal
> values). This
> * also means that COLOR_RANGE property applies to the Y-only formats.
> *
> */
>
> #define DRM_FORMAT_Y8 fourcc_code('G', 'R', 'E', 'Y') /* 8-bit Y-only */
> #define DRM_FORMAT_Y10_P32 fourcc_code('Y', 'P', 'A', '4') /* [31:0]
> x:Y2:Y1:Y0 2:10:10:10 little endian */
>
Hi Tomi,
I would be very happy with that.
Thanks,
pq
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists