From patchwork Mon Jul 20 13:23:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 11673951 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 143DB913 for ; Mon, 20 Jul 2020 13:25:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFCFB20729 for ; Mon, 20 Jul 2020 13:25:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mH/8+nCn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dMlGKoDu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DFCFB20729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LUpDrnfp3nFZsiC2868zebF4w3f20NeRuKkpgJm02C4=; b=mH/8+nCn/rPMYL4oq67e6CzBdj yFcUbXP49+i4h19PlK0SkMlSAlnwn3wNvrwKw8FR9KOWky3A/K1pkvD8Dc8R7l5OCQc7xSg66mPQQ uhRR/T1z5ZI+98cTUOuDFm9iYcFDmV+fA89EY1i8SBe48L9N+EqLNLdxA8V23ekxDH7+dZAt7LJmT R0YhsBACZZXWzOWEDItdKcFcvGxLgD9Q0VJNPcUIoL7GmqdnbB7zX7V4yaGgxyMvZDcWj+he5lt1y cynjLkA5/ullayE2L5nSSdJv6itcqMOjtQGil9jC7DimMzbGRgCLX7214lwCBM26PuzeGqPtlUSw+ n87Dug7Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVlw-0001l5-6g; Mon, 20 Jul 2020 13:24:00 +0000 Received: from mail-lf1-x141.google.com ([2a00:1450:4864:20::141]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVlq-0001jC-Kr for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 13:23:55 +0000 Received: by mail-lf1-x141.google.com with SMTP id h8so1483946lfp.9 for ; Mon, 20 Jul 2020 06:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9fj+mlGbPwbJel6oxJ0D6OKXqr3G/qYico6GQrfC1qA=; b=dMlGKoDuyUVZHgQml1t2nYQbgAlS6wHSGTnWeG9qBmheJbVrdSmdgIdCs40xO0xyV5 iBmtOsXQxs14aKkP4IrbXG50WwP39PsjZ9ZWhbgCeuoUmi9Oev04peVqWWJrH6viHtbW ujCkYur1josdNP0PV/x51B5pzb5jfYdfhP8MIyNrxNqXbZrAqv9L0f85kpaleN7UdZVV HNL24svcsKErzvgSMDGr6tq7AIsWkQ4bwxiAVwWFFaZPI0FePhAs6KSmfUKf4RJQtFir U1pGQ6PEagGCaqBxg2cOQaTgUkBAtS/zRv0U1PdV5vRmsqQB0SoFAOp3CpzQUjPZwt0J KW7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9fj+mlGbPwbJel6oxJ0D6OKXqr3G/qYico6GQrfC1qA=; b=HpNKX9L70mvqd+SqerWAVOzXBVpXY870RvjtePhXA87R+v95els/wmX5OX3jYBFaGW U37LFfDI04zdslqYpRTS1C631W4WpPEzcuk/pERoOO9QmhE9jYcDafy0vr0HtLMuzccn SWf9Vl4/NXvcYOm5Wm0MD/XSi2qk3vKglfDyHImS4UIfKxUuqGHgyYNFFQkjO0E+OTIJ bhrfFg9NTZwBQC6FB/VG3kwP44s9j1DI1X3fXjDgskRs/fEbwtF+MJ+7k0ea20rOY/Kh r1MdVGo3mF/OmRglz38tc+P6FeXA0B/7OGni9drGJXeL/sbF4i4idAytyf+vxNLl153G 0E3A== X-Gm-Message-State: AOAM533AmI4F+qwZHmdQ0KkJI6cp+p5whbuuD9T0sp6eWHDeov3gKmjr F782/RYObTAbRUWjolABtcwlpA== X-Google-Smtp-Source: ABdhPJzeK+bm1CsppE+QoHWhsU+GRYAPAxaEnuf1F510bqFxnLPqjes2JNUwtM9bs3IElPNk487aEg== X-Received: by 2002:a19:228a:: with SMTP id i132mr9641999lfi.178.1595251433502; Mon, 20 Jul 2020 06:23:53 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id h6sm867829lfc.84.2020.07.20.06.23.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 06:23:52 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/6] media: v4l2-ctrls: Add encoder constant quality control Date: Mon, 20 Jul 2020 16:23:08 +0300 Message-Id: <20200720132313.4810-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720132313.4810-1-stanimir.varbanov@linaro.org> References: <20200720132313.4810-1-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_092354_788757_727C6FD6 X-CRM114-Status: GOOD ( 13.22 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:141 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maheshwar Ajja , Andrzej Hajda , Kamil Debski , Stanimir Varbanov , Jeongtae Park , Kyungmin Park , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Ezequiel Garcia MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Maheshwar Ajja When V4L2_CID_MPEG_VIDEO_BITRATE_MODE value is V4L2_MPEG_VIDEO_BITRATE_MODE_CQ, encoder will produce constant quality output indicated by V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY control value. Encoder will choose appropriate quantization parameter and bitrate to produce requested frame quality level. Signed-off-by: Maheshwar Ajja Reviewed-by: Hans Verkuil Signed-off-by: Stanimir Varbanov --- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 10 ++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++ include/uapi/linux/v4l2-controls.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index d0d506a444b1..b9d3f7ae6486 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -581,6 +581,8 @@ enum v4l2_mpeg_video_bitrate_mode - - Variable bitrate * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR`` - Constant bitrate + * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ`` + - Constant quality @@ -592,6 +594,14 @@ enum v4l2_mpeg_video_bitrate_mode - the average video bitrate. It is ignored if the video bitrate mode is set to constant bitrate. +``V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (integer)`` + Constant quality level control. This control is applicable when + ``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` value is + ``V4L2_MPEG_VIDEO_BITRATE_MODE_CQ``. Valid range is 1 to 100 + where 1 indicates lowest quality and 100 indicates highest quality. + Encoder will decide the appropriate quantization parameter and + bitrate to produce requested frame quality. + ``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)`` For every captured frame, skip this many subsequent frames (default 0). diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 3f3fbcd60cc6..bc00d02e411f 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -200,6 +200,7 @@ const char * const *v4l2_ctrl_get_menu(u32 id) static const char * const mpeg_video_bitrate_mode[] = { "Variable Bitrate", "Constant Bitrate", + "Constant Quality", NULL }; static const char * const mpeg_stream_type[] = { @@ -832,6 +833,7 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE: return "Video GOP Closure"; case V4L2_CID_MPEG_VIDEO_PULLDOWN: return "Video Pulldown"; case V4L2_CID_MPEG_VIDEO_BITRATE_MODE: return "Video Bitrate Mode"; + case V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY: return "Constant Quality"; case V4L2_CID_MPEG_VIDEO_BITRATE: return "Video Bitrate"; case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: return "Video Peak Bitrate"; case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION: return "Video Temporal Decimation"; diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 62271418c1be..0f7e4388dcce 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -375,6 +375,7 @@ enum v4l2_mpeg_video_aspect { enum v4l2_mpeg_video_bitrate_mode { V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0, V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1, + V4L2_MPEG_VIDEO_BITRATE_MODE_CQ = 2, }; #define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) #define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) @@ -742,6 +743,7 @@ enum v4l2_cid_mpeg_video_hevc_size_of_length_field { #define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_MPEG_BASE + 642) #define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_MPEG_BASE + 643) #define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_MPEG_BASE + 644) +#define V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (V4L2_CID_MPEG_BASE + 645) /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) From patchwork Mon Jul 20 13:23:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 11673955 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C5225913 for ; Mon, 20 Jul 2020 13:25:45 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C6CC204EA for ; Mon, 20 Jul 2020 13:25:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aqGZO75C"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WHDkbIXS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C6CC204EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=nd9OKxhcIKGuBRIV00o7gIaa5Ga8Dcnycw+IqUckNNQ=; b=aqGZO75C3Zy66mEXhSFcviL3Lp w4mPk2pKggaCrDFuvgm00+UPopLf4z01r6aIdMuBJNydHBqXUU9kCHpkxkr+C6GNdazQdzRXhi3F8 NHWG+YfXUvZtpi6p/gbwhA88NBV/KWDfmHXmGB42gOdzhDlBZbxBDUWhL1RxqchJ2Xw0qV4JMtTUd J2aMfIeFFfsfGBBcZzOiKfUrtX9XfiTqj5QpERO28xsnidOt5ihCcB05V29MjMXrg3Xm2mCO860i8 XNOA5CEo5XkMrpaD2EiAu6OosYAosdemgOGOsFouLk54boeE03BTV9xBYEOUomwB4p0+aF7vw5Hj+ aoWkn+CA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVm4-0001oU-5A; Mon, 20 Jul 2020 13:24:08 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVlw-0001l3-QS for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 13:24:02 +0000 Received: by mail-lj1-x241.google.com with SMTP id z24so20193523ljn.8 for ; Mon, 20 Jul 2020 06:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UY1nsdPNSUSAf+7YLs436phqwdMpy28An6352a8KdMA=; b=WHDkbIXS1LKiXXQSdcPiZnulaypwcekKf5KQa61fI5WKRKDz+n7syHUpQsA9D1s1Rb Dl/jcNCpUoRiXIAuIPVtiv+bJNO0FLthaQIlhRVZtWebTtxRTcdNXmITs5tgDm4NpEQ3 9Ehui6uPqOsqkqEigy5DPXOd2lclWimRV5uMUTYMIku2+01GvrXZU5E27p/O56Mo+GJN WgY66eKB7fOv3pgHfKPnr7hd0HmcF7aQ75is2+3g/gM3H8KMnnZaw2TJ/Ym/aUXO8xtm +WYyQZ5EYw2Uf9Ue0sJC2mtkq5IYNZ80PYDqygrBN+YzlqQehFxss+a0GofJFuWKLgOo MyVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UY1nsdPNSUSAf+7YLs436phqwdMpy28An6352a8KdMA=; b=U59NaXEwgVgyJoujf4jjFxdmPmRRbFXRjXBfqXF0rEmdRt/ASOk9DRPaVJmlC0257L meeSLSHDyOrdbgMjqVM/0JDeD0RhtolYc0U2z4TtKVcnc6U+6+BchQnJAn0jUslb0utp DpERKxRS9B5J6fhcV9dyNLOOEQruf17RQFhe1WujFVfutAW3PxpvYKl1qmW5TWJkH/QC 5B+riHC3hh/nrJBFyIpsBMxf8U9bCaBtEuTuXMaFLwWJnRYAI8RGEwNOhl/zwRCKNiHp N1qhhYMxkjpcLudCsRZHAOW1u5VGAMrYkjlcTc0w0FZN64L4ygLx95VzMnL1UTyt7PPj zs8g== X-Gm-Message-State: AOAM530jja5vLpuwu3sMssj0rabDDNvLJ1m3EU996r2ZXj/nq9M7Rjgw K6bV3pStaYVtC5EbVmeaoT7GEQ== X-Google-Smtp-Source: ABdhPJwn2QfqIIAwwdyfcJ7ddwVcrd4mwvFEAZLOkZmR0mP9kKGdVj8GwTiAQ5YgKc3z3tgxzyVUlA== X-Received: by 2002:a2e:7a03:: with SMTP id v3mr11175750ljc.141.1595251439058; Mon, 20 Jul 2020 06:23:59 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id h6sm867829lfc.84.2020.07.20.06.23.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 06:23:58 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/6] venus: venc: Add support for constant quality control Date: Mon, 20 Jul 2020 16:23:09 +0300 Message-Id: <20200720132313.4810-3-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720132313.4810-1-stanimir.varbanov@linaro.org> References: <20200720132313.4810-1-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_092400_929335_D8F289A1 X-CRM114-Status: GOOD ( 19.42 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:241 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maheshwar Ajja , Andrzej Hajda , Kamil Debski , Stanimir Varbanov , Jeongtae Park , Kyungmin Park , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Ezequiel Garcia MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Adds implementation of V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY v4l control when the bitrate mode is CQ. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/hfi_cmds.c | 37 ++++++++++++++++++- .../media/platform/qcom/venus/hfi_helper.h | 10 ++++- drivers/media/platform/qcom/venus/venc.c | 14 ++++++- .../media/platform/qcom/venus/venc_ctrls.c | 8 +++- 5 files changed, 66 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 7118612673c9..1bac30d4cf50 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -201,6 +201,7 @@ struct venc_controls { u32 bitrate; u32 bitrate_peak; u32 rc_enable; + u32 const_quality; u32 h264_i_period; u32 h264_entropy_mode; diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index c67e412f8201..7022368c1e63 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -640,6 +640,7 @@ static int pkt_session_set_property_1x(struct hfi_session_set_property_pkt *pkt, case HFI_RATE_CONTROL_CBR_VFR: case HFI_RATE_CONTROL_VBR_CFR: case HFI_RATE_CONTROL_VBR_VFR: + case HFI_RATE_CONTROL_CQ: break; default: ret = -EINVAL; @@ -1218,6 +1219,37 @@ pkt_session_set_property_4xx(struct hfi_session_set_property_pkt *pkt, return 0; } +static int +pkt_session_set_property_6xx(struct hfi_session_set_property_pkt *pkt, + void *cookie, u32 ptype, void *pdata) +{ + void *prop_data; + + if (!pkt || !cookie || !pdata) + return -EINVAL; + + prop_data = &pkt->data[1]; + + pkt->shdr.hdr.size = sizeof(*pkt); + pkt->shdr.hdr.pkt_type = HFI_CMD_SESSION_SET_PROPERTY; + pkt->shdr.session_id = hash32_ptr(cookie); + pkt->num_properties = 1; + pkt->data[0] = ptype; + + switch (ptype) { + case HFI_PROPERTY_CONFIG_HEIC_FRAME_QUALITY: { + struct hfi_heic_frame_quality *in = pdata, *cq = prop_data; + + cq->frame_quality = in->frame_quality; + pkt->shdr.hdr.size += sizeof(u32) + sizeof(*cq); + break; + } default: + return pkt_session_set_property_4xx(pkt, cookie, ptype, pdata); + } + + return 0; +} + int pkt_session_get_property(struct hfi_session_get_property_pkt *pkt, void *cookie, u32 ptype) { @@ -1236,7 +1268,10 @@ int pkt_session_set_property(struct hfi_session_set_property_pkt *pkt, if (hfi_ver == HFI_VERSION_3XX) return pkt_session_set_property_3xx(pkt, cookie, ptype, pdata); - return pkt_session_set_property_4xx(pkt, cookie, ptype, pdata); + if (hfi_ver == HFI_VERSION_4XX) + return pkt_session_set_property_4xx(pkt, cookie, ptype, pdata); + + return pkt_session_set_property_6xx(pkt, cookie, ptype, pdata); } void pkt_set_version(enum hfi_version version) diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index f6613df1d16b..758c70ac26fd 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -231,6 +231,7 @@ #define HFI_RATE_CONTROL_VBR_CFR 0x1000003 #define HFI_RATE_CONTROL_CBR_VFR 0x1000004 #define HFI_RATE_CONTROL_CBR_CFR 0x1000005 +#define HFI_RATE_CONTROL_CQ 0x1000008 #define HFI_VIDEO_CODEC_H264 0x00000002 #define HFI_VIDEO_CODEC_H263 0x00000004 @@ -504,6 +505,7 @@ #define HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER 0x200600b #define HFI_PROPERTY_CONFIG_VENC_LTRPERIOD 0x200600c #define HFI_PROPERTY_CONFIG_VENC_PERF_MODE 0x200600e +#define HFI_PROPERTY_CONFIG_HEIC_FRAME_QUALITY 0x2006014 /* * HFI_PROPERTY_PARAM_VPE_COMMON_START @@ -520,7 +522,8 @@ enum hfi_version { HFI_VERSION_1XX, HFI_VERSION_3XX, - HFI_VERSION_4XX + HFI_VERSION_4XX, + HFI_VERSION_6XX, }; struct hfi_buffer_info { @@ -725,6 +728,11 @@ struct hfi_quality_vs_speed { u32 quality_vs_speed; }; +struct hfi_heic_frame_quality { + u32 frame_quality; + u32 reserved[3]; +}; + struct hfi_quantization { u32 qp_i; u32 qp_p; diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 513bbc07f7bc..4c30c3f3369e 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -740,14 +740,26 @@ static int venc_set_properties(struct venus_inst *inst) rate_control = HFI_RATE_CONTROL_OFF; else if (ctr->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) rate_control = HFI_RATE_CONTROL_VBR_CFR; - else + else if (ctr->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR) rate_control = HFI_RATE_CONTROL_CBR_CFR; + else if (ctr->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CQ) + rate_control = HFI_RATE_CONTROL_CQ; ptype = HFI_PROPERTY_PARAM_VENC_RATE_CONTROL; ret = hfi_session_set_property(inst, ptype, &rate_control); if (ret) return ret; + if (rate_control == HFI_RATE_CONTROL_CQ && ctr->const_quality) { + struct hfi_heic_frame_quality quality = {}; + + ptype = HFI_PROPERTY_CONFIG_HEIC_FRAME_QUALITY; + quality.frame_quality = ctr->const_quality; + ret = hfi_session_set_property(inst, ptype, &quality); + if (ret) + return ret; + } + if (!ctr->bitrate) bitrate = 64000; else diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c index 8362dde7949e..97a1e821c07e 100644 --- a/drivers/media/platform/qcom/venus/venc_ctrls.c +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c @@ -202,6 +202,9 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE: ctr->rc_enable = ctrl->val; break; + case V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY: + ctr->const_quality = ctrl->val; + break; default: return -EINVAL; } @@ -217,7 +220,7 @@ int venc_ctrl_init(struct venus_inst *inst) { int ret; - ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 31); + ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 32); if (ret) return ret; @@ -357,6 +360,9 @@ int venc_ctrl_init(struct venus_inst *inst) v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops, V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE, 0, 1, 1, 1); + v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops, + V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY, 0, 100, 1, 0); + ret = inst->ctrl_handler.error; if (ret) goto err; From patchwork Mon Jul 20 13:23:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 11673957 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8DC3913 for ; Mon, 20 Jul 2020 13:25:53 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B162C20729 for ; Mon, 20 Jul 2020 13:25:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vUc1PtcC"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PX9OEKkp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B162C20729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z+zifXLnFGiGerFrCpjnXKS6bXKlNIPlBJmEajMKvuI=; b=vUc1PtcCtZL5zf8A5hxC3KHsIS o+j+bAjlLSxGM52TI15KlfoGjSNfr+M+FLj+LgPP4nsZUU5OGTldDnKyWSfndp4my6JpQYAPZMl2n xJEoSBS6buAzTK6VNGm3KWFcFSLEtKmxYrgKvemQLtmuJvXVM9s0JdrHJD8KSWY+8Iyb6udLEjMgF zwr/hl+PpC+K2baOQ2QoeXbT7TMoMSZUApdOn+t4HAaYziH5jlhhOvlsq7QRs+GxES7Qxw8rdNEXK Goh+bG1BzMUyZXy52+LC6zF15T2QM4xjnNlxU9/voiqvgJ1n7JVGZyBncxzMjtiixoIeWCytVoJic ljSSyRFw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVmC-0001rX-JS; Mon, 20 Jul 2020 13:24:16 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVm1-0001nI-IY for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 13:24:06 +0000 Received: by mail-lj1-x241.google.com with SMTP id h19so20173747ljg.13 for ; Mon, 20 Jul 2020 06:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MqUU4NwcPoS5ZN35RvVZCwFe9U5tn/4+nbmkAYnncfM=; b=PX9OEKkpI/jtSn3vID9ulI98KVskkSEehSSFoiChH9W5domW5LwSB3O8SlIYSY8G2W urdoQAOyCy4Fe5al/Ra+s6SR9G6P7B0NqKstWvfIUbilRDNaTb+lQlHtfwCb37av9a2Y 8BhB17PzbPlxgRLv7YZ7g9odrv5W3O08vy/vLNmRM4Jgv2pyDewwFL2zkF/7gxtvBo/P BANErjpf/Ah1Hk4QG0q2RjEblvaVCspAI4Do6eKzNllNQdyvL1Diw8dYk1G9PoAPrQM2 AxpIYtRde2mZ53hBPzygFN27BJWAqCpoh/e6V8eFLIU7a4BmilWhCdfMqVLSE+TCF2h3 fsCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MqUU4NwcPoS5ZN35RvVZCwFe9U5tn/4+nbmkAYnncfM=; b=cbRh55Ue0mJ1LuvOJh+eKY+iPWpIhI7JXljyaet8CONiSEXmKggjwPN+vEpBhDr6Jl F3n2BaL2nkfvLCfE2XfYhjE53szVqL7amT7PeixMyIwzRNrIOKp50teyB9Wbn6k+h1TS rhuLV5Jd2g7uiFkFRzFpdsw12GN22Zt0frog0wCbz/TJ+PzgBbx7gNBIiJ0+6JWMndy4 tGw9bSmzoqyZVKvRpAdch0ZwCRRdFj727nlYbnQ/7AKs9MfFLwJY0ptaPCsLBJ7WPyhZ UKqYDFgU/m8vzb76m8GTcqivvvdIDfT1X6TSe0koRN5bm4U27LkxhyN5z+q1Dk22IkOe Qd/w== X-Gm-Message-State: AOAM533rEjWoBOXCGalQHulABEdOP3wsOAbQUvktznbdYJBhxsQCJk05 +452QemMzXmeflKdtK+kYw/oJg== X-Google-Smtp-Source: ABdhPJzGz39fa756++vvpvlHNQabX53riDhr9Hmp/C3WTe9Rem+aeAp3HPtWDrVkHE/Pqyfv5LcG3g== X-Received: by 2002:a2e:7804:: with SMTP id t4mr10479933ljc.8.1595251444480; Mon, 20 Jul 2020 06:24:04 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id h6sm867829lfc.84.2020.07.20.06.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 06:24:03 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/6] media: v4l2-ctrl: Add frame-skip std encoder control Date: Mon, 20 Jul 2020 16:23:10 +0300 Message-Id: <20200720132313.4810-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720132313.4810-1-stanimir.varbanov@linaro.org> References: <20200720132313.4810-1-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_092405_641343_820F0AC7 X-CRM114-Status: GOOD ( 15.06 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:241 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maheshwar Ajja , Andrzej Hajda , Kamil Debski , Stanimir Varbanov , Jeongtae Park , Kyungmin Park , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Ezequiel Garcia MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Adds encoders standard v4l2 control for frame-skip. The control is a copy of a custom encoder control so that other v4l2 encoder drivers can use it. Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil --- .../media/v4l/ext-ctrls-codec.rst | 33 +++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 10 ++++++ include/uapi/linux/v4l2-controls.h | 6 ++++ 3 files changed, 49 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index b9d3f7ae6486..3e6b5d61500b 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -602,6 +602,39 @@ enum v4l2_mpeg_video_bitrate_mode - Encoder will decide the appropriate quantization parameter and bitrate to produce requested frame quality. + +``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (enum)`` + +enum v4l2_mpeg_video_frame_skip_mode - + Indicates in what conditions the encoder should skip frames. If + encoding a frame would cause the encoded stream to be larger then a + chosen data limit then the frame will be skipped. Possible values + are: + + +.. tabularcolumns:: |p{9.2cm}|p{8.3cm}| + +.. raw:: latex + + \small + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - ``V4L2_MPEG_FRAME_SKIP_MODE_DISABLED`` + - Frame skip mode is disabled. + * - ``V4L2_MPEG_FRAME_SKIP_MODE_LEVEL_LIMIT`` + - Frame skip mode enabled and buffer limit is set by the chosen + level and is defined by the standard. + * - ``V4L2_MPEG_FRAME_SKIP_MODE_BUF_LIMIT`` + - Frame skip mode enabled and buffer limit is set by the VBV + (MPEG1/2/4) or CPB (H264) buffer size control. + +.. raw:: latex + + \normalsize + ``V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (integer)`` For every captured frame, skip this many subsequent frames (default 0). diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index bc00d02e411f..eb403858d325 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -591,6 +591,12 @@ const char * const *v4l2_ctrl_get_menu(u32 id) "External", NULL, }; + static const char * const mpeg_video_frame_skip[] = { + "Disabled", + "Level Limit", + "VBV/CPB Limit", + NULL, + }; switch (id) { case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ: @@ -652,6 +658,8 @@ const char * const *v4l2_ctrl_get_menu(u32 id) return flash_strobe_source; case V4L2_CID_MPEG_VIDEO_HEADER_MODE: return header_mode; + case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE: + return mpeg_video_frame_skip; case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE: return multi_slice; case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE: @@ -846,6 +854,7 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE: return "H264 MB Level Rate Control"; case V4L2_CID_MPEG_VIDEO_HEADER_MODE: return "Sequence Header Mode"; case V4L2_CID_MPEG_VIDEO_MAX_REF_PIC: return "Max Number of Reference Pics"; + case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE: return "Frame Skip Mode"; case V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP: return "H263 I-Frame QP Value"; case V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP: return "H263 P-Frame QP Value"; case V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP: return "H263 B-Frame QP Value"; @@ -1267,6 +1276,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_FLASH_LED_MODE: case V4L2_CID_FLASH_STROBE_SOURCE: case V4L2_CID_MPEG_VIDEO_HEADER_MODE: + case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE: case V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE: case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE: case V4L2_CID_MPEG_VIDEO_H264_LEVEL: diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 0f7e4388dcce..053827cda8e6 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -744,6 +744,12 @@ enum v4l2_cid_mpeg_video_hevc_size_of_length_field { #define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_MPEG_BASE + 643) #define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_MPEG_BASE + 644) #define V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY (V4L2_CID_MPEG_BASE + 645) +#define V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_BASE + 646) +enum v4l2_mpeg_video_frame_skip_mode { + V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED = 0, + V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1, + V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2, +}; /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) From patchwork Mon Jul 20 13:23:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 11673963 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1C408138A for ; Mon, 20 Jul 2020 13:26:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E8F4620729 for ; Mon, 20 Jul 2020 13:26:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ahqt+Ucn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CIw7Kr4J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8F4620729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=N/TDv6aw9YB6M7cPIDjOnj7oe6HA2jyVZpReoOI9fQs=; b=Ahqt+UcnbRjZbeuXO55sdrtE3R gegiF/ttyKVCjAvHymtHI0aqk98z3GtbkMQ7wE+EIChUlrpUOSecO1UVCdkW+Tmu1xVclk8uck9Ne mSMqDvbvbFPk2bhjK+5uiNZ1LT5sXSCru8nNCEctChLalUvkC38dWJqwAf3U07Obvh6EBGaKulhCe cgAoj0d5Sef/JzioDn7BGwDhedZb0183kVl9vs9CeaETdgYl6vNKIFECGh3NQKUoy0qyBsvrnEds7 K7jEWBROrbP6dAkz0g/vsC5yeHjAZIabEfyaOp57QZ7gCqglzEHol3h2Du1ySC0hIBk8NqOvj/O33 4RXZtCPg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVmN-0001vw-Sr; Mon, 20 Jul 2020 13:24:28 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVm9-0001qJ-4E for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 13:24:14 +0000 Received: by mail-lf1-x142.google.com with SMTP id s9so967771lfs.4 for ; Mon, 20 Jul 2020 06:24:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BEn8b19KNXeg8BFW/3OCgXOCsWUTohzxaH9qqztvhnA=; b=CIw7Kr4JtLkyvV0dl204XhbNYAfTMVrKzFJl3Lw2jjNU8u+uwKAPhn1po8GrGaeaog 1l1O7/OOF7433cWd/EdEBHRzVqbJNwG+lYd41oXrhduywn/HpYL6OaCiknpw1DGxsTNg VC0pRGaaptJbwDUfJ5gwl9AM2XmAYFEDtGIEKHYHQtKVvsjQlxmAEWMHXbA6wpduqfBm NroLGPjfFqRhO4VoHiVtVEccBIIdfH4L2VCZiGcgdNXmuI/GWBqqW2xTc+U1OT4K/tc5 7bNNEocdH8YWUJum2f5ARusglDb7ujbM3rBaDQbtvezoJfwr3WeDoQ1LX7VQT/GlM6BQ Q2Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BEn8b19KNXeg8BFW/3OCgXOCsWUTohzxaH9qqztvhnA=; b=PoSn9dJ6JYtLncPYXV7a6GWJweu7nh9Pyy5dNRAM1hkHbJ8lk5bJrTem/Wbew8T/h0 zhMRQvJLpd4UP86eLxgP306lpIcDJNRodpHls8Zi4GBBknJWGqil80rPzZzGaKW8Sabi iV5B0UOz2I/mYA8AbYqCYxkFAFMTPTnnL0JOl5v0yE9RS6EoqxruK+blfIRIAF5cRCgT ZuqE6s419tjN/Du3dSReantFD+xVGYuoEM1kh1nuTeWS3BL7LdPdSYrVDO+cUg0zs6bk OLK6B94vWD+QsiIB78JhaM/msB5oTo3Kkkk3dM2lX5i6NlBK44usQSgSkPtrpinSyD5I qYZg== X-Gm-Message-State: AOAM5334Hjmiby4BuhGlgZmFGsgn8esjP/7QROjUt50nuO123sTcRxtK j7iPO+wB6rfaoWsdrqrTwaBsoA== X-Google-Smtp-Source: ABdhPJyKrn5bk+q1D4Zgk7Suw0GD9WmiCJE0Ab+XJfJbVpPa0hFi8IWqOFR5dg0L5IrAI66aEwdQCw== X-Received: by 2002:ac2:4550:: with SMTP id j16mr10846655lfm.37.1595251451216; Mon, 20 Jul 2020 06:24:11 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id h6sm867829lfc.84.2020.07.20.06.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 06:24:10 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/6] venus: venc: Add support for frame-skip mode v4l2 control Date: Mon, 20 Jul 2020 16:23:11 +0300 Message-Id: <20200720132313.4810-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720132313.4810-1-stanimir.varbanov@linaro.org> References: <20200720132313.4810-1-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_092413_217527_3CC18C40 X-CRM114-Status: GOOD ( 15.17 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:142 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maheshwar Ajja , Andrzej Hajda , Kamil Debski , Stanimir Varbanov , Jeongtae Park , Kyungmin Park , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Ezequiel Garcia MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This adds support for frame-skip-mode standard v4l2 control in encoder driver. The control is implemented based on the combination of client selected bitrate-mode and frame-skip-mode. Once The client selected bitrate-mode (constant or variable) and the frame-skip-mode is not disabled we set variable framerate for rate controller. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/venc.c | 6 ++++-- drivers/media/platform/qcom/venus/venc_ctrls.c | 11 ++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 1bac30d4cf50..72e171ee05a8 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -202,6 +202,7 @@ struct venc_controls { u32 bitrate_peak; u32 rc_enable; u32 const_quality; + u32 frame_skip_mode; u32 h264_i_period; u32 h264_entropy_mode; diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 4c30c3f3369e..e4bbaae9975a 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -739,9 +739,11 @@ static int venc_set_properties(struct venus_inst *inst) if (!ctr->rc_enable) rate_control = HFI_RATE_CONTROL_OFF; else if (ctr->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_VBR) - rate_control = HFI_RATE_CONTROL_VBR_CFR; + rate_control = ctr->frame_skip_mode ? HFI_RATE_CONTROL_VBR_VFR : + HFI_RATE_CONTROL_VBR_CFR; else if (ctr->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR) - rate_control = HFI_RATE_CONTROL_CBR_CFR; + rate_control = ctr->frame_skip_mode ? HFI_RATE_CONTROL_CBR_VFR : + HFI_RATE_CONTROL_CBR_CFR; else if (ctr->bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CQ) rate_control = HFI_RATE_CONTROL_CQ; diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c b/drivers/media/platform/qcom/venus/venc_ctrls.c index 97a1e821c07e..4ac8da2ad061 100644 --- a/drivers/media/platform/qcom/venus/venc_ctrls.c +++ b/drivers/media/platform/qcom/venus/venc_ctrls.c @@ -204,6 +204,8 @@ static int venc_op_s_ctrl(struct v4l2_ctrl *ctrl) break; case V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY: ctr->const_quality = ctrl->val; + case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE: + ctr->frame_skip_mode = ctrl->val; break; default: return -EINVAL; @@ -220,7 +222,7 @@ int venc_ctrl_init(struct venus_inst *inst) { int ret; - ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 32); + ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 33); if (ret) return ret; @@ -363,6 +365,13 @@ int venc_ctrl_init(struct venus_inst *inst) v4l2_ctrl_new_std(&inst->ctrl_handler, &venc_ctrl_ops, V4L2_CID_MPEG_VIDEO_CONSTANT_QUALITY, 0, 100, 1, 0); + v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &venc_ctrl_ops, + V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE, + V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT, + ~((1 << V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED) | + (1 << V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT)), + V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED); + ret = inst->ctrl_handler.error; if (ret) goto err; From patchwork Mon Jul 20 13:23:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 11673961 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A92C3913 for ; Mon, 20 Jul 2020 13:26:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 827C720729 for ; Mon, 20 Jul 2020 13:26:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="APhT1l2o"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="YLYbNeJb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 827C720729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bme+ankr9HUH+LVW/G0Cr3rguVTKktH6yUGzttluSNo=; b=APhT1l2oHWqtSH9JurVWJ7wfrg o+/Lohe4b+Iwlfh6PFgUfdF6KRNbiENG3FSgwGBGP+oyU/b7HqruEE9/a+GXUhO3Gx9QIvTP+lu62 S7yNcLmPzgVvh2/S3hqAoAsIWRII3NvCuoTz2g5ZFkZb1tHzhwHRGRcUkVvND2ZWmTsG+WS08O1RT QVaZXQfkmQ4gtJ0yM8g4pb+RCqe9dpuLmtDJ/i++ZBvldaYK2R5PaAof4PG5ZzYWwY121HmWXtTc2 C6vSojfPnWVmika94YTpxZiyhUk9R2ohhU5YrEmd4UUoSVlzB+OSJ/jk9KQt7MbUJ6IBu0X0ErOM5 ZJ7VToKw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVmZ-00022x-SG; Mon, 20 Jul 2020 13:24:39 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVmE-0001tP-Dh for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 13:24:19 +0000 Received: by mail-lf1-x142.google.com with SMTP id t9so9700321lfl.5 for ; Mon, 20 Jul 2020 06:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PCNLmGR8sMtBYV74iVoiny++gKyFU6QKve9J6ft8KaU=; b=YLYbNeJbyBIaAQ8rb/3znbvrfWAkG4bvqP1j/gNRpW2GRjAqCS3c57lHyprI9vcUVy CFYb6/y0MWLSE9CSw6JnkGdtlKiGuenOa6djBdXOcXB5EZe4wJ/G7oXvQ7cCPaNamTef cnXYLGAHpAjq/bOaUfi4sP9VWdQu3vzn/aG6Fjt2+/ybVS/Cf4NRtH/7inpbltWwLXvx 9M9lYOOvRcrBJ++S/+qt8xMlSOTOCTGXb83x40QVyzfzokshHKrV6DUZODmIrA9GXWim bMophe4N3uJwQBu0Sr/9uv2THyxTHEDF5bsZ6Dd3yM9YBKQwikBqCqYtNwc9pWARjKHq vGdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PCNLmGR8sMtBYV74iVoiny++gKyFU6QKve9J6ft8KaU=; b=VidEJFVALvDk6Xz2norTGQ9/xL9P1US9ZG8zfkZRC9Uvvq26/io5LibfiqA7/wKXvx v8WqtljvMarnSuJjYt8heuav98usGtEWudlz1yqGbJdipW2JU0nUGKP0OFJF7KrlZjBI PodAoDlJupxkcOkIedA/aKEg4MP72zhbXQeWOptKAZ8yENJ4Ao3ctp4fJ0YZWuIRZBzE Z3gv7IQQivKym5zrHloGvyrm+S+zagB3XK0tZNgw+7DzELzuHmb2uYchbtbzQXlJ/4ma De7ixTb5YNddb/5h1sWu+1c6XlI4VaMa2tXk4kzPgsUgeuuGPdfNSLOAl81mYJLyZxZu 8tqA== X-Gm-Message-State: AOAM533uIaFfJZnJMSWhV7A01/s7/wNWIm91WvrKk7bg0sJo4e304S6Z JA5tern1yz/f9b57R6REJ0UqEg== X-Google-Smtp-Source: ABdhPJytG2Zgu+Ki97e5vuTKx8cSPSuv8MmaZXlz3NwLFdPuLR5QOLyNERbVvYpBHWPXrKtnKiUjVg== X-Received: by 2002:a19:f80e:: with SMTP id a14mr811645lff.49.1595251457123; Mon, 20 Jul 2020 06:24:17 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id h6sm867829lfc.84.2020.07.20.06.24.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 06:24:16 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/6] media: s5p-mfc: Use standard frame skip mode control Date: Mon, 20 Jul 2020 16:23:12 +0300 Message-Id: <20200720132313.4810-6-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720132313.4810-1-stanimir.varbanov@linaro.org> References: <20200720132313.4810-1-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_092418_567474_8C84C513 X-CRM114-Status: GOOD ( 12.55 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:142 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maheshwar Ajja , Andrzej Hajda , Kamil Debski , Stanimir Varbanov , Jeongtae Park , Kyungmin Park , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Ezequiel Garcia MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use the standard menu control for frame skip mode in the MFC driver. The legacy private menu control is kept for backward compatibility. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c index 912fe0c5ab18..3092eb6777a5 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c @@ -261,6 +261,11 @@ static struct mfc_control controls[] = { .menu_skip_mask = 0, .default_value = V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED, }, + { + .id = V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE, + .maximum = V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT, + .default_value = V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED, + }, { .id = V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT, .type = V4L2_CTRL_TYPE_BOOLEAN, @@ -1849,6 +1854,7 @@ static int s5p_mfc_enc_s_ctrl(struct v4l2_ctrl *ctrl) p->seq_hdr_mode = ctrl->val; break; case V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE: + case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE: p->frame_skip_mode = ctrl->val; break; case V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT: From patchwork Mon Jul 20 13:23:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 11673959 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 98BF9913 for ; Mon, 20 Jul 2020 13:26:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 720FB20729 for ; Mon, 20 Jul 2020 13:26:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bgdjG0OH"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eNLxZATC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 720FB20729 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BUUCqkOFd+p9pqQU/rkdw5qopdghq2DC5nvctlg5VAg=; b=bgdjG0OHDwxXiSfGqXHMJHYTD1 0uinkM5ocyojgEeycQzOLUGk4Z7aPCNNEOOflyWr3nkrRz7PL5rVdui6gbQ+FXzf7mr0+z8eYCZ4p fNi31nuUg2YbIj8cU4Ewrks9pySFd3eDdXgQWk0+vzlyS11E2BQ42q+OssxLV2TbUt0vK9CWsbR2x /AEexPSuCeFMSa4Uod7+aa8HDYYUerD50Pa5jKUhSG+hD8qfdonvH5M6LUrsg8LfMTlMAP+9JP2ri ArPacLXPjuaXWnK8zRPJKL6vzQal6xsNZWOCKY/cJsU+K/ZKMfIvHMciXK+ckb8U+SVvS91TWtoEv S2gFZFIQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVmg-00025M-EB; Mon, 20 Jul 2020 13:24:46 +0000 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxVmK-0001vz-59 for linux-arm-kernel@lists.infradead.org; Mon, 20 Jul 2020 13:24:25 +0000 Received: by mail-lj1-x244.google.com with SMTP id r19so20131967ljn.12 for ; Mon, 20 Jul 2020 06:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=b2rYd9nm3SPkJnxD1ULMt+9UUxBnRy5tHP+SV4VkRQo=; b=eNLxZATCSdcSJ52R9lxPtdWl3+8VydtB0TO4J8z7BDb8HN92Pe6AaHHdp0c1Y5KFnD e1OayGHlgNk3Wtps9EiuilM0+OQTpGTkNosnVoeW15aTGu5D6+oNsWWtNtxBceo7A/E9 1ey+E6yhxnN/dRVA7YuPQhHIpv3haqeN7RDwHU4dEjLMWS6tJGBAPK1NNOXhikY4aRrW TTiIVqOppHt6CI3SRJGbMgEWegQAW2COI3Z3I1p8uraJLc8U/+HDLUS1sRmQxHnFL2rs x3fo3RwaOZorYwx0685XNtaZbGPsc7sGjOAUnzIaNb6uWW4I7Hq+D/FOgnZAkjgPfk4+ hSnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=b2rYd9nm3SPkJnxD1ULMt+9UUxBnRy5tHP+SV4VkRQo=; b=h+oJQeEUJ7HdmPvIpQi+J+rpskGSNPIyPg+UFOYAbDF+/SNhCPtZkSwG5HrgF5CfU8 gqnYIZhmNdUvr73OZpph1e7/O4dQeJ9hQ1+OHbLrBwZfQQf8poFfL5PB8mnkoiUZEVPw xRNCjGHeQWoa6jBzeWzoWKgnaXOMDawlgfEzygSrlK0bWFVhd7QSQI2N1MNUtUkQ6x2g fbuGaim9FJiPcp3ucLRRQOtufJYHSjiZNHwnrGdGQsxNMIeCSJCDVwH6Df0V2UymgSuY 2TRbrWToyIIF+mc2apBuJ7g9R7nYYBn9C2UWY5EHAOvgFBlFSW/aXoQhsYURwi7SCcIF CDVQ== X-Gm-Message-State: AOAM5336SS3OFoFSm//PEHrW8ZCz6lgNSzF/Q2AjKY6XcCJm1ohxogbt domZLQVIdD8z2T9x95PK5K2ioQ== X-Google-Smtp-Source: ABdhPJxMqrHax1WTDgzjv84txngVdp7CoHtlWOOyUEWGxNRqf1zfy74uyA46AN2CgXS0aND0busIfg== X-Received: by 2002:a2e:7601:: with SMTP id r1mr11283577ljc.111.1595251462129; Mon, 20 Jul 2020 06:24:22 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id h6sm867829lfc.84.2020.07.20.06.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 06:24:21 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/6] media: docs: Deprecate mfc frame skip control Date: Mon, 20 Jul 2020 16:23:13 +0300 Message-Id: <20200720132313.4810-7-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200720132313.4810-1-stanimir.varbanov@linaro.org> References: <20200720132313.4810-1-stanimir.varbanov@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200720_092424_269423_448D4ED7 X-CRM114-Status: GOOD ( 11.97 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:244 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maheshwar Ajja , Andrzej Hajda , Kamil Debski , Stanimir Varbanov , Jeongtae Park , Kyungmin Park , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Ezequiel Garcia MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Deprecate mfc private frame skip mode control for new clients and use the standard one instead. Signed-off-by: Stanimir Varbanov --- Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 3e6b5d61500b..30899d84f178 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -2816,6 +2816,11 @@ MFC 5.1 Control IDs ``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE`` (enum) + .. note:: + + This control is deprecated. Use the standard + ``V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE`` control instead. + enum v4l2_mpeg_mfc51_video_frame_skip_mode - Indicates in what conditions the encoder should skip frames. If encoding a frame would cause the encoded stream to be larger then a