[PATCH v4 03/11] drm/fourcc: Add DRM_FORMAT_Y8
Pekka Paalanen
pekka.paalanen at collabora.com
Fri Apr 25 10:18:17 UTC 2025
On Fri, 25 Apr 2025 11:38:28 +0300
Tomi Valkeinen <tomi.valkeinen at ideasonboard.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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250425/9fba0ef7/attachment.sig>
More information about the dri-devel
mailing list