linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Smitha T Murthy <smitha.t@samsung.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	kyungmin.park@samsung.com, kamil@wypas.org, jtp.park@samsung.com,
	a.hajda@samsung.com, mchehab@kernel.org,
	pankaj.dubey@samsung.com, krzk@kernel.org,
	m.szyprowski@samsung.com, s.nawrocki@samsung.com
Subject: Re: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs
Date: Mon, 29 Jan 2018 18:12:58 +0530	[thread overview]
Message-ID: <1517229778.29374.9.camel@smitha-fedora> (raw)
In-Reply-To: <127cfd7f-113f-6724-297c-6f3c3746a8ff@xs4all.nl>

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.

Regards,
Smitha

  reply	other threads:[~2018-01-29 13:07 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
     [not found]   ` <CGME20180124112327epcas2p361633d6729ddef97cef1388701024f5b@epcas2p3.samsung.com>
2018-01-24 10:59     ` [Patch v7 01/12] [media] s5p-mfc: Rename IS_MFCV8 macro Smitha T Murthy
     [not found]   ` <CGME20180124112330epcas1p3aae1b9cb2a301cc25e41356c3ce73dd3@epcas1p3.samsung.com>
2018-01-24 10:59     ` [Patch v7 02/12] [media] s5p-mfc: Adding initial support for MFC v10.10 Smitha T Murthy
     [not found]   ` <CGME20180124112332epcas2p1dbc1ec3e76a21193c6524e614a448092@epcas2p1.samsung.com>
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
     [not found]   ` <CGME20180124112335epcas1p3545e2c08141f593d6056b91c7a4ee92e@epcas1p3.samsung.com>
2018-01-24 10:59     ` [Patch v7 04/12] [media] s5p-mfc: Support MFCv10.10 buffer requirements Smitha T Murthy
     [not found]   ` <CGME20180124112337epcas1p492f7efc58b30253a881eae3d991d72b1@epcas1p4.samsung.com>
2018-01-24 10:59     ` [Patch v7 05/12] [media] videodev2.h: Add v4l2 definition for HEVC Smitha T Murthy
     [not found]   ` <CGME20180124112340epcas2p4051efc01bcc004b78ef4f5a9cd810303@epcas2p4.samsung.com>
2018-01-24 10:59     ` [Patch v7 06/12] [media] v4l2-ioctl: add HEVC format description Smitha T Murthy
     [not found]   ` <CGME20180124112342epcas1p151c1c463c0d31efc6d15da38172ed01d@epcas1p1.samsung.com>
2018-01-24 10:59     ` [Patch v7 07/12] Documentation: v4l: Documentation for HEVC v4l2 definition Smitha T Murthy
     [not found]   ` <CGME20180124112346epcas2p39eec7e548f87fe5db5f48c547704a10d@epcas2p3.samsung.com>
2018-01-24 10:59     ` [Patch v7 08/12] [media] s5p-mfc: Add support for HEVC decoder Smitha T Murthy
     [not found]   ` <CGME20180124112351epcas2p2e111be35495863530b11043b3fccd795@epcas2p2.samsung.com>
2018-01-24 10:59     ` [Patch v7 09/12] [media] s5p-mfc: Add VP9 decoder support Smitha T Murthy
     [not found]   ` <CGME20180124112356epcas1p241c27446e9646b457fea474fdd5a9c6e@epcas1p2.samsung.com>
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
     [not found]   ` <CGME20180124112401epcas2p438e89e9c1914aa421ade444c479540ba@epcas2p4.samsung.com>
2018-01-24 10:59     ` [Patch v7 11/12] [media] s5p-mfc: Add support " Smitha T Murthy
     [not found]   ` <CGME20180124112406epcas2p3820cea581731825c7ad72ebbb1ca060c@epcas2p3.samsung.com>
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 [this message]
2018-01-29 13:27           ` Hans Verkuil
2018-01-29 13:13             ` Smitha T Murthy
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=1517229778.29374.9.camel@smitha-fedora \
    --to=smitha.t@samsung.com \
    --cc=a.hajda@samsung.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jtp.park@samsung.com \
    --cc=kamil@wypas.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@kernel.org \
    --cc=pankaj.dubey@samsung.com \
    --cc=s.nawrocki@samsung.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).