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] [day] [month] [year] [list]
Message-ID: <AM6PR04MB6341A4CA774AC4F222D8668AE7A29@AM6PR04MB6341.eurprd04.prod.outlook.com>
Date:   Tue, 14 Feb 2023 01:51:30 +0000
From:   Ming Qian <ming.qian@....com>
To:     Nicolas Dufresne <nicolas@...fresne.ca>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        "Mirela Rabulea (OSS)" <mirela.rabulea@....nxp.com>,
        "hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>
CC:     "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "festevam@...il.com" <festevam@...il.com>,
        "X.H. Bao" <xiahong.bao@....com>, dl-linux-imx <linux-imx@....com>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: RE: [EXT] Re: [PATCH v2 02/10] media: Add Y012 video format

>From: Nicolas Dufresne <nicolas@...fresne.ca>
>Sent: 2023年2月14日 0:39
>To: Ming Qian <ming.qian@....com>; mchehab@...nel.org; Mirela Rabulea
>(OSS) <mirela.rabulea@....nxp.com>; hverkuil-cisco@...all.nl
>Cc: shawnguo@...nel.org; s.hauer@...gutronix.de; kernel@...gutronix.de;
>festevam@...il.com; X.H. Bao <xiahong.bao@....com>; dl-linux-imx <linux-
>imx@....com>; linux-media@...r.kernel.org; linux-kernel@...r.kernel.org;
>devicetree@...r.kernel.org; linux-arm-kernel@...ts.infradead.org
>Subject: Re: [EXT] Re: [PATCH v2 02/10] media: Add Y012 video format
>
>Caution: EXT Email
>
>Le lundi 13 février 2023 à 09:22 +0000, Ming Qian a écrit :
>> > From: Nicolas Dufresne <nicolas@...fresne.ca>
>> > Sent: 2023年2月10日 23:18
>> > To: Ming Qian <ming.qian@....com>; mchehab@...nel.org; Mirela
>> > Rabulea
>> > (OSS) <mirela.rabulea@....nxp.com>; hverkuil-cisco@...all.nl
>> > Cc: shawnguo@...nel.org; s.hauer@...gutronix.de;
>> > kernel@...gutronix.de; festevam@...il.com; X.H. Bao
>> > <xiahong.bao@....com>; dl-linux-imx <linux- imx@....com>;
>> > linux-media@...r.kernel.org; linux-kernel@...r.kernel.org;
>> > devicetree@...r.kernel.org; linux-arm-kernel@...ts.infradead.org
>> > Subject: [EXT] Re: [PATCH v2 02/10] media: Add Y012 video format
>> >
>> > Caution: EXT Email
>> >
>> > Le mercredi 01 février 2023 à 14:02 +0800, Ming Qian a écrit :
>> > > Y012 is a luma-only formats with 12-bits per pixel, expanded to
>> > > 16bits.
>> > > Data in the 12 high bits, zeros in the 4 low bits, arranged in
>> > > little endian order.
>> > >
>> > > Signed-off-by: Ming Qian <ming.qian@....com>
>> > > ---
>> > >  .../userspace-api/media/v4l/pixfmt-yuv-luma.rst       | 11 +++++++++++
>> > >  drivers/media/v4l2-core/v4l2-ioctl.c                  |  1 +
>> > >  include/uapi/linux/videodev2.h                        |  1 +
>> > >  3 files changed, 13 insertions(+)
>> > >
>> > > diff --git
>> > > a/Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst
>> > > b/Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst
>> > > index 6a387f9df3ba..3ffa29000238 100644
>> > > --- a/Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst
>> > > +++ b/Documentation/userspace-api/media/v4l/pixfmt-yuv-luma.rst
>> > > @@ -103,6 +103,17 @@ are often referred to as greyscale formats.
>> > >        - ...
>> > >        - ...
>> > >
>> > > +    * .. _V4L2-PIX-FMT-Y012:
>> >
>> > Why the 0, can't this be name Y12 (just like Y14) ?
>> >
>>
>> Hi Nicolas,
>>     As the V4L2_PIX_FMT_Y12 is defined, but it's data is in the 12 low
>> bits, zeros in the high bits.
>>     Here I want to place the 12 bits data in the high bits, with zeros
>> in the
>> 4 low bits.
>>     So I add 0 before 12, I want to say that the low bits are padding data 0.
>>
>>     Or do you have a better suggestion?
>
>I see, I had missed this aspect. I think in this context, it would be fair naming.
>Maybe drop a note in the doc saying just that:
>
>"In contrast to V4L2_PIX_FMT_Y12 format, which have its padding located in
>the most significant bits of the 16 bit word".
>
>Or something similar.,
>Nicolas

Hi Nicolas,
    Thanks very much, I'll include the description in v3 patch

>
>>
>> Ming
>>
>> > > +
>> > > +      - ``V4L2_PIX_FMT_Y012``
>> > > +      - 'Y012'
>> > > +
>> > > +      - Y'\ :sub:`0`\ [3:0] `0000`
>> > > +      - Y'\ :sub:`0`\ [11:4]
>> > > +      - ...
>> > > +      - ...
>> > > +      - ...
>> > > +
>> > >      * .. _V4L2-PIX-FMT-Y14:
>> > >
>> > >        - ``V4L2_PIX_FMT_Y14``
>> > > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c
>> > > b/drivers/media/v4l2-core/v4l2-ioctl.c
>> > > index 067dbdd0a9ef..0ee730aa6cc7 100644
>> > > --- a/drivers/media/v4l2-core/v4l2-ioctl.c
>> > > +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
>> > > @@ -1303,6 +1303,7 @@ static void v4l_fill_fmtdesc(struct
>> > > v4l2_fmtdesc
>> > *fmt)
>> > >       case V4L2_PIX_FMT_Y6:           descr = "6-bit Greyscale"; break;
>> > >       case V4L2_PIX_FMT_Y10:          descr = "10-bit Greyscale"; break;
>> > >       case V4L2_PIX_FMT_Y12:          descr = "12-bit Greyscale"; break;
>> > > +     case V4L2_PIX_FMT_Y012:         descr = "12-bit Greyscale"; break;
>> > >       case V4L2_PIX_FMT_Y14:          descr = "14-bit Greyscale"; break;
>> > >       case V4L2_PIX_FMT_Y16:          descr = "16-bit Greyscale"; break;
>> > >       case V4L2_PIX_FMT_Y16_BE:       descr = "16-bit Greyscale BE";
>> > > break;
>> > > diff --git a/include/uapi/linux/videodev2.h
>> > > b/include/uapi/linux/videodev2.h index 5448aa3b7858..3d8f89bff33c
>> > > 100644
>> > > --- a/include/uapi/linux/videodev2.h
>> > > +++ b/include/uapi/linux/videodev2.h
>> > > @@ -583,6 +583,7 @@ struct v4l2_pix_format {
>> > >  #define V4L2_PIX_FMT_Y6      v4l2_fourcc('Y', '0', '6', ' ') /*  6
>> > > Greyscale     */
>> > >  #define V4L2_PIX_FMT_Y10     v4l2_fourcc('Y', '1', '0', ' ') /* 10
>> > > Greyscale
>> > */
>> > >  #define V4L2_PIX_FMT_Y12     v4l2_fourcc('Y', '1', '2', ' ') /* 12
>> > > Greyscale
>> > */
>> > > +#define V4L2_PIX_FMT_Y012    v4l2_fourcc('Y', '0', '1', '2') /* 12
>> > > Greyscale
>> > */
>> > >  #define V4L2_PIX_FMT_Y14     v4l2_fourcc('Y', '1', '4', ' ') /* 14
>> > > Greyscale
>> > */
>> > >  #define V4L2_PIX_FMT_Y16     v4l2_fourcc('Y', '1', '6', ' ') /* 16
>> > > Greyscale
>> > */
>> > >  #define V4L2_PIX_FMT_Y16_BE  v4l2_fourcc_be('Y', '1', '6', ' ')
>> > > /* 16 Greyscale BE  */
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ