Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4419013ybi; Mon, 3 Jun 2019 10:31:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyiaUG9lgJOUtdh3ZyquefiwDeomR+kyCiSwOyXilfOO+tut3CmPic9Q2/Owi6vP6Mk48bQ X-Received: by 2002:a17:90a:7184:: with SMTP id i4mr31827212pjk.49.1559583087787; Mon, 03 Jun 2019 10:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559583087; cv=none; d=google.com; s=arc-20160816; b=y7PmbOOuXlGfJvFvXligDRGLFq0eisvVB423X5Ed8C3OAQZ8ozWnaWe8xw67KH/E5H Cez7KSsHASFlp0iPGdnwcE9PJkQ8U5lCtygywnHD8aGvsE+A40wqOAjVdP8YgOYbMN06 KPYgAVUvzL/4E1V4hp2ah/vIeeCHjbLUT/ZJ53ge7pot6rMPpqYwifeTx590pD2BQYGW zCHYaWsQmtJCHr1NvrAvQcR3YeE7SJUpsp7XflafnNE/RnmzCThfbtzfs9BVcgAIgjF7 GsoirL67lgrh/63In9Vlng7HopSSIasQDf+LwCVYyVWvTLu1t0V08/oZ6ImsE4vXK8xa Q8WA== 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=fsTyEb0bP+joJLrXXSHnlooHZkWN4JW6hPoIjOSTt5Q=; b=aoHYbOhpNhPrJFSlX4pVAmdnOJLsU4jieOF0vArmJLameh5cpJEFVjiFbXmRcz/qww CkykB2HLXlG/vs+nsowECSZy/ymCYvfhd4MifxumZD+IBRr2qInBhuFCBCXXpjzgKmyh So/pSNf62QH/F4UZ5jEUa3Vf7z2Qb1okCGFkran3Ymti011kdRC6UHY1DoPT2X87DRAV Q2fEydXjlxuwziQJiumSKQPRMJcojepZdtvh5LNjc93tj86qJu+dpMJJkn0eMugukp+x +mjG9y3dUW0ydDFpGbM0eT7SnC+cN9DsG+mw9brHEaGQWHc0kIIOwKffYzuI24SHHKsk TbNg== 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 k24si18051355pgj.510.2019.06.03.10.31.11; Mon, 03 Jun 2019 10:31:27 -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 S1727824AbfFCLqa (ORCPT + 99 others); Mon, 3 Jun 2019 07:46:30 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:35157 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbfFCLqa (ORCPT ); Mon, 3 Jun 2019 07:46:30 -0400 X-Originating-IP: 90.88.144.139 Received: from localhost (aaubervilliers-681-1-24-139.w90-88.abo.wanadoo.fr [90.88.144.139]) (Authenticated sender: maxime.ripard@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 6EDBB1BF216; Mon, 3 Jun 2019 11:46:21 +0000 (UTC) Date: Mon, 3 Jun 2019 13:46:20 +0200 From: Maxime Ripard To: Jernej Skrabec Cc: paul.kocialkowski@bootlin.com, wens@csie.org, mchehab@kernel.org, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, nicolas@ndufresne.ca, boris.brezillon@collabora.com, jonas@kwiboo.se Subject: Re: [PATCH 2/7] media: cedrus: Fix H264 default reference index count Message-ID: <20190603114620.vsvbxz6gyhg3tn7b@flea> References: <20190530211516.1891-1-jernej.skrabec@siol.net> <20190530211516.1891-3-jernej.skrabec@siol.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fsayms5djr42vwm2" Content-Disposition: inline In-Reply-To: <20190530211516.1891-3-jernej.skrabec@siol.net> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fsayms5djr42vwm2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, May 30, 2019 at 11:15:11PM +0200, Jernej Skrabec wrote: > Reference index count in VE_H264_PPS reg should come from PPS control. > However, this is not really important because reference index count is > in our case always overridden by that from slice header. > > Cc: nicolas@ndufresne.ca > Cc: boris.brezillon@collabora.com > Cc: jonas@kwiboo.se > > Signed-off-by: Jernej Skrabec Acked-by: Maxime Ripard > --- > We have to decide if we drop pps->num_ref_idx_l0_default_active_minus1 > and pps->num_ref_idx_l1_default_active_minus1 fields or add > num_ref_idx_l0_active_override_flag and num_ref_idx_l0_active_override_flag > to slice control. > > Current control doesn't have those two flags, so in Cedrus override flag is > always set and we rely on userspace to set slice->num_ref_idx_l0_active_minus1 > and slice->num_ref_idx_l1_active_minus1 to correct values. This means that > values stored in PPS are not needed and always ignored by VPU. > > If I understand correctly, algorithm is very simple: > > ref_count = PPS->ref_count > if (override_flag) > ref_count = slice->ref_count > > It seems that VAAPI provides only final value. In my opinion we should do the > same - get rid of PPS default ref index count fields. The rationale was to be as conservative as possible and just expose everything that is in the bitstream in those controls to accomodate for as many weird hardware as possible. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --fsayms5djr42vwm2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXPUIjAAKCRDj7w1vZxhR xdm0AP46c7mpa3rFUC3RjFMniXaoNTXWcQ8pPICsPfw3vjCa9gD+KujizJ6uc9di +fd1bkaTJJCq8ZbqR+3HqBMJe9acIgE= =wE3x -----END PGP SIGNATURE----- --fsayms5djr42vwm2--