From: smitha.t@samsung.com (Smitha T Murthy)
To: linux-arm-kernel@lists.infradead.org
Subject: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs
Date: Mon, 29 Jan 2018 18:43:37 +0530 [thread overview]
Message-ID: <1517231617.29374.12.camel@smitha-fedora> (raw)
In-Reply-To: <f1ea8bcc-30b9-06b5-b815-e76fecc22a8a@xs4all.nl>
On Mon, 2018-01-29 at 14:27 +0100, Hans Verkuil wrote:
> On 01/29/2018 01:42 PM, Smitha T Murthy wrote:
> > On Wed, 2018-01-24 at 15:16 +0100, Hans Verkuil wrote:
> >> On 24/01/18 11:59, Smitha T Murthy wrote:
> >>> Added V4l2 controls for HEVC encoder
> >>>
> >>> Signed-off-by: Smitha T Murthy <smitha.t@samsung.com>
> >>> ---
> >>> Documentation/media/uapi/v4l/extended-controls.rst | 400 +++++++++++++++++++++
> >>> 1 file changed, 400 insertions(+)
> >>>
> >>> diff --git a/Documentation/media/uapi/v4l/extended-controls.rst b/Documentation/media/uapi/v4l/extended-controls.rst
> >>> index dfe49ae..46ee2bf 100644
> >>> --- a/Documentation/media/uapi/v4l/extended-controls.rst
> >>> +++ b/Documentation/media/uapi/v4l/extended-controls.rst
> >>> @@ -1960,6 +1960,406 @@ enum v4l2_vp8_golden_frame_sel -
> >>> 1, 2 and 3 corresponding to encoder profiles 0, 1, 2 and 3.
> >>>
> >>>
> >>> +High Efficiency Video Coding (HEVC/H.265) Control Reference
> >>> +-----------------------------------------------------------
> >>> +
> >>> +The HEVC/H.265 controls include controls for encoding parameters of HEVC/H.265
> >>> +video codec.
> >>> +
> >>> +
> >>> +.. _hevc-control-id:
> >>> +
> >>> +HEVC/H.265 Control IDs
> >>> +^^^^^^^^^^^^^^^^^^^^^^
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (integer)``
> >>> + Minimum quantization parameter for HEVC.
> >>> + Valid range: from 0 to 51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (integer)``
> >>> + Maximum quantization parameter for HEVC.
> >>> + Valid range: from 0 to 51.
> >>
> >> You probably should mention the default values for MIN_QP and MAX_QP
> >> (I assume those are 0 and 51 and are not driver specific).
> >>
> > Yes these values are not driver specific.
> > I followed the way MAX_QP and MIN_QP are defined for other codecs like
> > H264, H263, MPEG4 where only valid range is mentioned.
> >
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (integer)``
> >>> + Quantization parameter for an I frame for HEVC.
> >>> + Valid range: from 0 to 51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (integer)``
> >>> + Quantization parameter for a P frame for HEVC.
> >>> + Valid range: from 0 to 51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (integer)``
> >>> + Quantization parameter for a B frame for HEVC.
> >>> + Valid range: from 0 to 51.
> >>
> >> Sorry, this still isn't clear to me.
> >>
> >> If I set V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP to 50, can I then still set
> >> V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP to 51? Or is 50 then the maximum?
> >>
> >> In other words, what is the relationship between these three controls
> >> and the MIN_QP/MAX_QP controls.
> >>
> > If we set V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP as 50 then
> > V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP or
> > 4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP or
> > V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP will have maximum as 50.
> > Similarly for minimum as well, the above three controls will adhere to
> > the V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP set.
> > These controls have similar in relation as seen with
> > V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP and V4L2_CID_MPEG_VIDEO_H264_MAX_QP
> >
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (boolean)``
> >>> + HIERARCHICAL_QP allows the host to specify the quantization parameter
> >>> + values for each temporal layer through HIERARCHICAL_QP_LAYER. This is
> >>> + valid only if HIERARCHICAL_CODING_LAYER is greater than 1. Setting the
> >>> + control value to 1 enables setting of the QP values for the layers.
> >>> +
> >>> +.. _v4l2-hevc-hier-coding-type:
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE``
> >>> + (enum)
> >>> +
> >>> +enum v4l2_mpeg_video_hevc_hier_coding_type -
> >>> + Selects the hierarchical coding type for encoding. Possible values are:
> >>> +
> >>> +.. raw:: latex
> >>> +
> >>> + \begin{adjustbox}{width=\columnwidth}
> >>> +
> >>> +.. tabularcolumns:: |p{11.0cm}|p{10.0cm}|
> >>> +
> >>> +.. flat-table::
> >>> + :header-rows: 0
> >>> + :stub-columns: 0
> >>> +
> >>> + * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B``
> >>> + - Use the B frame for hierarchical coding.
> >>> + * - ``V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P``
> >>> + - Use the P frame for hierarchical coding.
> >>> +
> >>> +.. raw:: latex
> >>> +
> >>> + \end{adjustbox}
> >>> +
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (integer)``
> >>> + Selects the hierarchical coding layer. In normal encoding
> >>> + (non-hierarchial coding), it should be zero. Possible values are [0, 6].
> >>> + 0 indicates HIERARCHICAL CODING LAYER 0, 1 indicates HIERARCHICAL CODING
> >>> + LAYER 1 and so on.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (integer)``
> >>> + Indicates quantization parameter for hierarchical coding layer 0.
> >>> + For HEVC it can have a value of 0-51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (integer)``
> >>> + Indicates quantization parameter for hierarchical coding layer 1.
> >>> + For HEVC it can have a value of 0-51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (integer)``
> >>> + Indicates quantization parameter for hierarchical coding layer 2.
> >>> + For HEVC it can have a value of 0-51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (integer)``
> >>> + Indicates quantization parameter for hierarchical coding layer 3.
> >>> + For HEVC it can have a value of 0-51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (integer)``
> >>> + Indicates quantization parameter for hierarchical coding layer 4.
> >>> + For HEVC it can have a value of 0-51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (integer)``
> >>> + Indicates quantization parameter for hierarchical coding layer 5.
> >>> + For HEVC it can have a value of 0-51.
> >>> +
> >>> +``V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (integer)``
> >>> + Indicates quantization parameter for hierarchical coding layer 6.
> >>> + For HEVC it can have a value of 0-51.
> >>
> >> Same here: how does MIN_QP/MAX_QP influence these controls, if at all.
> >>
> >> Regards,
> >>
> >> Hans
> >>
> >>
> > The values set in V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP and
> > V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP will give the limits for the L0-L6 QP
> > values that can be set.
>
> OK. If you can clarify this in the documentation, then I can Ack this.
>
> Note: if userspace changes MIN_QP or MAX_QP, then the driver should call
> v4l2_ctrl_modify_range() to update the ranges of the controls that are
> impacted by QP range changes. I'm not sure if that's done at the moment.
>
> Regards,
>
> Hans
>
>
next prev parent reply other threads:[~2018-01-29 13:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180124112324epcas2p246e0983b55ae9d6923b537cb34d7346f@epcas2p2.samsung.com>
2018-01-24 10:59 ` [Patch v7 00/12] Add MFC v10.10 support Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 01/12] [media] s5p-mfc: Rename IS_MFCV8 macro Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 02/12] [media] s5p-mfc: Adding initial support for MFC v10.10 Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 03/12] [media] s5p-mfc: Use min scratch buffer size as provided by F/W Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 04/12] [media] s5p-mfc: Support MFCv10.10 buffer requirements Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 05/12] [media] videodev2.h: Add v4l2 definition for HEVC Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 06/12] [media] v4l2-ioctl: add HEVC format description Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 07/12] Documentation: v4l: Documentation for HEVC v4l2 definition Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 08/12] [media] s5p-mfc: Add support for HEVC decoder Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 09/12] [media] s5p-mfc: Add VP9 decoder support Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 10/12] [media] v4l2: Add v4l2 control IDs for HEVC encoder Smitha T Murthy
2018-01-24 14:06 ` Hans Verkuil
2018-01-24 10:59 ` [Patch v7 11/12] [media] s5p-mfc: Add support " Smitha T Murthy
2018-01-24 10:59 ` [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs Smitha T Murthy
2018-01-24 14:16 ` Hans Verkuil
2018-01-29 12:42 ` Smitha T Murthy
2018-01-29 13:27 ` Hans Verkuil
2018-01-29 13:13 ` Smitha T Murthy [this message]
2018-01-29 13:15 ` Smitha T Murthy
2018-01-29 13:39 ` Hans Verkuil
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=1517231617.29374.12.camel@smitha-fedora \
--to=smitha.t@samsung.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).