Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3704426imm; Sun, 10 Jun 2018 23:45:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKbt9WakqNO8w7Iq7RH4b+XCt/uIRfhtArLddUIXQxJ56yrU+8D1A34d+OwYri2JTZXSYGL X-Received: by 2002:aa7:8345:: with SMTP id z5-v6mr16427976pfm.251.1528699529876; Sun, 10 Jun 2018 23:45:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528699529; cv=none; d=google.com; s=arc-20160816; b=OJ9tGAw88zqvAIm+XhsuWNi/q7IwRdDVpf9GdfPRWncD1FL79M+WflWXfom2w+pa+l 75X6pimDplb8fdkPYrrhC5Nmf4tUjMMAvz9pXjwB+/0VB6AOofTSADnDW25klvhspnw6 uGVVZRu+uOw1RcZ7VMJC6tvlpb/DFHBXgkcgFj2/6wYQZPdKGu3WjmpZi2l5gYvkwX+3 +KwiDNILTYYubVvDKaRPykTWzpjSQ9bpH7fgtM667BzljPkbYv3Sx4mhQgaKMSJhVALJ Bq+3OV+YWgZ7R3QICblUIP7ow4f4tGA9CUZzmSxrPNHavyUVvTxVI0cHu676ZxyPburR ZnSA== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=f4M0FLNVufLrdGtWIUpwtSLtXHOJMDav2ToJb5TNqAo=; b=wj098ov09mVXdGqIUCUu8WRV7fhkJNfXbUXwQ95op0dXcmv5cxjYuDx4ULCBlITB2a fqeBa5raK8NQQ5gZTxJpkPQFrWYumSUmSdOknny+clepG69qiluX5IhsrKU3vDxWoVt7 FPhPV9gjVLn/SYRq71VtvmHmYYUE1LeSH9AjwKPFI7dcFg8xsbjMIka/7zuiu2Dc/N69 EqEpWUvIGc5KESEr3jibRItUnTq6BOZjqi32SIk96Nogv5Um/M8RaGpCD3P1o0v7RLuo h4LCwWQuDXTLNV2oh9FVvOSVpEYGxKIP6ezNF7h7oTm73wLXfTSSr/v3oUr9yWbUilAO bUMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pM0yPjzM; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r3-v6si50178679pgf.621.2018.06.10.23.45.15; Sun, 10 Jun 2018 23:45:29 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=pM0yPjzM; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754041AbeFKGov (ORCPT + 99 others); Mon, 11 Jun 2018 02:44:51 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:32789 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753974AbeFKGot (ORCPT ); Mon, 11 Jun 2018 02:44:49 -0400 Received: by mail-ot0-f196.google.com with SMTP id h6-v6so22531209otj.0 for ; Sun, 10 Jun 2018 23:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=f4M0FLNVufLrdGtWIUpwtSLtXHOJMDav2ToJb5TNqAo=; b=pM0yPjzMXoBcgez+UHL1v47B+t0H2XIlH3FSJp/8U975TrnaKU569m0jilXbcT3rFt jpJ2e3xdyQL99qhWktPfOQBaaJGGNJhQ99p4uKVUKbWWA6+oOk5UQgNebaLtLjY0o4NF QNCl3xhp2OC/3eA+jcKwjTom49MRzSrcL8qFyxVhFCcu1s3dZFgXL61+6Et1wV6CrtwR KNRCMAxciS+v2S4XFX7ZTFjtxxd8f27ftIirIZzWQOZoT9kC8Q0phDtZK8aKBMRDRa+T iqZKYR6rXOkHk9iAltm9536RvPYXotrDKgg7Ei3P72zC/2rYlCeH/jDI5Mca3X09EmSJ nISg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=f4M0FLNVufLrdGtWIUpwtSLtXHOJMDav2ToJb5TNqAo=; b=LAbMDAdQir6+9Uu4n2E+LLB0Vyj4uV8WD2FVgXI7fXiHJnca00frG9/unQEhm0oBUd DlpcJAK+nH0x32uRliBXNX39xa04NI5l8i9AMfbDMI9kaFyYTqT0cBXMoJUhFx2iIpCS sXdw9jG4tW2MUAWTRgpQnJp5yJ1SH+IUlp2am4yUzrlDid88stFuID/9lX+T3/2RvkTv NDVEssEJ+L+8ptax0IPhkt1Sh20EtlH4GaUYF6XqRo/9nkRNWt+i5UsK1N95HZQ3EfbM 4EICXZDem44KqPD6YX4PkzvM4HGYAFJG9YqCpEDJqzS2oAURtHaeKbjOjdC7NLAPwthe UmIw== X-Gm-Message-State: APt69E2VXaeE4dXi+aJ0zG2Qnbd1d4WPOmrtlTi7gVnfqgtIxf72ujXS Y8Q2l6Eicmd1R1oApvchp1IIeH3k3+eRee2W5TIVjw== X-Received: by 2002:a9d:3cda:: with SMTP id t26-v6mr9668011otf.309.1528699488968; Sun, 10 Jun 2018 23:44:48 -0700 (PDT) MIME-Version: 1.0 References: <20180530071613.125768-1-keiichiw@chromium.org> <20180530071613.125768-2-keiichiw@chromium.org> In-Reply-To: From: Keiichi Watanabe Date: Mon, 11 Jun 2018 15:44:37 +0900 Message-ID: Subject: Re: [PATCH v2 1/2] media: v4l2-ctrl: Add control for VP9 profile To: nicolas@ndufresne.ca Cc: stanimir.varbanov@linaro.org, Hans Verkuil , linux-arm-kernel@lists.infradead.org, Mauro Carvalho Chehab , tiffany.lin@mediatek.com, andrew-ct.chen@mediatek.com, matthias.bgg@gmail.com, Sakari Ailus , Sylwester Nawrocki , Smitha T Murthy , tom.saeger@oracle.com, Andy Shevchenko , Tomasz Figa , Ricardo Ribalda Delgado , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Hans. Thank you for the review. Your idea sounds good. However, I think that changing V4L2_CID_MPEG_VIDEO_VPX_PROFILE to an enum breaks both of s5p-mfc and venus drivers. This is because they call 'v4l2_ctrl_new_std' for it. For menu controls, 'v4l2_ctrl_new_std_menu' must be used. https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/s5p-m= fc/s5p_mfc_enc.c#L2678 https://elixir.bootlin.com/linux/latest/source/drivers/media/platform/qcom/= venus/vdec_ctrls.c#L133 I can fix them within the commit for adding VP8_PROFILE control, but cannot confirm that it works on real devices since I don't have them. What should I do? Best regards, Keiichi On Fri, Jun 8, 2018 at 10:00 PM Nicolas Dufresne wro= te: > > > > Le ven. 8 juin 2018 08:56, Stanimir Varbanov a =C3=A9crit : >> >> Hi Hans, >> >> On 06/08/2018 12:29 PM, Hans Verkuil wrote: >> > On 05/30/2018 09:16 AM, Keiichi Watanabe wrote: >> >> Add a new control V4L2_CID_MPEG_VIDEO_VP9_PROFILE for selecting desir= ed >> >> profile for VP9 encoder and querying for supported profiles by VP9 en= coder >> >> or decoder. >> >> >> >> An existing control V4L2_CID_MPEG_VIDEO_VPX_PROFILE cannot be >> >> used for querying since it is not a menu control but an integer >> >> control, which cannot return an arbitrary set of supported profiles. >> >> >> >> The new control V4L2_CID_MPEG_VIDEO_VP9_PROFILE is a menu control as >> >> with controls for other codec profiles. (e.g. H264) >> > >> > Please ignore my reply to patch 2/2. I looked at this a bit more and w= hat you >> > should do is to change the type of V4L2_CID_MPEG_VIDEO_VPX_PROFILE to = enum. >> > >> > All other codec profile controls are all enums, so the fact that VPX_P= ROFILE >> > isn't is a bug. Changing the type should not cause any problems since = the same >> > control value is used when you set the control. >> > >> > Sylwester: I see that s5p-mfc uses this control, but it is explicitly = added >> > as an integer type control, so the s5p-mfc driver should not be affect= ed by >> > changing the type of this control. >> > >> > Stanimir: this will slightly change the venus driver, but since it is = a very >> > recent driver I think we can get away with changing the core type of t= he >> > VPX_PROFILE control. I think that's better than ending up with two con= trols >> > that do the same thing. >> >> I agree. Actually the changes shouldn't be so much in venus driver. > > > Also fine on userspace side, since profiles enumeration isn't implemented= yet in FFMPEG, GStreamer, Chrome > > >> >> -- >> regards, >> Stan