mainline kernel hardware acceleration
#13
@termac from the mainline kernel thread
Quote:... i tried my hands on getting hardware decoding working, for that I added the rkvdec kernel patches from https://patchwork.kernel.org/project/lin...ter=179601 and patched libva and libva-v4l2-request as per Your instructions in the other thread. vainfo still would only show support for MPEG2. At that point I did give up. So now it is either waiting for full mainline support or have enough time and motivation to figure out where I went wrong.
vainfo will display a single media decoder module, and it defaults to /dev/video0 or whatever you have set as LIBVA_V4L2_REQUEST_VIDEO_PATH (see first few posts). since rk3399 has two (hantro and rkvdec) you need to select them with vainfo separately. with mpeg2 you are seeing hantro. check devices with v4l2-ctl --list-devices. check each device with v4l2-ctl -d /dev/video# --all.

it's notable that ffmpeg currently doesn't list the v4l2request hwaccel decoders in runtime ((ffmpeg -decoders|grep v4l2), but does list v4l2request codecs as detected during build.

it's also notable that these patches handle drm hwaccel because that is what LibreElec uses for kodi.

kernel patch info:

Kwiboo's LibreElec Rockchip 5.6 patches and pull request:
https://github.com/Kwiboo/LibreELEC.tv/t...ux/default
https://github.com/LibreELEC/LibreELEC.tv/pull/4377

Kwiboo hevc kernel repo branch:
https://github.com/Kwiboo/linux-rockchip...ist-v5.6.6
https://github.com/Kwiboo/linux-rockchip...5.6.6-hevc
make a diff of these two above repositories (exclude=.git exclude=sunxi)

Kwiboo's ffmpeg branch supporting rkvdec:
https://github.com/Kwiboo/FFmpeg/tree/v4...2.2-rkvdec
build: ./configure --prefix=/usr/local --libdir=/usr/local/lib/aarch64-linux-gnu --shlibdir=/usr/local/lib/aarch64-linux-gnu --enable-shared --enable-pic --enable-v4l2-request --enable-libdrm --enable-libudev && make -j6 && sudo make install

pbp linux 5.7-rc5 hwaccel patch sequence:
tsys 5.7.0-rc2 branch
5.7.0-rc3 incremental patch
5.7.0-rc4 incremental patch
5.7.0-rc5 incremental patch
LibreElec 002, 0012, 0013, 0021, 0022, 1000 patches
Kwiboo hevc patch


Messages In This Thread
RE: mainline kernel hardware acceleration - by xmixahlx - 05-16-2020, 06:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to mainline kernel on daniel thompson's debian installer? hellojack 14 7,363 09-07-2023, 09:38 PM
Last Post: Der Geist der Maschine
  kernel module that supports usb-c hdmi alexandre 16 14,539 05-14-2023, 09:58 PM
Last Post: rathofkhan3
  Manjaro update broke hardware video acceleration with mpv myself600 2 1,341 01-25-2023, 09:12 AM
Last Post: myself600
Question Debian (Vanilla) no output on display after Kernel update (6.0.8-1) as365n4 1 1,272 12-09-2022, 12:43 PM
Last Post: as365n4
  bootloader menu to pick a kernel - what is the current situation in in early 2022? maxtothemax 4 3,130 02-05-2022, 03:04 PM
Last Post: maxtothemax
  Kernel panics solostian 17 14,163 01-26-2022, 08:08 AM
Last Post: TRS-80
  Kernel 5.17 will improve VP9 support? jiyong 1 2,119 01-16-2022, 08:26 PM
Last Post: xmixahlx
  red/green power led not working with kernel 5.14 alchemist 4 3,773 11-04-2021, 04:09 AM
Last Post: alchemist
  Very slow glamor 2D acceleration hjalfi 3 4,056 09-06-2021, 12:54 PM
Last Post: jbrock
  Sound stuttering on Manjaro gnome after latest kernel upgrade? pjsf 0 1,784 07-13-2021, 10:37 PM
Last Post: pjsf

Forum Jump:


Users browsing this thread: 1 Guest(s)