[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1621823958.25430.4.camel@mhfsdcap03>
Date: Mon, 24 May 2021 10:39:18 +0800
From: Irui Wang <irui.wang@...iatek.com>
To: Tzung-Bi Shih <tzungbi@...gle.com>
CC: Alexandre Courbot <acourbot@...omium.org>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Tiffany Lin <tiffany.lin@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Tomasz Figa <tfiga@...gle.com>,
Hsin-Yi Wang <hsinyi@...omium.org>,
Maoguang Meng <maoguang.meng@...iatek.com>,
"Longfei Wang" <longfei.wang@...iatek.com>,
Yong Wu <yong.wu@...iatek.com>,
"Yunfei Dong" <yunfei.dong@...iatek.com>,
Fritz Koenig <frkoenig@...omium.org>,
Tzung-Bi Shih <tzungbi@...omium.org>,
<linux-media@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@...ts.infradead.org>,
<srv_heupstream@...iatek.com>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>,
<Project_Global_Chrome_Upstream_Group@...iatek.com>
Subject: Re: [PATCH v4,6/6] media: mtk-vcodec: Support MT8192 H264 4K
encoding
On Fri, 2021-05-21 at 16:06 +0800, Tzung-Bi Shih wrote:
> On Fri, May 21, 2021 at 3:02 PM Irui Wang <irui.wang@...iatek.com> wrote:
> > fsize->type = V4L2_FRMSIZE_TYPE_STEPWISE;
> > - fsize->stepwise = mtk_venc_framesizes;
> > + fsize->stepwise =
> > + (ctx->dev->enc_capability & MTK_VENC_4K_CAPABILITY_ENABLE) ?
> > + mtk_venc_4k_framesizes : mtk_venc_hd_framesizes;
>
> Use a normal if .. else .. is more readable.
if (ctx->dev->enc_capability & MTK_VENC_4K_CAPABILITY_ENABLE)
fsize->stepwise = mtk_venc_4k_framesizes;
else
fsize->stepwise = mtk_venc_hd_framesizes;
>
> > @@ -1210,6 +1231,9 @@ int mtk_vcodec_enc_ctrls_setup(struct mtk_vcodec_ctx *ctx)
> > {
> > const struct v4l2_ctrl_ops *ops = &mtk_vcodec_enc_ctrl_ops;
> > struct v4l2_ctrl_handler *handler = &ctx->ctrl_hdl;
> > + const u8 h264_max_level =
> > + (ctx->dev->enc_capability & MTK_VENC_4K_CAPABILITY_ENABLE) ?
> > + V4L2_MPEG_VIDEO_H264_LEVEL_5_1 : V4L2_MPEG_VIDEO_H264_LEVEL_4_2;
> Again, I would like it to be a normal if .. else ..
u8 h264_max_level;
if (ctx->dev->enc_capability & MTK_VENC_4K_CAPABILITY_ENABLE)
h264_max_level = V4L2_MPEG_VIDEO_H264_LEVEL_5_1;
else
h264_max_level = V4L2_MPEG_VIDEO_H264_LEVEL_4_2;
Patch V5 will be sent with these if there is no more comments.
Powered by blists - more mailing lists