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: 8058471 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 413D49F744 for ; Tue, 19 Jan 2016 07:07:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7041F20411 for ; Tue, 19 Jan 2016 07:07:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B10E203F1 for ; Tue, 19 Jan 2016 07:07:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757325AbcASHHm (ORCPT ); Tue, 19 Jan 2016 02:07:42 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34878 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757321AbcASHHj (ORCPT ); Tue, 19 Jan 2016 02:07:39 -0500 Received: by mail-pa0-f41.google.com with SMTP id ho8so185817672pac.2 for ; Mon, 18 Jan 2016 23:07:38 -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=DsM+AKiV/XMx52gdKDD8Zl07WWt8eTjeRBiL6Tx0xHE0Sp5xb8nHlXG9wSzBDAyGf2 eF57BVhLTHs80BDz/Y4eXd39gYNMa02XQXhzCndoZuJPpaP4lYw1jhrMKt2jxRYbhPDa vGqanZFL22OFul36lsgUr7e7tCNGNCOdM9B8ZPmdn9+scHsDOz4/LcNpyDnSCoE6a4dj zg74vjENL/yeOQtLkklR4SErhpmNEF7sff2mdVtMSD9IYuRLE7yTgj8JowM+l7hKd9Wi W6fFIpCoIQguO20pMvh0nHzckvu1tAm52y/wX3QfNzRTNHb9AjurGiVNQ5oYWGtKz8Tl /0OA== X-Gm-Message-State: ALoCoQnCnYB7dYUNC0D9eCPWWffDxE/un37KatejeBKDuiOYCftZ5eDbD3YEVDrIH1Aqjj8d/WO++ohzoLBOeoi5eKva8QPveg== 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 Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tiffany.lin@mediatek.com, djkurtz@chromium.org 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> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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;