From patchwork Tue Jan 19 07:07:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu-Cheng Li X-Patchwork-Id: 8058511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 36C43BEEE5 for ; Tue, 19 Jan 2016 07:10:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5632D20357 for ; Tue, 19 Jan 2016 07:10:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3095C203F1 for ; Tue, 19 Jan 2016 07:10:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aLQOm-00018X-0W; Tue, 19 Jan 2016 07:08:16 +0000 Received: from mail-pa0-x229.google.com ([2607:f8b0:400e:c03::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aLQOV-0000wY-HH for linux-arm-kernel@lists.infradead.org; Tue, 19 Jan 2016 07:08:01 +0000 Received: by mail-pa0-x229.google.com with SMTP id yy13so353919963pab.3 for ; Mon, 18 Jan 2016 23:07:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RX65NnndcNuP92b6CvOuJlTCxoXS8F0cjpX0ZjyNpHI=; b=NqlcvqduecZbtKMPNL5EO8snyvdDINy2pNXIgKYq0Qc4vpi5GWaezl5SkVGqxQ8PZ+ NzW28SS6VmaVzBe2VXGAcoBRrgfse9Uyb7VR6AJ6GNQ7FtsoRt5skyraYYsOuRAFyJ7w wGhUU8cKiAB3l++xQPVNDKauiTaEdD6X4WC0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RX65NnndcNuP92b6CvOuJlTCxoXS8F0cjpX0ZjyNpHI=; b=AjLZKRdNFuIp9BNi63eSSmHkT0JP1PoFFx3GIOftx7SJz432VvDz8E1oEVJBhpELqA IqTlMAQhojZ6l52LKI1VMwfvb3qpom59/UPwI08mR8ta7F326Kp3Qm7rKBZnwMdo2Jb4 gnIibOONtuoW59qeZSlHOoyN8R91y2qe/wMsV45l/BEAUXRNRlJkcPzvNigzfLTpqWay WtjGsjB+sUUwtKODlulu9RsssjF4E0xDsY87OosIocbjR8NaDTT18n4f/3V4f5HA2SSk SSJJOk/gPmHgKENVizsPPr0YAJb/RP4cRv071qRgwDH4aLXkeLzqVmjqfZiAP3New8fR nO3Q== X-Gm-Message-State: ALoCoQk4UqHKNi2xblvsVJ2km2ioi8NNlda18M4fNKO0JNCOpNqcSALqXK4zlU/PdkJV06sFZFkI+xr9tnK8xDzD1UP7Xi9i2Q== X-Received: by 10.66.237.102 with SMTP id vb6mr42184559pac.133.1453187258700; Mon, 18 Jan 2016 23:07:38 -0800 (PST) Received: from wuchengli-z840.tpe.corp.google.com ([172.30.210.26]) by smtp.gmail.com with ESMTPSA id e17sm38715807pfd.4.2016.01.18.23.07.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jan 2016 23:07:38 -0800 (PST) From: Wu-Cheng Li To: pawel@osciak.com, mchehab@osg.samsung.com, hverkuil@xs4all.nl, k.debski@samsung.com, crope@iki.fi, standby24x7@gmail.com, wuchengli@chromium.org, nicolas.dufresne@collabora.com, ricardo.ribalda@gmail.com, ao2@ao2.it, bparrot@ti.com, kyungmin.park@samsung.com, jtp.park@samsung.com Subject: [PATCH v4 2/2] s5p-mfc: add the support of V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME. Date: Tue, 19 Jan 2016 15:07:10 +0800 Message-Id: <1453187230-97231-3-git-send-email-wuchengli@chromium.org> X-Mailer: git-send-email 2.6.0.rc2.230.g3dd15c0 In-Reply-To: <1453187230-97231-1-git-send-email-wuchengli@chromium.org> References: <1453187230-97231-1-git-send-email-wuchengli@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160118_230759_722609_3F49F8BF X-CRM114-Status: GOOD ( 11.23 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, djkurtz@chromium.org, tiffany.lin@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a new control V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME to force an encoder key frame. It is the same as requesting V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME. Signed-off-by: Wu-Cheng Li Acked-by: Sylwester Nawrocki --- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c index 0434f02..034b5c1 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c @@ -212,6 +212,14 @@ static struct mfc_control controls[] = { .menu_skip_mask = 0, }, { + .id = V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME, + .type = V4L2_CTRL_TYPE_BUTTON, + .minimum = 0, + .maximum = 0, + .step = 0, + .default_value = 0, + }, + { .id = V4L2_CID_MPEG_VIDEO_VBV_SIZE, .type = V4L2_CTRL_TYPE_INTEGER, .minimum = 0, @@ -1423,6 +1431,10 @@ static int s5p_mfc_enc_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE: ctx->force_frame_type = ctrl->val; break; + case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME: + ctx->force_frame_type = + V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME; + break; case V4L2_CID_MPEG_VIDEO_VBV_SIZE: p->vbv_size = ctrl->val; break;