From: Hugues Fruchet <hugues.fruchet@foss.st.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Philipp Zabel <p.zabel@pengutronix.de>,
Andrzej Pietrasiewicz <andrzej.p@collabora.com>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Benjamin Gaignard <benjamin.gaignard@collabora.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Daniel Almeida <daniel.almeida@collabora.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Heiko Stuebner <heiko@sntech.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@xs4all.nl>, <linux-media@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-stm32@st-md-mailman.stormreply.com>
Cc: Hugues Fruchet <hugues.fruchet@foss.st.com>,
Marco Felsch <m.felsch@pengutronix.de>,
Adam Ford <aford173@gmail.com>
Subject: [RFC v2 4/6] media: hantro: add VP8 encode support for STM32MP25 VENC
Date: Thu, 5 Oct 2023 15:37:08 +0200 [thread overview]
Message-ID: <20231005133710.3589080-5-hugues.fruchet@foss.st.com> (raw)
In-Reply-To: <20231005133710.3589080-1-hugues.fruchet@foss.st.com>
Add VP8 stateless support for STM32MP25 VENC video hardware encoder.
Signed-off-by: Hugues Fruchet <hugues.fruchet@foss.st.com>
---
.../platform/verisilicon/stm32mp25_venc_hw.c | 22 ++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/verisilicon/stm32mp25_venc_hw.c b/drivers/media/platform/verisilicon/stm32mp25_venc_hw.c
index 0aac33afcadc..2176eccd1f79 100644
--- a/drivers/media/platform/verisilicon/stm32mp25_venc_hw.c
+++ b/drivers/media/platform/verisilicon/stm32mp25_venc_hw.c
@@ -87,6 +87,19 @@ static const struct hantro_fmt stm32mp25_venc_fmts[] = {
.step_height = MB_DIM,
},
},
+ {
+ .fourcc = V4L2_PIX_FMT_VP8_FRAME,
+ .codec_mode = HANTRO_MODE_VP8_ENC,
+ .max_depth = 2,
+ .frmsize = {
+ .min_width = 96,
+ .max_width = 4080,
+ .step_width = MB_DIM,
+ .min_height = 96,
+ .max_height = 4080,
+ .step_height = MB_DIM,
+ },
+ },
};
static irqreturn_t stm32mp25_venc_irq(int irq, void *dev_id)
@@ -120,6 +133,13 @@ static const struct hantro_codec_ops stm32mp25_venc_codec_ops[] = {
.reset = stm32mp25_venc_reset,
.done = hantro_h1_jpeg_enc_done,
},
+ [HANTRO_MODE_VP8_ENC] = {
+ .run = hantro_h1_vp8_enc_run,
+ .reset = stm32mp25_venc_reset,
+ .init = hantro_vp8_enc_init,
+ .done = hantro_h1_vp8_enc_done,
+ .exit = hantro_vp8_enc_exit,
+ },
};
/*
@@ -137,7 +157,7 @@ static const char * const stm32mp25_venc_clk_names[] = {
const struct hantro_variant stm32mp25_venc_variant = {
.enc_fmts = stm32mp25_venc_fmts,
.num_enc_fmts = ARRAY_SIZE(stm32mp25_venc_fmts),
- .codec = HANTRO_JPEG_ENCODER,
+ .codec = HANTRO_JPEG_ENCODER | HANTRO_VP8_ENCODER,
.codec_ops = stm32mp25_venc_codec_ops,
.irqs = stm32mp25_venc_irqs,
.num_irqs = ARRAY_SIZE(stm32mp25_venc_irqs),
--
2.25.1
next prev parent reply other threads:[~2023-10-05 15:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-05 13:37 [RFC v2 0/6] VP8 H1 stateless encoding Hugues Fruchet
2023-10-05 13:37 ` [RFC v2 1/6] media: uapi: Add VP8 stateless encoder controls Hugues Fruchet
2023-10-05 13:37 ` [RFC v2 2/6] media: hantro: add VP8 encode support for Rockchip RK3399 VPU2 Hugues Fruchet
2023-10-05 13:37 ` [RFC v2 3/6] media: hantro: add h1 vp8 encode support Hugues Fruchet
2023-10-05 13:37 ` Hugues Fruchet [this message]
2023-10-05 13:37 ` [RFC v2 5/6] media: hantro: h1: NV12 single-plane support Hugues Fruchet
2023-10-05 13:37 ` [RFC v2 6/6] media: hantro: add NV12 single-plane support for STM32MP25 VENC Hugues Fruchet
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=20231005133710.3589080-5-hugues.fruchet@foss.st.com \
--to=hugues.fruchet@foss.st.com \
--cc=aford173@gmail.com \
--cc=andrzej.p@collabora.com \
--cc=benjamin.gaignard@collabora.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=daniel.almeida@collabora.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=heiko@sntech.de \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=m.felsch@pengutronix.de \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=p.zabel@pengutronix.de \
--cc=sakari.ailus@linux.intel.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;
as well as URLs for NNTP newsgroup(s).