public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: linux-media@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>
Subject: Re: [PATCHv2 08/12] pixfmt-compressed.rst: improve H264/HEVC/MPEG1+2/VP8+9 documentation
Date: Wed, 14 Aug 2019 15:09:58 +0200	[thread overview]
Message-ID: <20190814130958.GG11714@aptenodytes> (raw)
In-Reply-To: <20190812110513.23774-9-hverkuil-cisco@xs4all.nl>

[-- Attachment #1: Type: text/plain, Size: 4444 bytes --]

Hi,

On Mon 12 Aug 19, 13:05, Hans Verkuil wrote:
> The existing documentation was incorrect and did not correspond
> to how actual codec drivers implemented this.
> 
> Update the documentation to explicitly specify what is actually
> expected.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> ---
>  .../media/uapi/v4l/pixfmt-compressed.rst      | 36 +++++++++++++++----
>  1 file changed, 30 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/media/uapi/v4l/pixfmt-compressed.rst b/Documentation/media/uapi/v4l/pixfmt-compressed.rst
> index f52a7b67023d..9bb4a172a660 100644
> --- a/Documentation/media/uapi/v4l/pixfmt-compressed.rst
> +++ b/Documentation/media/uapi/v4l/pixfmt-compressed.rst
> @@ -41,7 +41,12 @@ Compressed Formats
>  
>        - ``V4L2_PIX_FMT_H264``
>        - 'H264'
> -      - H264 video elementary stream with start codes.
> +      - H264 Access Unit.
> +	The decoder expects one Access Unit per buffer.
> +	The encoder generates one Access Unit per buffer.
> +	If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> +	then the decoder has no requirements since it can parse all the
> +	information from the raw bytestream.

Maybe it would be clearer to mention that "no requirements" concerns the
lack of frame/field boundary requirement? Otherwise it feels a bit unclear
what userspace is expected to do or not do depending on the flag.

Cheers,

Paul

>      * .. _V4L2-PIX-FMT-H264-NO-SC:
>  
>        - ``V4L2_PIX_FMT_H264_NO_SC``
> @@ -86,12 +91,20 @@ Compressed Formats
>  
>        - ``V4L2_PIX_FMT_MPEG1``
>        - 'MPG1'
> -      - MPEG1 video elementary stream.
> +      - MPEG1 Picture. Each buffer starts with a Picture header, followed
> +	by other headers as needed and ending with the Picture data.
> +	If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> +	then the decoder has no requirements since it can parse all the
> +	information from the raw bytestream.
>      * .. _V4L2-PIX-FMT-MPEG2:
>  
>        - ``V4L2_PIX_FMT_MPEG2``
>        - 'MPG2'
> -      - MPEG2 video elementary stream.
> +      - MPEG2 Picture. Each buffer starts with a Picture header, followed
> +	by other headers as needed and ending with the Picture data.
> +	If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> +	then the decoder has no requirements since it can parse all the
> +	information from the raw bytestream.
>      * .. _V4L2-PIX-FMT-MPEG2-SLICE:
>  
>        - ``V4L2_PIX_FMT_MPEG2_SLICE``
> @@ -132,7 +145,9 @@ Compressed Formats
>  
>        - ``V4L2_PIX_FMT_VP8``
>        - 'VP80'
> -      - VP8 video elementary stream.
> +      - VP8 compressed video frame. The encoder generates one
> +	compressed frame per buffer, and the decoder requires one
> +	compressed frame per buffer.
>      * .. _V4L2-PIX-FMT-VP8-FRAME:
>  
>        - ``V4L2_PIX_FMT_VP8_FRAME``
> @@ -157,12 +172,19 @@ Compressed Formats
>  
>        - ``V4L2_PIX_FMT_VP9``
>        - 'VP90'
> -      - VP9 video elementary stream.
> +      - VP9 compressed video frame. The encoder generates one
> +	compressed frame per buffer, and the decoder requires one
> +	compressed frame per buffer.
>      * .. _V4L2-PIX-FMT-HEVC:
>  
>        - ``V4L2_PIX_FMT_HEVC``
>        - 'HEVC'
> -      - HEVC/H.265 video elementary stream.
> +      - HEVC/H.265 Access Unit.
> +	The decoder expects one Access Unit per buffer.
> +	The encoder generates one Access Unit per buffer.
> +	If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> +	then the decoder has no	requirements since it can parse all the
> +	information from the raw bytestream.
>      * .. _V4L2-PIX-FMT-FWHT:
>  
>        - ``V4L2_PIX_FMT_FWHT``
> @@ -170,6 +192,8 @@ Compressed Formats
>        - Video elementary stream using a codec based on the Fast Walsh Hadamard
>          Transform. This codec is implemented by the vicodec ('Virtual Codec')
>  	driver. See the codec-fwht.h header for more details.
> +	:ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
> +	since the decoder can parse all the information from the raw bytestream.
>      * .. _V4L2-PIX-FMT-FWHT-STATELESS:
>  
>        - ``V4L2_PIX_FMT_FWHT_STATELESS``
> -- 
> 2.20.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-08-14 13:10 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 ` [PATCHv2 01/12] videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM Hans Verkuil
2019-08-14 12:52   ` 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 [this message]
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=20190814130958.GG11714@aptenodytes \
    --to=paul.kocialkowski@bootlin.com \
    --cc=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