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: <0099cb36956090f7c5f3058b353d3555870aea32.camel@ndufresne.ca>
Date:   Fri, 26 Aug 2022 14:12:27 -0400
From:   Nicolas Dufresne <nicolas@...fresne.ca>
To:     Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Shi Hao <hao.shi@...ogic.com>
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        mchehab@...nel.org, hans.verkuil@...co.com,
        hverkuil-cisco@...all.nl, ezequiel@...guardiasur.com.ar,
        sakari.ailus@...ux.intel.com, ribalda@...omium.org,
        stanimir.varbanov@...aro.org, nanxin.qin@...ogic.com
Subject: Re: [PATCH] [media] v4l2: Add AV1, AVS and AVS2 format

Le vendredi 26 août 2022 à 12:15 +0300, Laurent Pinchart a écrit :
> Hello Shi,
> 
> Thank you for the patch.
> 
> On Fri, Aug 26, 2022 at 11:00:03AM +0800, Shi Hao wrote:
> > From: "hao.shi" <hao.shi@...ogic.com>
> > 
> > Add AV1, AVS and AVS2 compressed pixel formats. They are
> > the more common formats.
> > 
> > Signed-off-by: Shi Hao <hao.shi@...ogic.com>
> > ---
> >  drivers/media/v4l2-core/v4l2-ioctl.c | 3 +++
> >  include/uapi/linux/videodev2.h       | 3 +++
> 
> The patch also needs to document the formats, in
> Documentation/userspace-api/media/v4l/.
> 
> >  2 files changed, 6 insertions(+)
> > 
> > diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> > index c314025d977e..7b102c2f59b1 100644
> > --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> > +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> > @@ -1497,6 +1497,9 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
> >  		case V4L2_PIX_FMT_MT21C:	descr = "Mediatek Compressed Format"; break;
> >  		case V4L2_PIX_FMT_QC08C:	descr = "QCOM Compressed 8-bit Format"; break;
> >  		case V4L2_PIX_FMT_QC10C:	descr = "QCOM Compressed 10-bit Format"; break;
> > +		case V4L2_PIX_FMT_AV1:		descr = "AV1"; break;

A recommendation while adding proper spec/doc. AV1 have multiple representation,
the exact expected representation should be specified in the doc. This will
avoid similar issues we had with H.264 (Annex B. vs AVCc formats).

> > +		case V4L2_PIX_FMT_AVS:		descr = "AVS"; break;
> > +		case V4L2_PIX_FMT_AVS2:		descr = "AVS2"; break;

Same things should be checked for these two, they aren't very common outside of
China, at least I didn't had a chance to play with these so far.

cheers,
Nicolas

> >  		default:
> >  			if (fmt->description[0])
> >  				return;
> > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> > index 01e630f2ec78..fa8ec0ddde3d 100644
> > --- a/include/uapi/linux/videodev2.h
> > +++ b/include/uapi/linux/videodev2.h
> > @@ -738,6 +738,9 @@ struct v4l2_pix_format {
> >  #define V4L2_PIX_FMT_FWHT_STATELESS     v4l2_fourcc('S', 'F', 'W', 'H') /* Stateless FWHT (vicodec) */
> >  #define V4L2_PIX_FMT_H264_SLICE v4l2_fourcc('S', '2', '6', '4') /* H264 parsed slices */
> >  #define V4L2_PIX_FMT_HEVC_SLICE v4l2_fourcc('S', '2', '6', '5') /* HEVC parsed slices */
> > +#define V4L2_PIX_FMT_AV1      v4l2_fourcc('A', 'V', '1', '0') /* AV1 */
> > +#define V4L2_PIX_FMT_AVS      v4l2_fourcc('A', 'V', 'S', '0') /* AVS */
> > +#define V4L2_PIX_FMT_AVS2     v4l2_fourcc('A', 'V', 'S', '2') /* AVS2 */
> >  
> >  /*  Vendor-specific formats   */
> >  #define V4L2_PIX_FMT_CPIA1    v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */
> > 
> > base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ