v19 hevc hardware decode on kodi-gbm via kernel drm v4l2 on raspberrypi 3
#1
Hi folks,
I have started a migration project for my raspberry pi 3B, which was using hevc hw decode via mmal libraries on 5.4.x kernel before when compiled through the popcornmix newclock5 branch.

Now I have switched to kernel 5.10.y, compiled the vc4 kernel driver, added support for DRM, enabled udmabufs, dma_heaps, v4l2_mem2mem, rpivid_hevc, etc.
My config.txt uses: 
dtoverlay=vc4-fkms-v3d,cma-size=0x14000000
dtoverlay=rpivid-v4l2

I have switched to the popcornmix GBM branch, so kodi is compiled for GLES and GBM windowing with internal ffmpeg (thus patched).
mesa is compiled to support vc4 videoCore only (do I also need v3d which is for rpi4?)
libdrm is compiled for vc4 and libkms

Kodi is setup to use pixel format  drm_prime and v4l2 hevc hw decode. However for some reason, it does not pickup the hevc streams for hw decode and it uses software rendering:
bash:
CDVDVideoCodecDRMPRIME::Open - using decoder HEVC (High Efficiency Video Coding)

h264 streams are being successfully decoded through hw decode: ffh264_v4l2m2m-drm_prime(HW):
bash:
CDVDVideoCodecDRMPRIME::Open - using decoder V4L2 mem2mem H.264 decoder wrapper

Is it possible to hevc hw decode through DRM via v4l2 on raspberry pi 3? It works fine on raspberry pi 4.

Kodi log: https://kichukov.home.xs4all.nl/bug-repo...l/kodi.log
Reply
#2
(2021-02-13, 12:31)nkichukov Wrote: Is it possible to hevc hw decode through DRM via v4l2 on raspberry pi 3? It works fine on raspberry pi 4.

Only RPi 4B/400 can use HW decoding for both x265 (HEVC) and h264 files. RPi3 series and RPi2 series can only use HW decoding for h264 files in my experience.  See this thread.
Need help programming a Streamzap remote?
Reply
#3
RPi3 doesn't have a HW decoder for HEVC
"PPC is too slow, your CPU has no balls to handle HD content." ~ Davilla
"Maybe it's a toaster. Who knows, but it has nothing to do with us." ~ Ned Scott
Reply
#4
(2021-02-13, 12:31)nkichukov Wrote: Is it possible to hevc hw decode through DRM via v4l2 on raspberry pi 3? It works fine on raspberry pi 4.
No.  Upgrade to a RasPi4 if you want/need HEVC HW decoding - it works brilliantly on mine.
Hardware has its limits.  you have found those for the RasPi3.
Reply
#5
Perhaps HEVC HW decode that everybody took literally was misleading. I am asking if it is possible to get the same support for hevc decode as with 'newclock5' from @popcornmix repo, which allows me to playback just fine 720p@50fps streams with extremely low CPU load and no lag/video delay.

I thought the gbm branch that removed the platform specifics would still avail the same ffmpeg hevc gpu hw acceleration.
Reply
#6
again: pi3 does not have hardware acceleration for hevc. You can still decode it in software, so 720p should be fine
Reply
#7
This post over on the LE forums gives a pretty good idea on the status of GPU accelerated HEVC on earlier Pi’s.
Reply
#8
(2021-02-13, 23:20)PANiCnz Wrote: This post over on the LE forums gives a pretty good idea on the status of GPU accelerated HEVC on earlier Pi’s.

Thanks PANiCnz, this answers it.
I will be switching back to the rbpi platform then and eventually retry v4l again in the future.
Reply

Logout Mark Read Team Forum Stats Members Help
hevc hardware decode on kodi-gbm via kernel drm v4l2 on raspberrypi 30