Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp368948yba; Fri, 5 Apr 2019 08:16:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxqkWBdNTZZWq6lOJDT7Nv8it9Ry1hFODIpHB7YgSeMhnObhYKpI2Naw8uvH66pkE6V/+c X-Received: by 2002:a63:c112:: with SMTP id w18mr12841643pgf.200.1554477412813; Fri, 05 Apr 2019 08:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554477412; cv=none; d=google.com; s=arc-20160816; b=SNRU1wK7LET5ftkd88/X13bAhR5iTR/vxCsQ/ImMOlT/BLjSYU15jpiI0lDnJwbcCU BMk9O+YayaRKcuw47YF2edkv+yEUArWsi4WkM01WPacNJOi3uoko22uk6RneXA7AF5Ug awd8l2kKc1sQk/qeHWsKE0PzhU9BsnySc6N5fxNPGgwTQSbQDWGvov2kDxLfYki22pgO ialas9bGcpsSiupRRiOm6/oJIhmn55LjdBSxKGFRhzLrPIWUlsUJkBRvDnFELY3YVQZ+ /VFX2OV9cyX3s8ThpFRfoFgggwAkFgwFqn6zFHzaK0ygT/jwwVT0fVl17UR7pddU7/T4 1vmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Naf0LVhUBrGPLxp4zD+F4I/WAa4GKus/k7D9Ln/BFsI=; b=Lv9qXclFKpLKmeSk8SLGt2Gn20C9XfGUw8Iooy3nCzwjq22bpIncDHd9kit/s/iZf5 IB63CF9AlMvKhxb9PQwSSA4VcBjc7w524VJIpUdFaxgQliC/9vd7hWvCqO33zcT9uzCj qaCxkq6OvI1OIGJtDCL+Gm9NZ0iJ6hTDqwYSwiTfYygz4orb4HcUk27UfOGscb7dgamC at++qTy7fhi6e/CmBUlXzydrf1dmZlPCxOWkmu3OugJPSJyqTH5JtPEk8tye4/rI0wH0 li2dG3Lryw7mrzvSTzM/NfL1hEMyLvHHGTWU8q+KGLjKbbVDLxlp1KzCEBMz8ve1lXiw omqg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12si3604096pgv.415.2019.04.05.08.16.37; Fri, 05 Apr 2019 08:16:52 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731505AbfDEPP7 (ORCPT + 99 others); Fri, 5 Apr 2019 11:15:59 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:33145 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbfDEPP6 (ORCPT ); Fri, 5 Apr 2019 11:15:58 -0400 X-Originating-IP: 90.88.30.125 Received: from localhost (aaubervilliers-681-1-89-125.w90-88.abo.wanadoo.fr [90.88.30.125]) (Authenticated sender: maxime.ripard@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 56B7860010; Fri, 5 Apr 2019 15:15:53 +0000 (UTC) Date: Fri, 5 Apr 2019 17:15:52 +0200 From: Maxime Ripard To: Nicolas Dufresne 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 Subject: Re: [PATCH RESEND v7 1/2] media: uapi: Add H264 low-level decoder API compound controls. Message-ID: <20190405151552.biesirbs35uivk7d@flea> References: <7cd913545cfc80fa9999839c62c4bf7b354a7904.1554380738.git-series.maxime.ripard@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t2qijco5lkwnrc7e" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --t2qijco5lkwnrc7e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --t2qijco5lkwnrc7e Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXKdxKAAKCRDj7w1vZxhR xaguAQDVqL8citHvAI0AYhkqcltH5ypA6lOK0dh6sIpwALsmDwEA3MEjg5BzYQbl HkVCdLdoLNkzR2QAVGyty1UFWk84Zgw= =+ba4 -----END PGP SIGNATURE----- --t2qijco5lkwnrc7e--