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: <20190405151552.biesirbs35uivk7d@flea>
Date:   Fri, 5 Apr 2019 17:15:52 +0200
From:   Maxime Ripard <maxime.ripard@...tlin.com>
To:     Nicolas Dufresne <nicolas.dufresne@...labora.com>
Cc:     Chen-Yu Tsai <wens@...e.org>, Tomasz Figa <tfiga@...omium.org>,
        Hans Verkuil <hans.verkuil@...co.com>,
        Alexandre Courbot <acourbot@...omium.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Pawel Osciak <posciak@...omium.org>,
        Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "list@....net:IOMMU DRIVERS <iommu@...ts.linux-foundation.org>, Joerg 
        Roedel <joro@...tes.org>," <linux-arm-kernel@...ts.infradead.org>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Jens Kuske <jenskuske@...il.com>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Jonas Karlman <jonas@...boo.se>,
        Ezequiel Garcia <ezequiel@...labora.com>,
        linux-sunxi <linux-sunxi@...glegroups.com>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        Guenter Roeck <groeck@...omium.org>
Subject: Re: [PATCH RESEND v7 1/2] media: uapi: Add H264 low-level decoder
 API compound controls.

Hi Nicolas,

On Thu, Apr 04, 2019 at 11:41:13AM -0400, Nicolas Dufresne wrote:
> > > > +    * - __u16
> > > > +      - ``pic_width_in_mbs_minus1``
> > > > +      -
> > > > +    * - __u16
> > > > +      - ``pic_height_in_map_units_minus1``
> > > > +      -
> > >
> > > We recently had some reflection with Alex that this is redundant with
> > > the width and height in the OUTPUT format. It may also apply to some
> > > other fields in these structs. I feel like they should be removed and
> > > passed via corresponding generic V4L2 properties - format, selection,
> > > etc.
> > >
> > > The same problem is also present in the MPEG2 controls. In fact, there
> > > was a patch already which used some fields from the controls to
> > > calculate the destination buffer strides, rather than bytesperline in
> > > the format.
> > >
> > > Since we're in staging, it could be done with a follow-up patch, though.
> >
> > Just my two cents. I played with some codecs a while back. IIRC some
> > specify a "codec" size in addition to the actual picture size, like
> > when the encoder does padding to fit the requirements of the codec
> > (spec). Is this needed anywhere?
>
> With state-less encoders, the headers, which contains the crop
> information is created by userspace and for state less decoder, the
> headers that contains this information is parsed by userspace. So I
> believe that in theory, the accelerator does not strictly need to be
> aware of the cropped dimensions.
>
> Another thing, is that there is not guarantied matches between e.g.
> depth of the chrome/luma and the final image buffers. Some hardware may
> have bandwidth limitation or internal converter and could possibly
> decode 10bit data into 8bit buffers.
>
> A third reason why I would not try and encode this header information
> is that there can be multiple PPS/SPS at the same time, and I think
> it's confusing if the relevant information to differentiate them is
> removed.

Sorry if that sounds a bit dumb, but it's not really clear to me if
you're arguing for the removal of the data as Tomasz suggests, or if
you want to keep them.

The first paragrah seems to advocate for the former, but the two
others for the latter.

Thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ