From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
mchehab@kernel.org, hverkuil@xs4all.nl,
ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de,
gregkh@linuxfoundation.org, mripard@kernel.org,
paul.kocialkowski@bootlin.com, wens@csie.org,
jernej.skrabec@gmail.com, samuel@sholland.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-staging@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, sebastian.fricke@collabora.com
Subject: Re: [PATCH v5 09/17] media: uapi: HEVC: Define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS as a dynamic array
Date: Fri, 08 Apr 2022 14:53:20 -0400 [thread overview]
Message-ID: <3179e400d52704d11dd150bf4270dab4c1064cad.camel@collabora.com> (raw)
In-Reply-To: <20220407152940.738159-10-benjamin.gaignard@collabora.com>
Le jeudi 07 avril 2022 à 17:29 +0200, Benjamin Gaignard a écrit :
> Make explicit that V4L2_CID_STATELESS_HEVC_SLICE_PARAMS control is
> a dynamic array control type.
> Some drivers may be able to receive multiple slices in one control
> to improve decoding performance.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
> Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 2 ++
> include/media/hevc-ctrls.h | 3 +++
> 2 files changed, 5 insertions(+)
>
> diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> index 7fcc6c2bac4c..1aaf3b84b584 100644
> --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> @@ -2964,6 +2964,8 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
> These bitstream parameters are defined according to :ref:`hevc`.
> They are described in section 7.4.7 "General slice segment header
> semantics" of the specification.
> + This control is a dynamically sized 1-dimensional array,
> + V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.
>
> .. c:type:: v4l2_ctrl_hevc_slice_params
>
> diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
> index 96a9b71d1def..28049e1a8a07 100644
> --- a/include/media/hevc-ctrls.h
> +++ b/include/media/hevc-ctrls.h
> @@ -314,6 +314,9 @@ struct v4l2_hevc_pred_weight_table {
> /**
> * v4l2_ctrl_hevc_slice_params - HEVC slice parameters
> *
> + * This control is a dynamically sized 1-dimensional array,
> + * V4L2_CTRL_FLAG_DYNAMIC_ARRAY flag must be set when using it.
> + *
I'm not sure about this comment, but I'm sure you forgot:
--- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c
@@ -1505,6 +1505,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum
v4l2_ctrl_type *type,
break;
case V4L2_CID_STATELESS_HEVC_SLICE_PARAMS:
*type = V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS;
+ *flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
break;
case V4L2_CID_STATELESS_HEVC_SCALING_MATRIX:
*type = V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX;
Also, in AV1 we have V4L2_AV1_MAX_TILE_COUNT, which can be used in cfg.dims,
something the driver will actually set. We could have
#define V4L2_HEVC_MAX_TILE_COUNT 600
And drives can set:
.dims = { V4L2_HEVC_MAX_TILE_COUNT },
In the control config.
> * @bit_size: size (in bits) of the current slice data
> * @data_bit_offset: offset (in bits) to the video data in the current slice data
> * @nal_unit_type: specifies the coding type of the slice (B, P or I)
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2022-04-08 18:53 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 15:29 [PATCH v5 00/17] Move HEVC stateless controls out of staging Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 01/17] videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 02/17] v4l2-ctrls: add support for dynamically allocated arrays Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 03/17] vivid: add dynamic array test control Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 04/17] media: uapi: HEVC: Add missing fields in HEVC controls Benjamin Gaignard
2022-04-25 13:54 ` Sebastian Fricke
2022-04-25 16:16 ` Benjamin Gaignard
2022-04-26 7:52 ` Sebastian Fricke
2022-04-26 8:50 ` Benjamin Gaignard
2022-04-26 9:00 ` Sebastian Fricke
2022-04-07 15:29 ` [PATCH v5 05/17] media: uapi: HEVC: Rename HEVC stateless controls with STATELESS prefix Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 06/17] media: uapi: HEVC: Change pic_order_cnt definition in v4l2_hevc_dpb_entry Benjamin Gaignard
2022-04-07 20:51 ` Nicolas Dufresne
2022-04-07 21:08 ` Nicolas Dufresne
2022-04-08 7:10 ` Benjamin Gaignard
2022-04-08 16:33 ` Nicolas Dufresne
2022-04-14 8:02 ` Benjamin Gaignard
2022-04-25 15:16 ` Sebastian Fricke
2022-04-07 15:29 ` [PATCH v5 07/17] media: uapi: HEVC: Add SEI pic struct flags Benjamin Gaignard
2022-04-25 15:24 ` Sebastian Fricke
2022-04-07 15:29 ` [PATCH v5 08/17] media: uapi: HEVC: Add document uAPI structure Benjamin Gaignard
2022-04-25 15:54 ` Sebastian Fricke
2022-04-26 7:45 ` Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 09/17] media: uapi: HEVC: Define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS as a dynamic array Benjamin Gaignard
2022-04-08 18:53 ` Nicolas Dufresne [this message]
2022-04-14 9:06 ` Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 10/17] media: uapi: Move parsed HEVC pixel format out of staging Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 11/17] media: uapi: Add V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS control Benjamin Gaignard
2022-04-26 8:09 ` Sebastian Fricke
2022-04-07 15:29 ` [PATCH v5 12/17] media: uapi: Move the HEVC stateless control type out of staging Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 13/17] media: controls: Log HEVC stateless control in .std_log Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 14/17] media: uapi: Create a dedicated header for Hantro control Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 15/17] media: uapi: HEVC: fix padding in v4l2 control structures Benjamin Gaignard
2022-04-07 15:29 ` [PATCH v5 16/17] media: uapi: Change data_bit_offset definition Benjamin Gaignard
2022-04-26 8:15 ` Sebastian Fricke
2022-04-07 15:29 ` [PATCH v5 17/17] media: uapi: move HEVC stateless controls out of staging Benjamin Gaignard
2022-04-08 13:48 ` Sebastian Fricke
2022-04-08 13:48 ` [PATCH v5 17/17] media: uapi: move HEVC stateless controls out (FIXUP) " Sebastian Fricke
2022-04-14 9:22 ` Benjamin Gaignard
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=3179e400d52704d11dd150bf4270dab4c1064cad.camel@collabora.com \
--to=nicolas.dufresne@collabora.com \
--cc=benjamin.gaignard@collabora.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=gregkh@linuxfoundation.org \
--cc=hverkuil@xs4all.nl \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-sunxi@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=paul.kocialkowski@bootlin.com \
--cc=samuel@sholland.org \
--cc=sebastian.fricke@collabora.com \
--cc=wens@csie.org \
/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