Re: [RFC PATCH v2] media: docs-rst: Document m2m stateless video decoder interface

From: Nicolas Dufresne
Date: Thu Oct 04 2018 - 14:10:11 EST


Le jeudi 04 octobre 2018 Ã 14:47 +0200, Paul Kocialkowski a Ãcrit :
> > + Instance of struct v4l2_ctrl_h264_scaling_matrix, containing the scaling
> > + matrix to use when decoding the next queued frame. Applicable to the H.264
> > + stateless decoder.
> > +
> > +``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAM``
>
> Ditto with "H264_SLICE_PARAMS".
>
> > + Array of struct v4l2_ctrl_h264_slice_param, containing at least as many
> > + entries as there are slices in the corresponding ``OUTPUT`` buffer.
> > + Applicable to the H.264 stateless decoder.
> > +
> > +``V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAM``
> > + Instance of struct v4l2_ctrl_h264_decode_param, containing the high-level
> > + decoding parameters for a H.264 frame. Applicable to the H.264 stateless
> > + decoder.
>
> Since we require all the macroblocks to decode one frame to be held in
> the same OUTPUT buffer, it probably doesn't make sense to keep
> DECODE_PARAM and SLICE_PARAM distinct.
>
> I would suggest merging both in "SLICE_PARAMS", similarly to what I
> have proposed for H.265: https://patchwork.kernel.org/patch/10578023/
>
> What do you think?

I don't understand why we add this arbitrary restriction of "all the
macroblocks to decode one frame". The bitstream may contain multiple
NALs per frame (e.g. slices), and stateless API shall pass each NAL
separately imho. The driver can then decide to combine them if needed,
or to keep them seperate. I would expect most decoder to decode each
slice independently from each other, even though they write into the
same frame.

Nicolas

Attachment: signature.asc
Description: This is a digitally signed message part