From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Tomasz Figa <tfiga@chromium.org>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCHv2 01/12] videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM
Date: Mon, 12 Aug 2019 13:05:02 +0200 [thread overview]
Message-ID: <20190812110513.23774-2-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20190812110513.23774-1-hverkuil-cisco@xs4all.nl>
Add an enum_fmt format flag to specifically tag coded formats where
full bytestream parsing is supported by the device.
Some stateful decoders are capable of fully parsing a bytestream,
but others require that userspace pre-parses the bytestream into
frames or fields (see the corresponding pixelformat descriptions
for details).
If this flag is set, then this pre-parsing step is not required
(but still possible, of course).
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst | 8 ++++++++
Documentation/media/videodev2.h.rst.exceptions | 1 +
include/uapi/linux/videodev2.h | 5 +++--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
index 822d6730e7d2..ebc05ce74bdf 100644
--- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
+++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
@@ -127,6 +127,14 @@ one until ``EINVAL`` is returned.
- This format is not native to the device but emulated through
software (usually libv4l2), where possible try to use a native
format instead for better performance.
+ * - ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
+ - 0x0004
+ - The hardware decoder for this compressed bytestream format (aka coded
+ format) is capable of parsing a continuous bytestream. Applications do
+ not need to parse the bytestream themselves to find the boundaries
+ between frames/fields. This flag can only be used in combination with
+ the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to compressed
+ formats only. This flag is valid for stateful decoders only.
Return Value
diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions
index 8e7d3492d248..a0640b6d0f68 100644
--- a/Documentation/media/videodev2.h.rst.exceptions
+++ b/Documentation/media/videodev2.h.rst.exceptions
@@ -180,6 +180,7 @@ replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA reserved-formats
# V4L2 format flags
replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags
replace define V4L2_FMT_FLAG_EMULATED fmtdesc-flags
+replace define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM fmtdesc-flags
# V4L2 timecode types
replace define V4L2_TC_TYPE_24FPS timecode-type
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 2427bc4d8eba..67077d52c59d 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -774,8 +774,9 @@ struct v4l2_fmtdesc {
__u32 reserved[4];
};
-#define V4L2_FMT_FLAG_COMPRESSED 0x0001
-#define V4L2_FMT_FLAG_EMULATED 0x0002
+#define V4L2_FMT_FLAG_COMPRESSED 0x0001
+#define V4L2_FMT_FLAG_EMULATED 0x0002
+#define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004
/* Frame Size and frame rate enumeration */
/*
--
2.20.1
next prev parent reply other threads:[~2019-08-12 11:05 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 11:05 [PATCHv2 00/12] Stateful/stateless codec core support Hans Verkuil
2019-08-12 11:05 ` Hans Verkuil [this message]
2019-08-14 12:52 ` [PATCHv2 01/12] videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM Paul Kocialkowski
2019-08-15 8:11 ` Alexandre Courbot
2019-08-15 8:13 ` Alexandre Courbot
2019-08-12 11:05 ` [PATCHv2 02/12] videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION Hans Verkuil
2019-08-14 12:53 ` Paul Kocialkowski
2019-08-15 8:11 ` Alexandre Courbot
2019-08-15 10:09 ` Tomasz Figa
2019-08-15 14:22 ` Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 03/12] media: venus: vdec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION Hans Verkuil
2019-08-12 13:49 ` Stanimir Varbanov
2019-08-14 12:54 ` Paul Kocialkowski
2019-08-12 11:05 ` [PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats Hans Verkuil
2019-08-14 12:55 ` Paul Kocialkowski
2019-08-15 10:14 ` Tomasz Figa
2019-08-16 11:37 ` Marek Szyprowski
2019-08-16 11:47 ` Tomasz Figa
2019-08-12 11:05 ` [PATCHv2 05/12] media: mtk-vcodec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION Hans Verkuil
2019-08-14 12:59 ` Paul Kocialkowski
2019-08-15 8:12 ` Alexandre Courbot
2019-08-12 11:05 ` [PATCHv2 06/12] media: vicodec: set flags for vdec/stateful OUTPUT coded formats Hans Verkuil
2019-08-14 13:04 ` Paul Kocialkowski
2019-08-12 11:05 ` [PATCHv2 07/12] media: docs-rst: Document memory-to-memory video decoder interface Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 08/12] pixfmt-compressed.rst: improve H264/HEVC/MPEG1+2/VP8+9 documentation Hans Verkuil
2019-08-14 13:09 ` Paul Kocialkowski
2019-08-14 13:15 ` Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 09/12] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF Hans Verkuil
2019-08-15 8:12 ` Alexandre Courbot
2019-08-15 11:53 ` Hans Verkuil
2019-08-15 12:27 ` Tomasz Figa
2019-08-15 12:31 ` Hans Verkuil
2019-08-15 14:27 ` Alexandre Courbot
2019-08-12 11:05 ` [PATCHv2 10/12] videodev2.h: add V4L2_DEC_CMD_FLUSH Hans Verkuil
2019-08-15 8:12 ` Alexandre Courbot
2019-08-15 11:53 ` Hans Verkuil
2019-08-12 11:05 ` [PATCHv2 11/12] media: docs-rst: Document m2m stateless video decoder interface Hans Verkuil
2019-08-15 9:58 ` Alexandre Courbot
2019-08-16 5:49 ` Alexandre Courbot
2019-08-16 6:59 ` Hans Verkuil
2019-08-16 7:17 ` Alexandre Courbot
2019-08-12 11:05 ` [PATCHv2 12/12] media: docs-rst: Document memory-to-memory video encoder interface Hans Verkuil
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=20190812110513.23774-2-hverkuil-cisco@xs4all.nl \
--to=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=tfiga@chromium.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).