Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp433532yba; Fri, 5 Apr 2019 09:29:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxurukg9dI9rte+DBY8tElgxQZerZIjMEaXwJcvkUMhbjhpze2y/Xg6+PtiHmShkbIkpbO0 X-Received: by 2002:a17:902:6b08:: with SMTP id o8mr14185800plk.105.1554481745793; Fri, 05 Apr 2019 09:29:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554481745; cv=none; d=google.com; s=arc-20160816; b=exYjkMCtBmymbXrbnHWUz97rjKk0DYHo4IlrkxM5Ky+czuSRjHveJtIz/I6LPJ5cRI d5tyMPKEyPl21fW4+/X0t4IfLNHbf/yf5/YfsPLTOV7LFvnn7DHnBnjmYUebU7VjVC1j LVLOnP1xsqMTu77PjRLokvqG+6rg6JMzuWtrY/LOCDGEZ4JDaGtMGqpI2bLLa9VAPN2w MmZarBaRujIL98FfVF1xcihJ/iEL723aaTEIqtcUIbTXTi/PjH7T97vqvCUNZURcMQlZ pUfGbJb+YLi8BHMhnmq9Py9opwmqmDRonKhF0hdq499KgUeOlYN5LqHFyxlM4fX08Mwc +UyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:organization :references:in-reply-to:date:cc:to:reply-to:from:subject:message-id; bh=OFDV+0uEVRQk0iC94OvZhoMGSomr8JSr4Wz4oV1zoRE=; b=LflV/nY5ANpZAzgQIepBs3IXZxvjFNzljwqFbeNP10oVV0qef+e7g9gly/vpARIpo+ se1VGoUjp3bMTQ2s/qz8TvwnWKhOEZiUH/7QX/TmYqBejhzjNkj+wNpXTdJ+rkBOdbTQ hbQoz5hR+vDZcPFz4bzQlS9MVOTeyRKOZk3jqkLfHrPYZiQHrmiRdzQOgzDflhAH1eXG zQX+3HGTzHJ75P99k7z+tMXMk/LN8fFWi/8Ab1duyoQ1Q0Dx4cLmXIRpIQaW2Ld9873e tiReh/+h2tmjSciIBzvSLiSqXyoM/LaHnUuT4iaIspg1wtSNImHvLCJEAgEQmYHCxp6A y0Ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t17si19284612pfe.250.2019.04.05.09.28.50; Fri, 05 Apr 2019 09:29:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731566AbfDEQ14 (ORCPT + 99 others); Fri, 5 Apr 2019 12:27:56 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:35730 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730554AbfDEQ14 (ORCPT ); Fri, 5 Apr 2019 12:27:56 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nicolas) with ESMTPSA id 17FF128226F Message-ID: <05078223a4098c96f6260f77e9ef2a01b966daa6.camel@collabora.com> Subject: Re: [PATCH RESEND v7 1/2] media: uapi: Add H264 low-level decoder API compound controls. From: Nicolas Dufresne Reply-To: Nicolas Dufresne To: Maxime Ripard Cc: Chen-Yu Tsai , Tomasz Figa , Hans Verkuil , Alexandre Courbot , Sakari Ailus , Laurent Pinchart , Pawel Osciak , Paul Kocialkowski , Linux Kernel Mailing List , "list@263.net:IOMMU DRIVERS , Joerg " "Roedel ," , Linux Media Mailing List , Jens Kuske , Jernej Skrabec , Jonas Karlman , Ezequiel Garcia , linux-sunxi , Thomas Petazzoni , Guenter Roeck Date: Fri, 05 Apr 2019 12:27:48 -0400 In-Reply-To: <20190405151552.biesirbs35uivk7d@flea> References: <7cd913545cfc80fa9999839c62c4bf7b354a7904.1554380738.git-series.maxime.ripard@bootlin.com> <20190405151552.biesirbs35uivk7d@flea> Organization: Collabora Ltd. Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-105qp6mZm6hZVbLbDG+d" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-105qp6mZm6hZVbLbDG+d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le vendredi 05 avril 2019 =C3=A0 17:15 +0200, Maxime Ripard a =C3=A9crit : > Hi Nicolas, >=20 > 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`` > > > > > + - > > > >=20 > > > > We recently had some reflection with Alex that this is redundant wi= th > > > > the width and height in the OUTPUT format. It may also apply to som= e > > > > other fields in these structs. I feel like they should be removed a= nd > > > > passed via corresponding generic V4L2 properties - format, selectio= n, > > > > etc. > > > >=20 > > > > The same problem is also present in the MPEG2 controls. In fact, th= ere > > > > was a patch already which used some fields from the controls to > > > > calculate the destination buffer strides, rather than bytesperline = in > > > > the format. > > > >=20 > > > > Since we're in staging, it could be done with a follow-up patch, th= ough. > > >=20 > > > 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? > >=20 > > 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. > >=20 > > 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. > >=20 > > 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. >=20 > 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. >=20 > The first paragrah seems to advocate for the former, but the two > others for the latter. I think the data should stay. As I said, there can be multiple SPS/PPS, while there is only one format. That being said, how does SPS/PPS activation works ? How do you tell the driver about all the SPS/PPS and which one is being activated ? >=20 > Thanks! > Maxime >=20 > -- > Maxime Ripard, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com --=-105qp6mZm6hZVbLbDG+d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQSScpfJiL+hb5vvd45xUwItrAaoHAUCXKeCBQAKCRBxUwItrAao HPxYAKCLokQMygHQVcEBVlfoU/0wx7JIPQCgigkxrrILs+98mkAhfw91CijNlVI= =lZ4c -----END PGP SIGNATURE----- --=-105qp6mZm6hZVbLbDG+d--