Re: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

Paul Kocialkowski
2019-07-25T19:26:15Z

Hi,

On Wed 03 Jul 19, 14:28, Boris Brezillon wrote:
> Looks like some stateless decoders expect slices to be prefixed with
> ANNEX B start codes (they most likely do some kind of bitstream parsing
> and/or need that to delimit slices when doing per frame decoding).
> Since skipping those start codes for dummy stateless decoders (those
> expecting all params to be passed through controls) should be pretty
> easy, let's mandate that all slices be prepended with ANNEX B start
> codes.
>
> If we ever need to support AVC headers, we can add a new menu control
> to select the type of NAL header to use.

After thinking a bit about this, I'd rather be in favor of having offsets
in the control structures rather than forcing the start code type or having a
dedicated control for that, as I've mentionned on the other patch.

What do you think?

Cheers,

Paul

> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> ---
> Changes in v3:
> * Add Paul's R-b
>
> Changes in v2:
> * None
> ---
> Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
> index 7a1947f5be96..3ae1367806cf 100644
> --- a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
> +++ b/Documentation/media/uapi/v4l/ext-ctrls-codec.rst
> @@ -1726,6 +1726,7 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
> :ref:`h264`, section 7.4.3 "Slice Header Semantics". For further
> documentation, refer to the above specification, unless there is
> an explicit comment stating otherwise.
> + All slices should be prepended with an ANNEX B start code.
>
> .. note::
>
> --
> 2.21.0
>

--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering