On Mon, 30 Jan 2023 at 12:35, Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > > On 30/01/2023 13:23, John Cox wrote: > > Hi > > > > How should I check whether or not a given profile and level is > > supported by a stateful decoder? Chrome uses VIDIOC_QUERYMENU to test > > whether a given profile is supported by, say, > > V4L2_CID_MPEG_VIDEO_H264_PROFILE. Is this "correct"? Certainly a few > > decoders seem to support this usage (qcom/venus, mediatek and possibly > > some others). > > > > The documentation currently suggests that > > V4L2_CID_MPEG_VIDEO_H264_PROFILE is only an encoder control. Should > > the documentation be extended to cover decoder use too? > > I think the documentation is out of date. > > For decoders this control definitely makes sense, but only as a READONLY > control. After all you can't set it. I think I saw a decoder that allowed setting using it to produce sensible default sizes for the coded OUTPUT buffers so it is not completely pointless. > Ideally it would also report which profile the currently decoding stream > uses, but I don't know if that is always possible. It certainly is not possible in all cases (rpi stateful firmware doesn't report it). Many thanks for the swift response John Cox