Received: by 10.223.176.5 with SMTP id f5csp2883063wra; Mon, 29 Jan 2018 05:39:26 -0800 (PST) X-Google-Smtp-Source: AH8x227+MAu7Fa2jGgw/3VaHzoKKiEalHNnk0KdaXTEvPdvyXo2r7c5HH7Ud1qnRQRYf3+2/LXeM X-Received: by 10.98.204.75 with SMTP id a72mr26839563pfg.211.1517233166628; Mon, 29 Jan 2018 05:39:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517233166; cv=none; d=google.com; s=arc-20160816; b=s0L4FX5wU2xr/gkSdNYeR82ZidpK9AkFtK7/fCSSGT39NVywg/Nhx7WzwgJSOz+TQg lc+kTcqsDgMnI4RVX9+yV9oqwmZjz6SE4j/HHdsMc7zwppt31JJ9T9QrQQlGrDwDzw94 mEqqNYAbpykRjbYkNP8WsOCcMvmo4nQdc87AwUcqGsVnyWfCu0C0rtGEfSdewWm6hYaJ UBbuKlEII+PpgNJVnkoII85IWGMXvKDx3dlW+3S/BvEYX7DnNqqukc1JLVDmfepOej6d Q4Z/WPnLJG2YYiVdVamV/vYw+u+H28lywEQKF2hp/HmIdZ2b7neHN3b/ijvF2jarhbD/ oDDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:mime-version:message-id:date:in-reply-to :cc:to:from:subject:dkim-signature:dkim-filter :arc-authentication-results; bh=8d1YG8CIiVAFQwmWYHBfa00b2fbss2RXNZOpQFyI3Qg=; b=IQep/JZuJAgL7x/71ifNTv6CVdm/MfoklT00YB7WMhSUXi91x+7Mcp6oqRDKUilBlM zHMexorRqEz2XjD+DcIcx1fdEsf+RPIm2d3qeiCmkKWr6XbMYUu8vhvElL2fp4hGoEGH vJ3XGY1zc4TfcmhEsw3LtM+958Y3nzV6ELfqhKyI2SOC/V+rJZlZ2uPFMCts8U5jhhdJ lOC0xiDwWrXii+WflztNTunOV2gRQFK1QORdwjURBvjiVTp3KuGojyFRXVe4v+SN8b7Z i3H+lTSQ/5ocMJJCxmJ8pUXsdQDzhIXoetIEzDnJd3lZx2vWGpHCz3RCAX3qGd98rF7b jtKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=r0hG2h8L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si1155428pld.31.2018.01.29.05.39.12; Mon, 29 Jan 2018 05:39:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=r0hG2h8L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751864AbeA2Nir (ORCPT + 99 others); Mon, 29 Jan 2018 08:38:47 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:55146 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751428AbeA2Nip (ORCPT ); Mon, 29 Jan 2018 08:38:45 -0500 Received: from epcas5p2.samsung.com (unknown [182.195.41.40]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180129133844epoutp014b04e0e16975e64ce985e03b2c739e8e~OS3zhWicB0626606266epoutp01P for ; Mon, 29 Jan 2018 13:38:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180129133844epoutp014b04e0e16975e64ce985e03b2c739e8e~OS3zhWicB0626606266epoutp01P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1517233124; bh=8d1YG8CIiVAFQwmWYHBfa00b2fbss2RXNZOpQFyI3Qg=; h=Subject:From:To:Cc:In-Reply-To:Date:References:From; b=r0hG2h8Lw4AOeyRMmxVjbpBZZTgh4pctnYMXfOEFQP4Zp39hGjXLgPf0ENM3XFmxb OuTTCuvz06NmiZCLwft3fJ6S2syfz3wrI/1LoULnlF1GgHHXvi9YReg4TpQKAa5PQv EWNxw9DV/TakIslbiygm1e6MgKQsJTlIloWyQoPs= Received: from epsmges5p3new.samsung.com (unknown [182.195.42.75]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20180129133843epcas5p3a013a5b5cf5b9b3a9d1be349418776be~OS3zEIMvk0175001750epcas5p3B; Mon, 29 Jan 2018 13:38:43 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p3new.samsung.com (Symantec Messaging Gateway) with SMTP id 39.DE.04390.3E32F6A5; Mon, 29 Jan 2018 22:38:43 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20180129133843epcas5p2df067794b545b3368223c8cb6523a32c~OS3yd9kfC0273402734epcas5p2u; Mon, 29 Jan 2018 13:38:43 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180129133843epsmtrp2541cd532ae42f6af39b9f6b4ea762842~OS3ycd-SK3058630586epsmtrp2V; Mon, 29 Jan 2018 13:38:43 +0000 (GMT) X-AuditID: b6c32a4b-cd1ff70000001126-9b-5a6f23e3823b Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id DE.12.03798.2E32F6A5; Mon, 29 Jan 2018 22:38:42 +0900 (KST) Received: from [107.108.83.49] (unknown [107.108.83.49]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20180129133836epsmtip2ca69438330ae5f3c34ea3111038ca8cc~OS3sN8kx52999029990epsmtip2a; Mon, 29 Jan 2018 13:38:35 +0000 (GMT) Subject: Re: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs From: Smitha T Murthy To: Hans Verkuil 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 In-Reply-To: Date: Mon, 29 Jan 2018 18:45:02 +0530 Message-ID: <1517231702.29374.13.camel@smitha-fedora> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0gUYRTl25nZGR8T0yp6M81ctfKRmqkNpKZltaFQIv2xoBYdVFrXbcdn RK0hWqIRFERivoiIJR+srppp+NhSzAf4LEVBDQN10/JB5aPcHcP+nXvPOfd89/JRmKSVcKCS lKmcWilXSMWWeH2Hh8fRGdeUWD9NqTs7VtVHsN2PZ0WsoXJYxD7ryiPY/v4aku29t0CyupkR gh1sKhazBTV6gq00TJDsS92GiK3Qr5Bsx0IeEUbLdNoHYlnti7uyh3VaJFvWHZANGbJJWffq MnlJHGsZHM8pktI5tW/odcvEd9NduGojKLOzLE6D1rzyEUUBEwDjhap8ZElJmLcINjZHRULx A8H3/hUkFGsInm41EvnIwuwY7XtFCEQLgtk32h2LEYGxthmZ5towkZDfZm8yiBlvWFv8KDZh W8Yd5pt+YyY9xtSLYHBkWWQiLJgQWB/oNovwbdFYdgluwjQTCOvlU5hpJs3shc1GG+ERXlCl 6TFLMMYZGozF5pnA5JFQPGvEBVEETM3OYQK2gbnOOlLADrD8rUUs4Axo3viFC2YN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4zSHCxK4rzy+ccihQTSE0tSs1NTC1KLYLJMHJxSDYxeXoce7phz e6Iiv7mFssv8F95BM7c+2px1M4jr2TfZVx2JbTMO+LOdXvhIzj3aVuilzYbuFuk8WdV3nVUp mSy7fqw6+N1+2uOKRTubNiQIi34+qs6e0nS25/tW7SOLhe0d37ZxBTTNUJn/0uJd/N85eqKb TPkOGC+T8Q2MnMx/XqzhpmyTB78SS3FGoqEWc1FxIgAUXeBinwIAAA== X-CMS-MailID: 20180129133843epcas5p2df067794b545b3368223c8cb6523a32c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-MTR: 20180129133843epcas5p2df067794b545b3368223c8cb6523a32c CMS-TYPE: 105P X-CMS-RootMailID: 20180124112406epcas2p3820cea581731825c7ad72ebbb1ca060c X-RootMTR: 20180124112406epcas2p3820cea581731825c7ad72ebbb1ca060c References: <1516791584-7980-1-git-send-email-smitha.t@samsung.com> <1516791584-7980-13-git-send-email-smitha.t@samsung.com> <127cfd7f-113f-6724-297c-6f3c3746a8ff@xs4all.nl> <1517229778.29374.9.camel@smitha-fedora> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > >>> --- > >>> 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 > > I can mention for all these controls range as [V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP, V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP]. Will this be ok? Regards, Smitha