All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Qian <ming.qian@nxp.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"Mirela Rabulea (OSS)" <mirela.rabulea@oss.nxp.com>
Cc: "shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"X.H. Bao" <xiahong.bao@nxp.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [EXT] Re: [PATCH 01/10] media: Add P012 and P012M video format
Date: Mon, 13 Feb 2023 09:16:05 +0000	[thread overview]
Message-ID: <AM6PR04MB63417E088E59E1B6D03E148CE7DD9@AM6PR04MB6341.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <e60e4abcc9a4ae149844982afd65135d6e1c87b6.camel@ndufresne.ca>

>From: Nicolas Dufresne <nicolas@ndufresne.ca>
>Sent: 2023年2月10日 23:08
>To: Ming Qian <ming.qian@nxp.com>; Hans Verkuil <hverkuil-
>cisco@xs4all.nl>; mchehab@kernel.org; Mirela Rabulea (OSS)
><mirela.rabulea@oss.nxp.com>
>Cc: shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
>festevam@gmail.com; X.H. Bao <xiahong.bao@nxp.com>; dl-linux-imx <linux-
>imx@nxp.com>; linux-media@vger.kernel.org; linux-kernel@vger.kernel.org;
>devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
>Subject: Re: [EXT] Re: [PATCH 01/10] media: Add P012 and P012M video
>format
>
>Caution: EXT Email
>
>Le lundi 30 janvier 2023 à 08:15 +0000, Ming Qian a écrit :
>> > > diff --git a/include/uapi/linux/videodev2.h
>> > > b/include/uapi/linux/videodev2.h index 1befd181a4cc..5448aa3b7858
>> > > 100644
>> > > --- a/include/uapi/linux/videodev2.h
>> > > +++ b/include/uapi/linux/videodev2.h
>> > > @@ -626,12 +626,14 @@ struct v4l2_pix_format {
>> > >   #define V4L2_PIX_FMT_NV24    v4l2_fourcc('N', 'V', '2', '4') /* 24
>> > > Y/CbCr
>> > 4:4:4  */
>> > >   #define V4L2_PIX_FMT_NV42    v4l2_fourcc('N', 'V', '4', '2') /* 24
>> > > Y/CrCb
>> > 4:4:4  */
>> > >   #define V4L2_PIX_FMT_P010    v4l2_fourcc('P', '0', '1', '0') /* 24
>> > > Y/CbCr
>> > 4:2:0 10-bit per component */
>> > > +#define V4L2_PIX_FMT_P012    v4l2_fourcc('P', '0', '1', '2') /* 24
>> > > Y/CbCr
>> > 4:2:0 12-bit per component */
>> > >
>> > >   /* two non contiguous planes - one Y, one Cr + Cb interleaved  */
>> > >   #define V4L2_PIX_FMT_NV12M   v4l2_fourcc('N', 'M', '1', '2') /* 12
>> > > Y/CbCr
>> > 4:2:0  */
>> > >   #define V4L2_PIX_FMT_NV21M   v4l2_fourcc('N', 'M', '2', '1') /* 21
>> > > Y/CrCb
>> > 4:2:0  */
>> > >   #define V4L2_PIX_FMT_NV16M   v4l2_fourcc('N', 'M', '1', '6') /* 16
>> > > Y/CbCr
>> > 4:2:2  */
>> > >   #define V4L2_PIX_FMT_NV61M   v4l2_fourcc('N', 'M', '6', '1') /* 16
>> > > Y/CrCb
>> > 4:2:2  */
>> > > +#define V4L2_PIX_FMT_P012M   v4l2_fourcc('P', 'M', '1', '2') /* 24
>> > > Y/CbCr
>> > 4:2:0 12-bit per component */
>> >
>> > The name of the V4L2_PIX_FMT_ defines in this series are hard to decode.
>> >
>> > In this case is it derived from V4L2_PIX_FMT_P010, which really
>> > should have been named differently, but it's too late now :-(
>> >
>> > So I guess we'll stick with this naming, but it's not obvious what 'P012'
>> > means
>> > without referring to documentation.
>> >
>> > Oh well.
>> >
>> > Regards,
>> >
>> >         Hans
>>
>> Hi Hans,
>>     I'll update the format name, as you know,  the P012 is following
>> the P010, as they are almost the same, and the Y212 comes from
>> gstreamer (GST_VIDEO_FORMAT_Y212_LE), then I did some naming like that.
>>     I'll correct them in v2 patch.
>
>I agree these naming are not obvious. In GStreamer, appart from the _LE part,
>we've had this historical tendency to just stick with Microsoft names when
>they exist. Though Microsoft only define 10 and 16bits (P010/P016, Y210 and
>Y216). In this case, the 12 has is derived from it.
>
>https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.
>microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fmedfound%2F10-bit-and-
>16-bit-yuv-video-
>formats&data=05%7C01%7Cming.qian%40nxp.com%7C4946d98325684a554d
>a408db0b78aa3a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638
>116385106384698%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
>CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sd
>ata=5Z6m1WVxmf6WYXRDZiUuKT9wjx7cOtt%2BRMHzlyT3n5E%3D&reserved=
>0
>
>While P010 is very commonly seen, I don't know if Y210/Y212/Y216 is a great
>idea. It is a 16bit component width version of YUYV, which as we know exist in
>all sort of swizzling. So the Microsoft name will be hard to extend to other
>component order. My argument of keeping it this way though is that it
>matches the other copy of pixel formats definition that exist in Linux, which is
>drm_fourcc.h.
>
>Nicolas

Hi Nicolas,
    Thanks for your comments, I agree with you that the name like Y212 is hard to understand,
I'll correct them to YUYV64_12,  YUV48_12, BGR48_12 and ABGR64_12, but for P012, I prefer to keep it.

Ming


WARNING: multiple messages have this Message-ID (diff)
From: Ming Qian <ming.qian@nxp.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"Mirela Rabulea (OSS)" <mirela.rabulea@oss.nxp.com>
Cc: "shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"X.H. Bao" <xiahong.bao@nxp.com>,
	dl-linux-imx <linux-imx@nxp.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [EXT] Re: [PATCH 01/10] media: Add P012 and P012M video format
Date: Mon, 13 Feb 2023 09:16:05 +0000	[thread overview]
Message-ID: <AM6PR04MB63417E088E59E1B6D03E148CE7DD9@AM6PR04MB6341.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <e60e4abcc9a4ae149844982afd65135d6e1c87b6.camel@ndufresne.ca>

>From: Nicolas Dufresne <nicolas@ndufresne.ca>
>Sent: 2023年2月10日 23:08
>To: Ming Qian <ming.qian@nxp.com>; Hans Verkuil <hverkuil-
>cisco@xs4all.nl>; mchehab@kernel.org; Mirela Rabulea (OSS)
><mirela.rabulea@oss.nxp.com>
>Cc: shawnguo@kernel.org; s.hauer@pengutronix.de; kernel@pengutronix.de;
>festevam@gmail.com; X.H. Bao <xiahong.bao@nxp.com>; dl-linux-imx <linux-
>imx@nxp.com>; linux-media@vger.kernel.org; linux-kernel@vger.kernel.org;
>devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
>Subject: Re: [EXT] Re: [PATCH 01/10] media: Add P012 and P012M video
>format
>
>Caution: EXT Email
>
>Le lundi 30 janvier 2023 à 08:15 +0000, Ming Qian a écrit :
>> > > diff --git a/include/uapi/linux/videodev2.h
>> > > b/include/uapi/linux/videodev2.h index 1befd181a4cc..5448aa3b7858
>> > > 100644
>> > > --- a/include/uapi/linux/videodev2.h
>> > > +++ b/include/uapi/linux/videodev2.h
>> > > @@ -626,12 +626,14 @@ struct v4l2_pix_format {
>> > >   #define V4L2_PIX_FMT_NV24    v4l2_fourcc('N', 'V', '2', '4') /* 24
>> > > Y/CbCr
>> > 4:4:4  */
>> > >   #define V4L2_PIX_FMT_NV42    v4l2_fourcc('N', 'V', '4', '2') /* 24
>> > > Y/CrCb
>> > 4:4:4  */
>> > >   #define V4L2_PIX_FMT_P010    v4l2_fourcc('P', '0', '1', '0') /* 24
>> > > Y/CbCr
>> > 4:2:0 10-bit per component */
>> > > +#define V4L2_PIX_FMT_P012    v4l2_fourcc('P', '0', '1', '2') /* 24
>> > > Y/CbCr
>> > 4:2:0 12-bit per component */
>> > >
>> > >   /* two non contiguous planes - one Y, one Cr + Cb interleaved  */
>> > >   #define V4L2_PIX_FMT_NV12M   v4l2_fourcc('N', 'M', '1', '2') /* 12
>> > > Y/CbCr
>> > 4:2:0  */
>> > >   #define V4L2_PIX_FMT_NV21M   v4l2_fourcc('N', 'M', '2', '1') /* 21
>> > > Y/CrCb
>> > 4:2:0  */
>> > >   #define V4L2_PIX_FMT_NV16M   v4l2_fourcc('N', 'M', '1', '6') /* 16
>> > > Y/CbCr
>> > 4:2:2  */
>> > >   #define V4L2_PIX_FMT_NV61M   v4l2_fourcc('N', 'M', '6', '1') /* 16
>> > > Y/CrCb
>> > 4:2:2  */
>> > > +#define V4L2_PIX_FMT_P012M   v4l2_fourcc('P', 'M', '1', '2') /* 24
>> > > Y/CbCr
>> > 4:2:0 12-bit per component */
>> >
>> > The name of the V4L2_PIX_FMT_ defines in this series are hard to decode.
>> >
>> > In this case is it derived from V4L2_PIX_FMT_P010, which really
>> > should have been named differently, but it's too late now :-(
>> >
>> > So I guess we'll stick with this naming, but it's not obvious what 'P012'
>> > means
>> > without referring to documentation.
>> >
>> > Oh well.
>> >
>> > Regards,
>> >
>> >         Hans
>>
>> Hi Hans,
>>     I'll update the format name, as you know,  the P012 is following
>> the P010, as they are almost the same, and the Y212 comes from
>> gstreamer (GST_VIDEO_FORMAT_Y212_LE), then I did some naming like that.
>>     I'll correct them in v2 patch.
>
>I agree these naming are not obvious. In GStreamer, appart from the _LE part,
>we've had this historical tendency to just stick with Microsoft names when
>they exist. Though Microsoft only define 10 and 16bits (P010/P016, Y210 and
>Y216). In this case, the 12 has is derived from it.
>
>https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.
>microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fmedfound%2F10-bit-and-
>16-bit-yuv-video-
>formats&data=05%7C01%7Cming.qian%40nxp.com%7C4946d98325684a554d
>a408db0b78aa3a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638
>116385106384698%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
>CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sd
>ata=5Z6m1WVxmf6WYXRDZiUuKT9wjx7cOtt%2BRMHzlyT3n5E%3D&reserved=
>0
>
>While P010 is very commonly seen, I don't know if Y210/Y212/Y216 is a great
>idea. It is a 16bit component width version of YUYV, which as we know exist in
>all sort of swizzling. So the Microsoft name will be hard to extend to other
>component order. My argument of keeping it this way though is that it
>matches the other copy of pixel formats definition that exist in Linux, which is
>drm_fourcc.h.
>
>Nicolas

Hi Nicolas,
    Thanks for your comments, I agree with you that the name like Y212 is hard to understand,
I'll correct them to YUYV64_12,  YUV48_12, BGR48_12 and ABGR64_12, but for P012, I prefer to keep it.

Ming

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-02-13  9:16 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20  3:11 [PATCH 00/10] media: imx-jpeg: Add support for 12 bit extended Ming Qian
2022-12-20  3:11 ` Ming Qian
2022-12-20  3:11 ` [PATCH 01/10] media: Add P012 and P012M video format Ming Qian
2022-12-20  3:11   ` Ming Qian
2023-01-27 14:31   ` Hans Verkuil
2023-01-27 14:31     ` Hans Verkuil
2023-01-30  8:15     ` [EXT] " Ming Qian
2023-01-30  8:15       ` Ming Qian
2023-02-10 15:08       ` Nicolas Dufresne
2023-02-10 15:08         ` Nicolas Dufresne
2023-02-13  9:16         ` Ming Qian [this message]
2023-02-13  9:16           ` Ming Qian
2022-12-20  3:11 ` [PATCH 02/10] media: Add Y012 " Ming Qian
2022-12-20  3:11   ` Ming Qian
2022-12-20  3:11 ` [PATCH 03/10] media: Add Y212 " Ming Qian
2022-12-20  3:11   ` Ming Qian
2023-01-27 14:37   ` Hans Verkuil
2023-01-27 14:37     ` Hans Verkuil
2023-02-22 15:31     ` Nicolas Dufresne
2023-02-22 15:31       ` Nicolas Dufresne
2023-02-23  1:35       ` [EXT] " Ming Qian
2023-02-23  1:35         ` Ming Qian
2022-12-20  3:11 ` [PATCH 04/10] media: Add Y312 " Ming Qian
2022-12-20  3:11   ` Ming Qian
2023-01-27 14:42   ` Hans Verkuil
2023-01-27 14:42     ` Hans Verkuil
2022-12-20  3:11 ` [PATCH 05/10] media: Add B312 " Ming Qian
2022-12-20  3:11   ` Ming Qian
2023-01-27 14:46   ` Hans Verkuil
2023-01-27 14:46     ` Hans Verkuil
2022-12-20  3:11 ` [PATCH 06/10] media: Add B412 " Ming Qian
2022-12-20  3:11   ` Ming Qian
2023-01-27 14:53   ` Hans Verkuil
2023-01-27 14:53     ` Hans Verkuil
2022-12-20  3:11 ` [PATCH 07/10] media: imx-jpeg: Refine the function mxc_jpeg_find_format Ming Qian
2022-12-20  3:11   ` Ming Qian
2022-12-20  3:11 ` [PATCH 08/10] media: imx-jpeg: Clear slot next desc ptr if config error Ming Qian
2022-12-20  3:11   ` Ming Qian
2022-12-20  3:11 ` [PATCH 09/10] media: imx-jpeg: Decoder add support for 12bit jpeg Ming Qian
2022-12-20  3:11   ` Ming Qian
2022-12-20  3:11 ` [PATCH 10/10] media: imx-jpeg: Encoder " Ming Qian
2022-12-20  3:11   ` Ming Qian
2022-12-22 21:47 ` [PATCH 00/10] media: imx-jpeg: Add support for 12 bit extended mirela.rabulea
2022-12-22 21:47   ` mirela.rabulea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR04MB63417E088E59E1B6D03E148CE7DD9@AM6PR04MB6341.eurprd04.prod.outlook.com \
    --to=ming.qian@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mirela.rabulea@oss.nxp.com \
    --cc=nicolas@ndufresne.ca \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=xiahong.bao@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.