Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1645074imm; Thu, 14 Jun 2018 01:13:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJxckx46BWUAR712L1Y2cnZXGadnv9kw4MvvT9ywp0+1ull4D0HKSyskEg7H4737YFfH5AV X-Received: by 2002:a17:902:bc4c:: with SMTP id t12-v6mr1858936plz.177.1528964030196; Thu, 14 Jun 2018 01:13:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528964030; cv=none; d=google.com; s=arc-20160816; b=v9d3eHSRn3s4j48VkY3dBRd7ck8co97q+arXKjVjkNfUAyokGFA9DIxe24GNerEY8l d9K8Hbt3piR5mvhCOK7NvsTp9Og2R2FG0gApgDvxD1WEzvWxSHpW6ww1f38Q6gXqZrT1 SMU0kTXpqIUYXg+i7ED8um4lD52nVwoRId/z/DVqafW667EYkpGPr8B+vxCJQM8la0ex Tjc2/5McHYG1aApiTuSfuBQFKYOan04otQkgkhNF0H9LwhKhHn+xHXF48w895pYomkR2 qaWbnrSvALi6t847QyVpHbwIJs+/GJN9aOzHQVf8kL7OOph2jmnVcq4epp7MJoXxtDy4 5HbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=/8EIB1DfM8qbKFAopfUKPoAJD6k6g24T+qTVRUFpM8c=; b=v01xDZVUb9IVt6T9qtwrcXt1YksNkRetxWh35T9jRVCl1TDv1HLbVqDFGz+63bWWpN Rfg7BrsqG9yOR0G52+kSO+HK8psoVBNR3Z81w76+lNncq3W1RmExqSXbaSkgLGltSudp n6vd9h+G/oK8KEkcbS0r4aFzkQL9uFep3cJkA8EkNVz4Z/CwYnCBU4MeeGrdZD3sLTvF aHIOCbchL3+iH5NnPfurOJmnExUb5m2YEYjqxBsdCRYOzEcZTqRcKHwsaH/qFZMqGetu VRkaXCTrFysBt883xTQbbV+J8qYqldIN62QbFkXRsCGHWaREwGFoWiosHw/E5LaGy/5V E2Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FDoTJWRq; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7-v6si4731688plt.115.2018.06.14.01.13.35; Thu, 14 Jun 2018 01:13:50 -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=@chromium.org header.s=google header.b=FDoTJWRq; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754685AbeFNINJ (ORCPT + 99 others); Thu, 14 Jun 2018 04:13:09 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:45009 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752813AbeFNINE (ORCPT ); Thu, 14 Jun 2018 04:13:04 -0400 Received: by mail-lf0-f67.google.com with SMTP id 36-v6so7973626lfr.11 for ; Thu, 14 Jun 2018 01:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/8EIB1DfM8qbKFAopfUKPoAJD6k6g24T+qTVRUFpM8c=; b=FDoTJWRq7bvg9kgq7LalDm6bLjMEnrZQQzI/R3oEYbNPajUZ7EtghgXimVB365u8ax UgbyIlMo5OjzhYOeH3zTy5L/cZa5PhysFaX/0Js+LC5mZsfZqEIm7n1psFi4lhMLLV6E od9GNdhOU9CrPOel097RWJKKfx1mVc5dBKoHk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/8EIB1DfM8qbKFAopfUKPoAJD6k6g24T+qTVRUFpM8c=; b=Jxg81oMRp2xbIkDv9R0S1sWeEhmk6f90wJTcxUf0Vn4fuzpcN6pgJA3q5ocKqW6k5i 7dwaaDTg3Ns7ntuK4/Tvp4M8N/aDFL3rjPkfMRdGtmtIz57xirF6D3o1irVoy15z1ahN SFdMICe8F2WkCUsbbkZnbwtk4O+FVABfHmIDcqwaoo/MH3bzav6s2EHHWpM3bFo1ZsPQ WqUSODshjc0ZWOX/wdPUkaRdyA5wgnvL2wd7J47ejQEZ/WcGmpSUJrZ3zswkqTb9hZ+8 WBpEPe5QeSq75jNPC8JmudyzuZ2YTvc7ZsAtoBuvmyo7R4M0Ne4UHlYXZft6G0bL2KcE c/vg== X-Gm-Message-State: APt69E1ErpHMd8EiiZywbUPeQwXeP5zYKpqx0AOw14tRenuuqTeEUU7e eE+uZ++f63RLuCW+VDatSMizgdsL++QBD8q1XjiWkg== X-Received: by 2002:a2e:5687:: with SMTP id k7-v6mr1054599lje.140.1528963982818; Thu, 14 Jun 2018 01:13:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5f96:0:0:0:0:0 with HTTP; Thu, 14 Jun 2018 01:13:02 -0700 (PDT) In-Reply-To: <2c5a4dbf-6640-052b-a873-76b4c50abe73@linaro.org> References: <20180614074652.162796-1-keiichiw@chromium.org> <20180614074652.162796-2-keiichiw@chromium.org> <2c5a4dbf-6640-052b-a873-76b4c50abe73@linaro.org> From: Keiichi Watanabe Date: Thu, 14 Jun 2018 17:13:02 +0900 Message-ID: Subject: Re: [PATCH v3 1/3] media: v4l2-ctrl: Change control for VP8 profile to menu control To: Stanimir Varbanov Cc: "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Mauro Carvalho Chehab , Tiffany Lin , Andrew-CT Chen , Matthias Brugger , Kyungmin Park , Kamil Debski , Jeongtae Park , Andrzej Hajda , Hans Verkuil , Jonathan Corbet , Sakari Ailus , Smitha T Murthy , Ricardo Ribalda Delgado , Tomasz Figa , Andy Shevchenko , Linux Media Mailing List , Linux Kernel Mailing List , linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, Sylwester Nawrocki Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks, Stanimir On Thu, Jun 14, 2018 at 5:04 PM, Stanimir Varbanov wrote: > Hi Keiichi, > > On 06/14/2018 10:46 AM, Keiichi Watanabe wrote: >> Add a menu control V4L2_CID_MPEG_VIDEO_VP8_PROFILE for VP8 profile and >> make V4L2_CID_MPEG_VIDEO_VPX_PROFILE an alias of it. This new control >> is used to select a desired profile for VP8 encoder, and query for >> supported profiles by VP8 encoder/decoder. >> >> Though we have originally a control V4L2_CID_MPEG_VIDEO_VPX_PROFILE and its name >> contains 'VPX', it works only for VP8 because supported profiles usually differ >> between VP8 and VP9. In addition, this contorol 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_VP8_PROFILE is a menu control as with >> controls for other codec profiles. (e.g. H264) >> >> In addition, this patch also fixes the use of >> V4L2_CID_MPEG_VIDEO_VPX_PROFILE in drivers of Qualcomm's venus and >> Samsung's s5p-mfc. >> >> Signed-off-by: Keiichi Watanabe >> --- >> .../media/uapi/v4l/extended-controls.rst | 27 ++++++++++++++++--- >> drivers/media/platform/qcom/venus/core.h | 2 +- >> .../media/platform/qcom/venus/hfi_helper.h | 12 ++++----- >> .../media/platform/qcom/venus/vdec_ctrls.c | 10 ++++--- >> drivers/media/platform/qcom/venus/venc.c | 14 +++++----- >> .../media/platform/qcom/venus/venc_ctrls.c | 12 +++++---- >> drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 15 +++++------ >> drivers/media/v4l2-core/v4l2-ctrls.c | 12 ++++++++- >> include/uapi/linux/v4l2-controls.h | 11 +++++++- >> 9 files changed, 79 insertions(+), 36 deletions(-) >> >> diff --git a/Documentation/media/uapi/v4l/extended-controls.rst b/Documentation/media/uapi/v4l/extended-controls.rst >> index 03931f9b1285..de99eafb0872 100644 >> --- a/Documentation/media/uapi/v4l/extended-controls.rst >> +++ b/Documentation/media/uapi/v4l/extended-controls.rst >> @@ -1955,9 +1955,30 @@ enum v4l2_vp8_golden_frame_sel - >> ``V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (integer)`` >> Quantization parameter for a P frame for VP8. >> >> -``V4L2_CID_MPEG_VIDEO_VPX_PROFILE (integer)`` >> - Select the desired profile for VPx encoder. Acceptable values are 0, >> - 1, 2 and 3 corresponding to encoder profiles 0, 1, 2 and 3. >> +.. _v4l2-mpeg-video-vp8-profile: >> + >> +``V4L2_CID_MPEG_VIDEO_VP8_PROFILE`` >> + (enum) >> + >> +enum v4l2_mpeg_video_vp8_profile - >> + This control allows to select the profile for VP8 encoder. >> + This is also used to enumerate supported profiles by VP8 encoder or decoder. >> + Possible values are: >> + >> + >> + >> +.. flat-table:: >> + :header-rows: 0 >> + :stub-columns: 0 >> + >> + * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_0`` >> + - Profile 0 >> + * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_1`` >> + - Profile 1 >> + * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_2`` >> + - Profile 2 >> + * - ``V4L2_MPEG_VIDEO_VP8_PROFILE_3`` >> + - Profile 3 >> >> >> High Efficiency Video Coding (HEVC/H.265) Control Reference >> diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h >> index 0360d295f4c8..f242e7f9f6a2 100644 >> --- a/drivers/media/platform/qcom/venus/core.h >> +++ b/drivers/media/platform/qcom/venus/core.h >> @@ -159,7 +159,7 @@ struct venc_controls { >> struct { >> u32 mpeg4; >> u32 h264; >> - u32 vpx; >> + u32 vp8; >> } profile; >> struct { >> u32 mpeg4; >> diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h >> index 55d8eb21403a..07bf49dd2ec6 100644 >> --- a/drivers/media/platform/qcom/venus/hfi_helper.h >> +++ b/drivers/media/platform/qcom/venus/hfi_helper.h >> @@ -333,12 +333,12 @@ >> #define HFI_VC1_LEVEL_3 0x00000040 >> #define HFI_VC1_LEVEL_4 0x00000080 >> >> -#define HFI_VPX_PROFILE_SIMPLE 0x00000001 >> -#define HFI_VPX_PROFILE_ADVANCED 0x00000002 >> -#define HFI_VPX_PROFILE_VERSION_0 0x00000004 >> -#define HFI_VPX_PROFILE_VERSION_1 0x00000008 >> -#define HFI_VPX_PROFILE_VERSION_2 0x00000010 >> -#define HFI_VPX_PROFILE_VERSION_3 0x00000020 >> +#define HFI_VP8_PROFILE_SIMPLE 0x00000001 >> +#define HFI_VP8_PROFILE_ADVANCED 0x00000002 >> +#define HFI_VP8_PROFILE_VERSION_0 0x00000004 >> +#define HFI_VP8_PROFILE_VERSION_1 0x00000008 >> +#define HFI_VP8_PROFILE_VERSION_2 0x00000010 >> +#define HFI_VP8_PROFILE_VERSION_3 0x00000020 > > Please do not rename these driver internal defines, just leave VPX as it > is now. > I got it. I'll fix it in the next revision of the patch. Best regards, Keiichi > > -- > regards, > Stan