Pi3B+ LibreELEC 10.0.2 - terrible HEVC performance.

  • Hi,

    I just upgraded the pi3B+ to LibreELEC 10.0.2 (LibreELEC-RPi2.arm-10.0.2.img.gz) to test it out Kodi v19.x and notice the HEVC performance is really bad.

    I noticed that the "Allow Hardware acceleration - MMAL" is no longer there and is replaced with DRM Prime.

    When DRM Prime enabled (by default) it is terrible and cannot play any HEVC files.
    Tested on 720p 10bit HEVC

    Kodi settings

    Allow using DRM PRIME decoder = ON

    Allow hardware acceleration using DRM PRIME prime = ON

    =there is audio but no video, just shows GUI with loading icon

    Allow using DRM PRIME decoder = ON

    Allow hardware acceleration using DRM PRIME prime = OFF

    =there is audio but no video, just shows GUI with loading icon

    Allow using DRM PRIME decoder = OFF

    Allow hardware acceleration using DRM PRIME prime = OFF

    -720p 10 bit HEVC playable but has lots of drop frames, so not great to watch since it video playback is not smooth.

    Skipping forward/back is really glitchy.

    -720p HEVC seems to play video without issue.

    -1080p 10bit HDR not playable due to extreme laggyness/slowness and probably lots of drop frames..

    Previously on Kodi V18.9 (LibreELEC-RPi2.arm-9.2.8.img.gz)

    I was able to play HEVC 720 10bit and 1080p 10bit HDR smoothly (no video or audio issues).

    I have reverted back to 9.2.8 because there is no benefit and a lot of negatives when upgrading to 10.0.2

    Questions

    What is the purpose of putting out a 10.02 image for pi3b+ if the performance is worse than previous 9.2.8?

    -HEVC 720 10bit and 1080p 10bit HDR is now no longer watchable...

    Why was MMAL removed and replace with DRM PRIME (enabled by default) which is useless on the Pi3B+?

    Will DRM PRIME ever get proper HEVC hardware acceleration as good as MMAL and how long we can expect to wait for proper support?

    -At this stage DRM PRIME is just terrible and has no benefit for HEVC decoding, and it actually makes HEVC decoding worse.

  • What is the purpose of putting out a 10.02 image for pi3b+ if the performance is worse than previous 9.2.8?

    -HEVC 720 10bit and 1080p 10bit HDR is now no longer watchable...

    Why was MMAL removed and replace with DRM PRIME (enabled by default) which is useless on the Pi3B+?

    Will DRM PRIME ever get proper HEVC hardware acceleration as good as MMAL and how long we can expect to wait for proper support?

    -At this stage DRM PRIME is just terrible and has no benefit for HEVC decoding, and it actually makes HEVC decoding worse.

    The purpose of releasing is so that users who need to run Matrix (and in the near-ish future, Nexus) can update their devices. For users with older RPi hardware it's a mixed bag because the upstream switch to a common GBM/V4L2 video pipeline (standardisation) means there is no longer any support for the older OMX/MMAL decoders. They were removed (along with iMX6 and Amcodec) to reduce the code spaghetti that had made Kodi increasingly impossible to maintain (fix something for one and you break something elsewhere): we did table-napkin maths at Kodi DevCon and estimated 38 decoding path combinations are reduced to 6 paths and with more work can reach 4 in the future. When it is used used with appropriate hardware, DRMPRIME is great. For example: For hardware with appropriate kernel drivers Kodi now supports HDR properly with 8/10/12 bit output - HDR support on RPi4 is now awesome (the comparison with LE 9.2 is night/day).

    The software optimisation done for HEVC under the older proprietary decoders was extremely clever, but also a huge hack, and requires a substantial 50,000 lines-of-code patch to ffmpeg that would never, ever, be upstreamable. In the mid-term future we will be running ffmpeg with upstream only code and no meaningful patches. That makes distro maintenance a lot easier, not just for LE, and means RPi hardware will start working the same on all distro's and not just the limited few dumb enough to allow 50,000 LOC patches in their codebases.

    There is no plan to redo the huge invasive code hack for older RPi hardware because (as before) it would never be upstreamable. After 10-years of hoarding custom patches in their own Linux fork the RPi Foundation has learned the cost of downstream development and the value of upstreaming. LE and Team Kodi have been one of the catalysts for change in their approach. We're proud of that, and we've been thanked for pushing them into making the changes, because standardising and upstreaming is benefitting their business model.

    So .. as has been published multiple times; you are welcome to continue using LE9.2 if you depend on HEVC support.