public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] media: v4l: dev-decoder: Add source change V4L2_EVENT_SRC_CH_COLORSPACE
@ 2025-01-17  6:19 Ming Qian
  2025-01-17  6:19 ` [PATCH v2 2/4] media: docs: dev-decoder: Trigger dynamic source change for colorspace Ming Qian
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Ming Qian @ 2025-01-17  6:19 UTC (permalink / raw)
  To: mchehab, hverkuil-cisco
  Cc: nicolas, shawnguo, robh+dt, s.hauer, kernel, festevam, linux-imx,
	xiahong.bao, eagle.zhou, tao.jiang_2, ming.qian, imx, linux-media,
	linux-kernel, linux-arm-kernel

Add a new source change V4L2_EVENT_SRC_CH_COLORSPACE that
indicates colorspace change in the stream.
The change V4L2_EVENT_SRC_CH_RESOLUTION will always affect
the allocation, but V4L2_EVENT_SRC_CH_COLORSPACE won't.

Signed-off-by: Ming Qian <ming.qian@oss.nxp.com>
---
 Documentation/userspace-api/media/v4l/vidioc-dqevent.rst | 9 +++++++++
 .../userspace-api/media/videodev2.h.rst.exceptions       | 1 +
 include/uapi/linux/videodev2.h                           | 1 +
 3 files changed, 11 insertions(+)

diff --git a/Documentation/userspace-api/media/v4l/vidioc-dqevent.rst b/Documentation/userspace-api/media/v4l/vidioc-dqevent.rst
index 8db103760930..91e6b86c976d 100644
--- a/Documentation/userspace-api/media/v4l/vidioc-dqevent.rst
+++ b/Documentation/userspace-api/media/v4l/vidioc-dqevent.rst
@@ -369,6 +369,15 @@ 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 colorsapce change is detected at
+	an input. This can come from a video decoder. Applications will query
+	the new colorspace information (if any, the signal may also have been
+	lost)
+
+	For stateful decoders follow the guidelines in :ref:`decoder`.
+
 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-04-08 21:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17  6:19 [PATCH v2 1/4] media: v4l: dev-decoder: Add source change V4L2_EVENT_SRC_CH_COLORSPACE Ming Qian
2025-01-17  6:19 ` [PATCH v2 2/4] media: docs: dev-decoder: Trigger dynamic source change for colorspace Ming Qian
2025-01-17  6:19 ` [PATCH v2 3/4] media: amphion: Clear last_buffer_dequeued flag for DEC_CMD_START Ming Qian
2025-01-17  6:19 ` [PATCH v2 4/4] media: amphion: Trigger source change if colorspace chagned Ming Qian
2025-04-07  9:54 ` [PATCH v2 1/4] media: v4l: dev-decoder: Add source change V4L2_EVENT_SRC_CH_COLORSPACE Hans Verkuil
2025-04-08  6:34   ` Ming Qian(OSS)
2025-04-08  8:30     ` Hans Verkuil
2025-04-08  8:45       ` Ming Qian(OSS)
2025-04-08  9:39         ` Hans Verkuil
2025-04-08 10:09           ` Ming Qian(OSS)
2025-04-08 21:03   ` Nicolas Dufresne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox