Message ID | 20230131130327.776899-1-benjamin.gaignard@collabora.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2739084wrn; Tue, 31 Jan 2023 05:06:24 -0800 (PST) X-Google-Smtp-Source: AK7set9pqvRYtGdZGYqyIXNwFxTe4ojOixB2Q1q7lagZkjGfuE+80n9FeJ/QON0zkmth1FAGuySn X-Received: by 2002:a17:906:7310:b0:881:f2f:6633 with SMTP id di16-20020a170906731000b008810f2f6633mr17983443ejc.50.1675170384503; Tue, 31 Jan 2023 05:06:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675170384; cv=none; d=google.com; s=arc-20160816; b=BMtSgnnoJl1JpryIrEbeONHRn4i3lgP230DIUlxUXryzszpExEp5Mc153t0zdZ5791 V+A0OI41z1EA8r8X0/HqVbUp8BDA6AdL04a4TYttCLGZOrn1Y3VQcWwaTHCQSW5AKyId /RYiqz13d7pUqshqlHeSLaf2k/J/4l4ZHrjV1T2+X6UkCOvNuu18C/Z82FOqOhwKUGot EYsnzsq+V5tV7Z2CmZUOE1qOfnyYkxlTjTDr3vDXsCJz03ojKMitnQKl8cyAb7wsn8Dp dtVBrSTKfbUWH+0DcPsZTzE+Uh6sblN8ggj2pr7FzwYqVGxbMKaGOPseUafBA36dmwjB FyHQ== 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=uojiUoec4ak7EKnerBx7K1JDXxBigoKUtkTCoixnB0c=; b=mvBS5DzR6TUW0oGx3fMMalkznLuinFWi5kf2mn56+TzpRUsupVrcBGHj+xhMYPdXwm 5SBXeGnCF3cyIWSqH8w7t5Dl/r1w7MgwiN+R8u+TF10s8/FH/RCnCjETT7eDdjqYi+0f AUjLt7YFX62+QUvN7Vd7aogc+mHL+6veFc3h62H9VE+brZCZWfk0Hg8xr8o6y+fzCPY8 mk6fCk5eImcfPGRY19kQ61WSWeyqzZ4e5CVUU1MSwVynlUz3MHFe4rVovmTK/KXl5iiI S0Qc8uxFSe/iHtn66CVwEeLZCOOC+2SHhbDhdcAhodcTf2/8HJbCa+3twc+U4oivG2qQ gD9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ZO42ntVo; 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=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020aa7da82000000b0049e9fe9abc1si10642029eds.389.2023.01.31.05.06.00; Tue, 31 Jan 2023 05:06:24 -0800 (PST) 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=ZO42ntVo; 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=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231778AbjAaNDw (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Tue, 31 Jan 2023 08:03:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231414AbjAaNDp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 31 Jan 2023 08:03:45 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C4361041B; Tue, 31 Jan 2023 05:03:43 -0800 (PST) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:d507:461a:a036:bf89]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id EF6256602E23; Tue, 31 Jan 2023 13:03:41 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1675170222; bh=ywf8wvzGvrBOTq7V4rX3r1UAVqKt2wfzIb6q7nPGBn0=; h=From:To:Cc:Subject:Date:From; b=ZO42ntVoIXd1r49AEjT0OYGNro8sGPZyFhwOFHnDSWhFR7VddD/wqXY/5Rlh0te7+ xud4/HRJQJ3B7lT0p1kMHFPcJgTMKmOmJsaQwjcApmldVkBohPKfR0734bv/GOd8GW 8KH4ACaz4o4e6td4xMX2QgBa6tZTS91xA+bDCeYL8vFXuzmTW3DkBfKdT/4xRue9Uy r/omfGjyChxNo8EMz4v5WaYGoY/tNH7pyRxAd65rxwOYnh6ACUCQHht3r+2CmP2xGa jOhUFphENI58fFKdkifeB9Ggwpn0itCffUCylhvWd6V1GBXVnQbLlvYpZTF27GXwGX 7gms6gimf0cRg== From: Benjamin Gaignard <benjamin.gaignard@collabora.com> To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.co.uk Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, Benjamin Gaignard <benjamin.gaignard@collabora.com> Subject: [PATCH v7 0/5] media: verisilicon: HEVC: fix 10bits handling Date: Tue, 31 Jan 2023 14:03:22 +0100 Message-Id: <20230131130327.776899-1-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.34.1 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_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756543461163553086?= X-GMAIL-MSGID: =?utf-8?q?1756543461163553086?= |
Series |
media: verisilicon: HEVC: fix 10bits handling
|
|
Message
Benjamin Gaignard
Jan. 31, 2023, 1:03 p.m. UTC
When decoding a 10bits bitstreams HEVC driver should only expose 10bits pixel formats. To fulfill this requirement it is needed to call hantro_reset_raw_fmt() and to only change driver internal state in case of success. Fluster score (140/147) doesn't change after this series. version 7: - Remove unused ctx variable in hantro_try_ctrl(). - Change HANTRO_DEFAULT_BIT_DEPTH value to 8. - Simplify hantro_check_depth_match logic. - Keep ctx->bit_depth as integer value because it is use to compute buffers size for hevc. version 6: - Split the patches in multiple sub-patches. - Rework hantro_reset_encoded_fmt() usage. version 5: - Add Nicolas's review tags - Add Fixes tags version 4: - Split the change in 2 patches. - Change hantro_check_depth_match() prototype to avoid using ctx->bit_depth - Return the result of hantro_reset_raw_fmt() to the caller. - Only set ctx->bit_depth when hantro_reset_raw_fmt() returns is ok. Benjamin Gaignard (5): media: verisilicon: Do not set context src/dst formats in reset functions media: verisilicon: Do not use ctx fields as format storage when resetting media: verisilicon: Do not set ctx->bit_depth in hantro_try_ctrl() media: verisilicon: Do not change context bit depth before validating the format media: verisilicon: HEVC: Only propose 10 bits compatible pixels formats .../media/platform/verisilicon/hantro_drv.c | 39 ++++++-- .../platform/verisilicon/hantro_postproc.c | 2 +- .../media/platform/verisilicon/hantro_v4l2.c | 90 +++++++++---------- .../media/platform/verisilicon/hantro_v4l2.h | 3 +- .../media/platform/verisilicon/imx8m_vpu_hw.c | 2 + 5 files changed, 78 insertions(+), 58 deletions(-)