On Tue, Jan 22, 2019 at 5:06 PM Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > > On 01/22/2019 07:26 AM, Alexandre Courbot wrote: > > Documents the protocol that user-space should follow when > > communicating with stateless video decoders. > > > > The stateless video decoding API makes use of the new request and tags > > APIs. While it has been implemented with the Cedrus driver so far, it > > should probably still be considered staging for a short while. > > > > Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxxxx> > > --- > > Changes since v1: > > > > * Use timestamps instead of tags to reference frames, > > * Applied Paul's suggestions to not require one frame worth of data per OUTPUT > > buffer > > > > One of the effects of requiring sub-frame units to be submitted per request is > > that the stateless decoders are not exactly "stateless" anymore: if a frame is > > made of several slices, then the decoder must keep track of the buffer in which > > the current frame is being decoded between requests, and all the slices for the > > current frame must be submitted before we can consider decoding the next one. > > > > Also if we decide to force clients to submit one slice per request, then doesn't > > some of the H.264 controls need to change? For instance, in the current v2 > > there is still a v4l2_ctrl_h264_decode_param::num_slices member. It is used in > > Chromium to specify the number of slices given to the > > V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS control, but is apparently ignored by the > > Cedrus driver. Maxime, can you comment on this? > > > > Documentation/media/uapi/v4l/dev-codec.rst | 5 + > > .../media/uapi/v4l/dev-stateless-decoder.rst | 378 ++++++++++++++++++ > > 2 files changed, 383 insertions(+) > > create mode 100644 Documentation/media/uapi/v4l/dev-stateless-decoder.rst > > > > Thank you! I have uploaded a version of the V4L2 spec with this and the two older > stateful codec patches applied: > > https://hverkuil.home.xs4all.nl/codec-api/uapi/v4l/dev-codec.html Thanks! A v3 will likely be necessary (and I'll likely be more reactive producing it) because of that one-slice-per-request requirement. After discussing with Tomasz we think it would be safer/simpler to require one frame per request in a first time, as we initially agreed. Anyway, we can discuss the details once Tomasz chimes in.