Message ID | 20220926093501.26466-1-irui.wang@mediatek.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Hans Verkuil |
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1ockWJ-00DIiP-2D; Mon, 26 Sep 2022 09:35:25 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234158AbiIZJfU (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Mon, 26 Sep 2022 05:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234112AbiIZJfT (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 26 Sep 2022 05:35:19 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C7AC165A7; Mon, 26 Sep 2022 02:35:11 -0700 (PDT) X-UUID: 052695737cbd4371aa3e9cb94c2c7ed1-20220926 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=H+SYdkbHp/cDLX4mENwizZnmtVaNtoheJG/XM3EMbdA=; b=MOoMGwleQLlgYV4UGVrO8NZaZbcRQOamSRomDJeKJOvN6kqZccP/f6/ZAyNwwjDkvVrcnjqaWBEpoYEAtgcXYKoCkrr1hIz281LVfEGXGadaxAJuetrdtQZPcaqjXkMn3dIN/g+oVAVhp8jes65kd7/JWTQ2r8uFaDTkfpnUHsw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:72ed0038-030a-4d2a-8755-5903b5bcad91,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:39a5ff1,CLOUDID:eba60807-1cee-4c38-b21b-a45f9682fdc0,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 052695737cbd4371aa3e9cb94c2c7ed1-20220926 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from <irui.wang@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 975954962; Mon, 26 Sep 2022 17:35:06 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Mon, 26 Sep 2022 17:35:04 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Mon, 26 Sep 2022 17:35:03 +0800 From: Irui Wang <irui.wang@mediatek.com> To: Hans Verkuil <hverkuil-cisco@xs4all.nl>, Alexandre Courbot <acourbot@chromium.org>, Tiffany Lin <tiffany.lin@mediatek.com>, "Mauro Carvalho Chehab" <mchehab@kernel.org>, Rob Herring <robh+dt@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, Hsin-Yi Wang <hsinyi@chromium.org>, <angelogioacchino.delregno@collabora.com>, <nicolas.dufresne@collabora.com> CC: Maoguang Meng <maoguang.meng@mediatek.com>, Longfei Wang <longfei.wang@mediatek.com>, Yunfei Dong <yunfei.dong@mediatek.com>, "Irui Wang" <irui.wang@mediatek.com>, <linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com> Subject: [PATCH] media: mediatek: vcodec: Skip unsupported h264 encoder profile Date: Mon, 26 Sep 2022 17:35:01 +0800 Message-ID: <20220926093501.26466-1-irui.wang@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_SPF_TEMPERROR, UNPARSEABLE_RELAY,URIBL_CSS autolearn=no 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-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.4 (--) X-LSpam-Report: No, score=-2.4 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,UNPARSEABLE_RELAY=0.001,URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no |
Series |
media: mediatek: vcodec: Skip unsupported h264 encoder profile
|
|
Commit Message
Irui Wang
Sept. 26, 2022, 9:35 a.m. UTC
The encoder driver support h264 baseline, main, high encoder
profile, set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip
the unsupported profile.
get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L
h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4
0: Baseline
2: Main
4: High
Signed-off-by: Irui Wang <irui.wang@mediatek.com>
---
drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Comments
Hi Irui, Tested-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> Tested for CTS cases on the mt8186 corsola board. Thanks, Allen On Mon, 2022-09-26 at 17:35 +0800, Irui Wang wrote: > The encoder driver support h264 baseline, main, high encoder > profile, set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip > the unsupported profile. > > get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L > h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 > 0: Baseline > 2: Main > 4: High > > Signed-off-by: Irui Wang <irui.wang@mediatek.com> > --- > drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > index d810a78dde51..d65800a3b89d 100644 > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > @@ -1397,7 +1397,10 @@ int mtk_vcodec_enc_ctrls_setup(struct > mtk_vcodec_ctx *ctx) > 0, V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE); > v4l2_ctrl_new_std_menu(handler, ops, > V4L2_CID_MPEG_VIDEO_H264_PROFILE, > V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, > - 0, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > + ~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) > | > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)), > + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > v4l2_ctrl_new_std_menu(handler, ops, > V4L2_CID_MPEG_VIDEO_H264_LEVEL, > h264_max_level, > 0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0);
Hi Irui, Reviewed-by: Yunfei Dong <yunfei.dong@mediatek.com> Thanks Yunfei Dong On Wed, 2022-09-28 at 21:38 +0800, Allen-KH Cheng (程冠勳) wrote: > Hi Irui, > > Tested-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com> > > Tested for CTS cases on the mt8186 corsola board. > > Thanks, > Allen > > On Mon, 2022-09-26 at 17:35 +0800, Irui Wang wrote: > > The encoder driver support h264 baseline, main, high encoder > > profile, set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip > > the unsupported profile. > > > > get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L > > h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 > > 0: Baseline > > 2: Main > > 4: High > > > > Signed-off-by: Irui Wang <irui.wang@mediatek.com> > > --- > > drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git > > a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > > index d810a78dde51..d65800a3b89d 100644 > > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > > @@ -1397,7 +1397,10 @@ int mtk_vcodec_enc_ctrls_setup(struct > > mtk_vcodec_ctx *ctx) > > 0, V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE); > > v4l2_ctrl_new_std_menu(handler, ops, > > V4L2_CID_MPEG_VIDEO_H264_PROFILE, > > V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, > > - 0, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > > + ~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) > > > > > > > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | > > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)), > > + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > > v4l2_ctrl_new_std_menu(handler, ops, > > V4L2_CID_MPEG_VIDEO_H264_LEVEL, > > h264_max_level, > > 0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0);
Il 26/09/22 11:35, Irui Wang ha scritto: > The encoder driver support h264 baseline, main, high encoder > profile, set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip > the unsupported profile. > > get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L > h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 > 0: Baseline > 2: Main > 4: High > > Signed-off-by: Irui Wang <irui.wang@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Dear Hans, Gently ping for this patch, could you help to review this patch? Thanks Best Regards On Mon, 2022-09-26 at 17:35 +0800, Irui Wang wrote: > The encoder driver support h264 baseline, main, high encoder > profile, set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip > the unsupported profile. > > get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L > h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 > 0: Baseline > 2: Main > 4: High > > Signed-off-by: Irui Wang <irui.wang@mediatek.com> > --- > drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > index d810a78dde51..d65800a3b89d 100644 > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > @@ -1397,7 +1397,10 @@ int mtk_vcodec_enc_ctrls_setup(struct > mtk_vcodec_ctx *ctx) > 0, V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE); > v4l2_ctrl_new_std_menu(handler, ops, > V4L2_CID_MPEG_VIDEO_H264_PROFILE, > V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, > - 0, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > + ~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) > | > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)), > + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > v4l2_ctrl_new_std_menu(handler, ops, > V4L2_CID_MPEG_VIDEO_H264_LEVEL, > h264_max_level, > 0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0);
Dear Hans, Gently ping for this patch. May I know this patch current status? It seems is under your reviewing state? Thanks Best Regards On Mon, 2022-09-26 at 17:35 +0800, Irui Wang wrote: > The encoder driver support h264 baseline, main, high encoder > profile, set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip > the unsupported profile. > > get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L > h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 > 0: Baseline > 2: Main > 4: High > > Signed-off-by: Irui Wang <irui.wang@mediatek.com> > --- > drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > index d810a78dde51..d65800a3b89d 100644 > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > @@ -1397,7 +1397,10 @@ int mtk_vcodec_enc_ctrls_setup(struct > mtk_vcodec_ctx *ctx) > 0, V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE); > v4l2_ctrl_new_std_menu(handler, ops, > V4L2_CID_MPEG_VIDEO_H264_PROFILE, > V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, > - 0, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > + ~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) > | > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)), > + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > v4l2_ctrl_new_std_menu(handler, ops, > V4L2_CID_MPEG_VIDEO_H264_LEVEL, > h264_max_level, > 0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0);
Hi Irui, On 11/15/22 12:40, Irui Wang (王瑞) wrote: > Dear Hans, > > Gently ping for this patch. > May I know this patch current status? It seems is under your reviewing > state? Mauro was on vacation last week, but he said that he hopes to merge the pending PRs tomorrow. Fingers crossed... Regards, Hans > > Thanks > Best Regards > > On Mon, 2022-09-26 at 17:35 +0800, Irui Wang wrote: >> The encoder driver support h264 baseline, main, high encoder >> profile, set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip >> the unsupported profile. >> >> get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L >> h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 >> 0: Baseline >> 2: Main >> 4: High >> >> Signed-off-by: Irui Wang <irui.wang@mediatek.com> >> --- >> drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c >> b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c >> index d810a78dde51..d65800a3b89d 100644 >> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c >> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c >> @@ -1397,7 +1397,10 @@ int mtk_vcodec_enc_ctrls_setup(struct >> mtk_vcodec_ctx *ctx) >> 0, V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE); >> v4l2_ctrl_new_std_menu(handler, ops, >> V4L2_CID_MPEG_VIDEO_H264_PROFILE, >> V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, >> -0, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); >> +~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) >> | >> + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | >> + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)), >> +V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); >> v4l2_ctrl_new_std_menu(handler, ops, >> V4L2_CID_MPEG_VIDEO_H264_LEVEL, >> h264_max_level, >> 0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0); > > ************* MEDIATEK Confidentiality Notice > ******************** > The information contained in this e-mail message (including any > attachments) may be confidential, proprietary, privileged, or otherwise > exempt from disclosure under applicable laws. It is intended to be > conveyed only to the designated recipient(s). Any use, dissemination, > distribution, printing, retaining or copying of this e-mail (including its > attachments) by unintended recipient(s) is strictly prohibited and may > be unlawful. If you are not an intended recipient of this e-mail, or believe > > that you have received this e-mail in error, please notify the sender > immediately (by replying to this e-mail), delete any and all copies of > this e-mail (including any attachments) from your system, and do not > disclose the content of this e-mail to any other person. Thank you!
Dear Hans, Got it, thank you very much. Best Regards On Tue, 2022-11-15 at 12:49 +0100, Hans Verkuil wrote: > Hi Irui, > > On 11/15/22 12:40, Irui Wang (王瑞) wrote: > > Dear Hans, > > > > Gently ping for this patch. > > May I know this patch current status? It seems is under your > > reviewing > > state? > > Mauro was on vacation last week, but he said that he hopes to merge > the pending PRs tomorrow. Fingers crossed... > > Regards, > > Hans > > > > > Thanks > > Best Regards > > > > On Mon, 2022-09-26 at 17:35 +0800, Irui Wang wrote: > > > The encoder driver support h264 baseline, main, high encoder > > > profile, set mask for V4L2_CID_MPEG_VIDEO_H264_PROFILE to skip > > > the unsupported profile. > > > > > > get supported h264_profile by command: v4l2-ctl -d /dev/videoX -L > > > h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4 > > > 0: Baseline > > > 2: Main > > > 4: High > > > > > > Signed-off-by: Irui Wang <irui.wang@mediatek.com> > > > --- > > > drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 5 > > > ++++- > > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > > > diff --git > > > a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > > > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > > > index d810a78dde51..d65800a3b89d 100644 > > > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > > > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c > > > @@ -1397,7 +1397,10 @@ int mtk_vcodec_enc_ctrls_setup(struct > > > mtk_vcodec_ctx *ctx) > > > 0, V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE); > > > v4l2_ctrl_new_std_menu(handler, ops, > > > V4L2_CID_MPEG_VIDEO_H264_PROFILE, > > > V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, > > > -0, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > > > +~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) > > > > > > > > > > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | > > > + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)), > > > +V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); > > > v4l2_ctrl_new_std_menu(handler, ops, > > > V4L2_CID_MPEG_VIDEO_H264_LEVEL, > > > h264_max_level, > > > 0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0); > > > > ************* MEDIATEK Confidentiality Notice > > ******************** > > The information contained in this e-mail message (including any > > attachments) may be confidential, proprietary, privileged, or > > otherwise > > exempt from disclosure under applicable laws. It is intended to be > > conveyed only to the designated recipient(s). Any use, > > dissemination, > > distribution, printing, retaining or copying of this e-mail > > (including its > > attachments) by unintended recipient(s) is strictly prohibited and > > may > > be unlawful. If you are not an intended recipient of this e-mail, > > or believe > > > > that you have received this e-mail in error, please notify the > > sender > > immediately (by replying to this e-mail), delete any and all copies > > of > > this e-mail (including any attachments) from your system, and do > > not > > disclose the content of this e-mail to any other person. Thank you! > >
diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c index d810a78dde51..d65800a3b89d 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c @@ -1397,7 +1397,10 @@ int mtk_vcodec_enc_ctrls_setup(struct mtk_vcodec_ctx *ctx) 0, V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE); v4l2_ctrl_new_std_menu(handler, ops, V4L2_CID_MPEG_VIDEO_H264_PROFILE, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH, - 0, V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); + ~((1 << V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE) | + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_MAIN) | + (1 << V4L2_MPEG_VIDEO_H264_PROFILE_HIGH)), + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH); v4l2_ctrl_new_std_menu(handler, ops, V4L2_CID_MPEG_VIDEO_H264_LEVEL, h264_max_level, 0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0);