linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Qian <ming.qian@nxp.com>
To: mchehab@kernel.org, shawnguo@kernel.org, robh+dt@kernel.org,
	s.hauer@pengutronix.de
Cc: hverkuil-cisco@xs4all.nl, kernel@pengutronix.de,
	festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 03/15] media:Add v4l2 buf flag codec data.
Date: Tue,  7 Sep 2021 17:49:10 +0800	[thread overview]
Message-ID: <7ef1840137417c33f5ef7ca611c90fc274926851.1631002447.git.ming.qian@nxp.com> (raw)
In-Reply-To: <cover.1631002447.git.ming.qian@nxp.com>

In some decoing scenarios, application may queue a buffer
that only contains codec config data, and the driver needs to
know whether is it a frame or not.
So we add a buf flag to tell this case.

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
---
 Documentation/userspace-api/media/v4l/buffer.rst | 7 +++++++
 include/uapi/linux/videodev2.h                   | 1 +
 2 files changed, 8 insertions(+)

diff --git a/Documentation/userspace-api/media/v4l/buffer.rst b/Documentation/userspace-api/media/v4l/buffer.rst
index e991ba73d873..11013bcf8a41 100644
--- a/Documentation/userspace-api/media/v4l/buffer.rst
+++ b/Documentation/userspace-api/media/v4l/buffer.rst
@@ -607,6 +607,13 @@ Buffer Flags
 	the format. Any subsequent call to the
 	:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore,
 	but return an ``EPIPE`` error code.
+    * .. _`V4L2-BUF-FLAG-CODECCONFIG`:
+
+      - ``V4L2_BUF_FLAG_CODECCONFIG``
+      - 0x00200000
+      - The buffer only contains codec config data, eg. sps and pps.
+    Applications can set this bit when ``type`` refers to an output
+    stream, this flag is usually used by v4l2 decoder.
     * .. _`V4L2-BUF-FLAG-REQUEST-FD`:
 
       - ``V4L2_BUF_FLAG_REQUEST_FD``
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 167c0e40ec06..5bb0682b4a23 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1119,6 +1119,7 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv)
 #define V4L2_BUF_FLAG_TSTAMP_SRC_SOE		0x00010000
 /* mem2mem encoder/decoder */
 #define V4L2_BUF_FLAG_LAST			0x00100000
+#define V4L2_BUF_FLAG_CODECCONFIG		0x00200000
 /* request_fd is valid */
 #define V4L2_BUF_FLAG_REQUEST_FD		0x00800000
 
-- 
2.32.0


  parent reply	other threads:[~2021-09-07  9:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07  9:49 [PATCH v8 00/15] amphion video decoder/encoder driver Ming Qian
2021-09-07  9:49 ` [PATCH v8 01/15] dt-bindings: media: amphion: add amphion video codec bindings Ming Qian
2021-09-07  9:49 ` [PATCH v8 02/15] media:Add nt8 and nt10 video format Ming Qian
2021-09-07  9:49 ` Ming Qian [this message]
2021-09-08 13:14   ` [PATCH v8 03/15] media:Add v4l2 buf flag codec data Nicolas Dufresne
2021-09-09  2:20     ` [EXT] " Ming Qian
2021-09-09 19:40       ` Nicolas Dufresne
2021-09-10  1:33         ` Ming Qian
2021-09-07  9:49 ` [PATCH v8 04/15] media:Add v4l2 event codec_error and skip Ming Qian
2021-09-08 13:32   ` Nicolas Dufresne
2021-09-09  3:13     ` [EXT] " Ming Qian
2021-09-09 19:54       ` Nicolas Dufresne
2021-09-10  1:50         ` Ming Qian
2022-01-13  7:18         ` Ming Qian
2022-01-21 22:25           ` Nicolas Dufresne
2022-01-25  1:54             ` Ming Qian
2022-01-25 20:23               ` Nicolas Dufresne
2021-09-07  9:49 ` [PATCH v8 05/15] media: amphion: add amphion vpu device driver Ming Qian
2021-09-07  9:49 ` [PATCH v8 06/15] media: amphion: add vpu core driver Ming Qian
2021-09-07  9:49 ` [PATCH v8 07/15] media: amphion: implement vpu core communication based on mailbox Ming Qian
2021-09-07  9:49 ` [PATCH v8 08/15] media: amphion: add vpu v4l2 m2m support Ming Qian
2021-09-07  9:49 ` [PATCH v8 09/15] media: amphion: add v4l2 m2m vpu encoder stateful driver Ming Qian
2021-09-07  9:49 ` [PATCH v8 10/15] media: amphion: add v4l2 m2m vpu decoder " Ming Qian
2021-09-07  9:49 ` [PATCH v8 11/15] media: amphion: implement windsor encoder rpc interface Ming Qian
2021-09-07  9:49 ` [PATCH v8 12/15] media: amphion: implement malone decoder " Ming Qian
2021-09-07  9:49 ` [PATCH v8 13/15] ARM64: dts: freescale: imx8q: add imx vpu codec entries Ming Qian
2021-09-07  9:49 ` [PATCH v8 14/15] firmware: imx: scu-pd: imx8q: add vpu mu resources Ming Qian
2021-09-07  9:49 ` [PATCH v8 15/15] MAINTAINERS: add AMPHION VPU CODEC V4L2 driver entry Ming Qian
2021-09-07 14:35 ` [PATCH v8 00/15] amphion video decoder/encoder driver Nicolas Dufresne

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=7ef1840137417c33f5ef7ca611c90fc274926851.1631002447.git.ming.qian@nxp.com \
    --to=ming.qian@nxp.com \
    --cc=aisheng.dong@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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).