From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Keiichi Watanabe <keiichiw@chromium.org>,
linux-arm-kernel@lists.infradead.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Tiffany Lin <tiffany.lin@mediatek.com>,
Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Kamil Debski <kamil@wypas.org>,
Jeongtae Park <jtp.park@samsung.com>,
Andrzej Hajda <a.hajda@samsung.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
Jonathan Corbet <corbet@lwn.net>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Smitha T Murthy <smitha.t@samsung.com>,
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>,
Tomasz Figa <tfiga@chromium.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mediatek@lists.infradead.org,
linux-arm-msm@vger.kernel.org, s.nawrocki@samsung.com
Subject: Re: [PATCH v3 1/3] media: v4l2-ctrl: Change control for VP8 profile to menu control
Date: Thu, 14 Jun 2018 11:04:11 +0300 [thread overview]
Message-ID: <2c5a4dbf-6640-052b-a873-76b4c50abe73@linaro.org> (raw)
In-Reply-To: <20180614074652.162796-2-keiichiw@chromium.org>
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 <keiichiw@chromium.org>
> ---
> .../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.
--
regards,
Stan
next prev parent reply other threads:[~2018-06-14 8:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 7:46 [PATCH v3 0/3] Add controls for VP8/VP9 profile Keiichi Watanabe
2018-06-14 7:46 ` [PATCH v3 1/3] media: v4l2-ctrl: Change control for VP8 profile to menu control Keiichi Watanabe
2018-06-14 8:04 ` Stanimir Varbanov [this message]
2018-06-14 8:13 ` Keiichi Watanabe
2018-06-15 8:51 ` Hans Verkuil
2018-06-14 7:46 ` [PATCH v3 2/3] media: v4l2-ctrl: Add control for VP9 profile Keiichi Watanabe
2018-06-14 8:06 ` Stanimir Varbanov
2018-06-14 9:12 ` Keiichi Watanabe
2018-06-14 7:46 ` [PATCH v3 3/3] media: mtk-vcodec: Support VP9 profile in decoder Keiichi Watanabe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2c5a4dbf-6640-052b-a873-76b4c50abe73@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=a.hajda@samsung.com \
--cc=andrew-ct.chen@mediatek.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=corbet@lwn.net \
--cc=hverkuil@xs4all.nl \
--cc=jtp.park@samsung.com \
--cc=kamil@wypas.org \
--cc=keiichiw@chromium.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=ricardo.ribalda@gmail.com \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@linux.intel.com \
--cc=smitha.t@samsung.com \
--cc=tfiga@chromium.org \
--cc=tiffany.lin@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®