[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQ4QGN2kdHxKwLBj@lizhi-Precision-Tower-5810>
Date: Fri, 7 Nov 2025 10:28:24 -0500
From: Frank Li <Frank.li@....com>
To: ming.qian@....nxp.com
Cc: mchehab@...nel.org, hverkuil-cisco@...all.nl, nicolas@...fresne.ca,
sebastian.fricke@...labora.com, shawnguo@...nel.org,
s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
linux-imx@....com, xiahong.bao@....com, eagle.zhou@....com,
imx@...ts.linux.dev, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 1/4] media: v4l: dev-decoder: Add source change
V4L2_EVENT_SRC_CH_COLORSPACE
On Fri, Apr 18, 2025 at 04:54:16PM +0800, ming.qian@....nxp.com wrote:
> From: Ming Qian <ming.qian@....nxp.com>
>
> Add a new source change V4L2_EVENT_SRC_CH_COLORSPACE that
change event V4l2...
> indicates colorspace change in the stream.
wrap at 75 char and add empty line between paragraph.
> The change V4L2_EVENT_SRC_CH_RESOLUTION will always affect
The event ...
Frank
> the allocation, but V4L2_EVENT_SRC_CH_COLORSPACE won't.
>
> Signed-off-by: Ming Qian <ming.qian@....nxp.com>
> ---
> v3
> - Improve the description according to comments
>
> .../userspace-api/media/v4l/vidioc-dqevent.rst | 12 ++++++++++++
> .../userspace-api/media/videodev2.h.rst.exceptions | 1 +
> include/uapi/linux/videodev2.h | 1 +
> 3 files changed, 14 insertions(+)
>
> diff --git a/Documentation/userspace-api/media/v4l/vidioc-dqevent.rst b/Documentation/userspace-api/media/v4l/vidioc-dqevent.rst
> index 8db103760930..f317af57a92c 100644
> --- a/Documentation/userspace-api/media/v4l/vidioc-dqevent.rst
> +++ b/Documentation/userspace-api/media/v4l/vidioc-dqevent.rst
> @@ -369,6 +369,18 @@ call.
> loss of signal and so restarting streaming I/O is required in order for
> the hardware to synchronize to the video signal.
>
> + * - ``V4L2_EVENT_SRC_CH_COLORSPACE``
> + - 0x0002
> + - This event gets triggered when a colorspace change is detected at
> + an input. This can come from a video decoder or a video receiver.
> + Applications will query the new colorspace information
> + (if any, the signal may also have been lost). If the signal is lost,
> + then that is a CH_RESOLUTION change, not CH_COLORSPACE.
> +
> + For stateful decoders follow the guidelines in :ref:`decoder`.
> + If CH_COLORSPACE is set, but not CH_RESOLUTION, then only the
> + colorspace changed and there is no need to reallocate buffers.
> +
> Return Value
> ============
>
> diff --git a/Documentation/userspace-api/media/videodev2.h.rst.exceptions b/Documentation/userspace-api/media/videodev2.h.rst.exceptions
> index 35d3456cc812..ac47c6d9448b 100644
> --- a/Documentation/userspace-api/media/videodev2.h.rst.exceptions
> +++ b/Documentation/userspace-api/media/videodev2.h.rst.exceptions
> @@ -526,6 +526,7 @@ replace define V4L2_EVENT_CTRL_CH_RANGE ctrl-changes-flags
> replace define V4L2_EVENT_CTRL_CH_DIMENSIONS ctrl-changes-flags
>
> replace define V4L2_EVENT_SRC_CH_RESOLUTION src-changes-flags
> +replace define V4L2_EVENT_SRC_CH_COLORSPACE src-changes-flags
>
> replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`v4l2_event_motion_det`
>
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index c8cb2796130f..242242c8e57b 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -2559,6 +2559,7 @@ struct v4l2_event_frame_sync {
> };
>
> #define V4L2_EVENT_SRC_CH_RESOLUTION (1 << 0)
> +#define V4L2_EVENT_SRC_CH_COLORSPACE (1 << 1)
>
> struct v4l2_event_src_change {
> __u32 changes;
> --
> 2.43.0-rc1
>
Powered by blists - more mailing lists