linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Ezequiel Garcia <ezequiel@collabora.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kernel@collabora.com, Jonas Karlman <jonas@kwiboo.se>,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Maxime Ripard <mripard@kernel.org>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
	Jernej Skrabec <jernej.skrabec@siol.net>
Subject: Re: [PATCH v2 3/9] media: Rename stateful codec control macros
Date: Sat, 14 Nov 2020 13:53:49 +0100	[thread overview]
Message-ID: <5b563695-bb40-8309-042b-10c6910d773c@xs4all.nl> (raw)
In-Reply-To: <20201113215121.505173-4-ezequiel@collabora.com>

On 13/11/2020 22:51, Ezequiel Garcia wrote:
> For historical reasons, stateful codec controls are named
> as {}_MPEG_{}. While we can't at this point sanely
> change all control IDs (such as V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER),
> we can least change the more meaningful macros such as classes
> macros.
> 
> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> ---
>  .../userspace-api/media/v4l/dev-mem2mem.rst   |   2 +-
>  .../media/v4l/ext-ctrls-codec.rst             |   4 +-
>  .../media/v4l/extended-controls.rst           |   8 +-
>  .../media/v4l/vidioc-g-ext-ctrls.rst          |   6 +-
>  drivers/media/common/cx2341x.c                |   4 +-
>  drivers/media/platform/s5p-mfc/s5p_mfc_dec.c  |   2 +-
>  drivers/media/platform/s5p-mfc/s5p_mfc_enc.c  |   2 +-
>  drivers/media/v4l2-core/v4l2-ctrls.c          |   4 +-
>  include/media/fwht-ctrls.h                    |   2 +-
>  include/media/h264-ctrls.h                    |  16 +-
>  include/media/hevc-ctrls.h                    |  10 +-
>  include/media/mpeg2-ctrls.h                   |   4 +-
>  include/media/vp8-ctrls.h                     |   2 +-
>  include/uapi/linux/v4l2-controls.h            | 409 +++++++++---------
>  14 files changed, 242 insertions(+), 233 deletions(-)
> 

<snip>

> @@ -1177,4 +1177,13 @@ enum v4l2_detect_md_mode {
>  #define V4L2_CID_DETECT_MD_THRESHOLD_GRID	(V4L2_CID_DETECT_CLASS_BASE + 3)
>  #define V4L2_CID_DETECT_MD_REGION_GRID		(V4L2_CID_DETECT_CLASS_BASE + 4)
>  
> +/* MPEG-compression definitions kept for backwards compatibility */
> +#ifndef __KERNEL__
> +#define V4L2_CTRL_CLASS_MPEG            V4L2_CTRL_CLASS_CODEC
> +#define V4L2_CID_MPEG_CLASS             (V4L2_CTRL_CLASS_MPEG | 1)
> +#define V4L2_CID_MPEG_BASE              (V4L2_CTRL_CLASS_MPEG | 0x900)
> +#define V4L2_CID_MPEG_CX2341X_BASE	(V4L2_CTRL_CLASS_MPEG | 0x1000)
> +#define V4L2_CID_MPEG_MFC51_BASE	(V4L2_CTRL_CLASS_MPEG | 0x1100)

Don't copy the offset value here, just keep this as a straight aliases, e.g.:

#define V4L2_CID_MPEG_MFC51_BASE	V4L2_CID_CODEC_MFC51_BASE

It's safer that way.

Regards,

	Hans

> +#endif
> +
>  #endif
> 


  reply	other threads:[~2020-11-14 12:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 21:51 [PATCH v2 0/9] Stateless H.264 de-staging Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 1/9] media: rkvdec: h264: Support profile and level controls Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 2/9] media: cedrus: " Ezequiel Garcia
2020-11-17 19:24   ` Jernej Škrabec
2020-11-17 19:40     ` Ezequiel Garcia
2020-11-17 19:55       ` Jernej Škrabec
2020-11-17 19:55         ` Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 3/9] media: Rename stateful codec control macros Ezequiel Garcia
2020-11-14 12:53   ` Hans Verkuil [this message]
2020-11-15  1:12     ` Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 4/9] media: Clean stateless control includes Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 5/9] media: controls: Add the stateless codec control class Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 6/9] media: uapi: Move parsed H264 pixel format out of staging Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 7/9] media: uapi: Move the H264 stateless control types " Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 8/9] media: uapi: move H264 stateless controls " Ezequiel Garcia
2020-11-13 21:51 ` [PATCH v2 9/9] media: docs: Move the H264 stateless codec uAPI Ezequiel Garcia
2020-11-14 12:57   ` Hans Verkuil
2020-11-15  1:11     ` Ezequiel Garcia
2020-11-14 12:58 ` [PATCH v2 0/9] Stateless H.264 de-staging Hans Verkuil
2020-11-15  0:02   ` Ezequiel Garcia

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=5b563695-bb40-8309-042b-10c6910d773c@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=ezequiel@collabora.com \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=nicolas.dufresne@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=paul.kocialkowski@bootlin.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;
as well as URLs for NNTP newsgroup(s).