From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933976AbeAXOQp (ORCPT ); Wed, 24 Jan 2018 09:16:45 -0500 Received: from lb3-smtp-cloud9.xs4all.net ([194.109.24.30]:45269 "EHLO lb3-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933648AbeAXOQn (ORCPT ); Wed, 24 Jan 2018 09:16:43 -0500 Subject: Re: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs To: Smitha T Murthy , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <1516791584-7980-1-git-send-email-smitha.t@samsung.com> <1516791584-7980-13-git-send-email-smitha.t@samsung.com> Cc: 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 From: Hans Verkuil Message-ID: <127cfd7f-113f-6724-297c-6f3c3746a8ff@xs4all.nl> Date: Wed, 24 Jan 2018 15:16:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <1516791584-7980-13-git-send-email-smitha.t@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfFznDB+M+YTz8BF5Tlz9YYmn9lplu2YDQyjuB6zxPgCZJfyTejwoR3B6uGvoEpWV4CyLe0ezr9izGJJGr+Upcg+NzTq0e9wnFxZaFMqTnU3S7XYjsszW dOdP0d8CY4WzkXRj24UqwFZJQv4GVN3rIND/RxGOkmbbnSj7KiRcBBRlTnADqMgtWHB6M7pMYmt6peFakXeg9zmJ2DuWo4VbJyjxJH4sMuhtyR1dKofMAxZd tfsZBXPOgVV2zeYdwgRRk0dO586WOQBi5PBP8l7kk+3sPKH5Pq8rGj5UM8egWqYhMmZodTjVYOCSe9gZRbKQacR3rrYrKoiwZ+/LVG9vMCmMDjKOQ/yyO1dt ByDeQ6Q3kycN9JOLqPyahTAbxFQPQPkAPWVtc2ryE/q4ar24mk/IH9XHXdOr6yOsk9USbciSjaoTQGSLgmvGBNSxVQBIhfTHey+LSwCKoaAGZIrCHPugvuZc JYXAQtCy2a5wHce735OkJZF1gSNGvumgv8LpablxT+v1vfZ98HRiKUUdGXiUba2hYlKRp7Gs9S3iTMC4Wvj6y/Z4O8Hq++Vf0ORwOw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/01/18 11:59, Smitha T Murthy wrote: > Added V4l2 controls for HEVC encoder > > Signed-off-by: Smitha T Murthy > --- > 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). > + > +``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. > + > +``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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: hverkuil@xs4all.nl (Hans Verkuil) Date: Wed, 24 Jan 2018 15:16:40 +0100 Subject: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs In-Reply-To: <1516791584-7980-13-git-send-email-smitha.t@samsung.com> References: <1516791584-7980-1-git-send-email-smitha.t@samsung.com> <1516791584-7980-13-git-send-email-smitha.t@samsung.com> Message-ID: <127cfd7f-113f-6724-297c-6f3c3746a8ff@xs4all.nl> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 24/01/18 11:59, Smitha T Murthy wrote: > Added V4l2 controls for HEVC encoder > > Signed-off-by: Smitha T Murthy > --- > 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). > + > +``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. > + > +``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