Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp203127imm; Fri, 5 Oct 2018 02:19:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV60IbId6KeZda6lQC+r13dZUc4c3CGX0PoZ91HI7E8+IDjgYI3dlMXp7/sCcwIEIAxpTz8lK X-Received: by 2002:a63:ff23:: with SMTP id k35-v6mr9424388pgi.62.1538731155520; Fri, 05 Oct 2018 02:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538731155; cv=none; d=google.com; s=arc-20160816; b=QFL/WairA3FxydVUWAzMwVGVg2i/p3RWszTJJKWRTmptO68kCeQRX8chokV1FPM5/b YrIoBw/Nk5KbuRCW5F8ZTOQAIkYzj7aA8S3694mDxAErXoNVuaSqNZ1R2XzMfNmCQ9Ay KztFFxrRH9ATP9TroP6PCiotFEzMn1HzsnODDVQ73h1G7gituMe5hi6UBX/IMpg4PQ4V K7LFnqTn3e4+pc8f3sVbMh172kXi4yFPpdIZRJKcgkHy8oO7h1xLEbQz47flRgXfNCfp UrIMovyClAyAOTRXokisAyHxKlSMn7QNSwiqvUSEszICAPfGJhjRLenNYYG/qHmTU6qV s3fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Iw7fIJOkHSEuNqvAPUBN4U1j78w3jjBqrgNsbcsRlPg=; b=wCTnhR1Ckl5YWeX1bQi+zU4wVyOI+zXvLFEcx0T2VmMtxLDRTciW7P5vtCIucLGws1 98EJWplPESHfLYXSGLitHRvdkHYr55JaBv1gZqL0S423jA1UYg8NCpTMw5whXbDvspqb NsaoqfhBztYT+967oDclAH8Owg57crwzXbeOhMJSZzve/cbLyYwuGZ0mYoBZquudBc2C ngyQEBx7jxMwp8bQIL1lqYHgSW5Z2YwSd/QOpylM775oCpYu88fg1gwptQOovtG8uQz3 1lhV2XrJa+KSmpuOOGKgTTXlBOh//ij2BIDOpvRfOXk0AKixYny9oRx/O6XUz2kqkD8l 39Ug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si7890478pli.238.2018.10.05.02.18.59; Fri, 05 Oct 2018 02:19:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728715AbeJEQQd (ORCPT + 99 others); Fri, 5 Oct 2018 12:16:33 -0400 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:51365 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727809AbeJEQQc (ORCPT ); Fri, 5 Oct 2018 12:16:32 -0400 Received: from [IPv6:2001:420:44c1:2579:51eb:3c7a:5e3a:802b] ([IPv6:2001:420:44c1:2579:51eb:3c7a:5e3a:802b]) by smtp-cloud8.xs4all.net with ESMTPA id 8MFogK7Z40ZZE8MFrgnLOS; Fri, 05 Oct 2018 11:18:40 +0200 Subject: Re: [PATCH] media: vivid: Support 480p for webcam capture To: Keiichi Watanabe , Linux Media Mailing List Cc: Mauro Carvalho Chehab , Linux Kernel Mailing List , Tomasz Figa , Ricky Liang , Shik Chen References: <20181003070656.193854-1-keiichiw@chromium.org> From: Hans Verkuil Message-ID: <5b236e95-b737-51b3-df4f-eea41a36735e@xs4all.nl> Date: Fri, 5 Oct 2018 11:18:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfEIfFPaTD6NtdO+LnGDHLqo/szkqT8hlw7N63uTdSl3uFE+YBrbhK/S43ALch4DqcUKDzpaS33V8s0macMv82ykVEHKHzbFcHSRTdZLs7xHbb3p6033D WOShh+/3z7DWW2rdSYvKPMSkTj5HpZj/oJ/e7achZfouxQuc4wott/05Z5/MoxphBQF9Sqszv6PfbiSnHZtLOBg8OY8MhwRA4eVVgOG1djBf5rJ77qxnBniV 2HGoY2LqbgGexXxraATqT1iqtHgytZBpRAIKTnRz375pHR9BgLDx0nLemGTMcidz2+btUnJv7YIoh1sSvSziR8e7MYw2WsLccpCjROnawE8FvqffgtNCXAfQ 17YDZ4YQi7/K2rR/ZrjrvQG+7+9e58CwiXujvNDe4lEd+1/kXEDF/bjcqAsieEKO8mnKEoi5zFjkpTcUwed6fIWSrKgDz5lgsCHqvNcx16uAAMs2bVP5HIag OMEDCF6Z5vzVD4AP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/03/18 09:08, Keiichi Watanabe wrote: > I think 480p is a common frame size and it's worth supporting in vivid. > But, my patch might be ad-hoc. Actually, I'm not sure which values are > suitable for the intervals. I can apply this ad-hoc patch as-is. Or do you want to postpone this and work on a more generic solution? Although I am not sure what that would look like. Proposals are welcome! The main purpose of this code is to have something that kind of acts like a real webcam that has various resolutions, and a slower framerate for higher resolutions (as you would expect). Regards, Hans > > We might want to add a more flexible/extensible way to specify frame sizes. > e.g. passing frame sizes and intervals as module parameters > > Kei > > On Wed, Oct 3, 2018 at 4:06 PM, Keiichi Watanabe wrote: >> Support 640x480 as a frame size for video input devices of vivid. >> >> Signed-off-by: Keiichi Watanabe >> --- >> drivers/media/platform/vivid/vivid-vid-cap.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c >> index 58e14dd1dcd3..da80bf4bc365 100644 >> --- a/drivers/media/platform/vivid/vivid-vid-cap.c >> +++ b/drivers/media/platform/vivid/vivid-vid-cap.c >> @@ -51,7 +51,7 @@ static const struct vivid_fmt formats_ovl[] = { >> }; >> >> /* The number of discrete webcam framesizes */ >> -#define VIVID_WEBCAM_SIZES 5 >> +#define VIVID_WEBCAM_SIZES 6 >> /* The number of discrete webcam frameintervals */ >> #define VIVID_WEBCAM_IVALS (VIVID_WEBCAM_SIZES * 2) >> >> @@ -59,6 +59,7 @@ static const struct vivid_fmt formats_ovl[] = { >> static const struct v4l2_frmsize_discrete webcam_sizes[VIVID_WEBCAM_SIZES] = { >> { 320, 180 }, >> { 640, 360 }, >> + { 640, 480 }, >> { 1280, 720 }, >> { 1920, 1080 }, >> { 3840, 2160 }, >> @@ -75,6 +76,8 @@ static const struct v4l2_fract webcam_intervals[VIVID_WEBCAM_IVALS] = { >> { 1, 5 }, >> { 1, 10 }, >> { 1, 15 }, >> + { 1, 15 }, >> + { 1, 25 }, >> { 1, 25 }, >> { 1, 30 }, >> { 1, 50 }, >> -- >> 2.19.0.605.g01d371f741-goog >>