linux-media.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 v6 03/14] media:Add v4l2 buf flag codec data.
Date: Wed, 11 Aug 2021 16:42:59 +0800	[thread overview]
Message-ID: <be578f1a32a47d24c03b9640c6a924b2a6507708.1628671163.git.ming.qian@nxp.com> (raw)
In-Reply-To: <cover.1628671163.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-08-11  8:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11  8:42 [PATCH v6 00/14] imx8q video decoder/encoder driver Ming Qian
2021-08-11  8:42 ` [PATCH v6 01/14] dt-bindings: media: imx8q: add imx video codec bindings Ming Qian
2021-08-11  8:42 ` [PATCH v6 02/14] media:Add nt8 and nt10 video format Ming Qian
2021-08-11  8:42 ` Ming Qian [this message]
2021-08-11  8:43 ` [PATCH v6 04/14] media: imx: imx8q: add imx8q vpu device driver Ming Qian
2021-08-11 13:58   ` kernel test robot
2021-08-11 15:09   ` kernel test robot
2021-08-11  8:43 ` [PATCH v6 05/14] media: imx: imx8q: add vpu core driver Ming Qian
2021-08-11  8:43 ` [PATCH v6 06/14] media: imx: imx8q: implement vpu core communication based on mailbox Ming Qian
2021-08-11  8:43 ` [PATCH v6 07/14] media: imx: imx8q: add vpu v4l2 m2m support Ming Qian
2021-08-11  8:43 ` [PATCH v6 08/14] media: imx: imx8q: add v4l2 m2m vpu encoder stateful driver Ming Qian
2021-08-11  8:43 ` [PATCH v6 09/14] media: imx: imx8q: add v4l2 m2m vpu decoder " Ming Qian
2021-08-11  8:43 ` [PATCH v6 10/14] media: imx: imx8q: implement windsor encoder rpc interface Ming Qian
2021-08-11 14:55   ` kernel test robot
2021-08-11  8:43 ` [PATCH v6 11/14] media: imx: imx8q: implement malone decoder " Ming Qian
2021-08-11  8:43 ` [PATCH v6 12/14] ARM64: dts: freescale: imx8q: add imx vpu codec entries Ming Qian
2021-08-11  8:43 ` [PATCH v6 13/14] firmware: imx: scu-pd: imx8q: add vpu mu resources Ming Qian
2021-08-11  8:43 ` [PATCH v6 14/14] MAINTAINERS: add NXP IMX8Q VPU CODEC V4L2 driver entry Ming Qian

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=be578f1a32a47d24c03b9640c6a924b2a6507708.1628671163.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).