From patchwork Tue Jul 8 15:23:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Utkin X-Patchwork-Id: 4505891 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 522279F39B for ; Tue, 8 Jul 2014 15:24:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E10220211 for ; Tue, 8 Jul 2014 15:24:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BE6D22020F for ; Tue, 8 Jul 2014 15:24:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754376AbaGHPX5 (ORCPT ); Tue, 8 Jul 2014 11:23:57 -0400 Received: from mail-la0-f53.google.com ([209.85.215.53]:58079 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754338AbaGHPX4 (ORCPT ); Tue, 8 Jul 2014 11:23:56 -0400 Received: by mail-la0-f53.google.com with SMTP id b8so4022136lan.26 for ; Tue, 08 Jul 2014 08:23:54 -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=1UIMnZxa4feVvPqMTI/G6E3eD25C2RNNylBAe8DkaWE=; b=nJ1uKQZ2SJ3xLhXZdpD3bajgkpQCbqP8LS3Eoey3XGPO8tJv4i3GS1blyUtTY7tX4E Kl2F3aqBYXek1m1ROdTumFY0dB2+xZ4CdkqhgbsJMvBiqoW/0Rmzaeb3e8wmw75dXane UqCSryBOoK1B8cxRwwk0xyaviOOdR6lDN3eujuDlu4Uy/oz1Ty4VWbRs/y28CVcl5zqU 5h27YGu8OU01wgtQjxWeQkNX48xwNeucMYhvWezuwySyP9n8VJlLaoUsg2dgDsMPKWHE QzE2ynWi2iFc3TMKK0S7Kv/iEtNK/Q2BoKEG7snhOcwxrPHl86aHVuH9s1ABjWk9E00u zSEQ== X-Gm-Message-State: ALoCoQnco3yYNcqTdwX7t+A0DdVSs39Iy2tJ4fD3rCD7+R3udLBlzfrxDDmvVV0WTDJYKbvxhjZT X-Received: by 10.112.19.133 with SMTP id f5mr26045387lbe.48.1404833034608; Tue, 08 Jul 2014 08:23:54 -0700 (PDT) Received: from localhost.localdomain (alfa-g11.tenet.odessa.ua. [195.138.73.151]) by mx.google.com with ESMTPSA id q3sm20701481lae.23.2014.07.08.08.23.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jul 2014 08:23:53 -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 18:23:32 +0300 Message-Id: <1404833013-18627-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. Signed-off-by: Andrey Utkin Signed-off-by: Ismael Luceno --- 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);