Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp740276iob; Tue, 3 May 2022 08:43:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyK0Ew4fKbi3RRaNQKiC8pNfw6gGEpJuPi8RHH6/Z2auwcy7OyYYceahixnYm7oD77CsJVR X-Received: by 2002:a17:902:c409:b0:15e:8e55:149 with SMTP id k9-20020a170902c40900b0015e8e550149mr15698124plk.56.1651592593232; Tue, 03 May 2022 08:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651592593; cv=none; d=google.com; s=arc-20160816; b=QBrjy2hgRqPAvnqErtaayU6+XYK5ZQjYbhA1UXkf3JPkmxqQXV5Db+ekSZMHTErP2Y ng4HK/YeRgT4H4w8i462WwE5ivV50Sp72a0BVGPCV56Jx3uskGCF59e5kxaUvMNc70lD mUxTClK1QEVUdttJ1yrNgQChhsqs6qytKhCgA8jTT/EwvA4AjJHwiwwdz8ce0FbBXB5f i2KjrdyWWg4bgIo+oXRMp4aTUOvutUZTnGW7VsWCEAsKeTI2vsetzLi0kkgEZQprqMaU NthRBc7CjlcUZ9QZx7Zf2yHXo0MY3pnzJljgrQWppipkj/yEZ4on5i5kHr89GANbVORW b+bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=M8XiIW3CiyuR/Q2YzKKAnn9ZipTUZg6bHFztflXlvHM=; b=wZ19rVEP9YOUJkgSV7c4xwAmKKDETYIsXD/2NhX7SXcBSjTbz99USLssrImU9TMczU HZzupZT3b+cFpL6vsjvOj+fSdg0UXbb3Lq9MOj46Y0KXIHLUZkOiLrMiEw+hHH3E08MB LHD8et3o2ma61AdsCYyyYjvGP+ISNv+74tLrHbgkqoCoiuzcs3bo9Cu4NJtramZkpJy1 Gu5Lpu1Xy8nsGyiIFcIsyozruY4aKQJq1tnfNI9Sqs+7CoHXcI10Bev3ekizXlipBqXT Hv+riMRG02F87i3IqC9NvlfBW3w/z9HNXI7mClbdX83Jh166NPvrZNkqcc1XNyka5gyg Dfhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=FctP2ezJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be3-20020a170902aa0300b0015827ec0073si17903847plb.452.2022.05.03.08.42.56; Tue, 03 May 2022 08:43:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=FctP2ezJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236575AbiECN7R (ORCPT + 99 others); Tue, 3 May 2022 09:59:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236631AbiECN7K (ORCPT ); Tue, 3 May 2022 09:59:10 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDEC91659C; Tue, 3 May 2022 06:55:37 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: benjamin.gaignard) with ESMTPSA id 64CC91F429C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1651586136; bh=P5xe8aK24FneKrejeJc2PeEEYU1RX6wkZjpKA6DtjL0=; h=From:To:Cc:Subject:Date:From; b=FctP2ezJ1BzuLidot3tZBewEQHmgjWSjKvaPpojBML/H6pY6ZFOht8x1DlUyHwuZ3 0TwHfMrqlr/17ABbP4t3eSdAl/1D0JQMhjx+AG9fO56ZLV0s969e8mHjspxxuN+adh Sx3OxcFS+Ngz4yVBUpNWpORWH05Az0NJ1CeTgJNhxqbI3wN6sQoByPKLBuQT/ycEUw tWCuAtEVcsV/2H39VBN3Cn6UzCm7WnKxY4wHbXwxQ3D/Qlf+wuS6FqUxDms7CFewXF VqnsI5YRV8UJax11e0wMqfR82z6C2EL1B+Q8S7W3ATSyyoIEEnNQrn20ftw7glliPy Qtib9O7YaoAYg== From: Benjamin Gaignard To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, gregkh@linuxfoundation.org Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, jon@nanocrew.net, aford173@gmail.com, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v3] media: hantro: HEVC: unconditionnaly set pps_{cb/cr}_qp_offset values Date: Tue, 3 May 2022 15:55:29 +0200 Message-Id: <20220503135529.683474-1-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Always set pps_cb_qp_offset and pps_cr_qp_offset values in Hantro/G2 register whatever is V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT flag value. The vendor code does the case to set these values. This fix conformance test CAINIT_G_SHARP_3. Fluster HEVC score is increase by one with this patch. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c index 6deb31b7b993..503f4b028bc5 100644 --- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c +++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c @@ -194,13 +194,8 @@ static void set_params(struct hantro_ctx *ctx) hantro_reg_write(vpu, &g2_max_cu_qpd_depth, 0); } - if (pps->flags & V4L2_HEVC_PPS_FLAG_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT) { - hantro_reg_write(vpu, &g2_cb_qp_offset, pps->pps_cb_qp_offset); - hantro_reg_write(vpu, &g2_cr_qp_offset, pps->pps_cr_qp_offset); - } else { - hantro_reg_write(vpu, &g2_cb_qp_offset, 0); - hantro_reg_write(vpu, &g2_cr_qp_offset, 0); - } + hantro_reg_write(vpu, &g2_cb_qp_offset, pps->pps_cb_qp_offset); + hantro_reg_write(vpu, &g2_cr_qp_offset, pps->pps_cr_qp_offset); hantro_reg_write(vpu, &g2_filt_offset_beta, pps->pps_beta_offset_div2); hantro_reg_write(vpu, &g2_filt_offset_tc, pps->pps_tc_offset_div2); -- 2.32.0