lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c432aca1-cbab-476c-ba3a-e0d9cc940da7@ideasonboard.com>
Date: Fri, 25 Apr 2025 11:38:28 +0300
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Pekka Paalanen <pekka.paalanen@...oniitty.fi>,
 Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: 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

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 */

  Tomi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ