From patchwork Sun Mar 10 14:04:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Volokh Konstantin X-Patchwork-Id: 2244801 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 93E97DF24C for ; Sun, 10 Mar 2013 14:12:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751730Ab3CJOMQ (ORCPT ); Sun, 10 Mar 2013 10:12:16 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:33254 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499Ab3CJOMP (ORCPT ); Sun, 10 Mar 2013 10:12:15 -0400 Received: by mail-la0-f54.google.com with SMTP id gw10so3008160lab.41 for ; Sun, 10 Mar 2013 07:12:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=gKwOi368y8gQl7sOnFIN93hOMF0GcAP5qlmMnKY8k0g=; b=ZIoQYAyi4uAagNR4QJXXaBVaEfWrQc+tql8WmOFALdGJdaHhy6+8jD2SqRnnHGeanI Emqu033B0tK0J/lhoc/NfbqYUFwAYwjvupI1Xf2gnJGlP5ryp9DGBq1jrjTicQTTnL47 2fROy3cXpOZPgXPzEvNmm+4Ztz74C38mkSaZWCEqcCt2gH45gAHlMhMAW3tT0uFqWZba gLZxbhP/yUApwSsQiq4PJUTnGQCiSDkgIqf9OgndW6X0jS0HncjC7SH/T5pjLVHCFYbi GwVuGZs+gtmL1zDLZFQO/3il24jl8FdRlGCXRzhciO46zfYeU1ge5DUZLgLFhegUGBM7 WFdg== X-Received: by 10.152.105.17 with SMTP id gi17mr7353003lab.46.1362924734334; Sun, 10 Mar 2013 07:12:14 -0700 (PDT) Received: from Volokh.Home (host-124-159-66-217.spbmts.ru. [217.66.159.124]) by mx.google.com with ESMTPS id m2sm3542813lbz.7.2013.03.10.07.12.05 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 10 Mar 2013 07:12:13 -0700 (PDT) From: Volokh Konstantin To: hverkuil@xs4all.nl, linux-media@vger.kernel.org Cc: Volokh Konstantin Subject: [PATCH 3/7] hverkuil/go7007: staging: media: go7007: Restore b_frame control Date: Sun, 10 Mar 2013 18:04:42 +0400 Message-Id: <1362924286-23995-3-git-send-email-volokh84@gmail.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1362924286-23995-1-git-send-email-volokh84@gmail.com> References: <1362924286-23995-1-git-send-email-volokh84@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Volokh Konstantin --- drivers/staging/media/go7007/go7007-priv.h | 1 + drivers/staging/media/go7007/go7007-v4l2.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/go7007/go7007-priv.h b/drivers/staging/media/go7007/go7007-priv.h index e969df1..fc8aac4 100644 --- a/drivers/staging/media/go7007/go7007-priv.h +++ b/drivers/staging/media/go7007/go7007-priv.h @@ -174,6 +174,7 @@ struct go7007 { struct v4l2_ctrl *mpeg_video_gop_size; struct v4l2_ctrl *mpeg_video_gop_closure; struct v4l2_ctrl *mpeg_video_bitrate; + struct v4l2_ctrl *mpeg_video_b_frames; }; struct v4l2_ctrl *mpeg_video_aspect_ratio; enum { STATUS_INIT, STATUS_ONLINE, STATUS_SHUTDOWN } status; diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c index 96538f6..91e5572 100644 --- a/drivers/staging/media/go7007/go7007-v4l2.c +++ b/drivers/staging/media/go7007/go7007-v4l2.c @@ -155,7 +155,7 @@ static void set_formatting(struct go7007 *go) go->gop_header_enable = 1; go->repeat_seqhead = 0; go->dvd_mode = 0; - go->ipb = 0; + go->ipb = v4l2_ctrl_g_ctrl(go->mpeg_video_b_frames); switch (v4l2_ctrl_g_ctrl(go->mpeg_video_aspect_ratio)) { default: @@ -1143,7 +1143,7 @@ int go7007_v4l2_ctrl_init(struct go7007 *go) struct v4l2_ctrl *ctrl; int rv; - v4l2_ctrl_handler_init(hdl, 12); + v4l2_ctrl_handler_init(hdl, 24); go->mpeg_stream_type = v4l2_ctrl_new_std_menu(hdl, &go7007_ctrl_ops, V4L2_CID_MPEG_STREAM_TYPE, V4L2_MPEG_STREAM_TYPE_MPEG2_DVD, @@ -1160,6 +1160,9 @@ int go7007_v4l2_ctrl_init(struct go7007 *go) go->mpeg_video_bitrate = v4l2_ctrl_new_std(hdl, &go7007_ctrl_ops, V4L2_CID_MPEG_VIDEO_BITRATE, 64000, 10000000, 1, 1500000); + go->mpeg_video_b_frames = v4l2_ctrl_new_std(hdl, &go7007_ctrl_ops, + V4L2_CID_MPEG_VIDEO_B_FRAMES, + 0, 2, 1, 0); go->mpeg_video_aspect_ratio = v4l2_ctrl_new_std_menu(hdl, &go7007_ctrl_ops, V4L2_CID_MPEG_VIDEO_ASPECT, V4L2_MPEG_VIDEO_ASPECT_16x9, 0,