Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3112665imw; Mon, 18 Jul 2022 02:18:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uBDw+UyDR7luIP/cchQhCV7eu/pGNvkez8p9+wGx0S6y+ifNIIckuqE6GjEEEhR1wVqT1d X-Received: by 2002:a17:90b:4f91:b0:1cd:3a73:3a5d with SMTP id qe17-20020a17090b4f9100b001cd3a733a5dmr30921414pjb.98.1658135898520; Mon, 18 Jul 2022 02:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658135898; cv=none; d=google.com; s=arc-20160816; b=EIU+adKuWy1JGNNqFuMVL1KE+RYL0lLEm3a+ESAEzZovznC5VuY55Dkl7FCoZNM8t7 wTWNA9qGDgF8okR9aH8YIykf+qntpN0cE/NFb9K2uY4+/SL7jjKpYY1Dfw4ccSGlPJdD MeZMeeqNrKHcBR7d9w00l1gCnOl8erkyUVAsgqTNx8Hgsrz4dMgoFT+T6wgmFdBopUc6 VpLShOLivYysF6/uoE/pH9UrGTeI9lvv5D7SNv3Eu9cHgmUOn5xEcxHqmn9EeOL6HD9q tdSY3GVmuEh+fSfLTTbxsjyQ/WWXxyOAWncregJKUfM8Nq6qQ1S+A76Qx5y98zVa+4A8 YzBA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+KczGojMuamR5du1h+CNZ/YZIKa6wzXpd4/FazmHvSo=; b=UTKnppEYPFpVwseU+9FhuA8VvKeDCHlrDrFKmyKZe4ZGgtQ57zNEpHzP7/zCvwGuuT YRhtX2QALmIoChiVA/+16Dni2J7Ow6+1H/lZPA2L36U/jiFimgZnWZW19lTRX9luewtP mtbl2S6K1sCmsw4BwgqSAJZpXTH9lugXh5mtakVOWOj7AhGd/bPBb8pRmBT/EweRUje8 zjKjkxsmxBbBx5apDcyWyt0H1Y+bk5UrjoExR6xl4GZcgDWdOCnWLZPh5YEcqPxSCP23 99ImOU1CxC72gzCOc3annTBNDYdtxSXHc4ihvPc7fzDk3PDV7iGrq71FYHUacXG0PeaR MEng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=bNTMEP3N; 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 b18-20020a056a000cd200b00528b9bd1162si16969806pfv.38.2022.07.18.02.18.04; Mon, 18 Jul 2022 02:18:18 -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=bNTMEP3N; 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 S233940AbiGRIkC (ORCPT + 99 others); Mon, 18 Jul 2022 04:40:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233872AbiGRIj4 (ORCPT ); Mon, 18 Jul 2022 04:39:56 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E256BC3E; Mon, 18 Jul 2022 01:39:55 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:4754:89ee:32c6:e620]) (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 F1D786601A1B; Mon, 18 Jul 2022 09:39:53 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1658133594; bh=p1IL0WApAId0OF2roNkCC1LN0QMRN6h/Fzya6tDqTJk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bNTMEP3NGof4m/05T5ErKNB6zBdxk7o8uu7EzV6O+TXcJGGOesbsBZ5IBBI3S/H4C rY/8idtsmPNdCQVneBfN5sHPBtnMjGW0ysZ7kb0nS9bC845it6XZCjhFveSGrBEDNp S7MFX2hpW7ehPKoOekzqM9ZXqswy6GmJ04mHBuaEsjCLYebLrfRM9+7UtJneXQxdFx R9+EymURvZCcOeYMz7zekaI+LIoawhphJnG6Z1HNdrnQFlJ3ysdoMlZi44ufLC2CDC azATiv/epXe/Ts/MlexbOKpkAbZa5sCW1pj0m482/zO65RhBZLY1SCfaiYj5E7qrHg NthFthxzUvSeQ== From: Benjamin Gaignard To: mchehab@kernel.org, hverkuil@xs4all.nl, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, mripard@kernel.org, paul.kocialkowski@bootlin.com, wens@csie.org, jernej.skrabec@gmail.com, samuel@sholland.org, nicolas.dufresne@collabora.com, andrzej.p@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v2 1/7] media: hantro: Store HEVC bit depth in context Date: Mon, 18 Jul 2022 10:39:39 +0200 Message-Id: <20220718083945.200845-2-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220718083945.200845-1-benjamin.gaignard@collabora.com> References: <20220718083945.200845-1-benjamin.gaignard@collabora.com> 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: X-Mailing-List: linux-kernel@vger.kernel.org Store HEVC bit depth in context. Bit depth is equal to hevc sps bit_depth_luma_minus8 + 8. Signed-off-by: Benjamin Gaignard --- drivers/staging/media/hantro/hantro_hevc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/hantro/hantro_hevc.c b/drivers/staging/media/hantro/hantro_hevc.c index 5984c5fa6f83..dcb5c8703b6e 100644 --- a/drivers/staging/media/hantro/hantro_hevc.c +++ b/drivers/staging/media/hantro/hantro_hevc.c @@ -163,6 +163,8 @@ int hantro_hevc_validate_sps(struct hantro_ctx *ctx, const struct v4l2_ctrl_hevc /* Only 8-bit is supported */ return -EINVAL; + ctx->bit_depth = sps->bit_depth_luma_minus8 + 8; + /* * for tile pixel format check if the width and height match * hardware constraints -- 2.32.0