[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2d41ab4daef0e9a188e6416d0dc4a5abe20bb195.camel@collabora.com>
Date: Thu, 25 Jun 2020 10:55:50 -0400
From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Ezequiel Garcia <ezequiel@...labora.com>,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Tomasz Figa <tfiga@...omium.org>, kernel@...labora.com,
Jonas Karlman <jonas@...boo.se>,
Hans Verkuil <hverkuil@...all.nl>,
Alexandre Courbot <acourbot@...omium.org>,
Jeffrey Kardatzke <jkardatzke@...omium.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Maxime Ripard <mripard@...nel.org>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Subject: Re: [RFC 5/7] media: uapi: h264: pad v4l2_ctrl_h264_pps to 64-bit
Le mardi 23 juin 2020 à 15:28 -0300, Ezequiel Garcia a écrit :
> The struct does not contain 64-bit types, and therefore
> doesn't suffer from compatibility issues.
>
> However, having it aligned to 64-bits is cleaner and
> has the advantage of allowing future extensions.
This one seems a bit random too, it's a final/fixed bitstream syntax.
I'm not certain this is really needed.
>
> Signed-off-by: Ezequiel Garcia <ezequiel@...labora.com>
> ---
> Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 3 +++
> drivers/media/v4l2-core/v4l2-ctrls.c | 5 +++++
> include/media/h264-ctrls.h | 1 +
> 3 files changed, 9 insertions(+)
>
> diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> index e3b5a28fb965..2c682f81aaad 100644
> --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
> @@ -1662,6 +1662,9 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
> * - __u16
> - ``flags``
> - See :ref:`Picture Parameter Set Flags <h264_pps_flags>`
> + * - __u32
> + - ``reserved``
> + - Applications and drivers must set this to zero.
>
> .. _h264_pps_flags:
>
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
> index a751c14f9c22..003333b6c7f7 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> @@ -1735,6 +1735,7 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx,
> struct v4l2_ctrl_vp8_frame_header *p_vp8_frame_header;
> struct v4l2_ctrl_h264_slice_params *p_h264_slice_params;
> struct v4l2_ctrl_h264_decode_params *p_h264_dec_params;
> + struct v4l2_ctrl_h264_pps *p_h264_pps;
> struct v4l2_ctrl_hevc_sps *p_hevc_sps;
> struct v4l2_ctrl_hevc_pps *p_hevc_pps;
> struct v4l2_ctrl_hevc_slice_params *p_hevc_slice_params;
> @@ -1792,7 +1793,11 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx,
> break;
>
> case V4L2_CTRL_TYPE_H264_SPS:
> + break;
> case V4L2_CTRL_TYPE_H264_PPS:
> + p_h264_pps = p;
> + zero_reserved(*p_h264_pps);
> + break;
> case V4L2_CTRL_TYPE_H264_SCALING_MATRIX:
> break;
> case V4L2_CTRL_TYPE_H264_SLICE_PARAMS:
> diff --git a/include/media/h264-ctrls.h b/include/media/h264-ctrls.h
> index a938d16b901c..4119dc4486f3 100644
> --- a/include/media/h264-ctrls.h
> +++ b/include/media/h264-ctrls.h
> @@ -111,6 +111,7 @@ struct v4l2_ctrl_h264_pps {
> __s8 chroma_qp_index_offset;
> __s8 second_chroma_qp_index_offset;
> __u16 flags;
> + __u32 reserved;
> };
>
> struct v4l2_ctrl_h264_scaling_matrix {
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists