Message ID | 20231116154816.70959-4-andrzej.p@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp3300852vqg; Thu, 16 Nov 2023 07:49:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhP3n28vUu8tGETgP82dIQO28QHBzK1Ay9deefGdQSkb5dY5vkPdBvQ0FUTniPZ6d5Qoxf X-Received: by 2002:a05:6a21:185:b0:187:d189:53df with SMTP id le5-20020a056a21018500b00187d18953dfmr1639541pzb.16.1700149784489; Thu, 16 Nov 2023 07:49:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700149784; cv=none; d=google.com; s=arc-20160816; b=E2qWyQ7lnYo06XTnJuF+Zp8HWJ+72hKmnN4o8PxXt6xCCoGJN8C0dUwBla+eAlDFea jIzbWikD8tjYarNCi8m+DUKNCw23vek91CupXgk8TGJ7v9giovpQmPZVPBtfsPOgpLmo ycDT2yvHtyZ3T+NaZqvnWL6TrTNg//9uDk+UMLFsYMXU2/kXdr9B1e8U7WcY+zZFosYu P2NEs29RIxe9LXKUlkTbhkFPGeMiKAvudEkB6eGSqROzF9BQuYE6hfrqyX4Cz359gCE6 IbLZNBEpbQw8/es8tq6zFuti5wdTdgPs3xHFjGpsGo9ZWyoaeTRC5sV5nGsGYBo8ttyP 9EYQ== 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=Kmht7svO/Aocc7HfTpwoDzXrdlEFwqA+lRjoyajThtw=; fh=hmveWuESrCs1SRnU5EOciZPVSPu9pA05pGOH2f1jU60=; b=V6WnMY0pMD/eqs0jSIs4gB0v5RZOIoFuh7Ghdy3aJ8PEhLa2o2ndCSR84OtpAuxcbh 3P9X3c3BLtNPPSPhj6XMvIb+N03dtEMgWA/QcKGo2mLehjIGKDPupLW/DKCS2Lz3rIXt VJlOl/Ztqy3UqsDnPOeaojU5+Qh8ZFgGliJUWPiEQLXbW9+121MG9AjGkwE+HjK2dADA aqo7RSpCaLPm1A9DF0l3Tv4SxiFLG+4vNPnlAEDV3lpyJLFJdxLya0ovs3aMdtpwTJDa J9f096S2kaGBcmKaKtxGMFD/SCVCpZD5JQp1tw7924M9xoeyZs2VR+lB8xuKW/LpwMLA wH8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dmvWKIAC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id b13-20020a6567cd000000b005859e22461csi13022785pgs.817.2023.11.16.07.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 07:49:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=dmvWKIAC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 58DC680ECADB; Thu, 16 Nov 2023 07:49:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345434AbjKPPsn (ORCPT <rfc822;jaysivo@gmail.com> + 30 others); Thu, 16 Nov 2023 10:48:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345351AbjKPPsf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 16 Nov 2023 10:48:35 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CF21D5A; Thu, 16 Nov 2023 07:48:31 -0800 (PST) Received: from localhost.localdomain (cola.collaboradmins.com [195.201.22.229]) (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: andrzej.p) by madras.collabora.co.uk (Postfix) with ESMTPSA id 3C4316607359; Thu, 16 Nov 2023 15:48:29 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1700149710; bh=FWoRq71D+3CZWvgfQamGU6bN0kUnW+MQUhCIbwvri58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dmvWKIACvVm8j1f0ShhDkQUcTBQpus3oQZsJORrCeE0Zs22+DDxZtF123CnE5cdlo LNAbDrYcaX3lN76LF2kTVRecK7MfohVzK29uMcu/sGkh1cjm3beTb+QhQ65gRpyRoU vpGjAg1yyqacC6K4acERKOE9Z/K2PlMwNVjWxT7qD1ucqibzuZ/2YkNgus43Bw3VTf Y3rNiyomHPbD8jBLEJbe99QkHFerTrbozpkaMu8yzaK/9AKlqLcFllDflm8IzGjayn qOuP3b00Zp8E5sZm/im6xXR3kU6sDok8wz1JYCzBZNWT7vsUt8ZebTUtpVBIC5Iq1b 2q6bAj/bppDVA== From: Andrzej Pietrasiewicz <andrzej.p@collabora.com> To: linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Cc: Hugues Fruchet <hugues.fruchet@foss.st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Andrzej Pietrasiewicz <andrzej.p@collabora.com>, Benjamin Gaignard <benjamin.gaignard@collabora.com>, Daniel Almeida <daniel.almeida@collabora.com>, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, Mauro Carvalho Chehab <mchehab@kernel.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Nicolas Dufresne <nicolas.dufresne@collabora.com>, Philipp Zabel <p.zabel@pengutronix.de>, kernel@collabora.com Subject: [RFC 3/6] media: verisilicon: Improve constant's name Date: Thu, 16 Nov 2023 16:48:13 +0100 Message-Id: <20231116154816.70959-4-andrzej.p@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231116154816.70959-1-andrzej.p@collabora.com> References: <20231116154816.70959-1-andrzej.p@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 16 Nov 2023 07:49:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782736260480162935 X-GMAIL-MSGID: 1782736260480162935 |
Series |
H.264 stateless encoder RFC 0/6
|
|
Commit Message
Andrzej Pietrasiewicz
Nov. 16, 2023, 3:48 p.m. UTC
For VP8 BIT(18) of this register is for enabling the boolean encoder.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
drivers/media/platform/verisilicon/hantro_h1_regs.h | 2 +-
drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Comments
On Thu, Nov 16, 2023 at 11:48 PM Andrzej Pietrasiewicz <andrzej.p@collabora.com> wrote: > > For VP8 BIT(18) of this register is for enabling the boolean encoder. Yes, but for H.264 it selects the entropy coding mode, 0 for CAVLC and 1 for CABAC. You even add it back in the last patch. I'd do it here, so you disambiguate the definition within one patch. ChenYu > Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> > --- > drivers/media/platform/verisilicon/hantro_h1_regs.h | 2 +- > drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/verisilicon/hantro_h1_regs.h b/drivers/media/platform/verisilicon/hantro_h1_regs.h > index 7752d1291c0e..c1c66c934a24 100644 > --- a/drivers/media/platform/verisilicon/hantro_h1_regs.h > +++ b/drivers/media/platform/verisilicon/hantro_h1_regs.h > @@ -70,7 +70,7 @@ > #define H1_REG_ENC_CTRL2_DISABLE_QUARTER_PIXMV BIT(22) > #define H1_REG_ENC_CTRL2_TRANS8X8_MODE_EN BIT(21) > #define H1_REG_ENC_CTRL2_CABAC_INIT_IDC(x) ((x) << 19) > -#define H1_REG_ENC_CTRL2_ENTROPY_CODING_MODE BIT(18) > +#define H1_REG_ENC_CTRL2_VP8_BOOLENC_ENABLE BIT(18) > #define H1_REG_ENC_CTRL2_H264_INTER4X4_MODE BIT(17) > #define H1_REG_ENC_CTRL2_H264_STREAM_MODE BIT(16) > #define H1_REG_ENC_CTRL2_INTRA16X16_MODE(x) ((x)) > diff --git a/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c b/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c > index 05aa0dd9c09c..08c5079fbfd0 100644 > --- a/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c > +++ b/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c > @@ -1226,7 +1226,7 @@ static void hantro_h1_vp8_enc_set_params(struct hantro_dev *vpu, struct hantro_c > reg = 0; > if (mb_width * mb_height > MAX_MB_COUNT_TO_DISABLE_QUARTER_PIXEL_MV) > reg = H1_REG_ENC_CTRL2_DISABLE_QUARTER_PIXMV; > - reg |= H1_REG_ENC_CTRL2_ENTROPY_CODING_MODE; > + reg |= H1_REG_ENC_CTRL2_VP8_BOOLENC_ENABLE; > > inter_favor = 128 - ctx->vp8_enc.prob_intra; > if (inter_favor >= 0) > -- > 2.25.1 > >
Hi, Thanks for looking at it. W dniu 17.11.2023 o 07:11, Chen-Yu Tsai pisze: > On Thu, Nov 16, 2023 at 11:48 PM Andrzej Pietrasiewicz > <andrzej.p@collabora.com> wrote: >> >> For VP8 BIT(18) of this register is for enabling the boolean encoder. > > Yes, but for H.264 it selects the entropy coding mode, 0 for CAVLC > and 1 for CABAC. You even add it back in the last patch. I'd do it > here, so you disambiguate the definition within one patch. > The rationale behind doing what I did is this: At this moment the H1 H.264 encoder is non-existent in the kernel, so why would we keep H.264-related definitions? I re-introduce it when the encoder appears. That said, other H.264-specific constants do exist at this moment anyway. So I'm fine with either approach. Andrzej > ChenYu > > >> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> >> --- >> drivers/media/platform/verisilicon/hantro_h1_regs.h | 2 +- >> drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/media/platform/verisilicon/hantro_h1_regs.h b/drivers/media/platform/verisilicon/hantro_h1_regs.h >> index 7752d1291c0e..c1c66c934a24 100644 >> --- a/drivers/media/platform/verisilicon/hantro_h1_regs.h >> +++ b/drivers/media/platform/verisilicon/hantro_h1_regs.h >> @@ -70,7 +70,7 @@ >> #define H1_REG_ENC_CTRL2_DISABLE_QUARTER_PIXMV BIT(22) >> #define H1_REG_ENC_CTRL2_TRANS8X8_MODE_EN BIT(21) >> #define H1_REG_ENC_CTRL2_CABAC_INIT_IDC(x) ((x) << 19) >> -#define H1_REG_ENC_CTRL2_ENTROPY_CODING_MODE BIT(18) >> +#define H1_REG_ENC_CTRL2_VP8_BOOLENC_ENABLE BIT(18) >> #define H1_REG_ENC_CTRL2_H264_INTER4X4_MODE BIT(17) >> #define H1_REG_ENC_CTRL2_H264_STREAM_MODE BIT(16) >> #define H1_REG_ENC_CTRL2_INTRA16X16_MODE(x) ((x)) >> diff --git a/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c b/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c >> index 05aa0dd9c09c..08c5079fbfd0 100644 >> --- a/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c >> +++ b/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c >> @@ -1226,7 +1226,7 @@ static void hantro_h1_vp8_enc_set_params(struct hantro_dev *vpu, struct hantro_c >> reg = 0; >> if (mb_width * mb_height > MAX_MB_COUNT_TO_DISABLE_QUARTER_PIXEL_MV) >> reg = H1_REG_ENC_CTRL2_DISABLE_QUARTER_PIXMV; >> - reg |= H1_REG_ENC_CTRL2_ENTROPY_CODING_MODE; >> + reg |= H1_REG_ENC_CTRL2_VP8_BOOLENC_ENABLE; >> >> inter_favor = 128 - ctx->vp8_enc.prob_intra; >> if (inter_favor >= 0) >> -- >> 2.25.1 >> >> > _______________________________________________ > Kernel mailing list -- kernel@mailman.collabora.com > To unsubscribe send an email to kernel-leave@mailman.collabora.com
diff --git a/drivers/media/platform/verisilicon/hantro_h1_regs.h b/drivers/media/platform/verisilicon/hantro_h1_regs.h index 7752d1291c0e..c1c66c934a24 100644 --- a/drivers/media/platform/verisilicon/hantro_h1_regs.h +++ b/drivers/media/platform/verisilicon/hantro_h1_regs.h @@ -70,7 +70,7 @@ #define H1_REG_ENC_CTRL2_DISABLE_QUARTER_PIXMV BIT(22) #define H1_REG_ENC_CTRL2_TRANS8X8_MODE_EN BIT(21) #define H1_REG_ENC_CTRL2_CABAC_INIT_IDC(x) ((x) << 19) -#define H1_REG_ENC_CTRL2_ENTROPY_CODING_MODE BIT(18) +#define H1_REG_ENC_CTRL2_VP8_BOOLENC_ENABLE BIT(18) #define H1_REG_ENC_CTRL2_H264_INTER4X4_MODE BIT(17) #define H1_REG_ENC_CTRL2_H264_STREAM_MODE BIT(16) #define H1_REG_ENC_CTRL2_INTRA16X16_MODE(x) ((x)) diff --git a/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c b/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c index 05aa0dd9c09c..08c5079fbfd0 100644 --- a/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c +++ b/drivers/media/platform/verisilicon/hantro_h1_vp8_enc.c @@ -1226,7 +1226,7 @@ static void hantro_h1_vp8_enc_set_params(struct hantro_dev *vpu, struct hantro_c reg = 0; if (mb_width * mb_height > MAX_MB_COUNT_TO_DISABLE_QUARTER_PIXEL_MV) reg = H1_REG_ENC_CTRL2_DISABLE_QUARTER_PIXMV; - reg |= H1_REG_ENC_CTRL2_ENTROPY_CODING_MODE; + reg |= H1_REG_ENC_CTRL2_VP8_BOOLENC_ENABLE; inter_favor = 128 - ctx->vp8_enc.prob_intra; if (inter_favor >= 0)