Lines Matching +full:pixel +full:- +full:format
1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
6 Memory-to-Memory Stateful Video Encoder Interface
12 further post-processing by the client.
34 5. Single-planar API (see :ref:`planar-apis`) and applicable structures may be
35 used interchangeably with multi-planar API, unless specified otherwise,
47 Refer to :ref:`decoder-glossary`.
52 .. kernel-render:: DOT
65 qi -> Initialization [ label = "open()" ];
67 Initialization -> Encoding [ label = "Both queues streaming" ];
69 Encoding -> Drain [ label = "V4L2_ENC_CMD_STOP" ];
70 Encoding -> Reset [ label = "VIDIOC_STREAMOFF(CAPTURE)" ];
71 Encoding -> Stopped [ label = "VIDIOC_STREAMOFF(OUTPUT)" ];
72 Encoding -> Encoding;
74 Drain -> Stopped [ label = "All CAPTURE\nbuffers dequeued\nor\nVIDIOC_STREAMOFF(OUTPUT)" ];
75 Drain -> Reset [ label = "VIDIOC_STREAMOFF(CAPTURE)" ];
77 Reset -> Encoding [ label = "VIDIOC_STREAMON(CAPTURE)" ];
78 Reset -> Initialization [ label = "VIDIOC_REQBUFS(OUTPUT, 0)" ];
80 Stopped -> Encoding [ label = "V4L2_ENC_CMD_START\nor\nVIDIOC_STREAMON(OUTPUT)" ];
81 Stopped -> Reset [ label = "VIDIOC_STREAMOFF(CAPTURE)" ];
91 format set on ``OUTPUT``.
96 * Only the formats supported for the format currently active on ``CAPTURE``
99 * In order to enumerate raw formats supported by a given coded format,
100 the client must first set that coded format on ``CAPTURE`` and then
104 resolutions for a given format, passing the desired pixel format in
107 * Values returned by :c:func:`VIDIOC_ENUM_FRAMESIZES` for a coded pixel
108 format will include all possible coded resolutions supported by the
109 encoder for the given coded pixel format.
111 * Values returned by :c:func:`VIDIOC_ENUM_FRAMESIZES` for a raw pixel format
113 encoder for the given raw pixel format and coded format currently set on
117 frame intervals for a given format and resolution, passing the desired pixel
118 format in :c:type:`v4l2_frmivalenum` ``pixel_format`` and the resolution
122 * Values returned by :c:func:`VIDIOC_ENUM_FRAMEINTERVALS` for a coded pixel
123 format and coded resolution will include all possible frame intervals
124 supported by the encoder for the given coded pixel format and resolution.
126 * Values returned by :c:func:`VIDIOC_ENUM_FRAMEINTERVALS` for a raw pixel
127 format and resolution will include all possible frame intervals supported
128 by the encoder for the given raw pixel format and resolution and for the
129 coded format, coded resolution and coded frame interval currently set on
136 5. Supported profiles and levels for the coded format currently set on
146 1. Set the coded format on the ``CAPTURE`` queue via :c:func:`VIDIOC_S_FMT`.
154 the coded format to be produced.
161 ignored (read-only).
173 ``OUTPUT`` format, selection rectangles, etc. (read-only).
177 Changing the ``CAPTURE`` format may change the currently set ``OUTPUT``
178 format. How the new ``OUTPUT`` format is determined is up to the encoder
182 source) for the selected coded format via :c:func:`VIDIOC_ENUM_FMT`.
195 raw format supported for the coded format currently selected on
201 3. Set the raw source format on the ``OUTPUT`` queue via
210 raw format of the source.
228 * Setting the ``OUTPUT`` format will reset the selection rectangles to their
264 changed to a different value. This is useful for off-line encoding
284 the case for off-line encoding. Support for this feature is signalled
285 by the :ref:`V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL <fmtdesc-flags>` format flag.
351 format.
437 on the coded format, but may include the following implications:
454 The content of encoded ``CAPTURE`` buffers depends on the active coded pixel
455 format and may be affected by codec-specific extended controls, as stated
456 in the documentation of each format.
459 queues and memory-to-memory devices. In addition, the order of encoded frames
461 frames to the ``OUTPUT`` queue, due to properties of the selected coded format,
502 ``CAPTURE`` buffers are out-of-order compared to the ``OUTPUT`` buffers):
508 frames; the exact list of types depends on the coded format), the
511 :c:type:`v4l2_buffer` and each coded pixel format for exact list of flags
532 further operations on corresponding encoder file handle will return the -EIO
541 parameters at any time. The availability of parameters is encoder-specific
544 The ability to change each parameter during encoding is encoder-specific, as
547 -EBUSY error code, the ``CAPTURE`` queue needs to be stopped for the
551 The timing of parameter updates is encoder-specific, as per the standard
554 (:ref:`media-request-api`) should be considered, if supported by the encoder.
603 marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from
623 * ``V4L2_ENC_CMD_START`` - the encoder will not be reset and will resume
627 ``CAPTURE`` queue - the encoder will be reset (see the `Reset` sequence)
631 ``OUTPUT`` queue - the encoder will resume operation normally, however any
642 will fail with -EBUSY error code if attempted.
673 generated before. Depending on the coded format, that may imply that:
683 1. Perform the `Drain` sequence to ensure all the in-flight encoding finishes
706 1. Setting the format on the ``CAPTURE`` queue may change the set of formats
708 that the ``OUTPUT`` format may be reset and the client must not rely on the
709 previously set format being preserved.
712 supported for the current ``CAPTURE`` format.
714 3. Setting the format on the ``OUTPUT`` queue does not change the list of
716 format that is not supported for the currently selected ``CAPTURE`` format
717 will result in the encoder adjusting the requested ``OUTPUT`` format to a
721 supported coded formats, irrespective of the current ``OUTPUT`` format.
724 the client must not change the format on the ``CAPTURE`` queue. Drivers will
725 return the -EBUSY error code for any such format change attempt.