History

media: videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM

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).

Hans Verkuil committed 7 years ago

Commit 2b770be1 parent 76032793 files · +12 −2Browse files

Unified · Split

3 files
  1. Documentation/media/uapi/v4l/vidioc-enum-fmt.rst +8 −0
  2. Documentation/media/videodev2.h.rst.exceptions +1 −0
  3. include/uapi/linux/videodev2.h +3 −2
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst+8−0
@@ -127,6 +127,14 @@ one until ``EINVAL`` is returned. · 126 unmodified lines
127127 - This format is not native to the device but emulated through
128128 software (usually libv4l2), where possible try to use a native
129129 format instead for better performance.
130+ * - ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
131+ - 0x0004
132+ - The hardware decoder for this compressed bytestream format (aka coded
133+ format) is capable of parsing a continuous bytestream. Applications do
134+ not need to parse the bytestream themselves to find the boundaries
135+ between frames/fields. This flag can only be used in combination with
136+ the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to compressed
137+ formats only. This flag is valid for stateful decoders only.
130138
131139
132140 Return Value
Documentation/media/videodev2.h.rst.exceptions+1−0
@@ -180,6 +180,7 @@ replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA reserved-formats · 179 unmodified lines
180180 # V4L2 format flags
181181 replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags
182182 replace define V4L2_FMT_FLAG_EMULATED fmtdesc-flags
183+replace define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM fmtdesc-flags
183184
184185 # V4L2 timecode types
185186 replace define V4L2_TC_TYPE_24FPS timecode-type
include/uapi/linux/videodev2.h+3−2
@@ -774,8 +774,9 @@ struct v4l2_fmtdesc { · 773 unmodified lines
774774 __u32 reserved[4];
775775 };
776776
777−#define V4L2_FMT_FLAG_COMPRESSED 0x0001
778−#define V4L2_FMT_FLAG_EMULATED 0x0002
777+#define V4L2_FMT_FLAG_COMPRESSED 0x0001
778+#define V4L2_FMT_FLAG_EMULATED 0x0002
779+#define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004
779780
780781 /* Frame Size and frame rate enumeration */
781782 /*