From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, FROM_EXCESS_BASE64,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 660CEC04AB5 for ; Mon, 3 Jun 2019 15:34:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3D1C827243 for ; Mon, 3 Jun 2019 15:34:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nXXGSXCU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3D1C827243 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=siol.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Qdcdyj6rxruRK7udoV9SMgpelMPv77d+up7STt8wgoU=; b=nXXGSXCUkDdWAc zdds7wQ3TXyDudrWglcPdepU/7PurfmrJPQbPuwh7m9UW4Y/TzvSXMWOmyt5cY3xnPu/FJvI7sfD+ 3fozSnK/FWbyiedlYT8G23qV7hzHW7ME+vrMs/H8Dgd2fmaPc62EHvkaorwJQAtRfDIIpNhDJFdd7 oHkZ35rneQE6Cz6lV25iL5DNHrP3Gk2HD2pzvqNH31Y4V/u+fvWDYZA5mIOYzbnIM8bLni+GgJ3An J8jCaUGxTDJft2O1r+34mkkC97ei1xxihjdpHebezCNZiQA1DFNV5P9EKMlM9B7ldByDrsUVIpRR1 SklpJ39PSk2zE4nK1LLA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXoye-0008AF-My; Mon, 03 Jun 2019 15:34:24 +0000 Received: from mailoutvs42.siol.net ([185.57.226.233] helo=mail.siol.net) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXoyb-00089f-UZ for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2019 15:34:23 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTP id 7973A521018; Mon, 3 Jun 2019 17:34:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at psrvmta10.zcs-production.pri Received: from mail.siol.net ([127.0.0.1]) by localhost (psrvmta10.zcs-production.pri [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id I185maW5QRX1; Mon, 3 Jun 2019 17:34:05 +0200 (CEST) Received: from mail.siol.net (localhost [127.0.0.1]) by mail.siol.net (Postfix) with ESMTPS id 10534520F7B; Mon, 3 Jun 2019 17:34:05 +0200 (CEST) Received: from jernej-laptop.localnet (cpe-86-58-52-202.static.triera.net [86.58.52.202]) (Authenticated sender: jernej.skrabec@siol.net) by mail.siol.net (Postfix) with ESMTPA id A9764520F69; Mon, 3 Jun 2019 17:34:03 +0200 (CEST) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Maxime Ripard Subject: Re: [PATCH 2/7] media: cedrus: Fix H264 default reference index count Date: Mon, 03 Jun 2019 17:34:03 +0200 Message-ID: <8861995.Bqp6Xp4pol@jernej-laptop> In-Reply-To: <20190603114620.vsvbxz6gyhg3tn7b@flea> References: <20190530211516.1891-1-jernej.skrabec@siol.net> <20190530211516.1891-3-jernej.skrabec@siol.net> <20190603114620.vsvbxz6gyhg3tn7b@flea> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190603_083422_145730_1960C3BC X-CRM114-Status: GOOD ( 16.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, jonas@kwiboo.se, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, nicolas@ndufresne.ca, paul.kocialkowski@bootlin.com, wens@csie.org, boris.brezillon@collabora.com, mchehab@kernel.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne ponedeljek, 03. junij 2019 ob 13:46:20 CEST je Maxime Ripard napisal(a): > 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. Actually only one flag is in bitstream valid for both l0 and l1 ref list. > > > > 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. Ok, so then we should add that override flag, which would align with h264 specs and you can still do same trick in VAAPI library which it's currently used in Cedrus driver - always set override flag and fill out only slice reflist count. At the end it shouldn't matter for proper decoding in any driver. Best regards, Jernej _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel