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: <5e18a8ae-0657-edc8-b15d-decd81fa82d4@xs4all.nl>
Date:   Wed, 6 Sep 2023 12:37:36 +0200
From:   Hans Verkuil <hverkuil@...all.nl>
To:     Paweł Anikiel <pan@...ihalf.com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org
Cc:     dinguyen@...nel.org, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        mchehab@...nel.org, upstream@...ihalf.com, amstan@...omium.org,
        ribalda@...omium.org
Subject: Re: [RFC PATCH 1/3] media: Add 10, 12, and 16 bit RGB formats

On 30/06/2023 16:40, Paweł Anikiel wrote:
> Add the RGB30U, RGB30L, RGB36U, RGB36L, and RGB48 pixel formats.
> 
> Signed-off-by: Paweł Anikiel <pan@...ihalf.com>
> ---
>  drivers/media/v4l2-core/v4l2-ioctl.c | 5 +++++
>  include/uapi/linux/videodev2.h       | 5 +++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> index a858acea6547..5ee616704225 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1300,6 +1300,11 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>  	case V4L2_PIX_FMT_ARGB2101010:	descr = "32-bit ARGB 2-10-10-10"; break;
>  	case V4L2_PIX_FMT_BGR48_12:	descr = "12-bit Depth BGR"; break;
>  	case V4L2_PIX_FMT_ABGR64_12:	descr = "12-bit Depth BGRA"; break;
> +	case V4L2_PIX_FMT_RGB30U:	descr = "30-bit RXGXBX-10-10-10"; break;
> +	case V4L2_PIX_FMT_RGB30L:	descr = "30-bit XRXGXB-10-10-10"; break;
> +	case V4L2_PIX_FMT_RGB36U:	descr = "36-bit RXGXBX-12-12-12"; break;
> +	case V4L2_PIX_FMT_RGB36L:	descr = "36-bit XRXGXB-12-12-12"; break;
> +	case V4L2_PIX_FMT_RGB48:	descr = "48-bit RGB-16-16-16"; break;
>  	case V4L2_PIX_FMT_GREY:		descr = "8-bit Greyscale"; break;
>  	case V4L2_PIX_FMT_Y4:		descr = "4-bit Greyscale"; break;
>  	case V4L2_PIX_FMT_Y6:		descr = "6-bit Greyscale"; break;
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index aee75eb9e686..3568819eabeb 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -583,6 +583,11 @@ struct v4l2_pix_format {
>  /* RGB formats (6 or 8 bytes per pixel) */
>  #define V4L2_PIX_FMT_BGR48_12    v4l2_fourcc('B', '3', '1', '2') /* 48  BGR 12-bit per component */
>  #define V4L2_PIX_FMT_ABGR64_12   v4l2_fourcc('B', '4', '1', '2') /* 64  BGRA 12-bit per component */
> +#define V4L2_PIX_FMT_RGB30U  v4l2_fourcc('R', '3', '0', 'U') /* 30  RXGXBX-10-10-10 */
> +#define V4L2_PIX_FMT_RGB30L  v4l2_fourcc('R', '3', '0', 'L') /* 30  XRXGXB-10-10-10 */
> +#define V4L2_PIX_FMT_RGB36U  v4l2_fourcc('R', '3', '6', 'U') /* 36  RXGXBX-12-12-12 */
> +#define V4L2_PIX_FMT_RGB36L  v4l2_fourcc('R', '3', '6', 'L') /* 36  XRXGXB-12-12-12 */
> +#define V4L2_PIX_FMT_RGB48   v4l2_fourcc('R', 'G', 'B', '6') /* 48  RGB-16-16-16    */
>  
>  /* Grey formats */
>  #define V4L2_PIX_FMT_GREY    v4l2_fourcc('G', 'R', 'E', 'Y') /*  8  Greyscale     */

These new formats also need to be documented in (probably) pixfmt-rgb.rst.

Regards,

	Hans

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ