From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
linux-media@vger.kernel.org
Cc: kernel@collabora.com, acourbot@chromium.org,
andrew-ct.chen@mediatek.com, courbot@chromium.org,
dafna3@gmail.com, eizan@chromium.org, houlong.wei@mediatek.com,
hsinyi@chromium.org, hverkuil@xs4all.nl, irui.wang@mediatek.com,
linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
maoguang.meng@mediatek.com, matthias.bgg@gmail.com,
mchehab@kernel.org, minghsiu.tsai@mediatek.com,
tfiga@chromium.org, tiffany.lin@mediatek.com
Subject: Re: [PATCH 1/3] media: mtk-vcodec: enc: add vp8 profile ctrl
Date: Thu, 28 Oct 2021 10:18:08 -0400 [thread overview]
Message-ID: <34a3f0e40c5248472d072d2a06cc4370e08ea9ff.camel@ndufresne.ca> (raw)
In-Reply-To: <20211022150410.29335-2-dafna.hirschfeld@collabora.com>
Le vendredi 22 octobre 2021 à 17:04 +0200, Dafna Hirschfeld a écrit :
> In order for the encoder to work with gstreamer
> it needs to have the V4L2_CID_MPEG_VIDEO_VP8_PROFILE
> ctrl. This patch adds that ctrl with only profile 0
> supported.
>
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
I confirm starting from GStreamer 1.18 profile (and level for other codecs) are
needed. This is to allow proper fallback to other decoders (including software)
when the HW is not capable.
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
> ---
> drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> index 8998244ea671..87a5114bf680 100644
> --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c
> @@ -103,6 +103,13 @@ static int vidioc_venc_s_ctrl(struct v4l2_ctrl *ctrl)
> p->gop_size = ctrl->val;
> ctx->param_change |= MTK_ENCODE_PARAM_GOP_SIZE;
> break;
> + case V4L2_CID_MPEG_VIDEO_VP8_PROFILE:
> + /*
> + * FIXME - what vp8 profiles are actually supported?
> + * The ctrl is added (with only profile 0 supported) for now.
> + */
> + mtk_v4l2_debug(2, "V4L2_CID_MPEG_VIDEO_VP8_PROFILE val = %d", ctrl->val);
> + break;
> case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME:
> mtk_v4l2_debug(2, "V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME");
> p->force_intra = 1;
> @@ -1394,6 +1401,9 @@ int mtk_vcodec_enc_ctrls_setup(struct mtk_vcodec_ctx *ctx)
> v4l2_ctrl_new_std_menu(handler, ops, V4L2_CID_MPEG_VIDEO_H264_LEVEL,
> h264_max_level,
> 0, V4L2_MPEG_VIDEO_H264_LEVEL_4_0);
> + v4l2_ctrl_new_std_menu(handler, ops, V4L2_CID_MPEG_VIDEO_VP8_PROFILE,
> + V4L2_MPEG_VIDEO_VP8_PROFILE_0, 0, V4L2_MPEG_VIDEO_VP8_PROFILE_0);
> +
>
> if (handler->error) {
> mtk_v4l2_err("Init control handler fail %d",
next prev parent reply other threads:[~2021-10-28 14:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 15:04 [PATCH 0/3] media: mtk-vcodec: few fixes Dafna Hirschfeld
2021-10-22 15:04 ` [PATCH 1/3] media: mtk-vcodec: enc: add vp8 profile ctrl Dafna Hirschfeld
2021-10-28 14:18 ` Nicolas Dufresne [this message]
2021-10-22 15:04 ` [PATCH 2/3] media: mtk-vcodec: enc: use "stream_started" flag for "stop/start_streaming" Dafna Hirschfeld
2021-11-15 13:45 ` Hans Verkuil
2021-10-22 15:04 ` [PATCH 3/3] meida: mtk-vcodec: remove unused func parameter Dafna Hirschfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34a3f0e40c5248472d072d2a06cc4370e08ea9ff.camel@ndufresne.ca \
--to=nicolas@ndufresne.ca \
--cc=acourbot@chromium.org \
--cc=andrew-ct.chen@mediatek.com \
--cc=courbot@chromium.org \
--cc=dafna.hirschfeld@collabora.com \
--cc=dafna3@gmail.com \
--cc=eizan@chromium.org \
--cc=houlong.wei@mediatek.com \
--cc=hsinyi@chromium.org \
--cc=hverkuil@xs4all.nl \
--cc=irui.wang@mediatek.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=maoguang.meng@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=minghsiu.tsai@mediatek.com \
--cc=tfiga@chromium.org \
--cc=tiffany.lin@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®