From patchwork Tue Jul 8 14:30:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Utkin X-Patchwork-Id: 4505591 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B5F8EBEEAA for ; Tue, 8 Jul 2014 14:30:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2C1C2021B for ; Tue, 8 Jul 2014 14:30:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 99038201DE for ; Tue, 8 Jul 2014 14:30:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752728AbaGHOav (ORCPT ); Tue, 8 Jul 2014 10:30:51 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:40091 "EHLO mail-la0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750834AbaGHOau (ORCPT ); Tue, 8 Jul 2014 10:30:50 -0400 Received: by mail-la0-f47.google.com with SMTP id s18so3978542lam.6 for ; Tue, 08 Jul 2014 07:30:48 -0700 (PDT) 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; bh=qew7GdQKplUPt/52+e1bDJBCbCq+G2smDYbz6Zppqdw=; b=VTI46dQ80S7xZ6DLAmIHNKryfYF6Vl6NWcCIEVOWtmAkopdy8YaqHrirB+U5W86GdA f2GMcPJnBhfFXJap+YLKglGKgXaKmIQWqD0TMCOKDIS53SnJHiNzn5TaIoLTJsf2P/K5 1d5Rc0A6HInB2jzxGy9LigwISnevwHcv6TsTnIhp/jPesrJMwZuUg2MVZ+mzhRsosgPG gDF7gqsJ2bcB67VkBYToY64AHXenUDRISw95YqhFFUSwKJEDsvabKWJ5EvyGH/ErvBPw Vw8vTJjmWlgTg711QuZKw9gcqPA7tMWNNEw+97720Nh6H5QCwhXIt+cSu2iSR5YtMlL2 m2NA== X-Gm-Message-State: ALoCoQkWDqFc0mRfHzOs6HZu/1An0iAiAYtwocN9HO3cU8cPl8PROD+3dpis1qTROsEP7+CNK1mL X-Received: by 10.112.139.196 with SMTP id ra4mr8865526lbb.28.1404829848789; Tue, 08 Jul 2014 07:30:48 -0700 (PDT) Received: from localhost.localdomain (alfa-g11.tenet.odessa.ua. [195.138.73.151]) by mx.google.com with ESMTPSA id ks4sm18431633lac.18.2014.07.08.07.30.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jul 2014 07:30:47 -0700 (PDT) From: Andrey Utkin To: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linux-media@vger.kernel.org Cc: gregkh@linuxfoundation.org, m.chehab@samsung.com, ismael.luceno@corp.bluecherry.net, Andrey Utkin Subject: [PATCH 1/2] solo6x10: expose encoder quantization setting as V4L2 control Date: Tue, 8 Jul 2014 17:30:33 +0300 Message-Id: <1404829834-8747-1-git-send-email-andrey.utkin@corp.bluecherry.net> X-Mailer: git-send-email 1.8.3.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 solo6*10 boards have configurable quantization parameter which takes values from 0 to 31, inclusively. This change enables setting it with ioctl VIDIOC_S_CTRL with id V4L2_CID_MPEG_VIDEO_H264_MIN_QP. --- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c index b8ff113..bf6eb06 100644 --- a/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c @@ -1111,6 +1111,9 @@ static int solo_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDEO_GOP_SIZE: solo_enc->gop = ctrl->val; return 0; + case V4L2_CID_MPEG_VIDEO_H264_MIN_QP: + solo_enc->qp = ctrl->val; + return 0; case V4L2_CID_MOTION_THRESHOLD: solo_enc->motion_thresh = ctrl->val; if (!solo_enc->motion_global || !solo_enc->motion_enabled) @@ -1260,6 +1263,8 @@ static struct solo_enc_dev *solo_enc_alloc(struct solo_dev *solo_dev, V4L2_CID_SHARPNESS, 0, 15, 1, 0); v4l2_ctrl_new_std(hdl, &solo_ctrl_ops, V4L2_CID_MPEG_VIDEO_GOP_SIZE, 1, 255, 1, solo_dev->fps); + v4l2_ctrl_new_std(hdl, &solo_ctrl_ops, + V4L2_CID_MPEG_VIDEO_H264_MIN_QP, 0, 31, 1, SOLO_DEFAULT_QP); v4l2_ctrl_new_custom(hdl, &solo_motion_threshold_ctrl, NULL); v4l2_ctrl_new_custom(hdl, &solo_motion_enable_ctrl, NULL); v4l2_ctrl_new_custom(hdl, &solo_osd_text_ctrl, NULL);