Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp323676iob; Wed, 18 May 2022 03:03:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmMKvA9lzs3CtN8B0v7yWxHJOZvkwHsQle/gC4xk9ujiapoZJnqKDISWhw8k5Bxp1TM2o5 X-Received: by 2002:a17:90b:2483:b0:1df:1805:652f with SMTP id nt3-20020a17090b248300b001df1805652fmr22401622pjb.68.1652868213652; Wed, 18 May 2022 03:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652868213; cv=none; d=google.com; s=arc-20160816; b=WB8vcE/3mKt7kOkvndUJpcME9f2FJ6ac5OK4kRsktidia2B/1OZRP6eol9Hib8xfnW wE27xY0e2CY8hUk2aNvfLlJnKCGCd4HCQc5rpSAbmh0eQo9+FfXf7UNGN/QCuJ+1u2O3 IwL3uBV+JObVv+2E+WQn8hMySts0pLEiwft2Eq2rVvkqZTLcCmqLVgg5AQsFiVPTwAJC OcwWu3rfGRRDS9D+pNBHcPOuyC4oaBmbyHQyoB+ertsADwZfKvGrTmbRHB7hCYB/KOT+ HoyZVe6fS1spHAP9S3R9uyWFlT1gOQF4dLz16VNa/XKGyfB3/FyEDJllhGHNKRvXq1tS +/FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=BBGxAveKvwrNFxqjW3tOsOaJMY9zAncKG+pS5804mNQ=; b=odCz1ASy9gqeti1D+3z0f+6h6SbiFqT3RxDsbXdnoujF8y6TqIwwTnrlu8xxmUkTjD ewhfSze9dC9lGkYzgaSfWncJ9TIqQI3IqFzU1uhfijhsZ0QedL/oyulkhaUgw/eTDEqV kONHe00D77iX0lzfWMKNZao2uzl7ZEEE92UVZaEYx0dQYKjeFcU7KjaTgcqBlkLSp/eE 5BelqPbFKuRhu4hZHWoQbRfgwBcI1HY9vXuM+FcN+Yor1A5FfX1eM6U5y7iz7tqYstOH 8w4aiZ+9ZEmwnINqpcHOf3iAwLGLQ+C8a8uzoJ5aTagZ/fEqaSzbZSzPuJuhj3qYWboa NT3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u18-20020a170902e81200b0015838a4fd9dsi2720416plg.64.2022.05.18.03.03.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 03:03:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B756013C4E3; Wed, 18 May 2022 02:47:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234675AbiERJql (ORCPT + 99 others); Wed, 18 May 2022 05:46:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234670AbiERJp7 (ORCPT ); Wed, 18 May 2022 05:45:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF33FB0A7E; Wed, 18 May 2022 02:45:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 60F50617AD; Wed, 18 May 2022 09:45:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDC49C34100; Wed, 18 May 2022 09:45:30 +0000 (UTC) Message-ID: <55f5f601-466a-5f90-0c71-1ea1e219ef56@xs4all.nl> Date: Wed, 18 May 2022 11:45:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 06/20] Documention: v4l: Documentation for VP9 CIDs. Content-Language: en-US To: Smitha T Murthy , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: m.szyprowski@samsung.com, andrzej.hajda@intel.com, mchehab@kernel.org, ezequiel@vanguardiasur.com.ar, jernej.skrabec@gmail.com, benjamin.gaignard@collabora.com, stanimir.varbanov@linaro.org, dillon.minfei@gmail.com, david.plowman@raspberrypi.com, mark.rutland@arm.com, robh+dt@kernel.org, krzk+dt@kernel.org, andi@etezian.org, alim.akhtar@samsung.com, aswani.reddy@samsung.com, pankaj.dubey@samsung.com, linux-fsd@tesla.com References: <20220517125548.14746-1-smitha.t@samsung.com> <20220517125548.14746-7-smitha.t@samsung.com> From: Hans Verkuil In-Reply-To: <20220517125548.14746-7-smitha.t@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Smitha, On 5/17/22 14:55, Smitha T Murthy wrote: > Adds V4l2 controls for VP9 encoder documention. > > Cc: linux-fsd@tesla.com > Signed-off-by: Smitha T Murthy > --- > .../media/v4l/ext-ctrls-codec.rst | 167 ++++++++++++++++++ > 1 file changed, 167 insertions(+) > > diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst > index 4cd7c541fc30..1b617a08f973 100644 > --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst > +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst > @@ -2165,6 +2165,16 @@ enum v4l2_mpeg_video_vp8_profile - > * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3`` > - Profile 3 > > +VP9 Control Reference > +--------------------- > + > +The VP9 controls include controls for encoding parameters of VP9 video > +codec. > + > +.. _vp9-control-id: > + > +VP9 Control IDs > + > .. _v4l2-mpeg-video-vp9-profile: > > ``V4L2_CID_MPEG_VIDEO_VP9_PROFILE`` > @@ -2231,6 +2241,163 @@ enum v4l2_mpeg_video_vp9_level - > * - ``V4L2_MPEG_VIDEO_VP9_LEVEL_6_2`` > - Level 6.2 > > +``V4L2_CID_MPEG_VIDEO_VP9_I_FRAME_QP`` > + Quantization parameter for an I frame for VP9. Valid range: from 1 to 255. Hmm, for this CID and most of the others you added there already exists a CID: V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP. It's called VPX since it is valid for both VP8 and VP9. So I think quite a few of these VP9 controls can be dropped, unless I am missing something? Regards, Hans > + > +``V4L2_CID_MPEG_VIDEO_VP9_P_FRAME_QP`` > + Quantization parameter for an P frame for VP9. Valid range: from 1 to 255. > + > +``V4L2_CID_MPEG_VIDEO_VP9_MAX_QP`` > + Maximum quantization parameter for VP9. Valid range: from 1 to 255. > + Recommended range for MFC is from 230 to 255. > + > +``V4L2_CID_MPEG_VIDEO_VP9_MIN_QP`` > + Minimum quantization parameter for VP9. Valid range: from 1 to 255. > + Recommended range for MFC is from 1 to 24. > + > +``V4L2_CID_MPEG_VIDEO_VP9_RC_FRAME_RATE`` > + Indicates the number of evenly spaced subintervals, called ticks, within > + one second. This is a 16 bit unsigned integer and has a maximum value up to > + 0xffff and a minimum value of 1. > + > +``V4L2_CID_MPEG_VIDEO_VP9_GF_REFRESH_PERIOD`` > + Indicates the refresh period of the golden frame for VP9 encoder. > + > +.. _v4l2-vp9-golden-frame-sel: > + > +``V4L2_CID_MPEG_VIDEO_VP9_GOLDEN_FRAMESEL`` > + (enum) > + > +enum v4l2_mpeg_vp9_golden_framesel - > + Selects the golden frame for encoding. Valid when NUM_OF_REF is 2. > + Possible values are: > + > +.. raw:: latex > + > + \footnotesize > + > +.. tabularcolumns:: |p{9.0cm}|p{8.0cm}| > + > +.. flat-table:: > + :header-rows: 0 > + :stub-columns: 0 > + > + * - ``V4L2_CID_MPEG_VIDEO_VP9_GOLDEN_FRAME_USE_PREV`` > + - Use the (n-2)th frame as a golden frame, current frame index being > + 'n'. > + * - ``V4L2_CID_MPEG_VIDEO_VP9_GOLDEN_FRAME_USE_REF_PERIOD`` > + - Use the previous specific frame indicated by > + ``V4L2_CID_MPEG_VIDEO_VP9_GF_REFRESH_PERIOD`` as a > + golden frame. > + > +.. raw:: latex > + > + \normalsize > + > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIERARCHY_QP_ENABLE`` > + Allows 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-vp9-ref-number-of-pframes: > + > +``V4L2_CID_MPEG_VIDEO_VP9_REF_NUMBER_FOR_PFRAMES`` > + (enum) > + > +enum v4l2_mpeg_vp9_ref_num_for_pframes - > + Number of reference pictures for encoding P frames. > + > +.. raw:: latex > + > + \footnotesize > + > +.. tabularcolumns:: |p{9.0cm}|p{8.0cm}| > + > +.. flat-table:: > + :header-rows: 0 > + :stub-columns: 0 > + > + * - ``V4L2_CID_MPEG_VIDEO_VP9_1_REF_PFRAME`` > + - Indicates one reference frame, last encoded frame will be searched. > + * - ``V4L2_CID_MPEG_VIDEO_VP9_GOLDEN_FRAME_USE_REF_PERIOD`` > + - Indicates 2 reference frames, last encoded frame and golden frame > + will be searched. > + > +.. raw:: latex > + > + \normalsize > + > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIERARCHICAL_CODING_LAYER`` > + Indicates the number of hierarchial coding layer. > + In normal encoding (non-hierarchial coding), it should be zero. > + VP9 has upto 3 layer of encoder. > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIERARCHY_RC_ENABLE`` > + Indicates enabling of bit rate for hierarchical coding layers VP9 encoder. > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIER_CODING_L0_BR`` > + Indicates bit rate for hierarchical coding layer 0 for VP9 encoder. > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIER_CODING_L1_BR`` > + Indicates bit rate for hierarchical coding layer 1 for VP9 encoder. > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIER_CODING_L2_BR`` > + Indicates bit rate for hierarchical coding layer 2 for VP9 encoder. > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIER_CODING_L0_QP`` > + Indicates quantization parameter for hierarchical coding layer 0. > + Valid range: [V4L2_CID_MPEG_VIDEO_VP9_MIN_QP, > + V4L2_CID_MPEG_VIDEO_VP9_MAX_QP]. > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIER_CODING_L1_QP`` > + Indicates quantization parameter for hierarchical coding layer 1. > + Valid range: [V4L2_CID_MPEG_VIDEO_VP9_MIN_QP, > + V4L2_CID_MPEG_VIDEO_VP9_MAX_QP]. > + > +``V4L2_CID_MPEG_VIDEO_VP9_HIER_CODING_L2_QP`` > + Indicates quantization parameter for hierarchical coding layer 2. > + Valid range: [V4L2_CID_MPEG_VIDEO_VP9_MIN_QP, > + V4L2_CID_MPEG_VIDEO_VP9_MAX_QP]. > + > +.. _v4l2-vp9-max-partition-depth: > + > +``V4L2_CID_MPEG_VIDEO_VP9_MAX_PARTITION_DEPTH`` > + (enum) > + > +enum v4l2_mpeg_vp9_num_partitions - > + Indicate maximum coding unit depth. > + > +.. raw:: latex > + > + \footnotesize > + > +.. tabularcolumns:: |p{9.0cm}|p{8.0cm}| > + > +.. flat-table:: > + :header-rows: 0 > + :stub-columns: 0 > + > + * - ``V4L2_CID_MPEG_VIDEO_VP9_0_PARTITION`` > + - No coding unit partition depth. > + * - ``V4L2_CID_MPEG_VIDEO_VP9_1_PARTITION`` > + - Allows one coding unit partition depth. > + > +.. raw:: latex > + > + \normalsize > + > + > +``V4L2_CID_MPEG_VIDEO_VP9_DISABLE_INTRA_PU_SPLIT`` > + Zero indicates enable intra NxN PU split. > + One indicates disable intra NxN PU split. > + > +``V4L2_CID_MPEG_VIDEO_VP9_DISABLE_IVF_HEADER`` > + Indicates IVF header generation. Zero indicates enable IVF format. > + One indicates disable IVF format. > + > > High Efficiency Video Coding (HEVC/H.265) Control Reference > ===========================================================