[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3b1b650-94d7-bb84-41ef-dc4cab0cdae1@xs4all.nl>
Date: Thu, 31 Jan 2019 11:45:11 +0100
From: Hans Verkuil <hverkuil@...all.nl>
To: Tomasz Figa <tfiga@...omium.org>, linux-media@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Pawel Osciak <posciak@...omium.org>,
Alexandre Courbot <acourbot@...omium.org>,
Kamil Debski <kamil@...as.org>,
Andrzej Hajda <a.hajda@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
Jeongtae Park <jtp.park@...sung.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Tiffany Lin (林慧珊)
<tiffany.lin@...iatek.com>,
Andrew-CT Chen (陳智迪)
<andrew-ct.chen@...iatek.com>,
Stanimir Varbanov <stanimir.varbanov@...aro.org>,
Todor Tomov <todor.tomov@...aro.org>,
Nicolas Dufresne <nicolas@...fresne.ca>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
dave.stevenson@...pberrypi.org,
Ezequiel Garcia <ezequiel@...labora.com>,
Maxime Jourdan <maxi.jourdan@...adoo.fr>
Subject: Re: [PATCH v3 1/2] media: docs-rst: Document memory-to-memory video
decoder interface
On 1/24/19 11:04 AM, Tomasz Figa wrote:
> Due to complexity of the video decoding process, the V4L2 drivers of
> stateful decoder hardware require specific sequences of V4L2 API calls
> to be followed. These include capability enumeration, initialization,
> decoding, seek, pause, dynamic resolution change, drain and end of
> stream.
>
> Specifics of the above have been discussed during Media Workshops at
> LinuxCon Europe 2012 in Barcelona and then later Embedded Linux
> Conference Europe 2014 in Düsseldorf. The de facto Codec API that
> originated at those events was later implemented by the drivers we already
> have merged in mainline, such as s5p-mfc or coda.
>
> The only thing missing was the real specification included as a part of
> Linux Media documentation. Fix it now and document the decoder part of
> the Codec API.
>
> Signed-off-by: Tomasz Figa <tfiga@...omium.org>
> ---
> Documentation/media/uapi/v4l/dev-decoder.rst | 1076 +++++++++++++++++
> Documentation/media/uapi/v4l/dev-mem2mem.rst | 5 +
> Documentation/media/uapi/v4l/pixfmt-v4l2.rst | 5 +
> Documentation/media/uapi/v4l/v4l2.rst | 10 +-
> .../media/uapi/v4l/vidioc-decoder-cmd.rst | 40 +-
> Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 14 +
> 6 files changed, 1135 insertions(+), 15 deletions(-)
> create mode 100644 Documentation/media/uapi/v4l/dev-decoder.rst
>
<snip>
> +4. **This step only applies to coded formats that contain resolution information
> + in the stream.** Continue queuing/dequeuing bitstream buffers to/from the
> + ``OUTPUT`` queue via :c:func:`VIDIOC_QBUF` and :c:func:`VIDIOC_DQBUF`. The
> + buffers will be processed and returned to the client in order, until
> + required metadata to configure the ``CAPTURE`` queue are found. This is
> + indicated by the decoder sending a ``V4L2_EVENT_SOURCE_CHANGE`` event with
> + ``V4L2_EVENT_SRC_CH_RESOLUTION`` source change type.
> +
> + * It is not an error if the first buffer does not contain enough data for
> + this to occur. Processing of the buffers will continue as long as more
> + data is needed.
> +
> + * If data in a buffer that triggers the event is required to decode the
> + first frame, it will not be returned to the client, until the
> + initialization sequence completes and the frame is decoded.
> +
> + * If the client sets width and height of the ``OUTPUT`` format to 0,
> + calling :c:func:`VIDIOC_G_FMT`, :c:func:`VIDIOC_S_FMT`,
> + :c:func:`VIDIOC_TRY_FMT` or :c:func:`VIDIOC_REQBUFS` on the ``CAPTURE``
> + queue will return the ``-EACCES`` error code, until the decoder
> + configures ``CAPTURE`` format according to stream metadata.
I think this should also include the G/S_SELECTION ioctls, right?
Regards,
Hans
Powered by blists - more mailing lists