mbox series

[v3,00/14] Move HEVC stateless controls out of staging

Message ID 20220225164600.1044663-1-benjamin.gaignard@collabora.com
Headers show
Series Move HEVC stateless controls out of staging | expand

Message

Benjamin Gaignard Feb. 25, 2022, 4:45 p.m. UTC
This series aims to make HEVC uapi stable and usable for hardware
decoder. HEVC uapi is used by 2 mainlined drivers (Cedrus and Hantro)
and 2 out of the tree drivers (rkvdec and RPI).

After the remarks done on version 2, I have completely reworked to patches 
split so changelogs are meaningless. I have also drop "RFC" from the
titles.

In this v3 I do all the changes (new controls, documentation, etc..)
in the staging directory before moving the HEVC uAPI to stable 
steps by steps (unlike the big one patch in v2).

At the end fluster tests results on IMX8MQ is 77/147 for HEVC codec.

Benjamin

Benjamin Gaignard (11):
  media: uapi: HEVC: Add missing fields in HEVC controls
  media: uapi: HEVC: Rename HEVC stateless controls with STATELESS
    prefix
  media: uapi: HEVC: Add document uAPI structure
  media: uapi: HEVC: Define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS as a
    dynamic array
  media: uapi: Move parsed HEVC pixel format out of staging
  media: uapi: Add V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSET control
  media: uapi: Move the HEVC stateless control type out of staging
  media: controls: Log HEVC stateless control in .std_log
  media: uapi: Create a dedicated header for Hantro control
  media: uapi: HEVC: fix padding in v4l2 control structures
  media: uapi: move HEVC stateless controls out of staging

Hans Verkuil (3):
  videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY
  v4l2-ctrls: add support for dynamically allocated arrays.
  vivid: add dynamic array test control

 .../userspace-api/media/drivers/hantro.rst    |   5 -
 .../media/v4l/ext-ctrls-codec-stateless.rst   | 831 ++++++++++++++++++
 .../media/v4l/ext-ctrls-codec.rst             | 780 ----------------
 .../media/v4l/pixfmt-compressed.rst           |   7 +-
 .../media/v4l/vidioc-g-ext-ctrls.rst          |  20 +
 .../media/v4l/vidioc-queryctrl.rst            |   8 +
 .../media/videodev2.h.rst.exceptions          |   5 +
 .../media/test-drivers/vivid/vivid-ctrls.c    |  15 +
 drivers/media/v4l2-core/v4l2-ctrls-api.c      | 103 ++-
 drivers/media/v4l2-core/v4l2-ctrls-core.c     | 198 ++++-
 drivers/media/v4l2-core/v4l2-ctrls-defs.c     |  32 +-
 drivers/media/v4l2-core/v4l2-ctrls-priv.h     |   3 +-
 drivers/media/v4l2-core/v4l2-ctrls-request.c  |  13 +-
 drivers/staging/media/hantro/hantro_drv.c     |  27 +-
 drivers/staging/media/hantro/hantro_hevc.c    |   8 +-
 drivers/staging/media/sunxi/cedrus/cedrus.c   |  24 +-
 .../staging/media/sunxi/cedrus/cedrus_dec.c   |  10 +-
 include/media/hevc-ctrls.h                    | 250 ------
 include/media/v4l2-ctrls.h                    |  48 +-
 include/uapi/linux/hantro-media.h             |  19 +
 include/uapi/linux/v4l2-controls.h            | 436 +++++++++
 include/uapi/linux/videodev2.h                |  13 +
 22 files changed, 1686 insertions(+), 1169 deletions(-)
 delete mode 100644 include/media/hevc-ctrls.h
 create mode 100644 include/uapi/linux/hantro-media.h

Comments

Adam Ford Feb. 26, 2022, 10:25 p.m. UTC | #1
On Fri, Feb 25, 2022 at 4:41 PM Benjamin Gaignard
<benjamin.gaignard@collabora.com> wrote:
>
> This series aims to make HEVC uapi stable and usable for hardware
> decoder. HEVC uapi is used by 2 mainlined drivers (Cedrus and Hantro)
> and 2 out of the tree drivers (rkvdec and RPI).
>
> After the remarks done on version 2, I have completely reworked to patches
> split so changelogs are meaningless. I have also drop "RFC" from the
> titles.
>
> In this v3 I do all the changes (new controls, documentation, etc..)
> in the staging directory before moving the HEVC uAPI to stable
> steps by steps (unlike the big one patch in v2).
>
> At the end fluster tests results on IMX8MQ is 77/147 for HEVC codec.

Benjamin,

I have an imx8mm and imx8mq that I can test. Do you happen to have a
repo that I can clone to test this?  The imx8m stuff is spread around
between the media tree and the imx tree since it hasn't been fully
merged yet.

thanks,

adam

>
> Benjamin
>
> Benjamin Gaignard (11):
>   media: uapi: HEVC: Add missing fields in HEVC controls
>   media: uapi: HEVC: Rename HEVC stateless controls with STATELESS
>     prefix
>   media: uapi: HEVC: Add document uAPI structure
>   media: uapi: HEVC: Define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS as a
>     dynamic array
>   media: uapi: Move parsed HEVC pixel format out of staging
>   media: uapi: Add V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSET control
>   media: uapi: Move the HEVC stateless control type out of staging
>   media: controls: Log HEVC stateless control in .std_log
>   media: uapi: Create a dedicated header for Hantro control
>   media: uapi: HEVC: fix padding in v4l2 control structures
>   media: uapi: move HEVC stateless controls out of staging
>
> Hans Verkuil (3):
>   videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY
>   v4l2-ctrls: add support for dynamically allocated arrays.
>   vivid: add dynamic array test control
>
>  .../userspace-api/media/drivers/hantro.rst    |   5 -
>  .../media/v4l/ext-ctrls-codec-stateless.rst   | 831 ++++++++++++++++++
>  .../media/v4l/ext-ctrls-codec.rst             | 780 ----------------
>  .../media/v4l/pixfmt-compressed.rst           |   7 +-
>  .../media/v4l/vidioc-g-ext-ctrls.rst          |  20 +
>  .../media/v4l/vidioc-queryctrl.rst            |   8 +
>  .../media/videodev2.h.rst.exceptions          |   5 +
>  .../media/test-drivers/vivid/vivid-ctrls.c    |  15 +
>  drivers/media/v4l2-core/v4l2-ctrls-api.c      | 103 ++-
>  drivers/media/v4l2-core/v4l2-ctrls-core.c     | 198 ++++-
>  drivers/media/v4l2-core/v4l2-ctrls-defs.c     |  32 +-
>  drivers/media/v4l2-core/v4l2-ctrls-priv.h     |   3 +-
>  drivers/media/v4l2-core/v4l2-ctrls-request.c  |  13 +-
>  drivers/staging/media/hantro/hantro_drv.c     |  27 +-
>  drivers/staging/media/hantro/hantro_hevc.c    |   8 +-
>  drivers/staging/media/sunxi/cedrus/cedrus.c   |  24 +-
>  .../staging/media/sunxi/cedrus/cedrus_dec.c   |  10 +-
>  include/media/hevc-ctrls.h                    | 250 ------
>  include/media/v4l2-ctrls.h                    |  48 +-
>  include/uapi/linux/hantro-media.h             |  19 +
>  include/uapi/linux/v4l2-controls.h            | 436 +++++++++
>  include/uapi/linux/videodev2.h                |  13 +
>  22 files changed, 1686 insertions(+), 1169 deletions(-)
>  delete mode 100644 include/media/hevc-ctrls.h
>  create mode 100644 include/uapi/linux/hantro-media.h
>
> --
> 2.32.0
>
John Cox Feb. 28, 2022, 9:47 a.m. UTC | #2
On Sat, 26 Feb 2022 19:17:46 +0100, you wrote:

>Dne sobota, 26. februar 2022 ob 18:59:18 CET je Jernej Škrabec napisal(a):
>> Hi!
>> 
>> Dne petek, 25. februar 2022 ob 20:30:20 CET je Jernej Škrabec napisal(a):
>> > Hi!
>> > 
>> > Dne petek, 25. februar 2022 ob 17:45:55 CET je Benjamin Gaignard 
>napisal(a):
>> > > The number of 'entry point offset' could be very variable.
>> > > Rather than use a large static array define a v4l2 dynamic array
>> > > of integer control.
>> > 
>> > I suggest we should be more specific and say U32 (V4L2_CTRL_TYPE_U32).
>> > 
>> > > The number of entry point offsets is reported by the elems field.
>> 
>> I did few more tests and these are my findings:
>> 1. dynamic array can't be set over size, specified in .dims array
>> 2. entry point offsets are per slice, so if we make slices dynamic array, 
>then 
>> entry points would become two dimensional dynamic array
>> 3. num_entry_point_offsets must be part of slice control, because it can be 
>> zero, but size of array can't be
>
>Clarification: num_entry_point_offsets is needed in any case, even without entry 
>point list.

I thought that at least one decoder wanted the entry points or have we
decided that we don't? Whilst they aren't required for decode, what they
give you, if your h/w supports it, is the ability to decode multiple
lines of CTBs in parallel (with a 2 CTB offset between lines), so they
aren't useless.

If we do decided we want the entry point offset control, now or later,
then num_entry_points in the slice_param allows you to determine which
offsets apply to which slices without the complexity of a variable array
of variable arrays.

But whether or not we end up supporting entry point offsets, the Pi h/w
requires me to generate 1 table entry for each CTB line and
num_entry_points is the parameter I need for that, so I really want it
in the slice_params.

Regards

John Cox

>> 4. fortunately, not setting entry points doesn't impact decoding 
>correctness. 
>> This is in line what John told me about them.
>> 
>> Hans, can you comment points 1-3? I might misunderstand point 1.
>> 
>> In short, it seems like we don't really need entry points, even if they are 
>> used in BSP library. In both cases, I got fluster score 119/138 (10-bit 
>> excluded), so we can just drop this patch, although I'm a bit uneasy not 
>> setting entry points...
>> 
>> Best regards,
>> Jernej
>> 
>> > > 
>> > > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
>> > > ---
>> > >  .../userspace-api/media/v4l/ext-ctrls-codec.rst          | 9 +++++++++
>> > >  include/media/hevc-ctrls.h                               | 1 +
>> > >  2 files changed, 10 insertions(+)
>> > > 
>> > > diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/
>> > Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
>> > > index 44a268a948c0..71f7dc1c1ccd 100644
>> > > --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
>> > > +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst
>> > > @@ -3128,6 +3128,15 @@ enum v4l2_mpeg_video_hevc_size_of_length_field -
>> > >  
>> > >      \normalsize
>> > >  
>> > > +``V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (integer)``
>> > 
>> > Here you have OFFSETS (plural) ...
>> > 
>> > > +    Specifies the i-th entry point offset in bytes and is represented by
>> > > +    offset_len_minus1 plus 1 bits.
>> > 
>> > You probably mean entry_point_offset_minus1? offset_len_minus1 just tells 
>how 
>> > much bits need to be read for each element and it's not important for 
>actual 
>> > decoding.
>> > 
>> > > +    This control is a dynamically sized array. The number of entry 
>point
>> > > +    offsets is reported by the ``elems`` field.
>> > > +    This bitstream parameter is defined according to :ref:`hevc`.
>> > > +    They are described in section 7.4.7.1 "General slice segment header
>> > > +    semantics" of the specification.
>> > > +
>> > >  ``V4L2_CID_STATELESS_HEVC_SCALING_MATRIX (struct)``
>> > >      Specifies the HEVC scaling matrix parameters used for the scaling 
>> > process
>> > >      for transform coefficients.
>> > > diff --git a/include/media/hevc-ctrls.h b/include/media/hevc-ctrls.h
>> > > index 3016c1abb1d0..3f8a67924df3 100644
>> > > --- a/include/media/hevc-ctrls.h
>> > > +++ b/include/media/hevc-ctrls.h
>> > > @@ -20,6 +20,7 @@
>> > >  #define V4L2_CID_STATELESS_HEVC_DECODE_PARAMS	(V4L2_CID_CODEC_BASE + 
>> > 1012)
>> > >  #define V4L2_CID_STATELESS_HEVC_DECODE_MODE	(V4L2_CID_CODEC_BASE + 
>> > 1015)
>> > >  #define V4L2_CID_STATELESS_HEVC_START_CODE	(V4L2_CID_CODEC_BASE 
>+ 
>> 1016)
>> > > +#define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSET (V4L2_CID_CODEC_BASE 
>+ 
>> > 1017)
>> > 
>> > ... and here you have OFFSET (singlular). I suggest plural form to be used 
>> in 
>> > all places, including subject line of this commit.
>> > 
>> > Additionally, it would be nice if control is initialized, like so:
>> > https://github.com/jernejsk/linux-1/commit/
>> > f938e162cd8dd77c9f6f1b248d80144840a37bce
>> > 
>> > Best regards,
>> > Jernej
>> > 
>> > >  
>> > >  /* enum v4l2_ctrl_type type values */
>> > >  #define V4L2_CTRL_TYPE_HEVC_SPS 0x0120
>> > > -- 
>> > > 2.32.0
>> > > 
>> > > 
>> > 
>> > 
>> > 
>> 
>> 
>> 
>
Benjamin Gaignard Feb. 28, 2022, 10:13 a.m. UTC | #3
Le 26/02/2022 à 23:25, Adam Ford a écrit :
> On Fri, Feb 25, 2022 at 4:41 PM Benjamin Gaignard
> <benjamin.gaignard@collabora.com> wrote:
>> This series aims to make HEVC uapi stable and usable for hardware
>> decoder. HEVC uapi is used by 2 mainlined drivers (Cedrus and Hantro)
>> and 2 out of the tree drivers (rkvdec and RPI).
>>
>> After the remarks done on version 2, I have completely reworked to patches
>> split so changelogs are meaningless. I have also drop "RFC" from the
>> titles.
>>
>> In this v3 I do all the changes (new controls, documentation, etc..)
>> in the staging directory before moving the HEVC uAPI to stable
>> steps by steps (unlike the big one patch in v2).
>>
>> At the end fluster tests results on IMX8MQ is 77/147 for HEVC codec.

I have push a branch here:
https://gitlab.collabora.com/benjamin.gaignard/for-upstream/-/commits/HEVC_UAPI_V4

it is the incoming version 4 of this series + patches to enable G2 on my IMX8MQ

Regards,
Benjamin

> Benjamin,
>
> I have an imx8mm and imx8mq that I can test. Do you happen to have a
> repo that I can clone to test this?  The imx8m stuff is spread around
> between the media tree and the imx tree since it hasn't been fully
> merged yet.
>
> thanks,
>
> adam
>
>> Benjamin
>>
>> Benjamin Gaignard (11):
>>    media: uapi: HEVC: Add missing fields in HEVC controls
>>    media: uapi: HEVC: Rename HEVC stateless controls with STATELESS
>>      prefix
>>    media: uapi: HEVC: Add document uAPI structure
>>    media: uapi: HEVC: Define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS as a
>>      dynamic array
>>    media: uapi: Move parsed HEVC pixel format out of staging
>>    media: uapi: Add V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSET control
>>    media: uapi: Move the HEVC stateless control type out of staging
>>    media: controls: Log HEVC stateless control in .std_log
>>    media: uapi: Create a dedicated header for Hantro control
>>    media: uapi: HEVC: fix padding in v4l2 control structures
>>    media: uapi: move HEVC stateless controls out of staging
>>
>> Hans Verkuil (3):
>>    videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY
>>    v4l2-ctrls: add support for dynamically allocated arrays.
>>    vivid: add dynamic array test control
>>
>>   .../userspace-api/media/drivers/hantro.rst    |   5 -
>>   .../media/v4l/ext-ctrls-codec-stateless.rst   | 831 ++++++++++++++++++
>>   .../media/v4l/ext-ctrls-codec.rst             | 780 ----------------
>>   .../media/v4l/pixfmt-compressed.rst           |   7 +-
>>   .../media/v4l/vidioc-g-ext-ctrls.rst          |  20 +
>>   .../media/v4l/vidioc-queryctrl.rst            |   8 +
>>   .../media/videodev2.h.rst.exceptions          |   5 +
>>   .../media/test-drivers/vivid/vivid-ctrls.c    |  15 +
>>   drivers/media/v4l2-core/v4l2-ctrls-api.c      | 103 ++-
>>   drivers/media/v4l2-core/v4l2-ctrls-core.c     | 198 ++++-
>>   drivers/media/v4l2-core/v4l2-ctrls-defs.c     |  32 +-
>>   drivers/media/v4l2-core/v4l2-ctrls-priv.h     |   3 +-
>>   drivers/media/v4l2-core/v4l2-ctrls-request.c  |  13 +-
>>   drivers/staging/media/hantro/hantro_drv.c     |  27 +-
>>   drivers/staging/media/hantro/hantro_hevc.c    |   8 +-
>>   drivers/staging/media/sunxi/cedrus/cedrus.c   |  24 +-
>>   .../staging/media/sunxi/cedrus/cedrus_dec.c   |  10 +-
>>   include/media/hevc-ctrls.h                    | 250 ------
>>   include/media/v4l2-ctrls.h                    |  48 +-
>>   include/uapi/linux/hantro-media.h             |  19 +
>>   include/uapi/linux/v4l2-controls.h            | 436 +++++++++
>>   include/uapi/linux/videodev2.h                |  13 +
>>   22 files changed, 1686 insertions(+), 1169 deletions(-)
>>   delete mode 100644 include/media/hevc-ctrls.h
>>   create mode 100644 include/uapi/linux/hantro-media.h
>>
>> --
>> 2.32.0
>>
Benjamin Gaignard March 7, 2022, 8:49 a.m. UTC | #4
Le 04/03/2022 à 23:46, Adam Ford a écrit :
> On Fri, Mar 4, 2022 at 7:03 AM Benjamin Gaignard
> <benjamin.gaignard@collabora.com> wrote:
>>
>> Le 04/03/2022 à 13:59, Adam Ford a écrit :
>>> On Thu, Mar 3, 2022 at 4:13 AM Benjamin Gaignard
>>> <benjamin.gaignard@collabora.com> wrote:
>>>> Le 03/03/2022 à 02:23, Adam Ford a écrit :
>>>>> On Mon, Feb 28, 2022 at 4:13 AM Benjamin Gaignard
>>>>> <benjamin.gaignard@collabora.com> wrote:
>>>>>> Le 26/02/2022 à 23:25, Adam Ford a écrit :
>>>>>>> On Fri, Feb 25, 2022 at 4:41 PM Benjamin Gaignard
>>>>>>> <benjamin.gaignard@collabora.com> wrote:
>>>>>>>> This series aims to make HEVC uapi stable and usable for hardware
>>>>>>>> decoder. HEVC uapi is used by 2 mainlined drivers (Cedrus and Hantro)
>>>>>>>> and 2 out of the tree drivers (rkvdec and RPI).
>>>>>>>>
>>>>>>>> After the remarks done on version 2, I have completely reworked to patches
>>>>>>>> split so changelogs are meaningless. I have also drop "RFC" from the
>>>>>>>> titles.
>>>>>>>>
>>>>>>>> In this v3 I do all the changes (new controls, documentation, etc..)
>>>>>>>> in the staging directory before moving the HEVC uAPI to stable
>>>>>>>> steps by steps (unlike the big one patch in v2).
>>>>>>>>
>>>>>>>> At the end fluster tests results on IMX8MQ is 77/147 for HEVC codec.
>>>>>> I have push a branch here:
>>>>>> https://gitlab.collabora.com/benjamin.gaignard/for-upstream/-/commits/HEVC_UAPI_V4
>>>>>>
>>>>>> it is the incoming version 4 of this series + patches to enable G2 on my IMX8MQ
>>>>> Benjamin,
>>>>>
>>>>> I checked this repo out, and built it along with pulling the latest
>>>>> versions of G-streamer and fluster.
>>>>> When I check for v4l2 compatibility, I get the following:
>>>>>
>>>>>        GStreamer-H.264-V4L2-Gst1.0: GStreamer H.264 V4L2 decoder for
>>>>> GStreamer 1.0... ❌
>>>>>        GStreamer-H.264-V4L2SL-Gst1.0: GStreamer H.264 V4L2SL decoder for
>>>>> GStreamer 1.0... ✔️
>>>>>        GStreamer-AV1-V4L2SL-Gst1.0: GStreamer AV1 V4L2SL decoder for
>>>>> GStreamer 1.0... ❌
>>>>>        GStreamer-H.265-V4L2-Gst1.0: GStreamer H.265 V4L2 decoder for
>>>>> GStreamer 1.0... ❌
>>>>>        GStreamer-H.265-V4L2SL-Gst1.0: GStreamer H.265 V4L2SL decoder for
>>>>> GStreamer 1.0... ❌
>>>>>        GStreamer-VP8-V4L2-Gst1.0: GStreamer VP8 V4L2 decoder for GStreamer 1.0... ❌
>>>>>        GStreamer-VP8-V4L2SL-Gst1.0: GStreamer VP8 V4L2SL decoder for
>>>>> GStreamer 1.0... ✔️
>>>>>        GStreamer-VP9-V4L2SL-Gst1.0: GStreamer VP9 V4L2SL decoder for
>>>>> GStreamer 1.0... ✔️
>>>>>
>>>>> I see H,264, VP8 and VP9, but I would have also expected
>>>>> GStreamer-H.265-V4L2SL-Gst1.0 to return with a check box.
>>>>>
>>>>> When I checked to see if both decoders were being enumerated, I found they were.
>>>>> [gst-main] root@localhost:~/gstreamer/fluster# dmesg |grep -i hantro
>>>>> [   16.044243] hantro_vpu: module is from the staging directory, the
>>>>> quality is unknown, you have been warned.
>>>>> [   16.044243] hantro_vpu: module is from the staging directory, the
>>>>> quality is unknown, you have been warned.
>>>>> [   16.095661] hantro-vpu 38300000.video-codec: registered
>>>>> nxp,imx8mq-vpu-g1-dec as /dev/video0
>>>>> [   16.096782] hantro-vpu 38310000.video-codec: registered
>>>>> nxp,imx8mq-vpu-g2-dec as /dev/video1
>>>>>
>>>>> Did I do something wrong, or did I miss something?
>>>> Hi Adam,
>>>>
>>>> I guess it could be a misalignment between v4l2 kernel headers
>>>> and GStreamer v4l2 headers.
>>>> I have push a new version of the GST merge request which is aligned with
>>>> HEVC uAPI v4 proposal.
>>>>
>>>> When you inspect v4l2codecs gst plugin (gst-inspect-1.0 v4l2codecs) do
>>>> you see v4l2slh265dec plugin ?
>>>> I have fluster happy with it:
>>>> ./fluster.py list -c
>>> I pulled the latest from g-streamer's git repo again, and re-built.
>>> gst-instpect does not appear to show the h265 codec anymore.
>>>
>>> # gst-inspect-1.0 |grep v4l2codecs
>>> v4l2codecs:  v4l2slh264dec: V4L2 Stateless H.264 Video Decoder
>>> v4l2codecs:  v4l2slmpeg2dec: V4L2 Stateless Mpeg2 Video Decoder
>>> v4l2codecs:  v4l2slvp8alphadecodebin: VP8 Alpha Decoder
>>> v4l2codecs:  v4l2slvp8dec: V4L2 Stateless VP8 Video Decoder
>>> v4l2codecs:  v4l2slvp9alphadecodebin: VP9 Alpha Decoder
>>> v4l2codecs:  v4l2slvp9dec: V4L2 Stateless VP9 Video Decoder
>>>
>>> Is there a specific branch of g-streamer I should be using that can
>>> handle the newer API?
>> You can use this branch:
>>
>> https://gitlab.freedesktop.org/benjamin.gaignard1/gstreamer/-/tree/HEVC_aligned_with_kernel_5.15
>>
>> It is the one used to create the merge request for h265 plugin.
> I used the above gstreamer branch with
> https://gitlab.collabora.com/benjamin.gaignard/for-upstream/-/commits/HEVC_UAPI_V4
> for the kernel.
>
> I was able to confirm the gst-inspect showed the H265:
>
> [gst-HEAD] root@localhost:~/fluster# gst-inspect-1.0 |grep 265
> libav:  avdec_h265: libav HEVC (High Efficiency Video Coding) decoder
> rtp:  rtph265depay: RTP H265 depayloader
>
> rtp:  rtph265pay: RTP H265 payloader
> typefindfunctions: video/x-h265: h265, x265, 265
> v4l2codecs:  v4l2slh265dec: V4L2 Stateless H.265 Video Decoder
> videoparsersbad:  h265parse: H.265 parser
>
> Unfortunately, fluster doesn't appear to recognize it:
>
>      GStreamer-H.265-V4L2SL-Gst1.0: GStreamer H.265 V4L2SL decoder for
> GStreamer 1.0... ❌
>
> Attempting to run fluster with that decoder fail:
>
> # ./fluster.py run -d GStreamer-H.265-V4L2SL-Gst1.0 -j1
> Skipping decoder GStreamer-H.265-V4L2SL-Gst1.0 because it cannot be run
> [gst-HEAD] root@localhost:~/fluster#

Can you try with -vvv option in fluster command line ?

Does a manual gst pipeline with v4l2slh265dec works ?

Regards,
Benjamin

>
>
>
>
>
>
>
>> Benjamin
>>
>> adam
>>
>>>> H265
>>>>        ...
>>>>        GStreamer-H.265-V4L2-Gst1.0: GStreamer H.265 V4L2 decoder for GStreamer 1.0... ❌
>>>>        GStreamer-H.265-V4L2SL-Gst1.0: GStreamer H.265 V4L2SL decoder for GStreamer 1.0... ✔️
>>>>        GStreamer-H.265-VA-Gst1.0: GStreamer H.265 VA decoder for GStreamer 1.0... ❌
>>>>        GStreamer-H.265-VAAPI-Gst1.0: GStreamer H.265 VAAPI decoder for GStreamer 1.0... ❌
>>>>        JCT-VT-H.265: JCT-VT H.265/HEVC reference decoder... ❌
>>>>
>>>> I hope that will help you,
>>>>
>>>> Regards,
>>>> Benjamin
>>>>
>>>>> adam
>>>>>
>>>>>> Regards,
>>>>>> Benjamin
>>>>>>
>>>>>>> Benjamin,
>>>>>>>
>>>>>>> I have an imx8mm and imx8mq that I can test. Do you happen to have a
>>>>>>> repo that I can clone to test this?  The imx8m stuff is spread around
>>>>>>> between the media tree and the imx tree since it hasn't been fully
>>>>>>> merged yet.
>>>>>>>
>>>>>>> thanks,
>>>>>>>
>>>>>>> adam
>>>>>>>
>>>>>>>> Benjamin
>>>>>>>>
>>>>>>>> Benjamin Gaignard (11):
>>>>>>>>       media: uapi: HEVC: Add missing fields in HEVC controls
>>>>>>>>       media: uapi: HEVC: Rename HEVC stateless controls with STATELESS
>>>>>>>>         prefix
>>>>>>>>       media: uapi: HEVC: Add document uAPI structure
>>>>>>>>       media: uapi: HEVC: Define V4L2_CID_STATELESS_HEVC_SLICE_PARAMS as a
>>>>>>>>         dynamic array
>>>>>>>>       media: uapi: Move parsed HEVC pixel format out of staging
>>>>>>>>       media: uapi: Add V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSET control
>>>>>>>>       media: uapi: Move the HEVC stateless control type out of staging
>>>>>>>>       media: controls: Log HEVC stateless control in .std_log
>>>>>>>>       media: uapi: Create a dedicated header for Hantro control
>>>>>>>>       media: uapi: HEVC: fix padding in v4l2 control structures
>>>>>>>>       media: uapi: move HEVC stateless controls out of staging
>>>>>>>>
>>>>>>>> Hans Verkuil (3):
>>>>>>>>       videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY
>>>>>>>>       v4l2-ctrls: add support for dynamically allocated arrays.
>>>>>>>>       vivid: add dynamic array test control
>>>>>>>>
>>>>>>>>      .../userspace-api/media/drivers/hantro.rst    |   5 -
>>>>>>>>      .../media/v4l/ext-ctrls-codec-stateless.rst   | 831 ++++++++++++++++++
>>>>>>>>      .../media/v4l/ext-ctrls-codec.rst             | 780 ----------------
>>>>>>>>      .../media/v4l/pixfmt-compressed.rst           |   7 +-
>>>>>>>>      .../media/v4l/vidioc-g-ext-ctrls.rst          |  20 +
>>>>>>>>      .../media/v4l/vidioc-queryctrl.rst            |   8 +
>>>>>>>>      .../media/videodev2.h.rst.exceptions          |   5 +
>>>>>>>>      .../media/test-drivers/vivid/vivid-ctrls.c    |  15 +
>>>>>>>>      drivers/media/v4l2-core/v4l2-ctrls-api.c      | 103 ++-
>>>>>>>>      drivers/media/v4l2-core/v4l2-ctrls-core.c     | 198 ++++-
>>>>>>>>      drivers/media/v4l2-core/v4l2-ctrls-defs.c     |  32 +-
>>>>>>>>      drivers/media/v4l2-core/v4l2-ctrls-priv.h     |   3 +-
>>>>>>>>      drivers/media/v4l2-core/v4l2-ctrls-request.c  |  13 +-
>>>>>>>>      drivers/staging/media/hantro/hantro_drv.c     |  27 +-
>>>>>>>>      drivers/staging/media/hantro/hantro_hevc.c    |   8 +-
>>>>>>>>      drivers/staging/media/sunxi/cedrus/cedrus.c   |  24 +-
>>>>>>>>      .../staging/media/sunxi/cedrus/cedrus_dec.c   |  10 +-
>>>>>>>>      include/media/hevc-ctrls.h                    | 250 ------
>>>>>>>>      include/media/v4l2-ctrls.h                    |  48 +-
>>>>>>>>      include/uapi/linux/hantro-media.h             |  19 +
>>>>>>>>      include/uapi/linux/v4l2-controls.h            | 436 +++++++++
>>>>>>>>      include/uapi/linux/videodev2.h                |  13 +
>>>>>>>>      22 files changed, 1686 insertions(+), 1169 deletions(-)
>>>>>>>>      delete mode 100644 include/media/hevc-ctrls.h
>>>>>>>>      create mode 100644 include/uapi/linux/hantro-media.h
>>>>>>>>
>>>>>>>> --
>>>>>>>> 2.32.0
>>>>>>>>