• Home
  • Raw
  • Download

Lines Matching +full:per +full:- +full:queue

1 .. SPDX-License-Identifier: GPL-2.0
6 Memory-to-Memory Stateful Video Decoder Interface
9 A stateful video decoder takes complete chunks of the bytestream (e.g. Annex-B
25 2. The meaning of words "must", "may", "should", etc. is as per `RFC
34 5. Single-planar API (see :ref:`planar-apis`) and applicable structures may be
35 used interchangeably with multi-planar API, unless specified otherwise,
42 queue containing data that resulted from processing buffer A.
44 .. _decoder-glossary:
50 the destination buffer queue; for decoders, the queue of buffers containing
51 decoded frames; for encoders, the queue of buffers containing an encoded
79 Good at sub-partitioning the picture into variable sized structures.
103 Instantaneous Decoder Refresh; a type of a keyframe in an H.264/HEVC-encoded
112 block transforms (e.g. H.264, VP8, VP9); codec-specific, but for most of
117 the source buffer queue; for decoders, the queue of buffers containing
118 an encoded bytestream; for encoders, the queue of buffers containing raw
153 additional (non-visual) information contained inside encoded bytestream;
170 .. kernel-render:: DOT
186 qi -> Initialization [ label = "open()" ];
188 Initialization -> CaptureSetup [ label = "CAPTURE\nformat\nestablished" ];
190 CaptureSetup -> Stopped [ label = "CAPTURE\nbuffers\nready" ];
192 Decoding -> ResChange [ label = "Stream\nresolution\nchange" ];
193 Decoding -> Drain [ label = "V4L2_DEC_CMD_STOP" ];
194 Decoding -> EoS [ label = "EoS mark\nin the stream" ];
195 Decoding -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ];
196 Decoding -> Stopped [ label = "VIDIOC_STREAMOFF(CAPTURE)" ];
197 Decoding -> Decoding;
199 ResChange -> CaptureSetup [ label = "CAPTURE\nformat\nestablished" ];
200 ResChange -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ];
202 EoS -> Drain [ label = "Implicit\ndrain" ];
204 Drain -> Stopped [ label = "All CAPTURE\nbuffers dequeued\nor\nVIDIOC_STREAMOFF(CAPTURE)" ];
205 Drain -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ];
207 Seek -> Decoding [ label = "VIDIOC_STREAMON(OUTPUT)" ];
208 Seek -> Initialization [ label = "VIDIOC_REQBUFS(OUTPUT, 0)" ];
210 Stopped -> Decoding [ label = "V4L2_DEC_CMD_START\nor\nVIDIOC_STREAMON(CAPTURE)" ];
211 Stopped -> Seek [ label = "VIDIOC_STREAMOFF(OUTPUT)" ];
224 In particular whether or not the decoder has a full-fledged bytestream
325 Alternatively, :c:func:`VIDIOC_CREATE_BUFS` on the ``OUTPUT`` queue can be
353 3. Start streaming on the ``OUTPUT`` queue via :c:func:`VIDIOC_STREAMON`.
357 ``OUTPUT`` queue via :c:func:`VIDIOC_QBUF` and :c:func:`VIDIOC_DQBUF`. The
359 required metadata to configure the ``CAPTURE`` queue are found. This is
374 queue will not return the real values for the stream until a
381 values applying to the just parsed stream, including queue formats,
388 to non-zero values matching the coded size of the stream, skip this step
405 1. Call :c:func:`VIDIOC_G_FMT` on the ``CAPTURE`` queue to get format for the
425 as per standard semantics; matching frame buffer format.
464 ``CAPTURE``; defaults to ``V4L2_SEL_TGT_CROP_DEFAULT``; read-only on
478 read-only on hardware without additional compose/scaling capabilities.
492 the ``CAPTURE`` queue. Once the stream information is parsed and known, the
499 established coded format, as per the ``OUTPUT`` format and/or stream
518 ``CAPTURE`` queue. The client may choose a different format than
539 the ``CAPTURE`` queue if it is desired and if the decoder has compose and/or
553 read-only on hardware without additional compose/scaling capabilities.
581 * if the ``CAPTURE`` queue is streaming, call :c:func:`VIDIOC_DECODER_CMD`
584 * if the ``CAPTURE`` queue is not streaming, call :c:func:`VIDIOC_STREAMON`
585 on the ``CAPTURE`` queue.
591 7. **If the** ``CAPTURE`` **queue is streaming,** keep queuing and dequeuing
592 buffers on the ``CAPTURE`` queue until a buffer marked with the
595 8. **If the** ``CAPTURE`` **queue is streaming,** call :c:func:`VIDIOC_STREAMOFF`
596 on the ``CAPTURE`` queue to stop streaming.
600 The ``OUTPUT`` queue must remain streaming. Calling
604 9. **If the** ``CAPTURE`` **queue has buffers allocated,** free the ``CAPTURE``
619 ``CAPTURE`` queue.
651 Alternatively, :c:func:`VIDIOC_CREATE_BUFS` on the ``CAPTURE`` queue can be
697 11. Call :c:func:`VIDIOC_STREAMON` on the ``CAPTURE`` queue to start decoding
709 format and may be affected by codec-specific extended controls, as stated in
713 buffer queues and memory-to-memory devices. In addition, the order of decoded
714 frames dequeued from the ``CAPTURE`` queue may differ from the order of queuing
715 coded frames to the ``OUTPUT`` queue, due to properties of the selected coded
736 * buffers may become available on the ``CAPTURE`` queue without additional
759 buffers are out-of-order compared to the ``OUTPUT`` buffers): ``CAPTURE``
767 ``CAPTURE`` queue is streaming. Failure to observe this may result in
772 the same backing memory for as long as the ``CAPTURE`` queue is streaming.
807 further operations on corresponding decoder file handle will return the -EIO
815 Seek is controlled by the ``OUTPUT`` queue, as it is the source of coded data.
816 The seek does not require any specific operation on the ``CAPTURE`` queue, but
817 it may be affected as per normal decoder operation.
819 1. Stop the ``OUTPUT`` queue to begin the seek sequence via
830 2. Restart the ``OUTPUT`` queue via :c:func:`VIDIOC_STREAMON`.
841 queue until a suitable resume point is found.
851 Some hardware is known to mishandle seeks to a non-resume point. Such an
853 being made available on the ``CAPTURE`` queue. Drivers must ensure that
879 as per normal decoder operation.
883 It is not specified when the ``CAPTURE`` queue starts producing buffers
885 as it operates independently from the ``OUTPUT`` queue.
895 ``OUTPUT`` queue:
899 any of the following results on the ``CAPTURE`` queue is allowed:
911 ``CAPTURE`` queue too to discard decoded, but not yet dequeued buffers.
935 * bit-depth of the bitstream has been changed.
947 queue formats, selection rectangles and controls.
964 with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from
978 ``CAPTURE`` queue, or a call to :c:func:`VIDIOC_DECODER_CMD` with the
985 During the resolution change sequence, the ``OUTPUT`` queue must remain
986 streaming. Calling :c:func:`VIDIOC_STREAMOFF` on the ``OUTPUT`` queue would
989 In principle, the ``OUTPUT`` queue operates separately from the ``CAPTURE``
990 queue and this remains true for the duration of the entire resolution change
994 buffers to/from the ``OUTPUT`` queue even while processing this sequence.
1047 marked with ``V4L2_BUF_FLAG_LAST`` will result in a -EPIPE error from
1067 * ``V4L2_DEC_CMD_START`` - the decoder will not be reset and will resume
1071 ``CAPTURE`` queue - the decoder will resume the operation normally,
1072 however any ``CAPTURE`` buffers still in the queue will be returned to the
1076 ``OUTPUT`` queue - any pending source buffers will be returned to the
1086 will fail with -EBUSY error code if attempted.
1104 1. Setting the format on the ``OUTPUT`` queue may change the set of formats
1105 supported/advertised on the ``CAPTURE`` queue. In particular, it also means
1109 2. Enumerating formats on the ``CAPTURE`` queue always returns only formats
1112 3. Setting the format on the ``CAPTURE`` queue does not change the list of
1113 formats available on the ``OUTPUT`` queue. An attempt to set a ``CAPTURE``
1118 4. Enumerating formats on the ``OUTPUT`` queue always returns the full set of
1122 the client must not change the format on the ``OUTPUT`` queue. Drivers will
1123 return the -EBUSY error code for any such format change attempt.
1126 ``OUTPUT`` queue and the ``OUTPUT`` queue is the master that governs the
1127 set of supported formats for the ``CAPTURE`` queue.